Commit 7756b2aa authored by hanfeng's avatar hanfeng

Merge branch 'master-modify-background-bug-hf' into dev

# Conflicts:
#	xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
#	xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
parents 51cd4ecb 3cb7d75c
......@@ -108,17 +108,18 @@ public class BackStageOrderController extends CommonBaseController implements Us
@IgnoreClientToken
@CrossOrigin
public ObjectRestResponse<PageDataVO<OrderListVo>> selectByUser(BaseOrderController.QueryOrderList dto) {
if (dto.getStartTime() != null) {
if (dto.getEndTime() == null) {
dto.setEndTime(new Date().getTime());
}
UserDTO userDTO = getAdminUserInfo();
if (userDTO == null) {
return ObjectRestResponse.succ(new PageDataVO<>());
}
//车辆排班表查询订单详情
if (dto.getOneNo()!=null) {
dto.setPage(1);
dto.setLimit(1);
dto.setType(1);
}
if (StringUtils.isNotBlank(dto.getPhone()) || StringUtils.isNotBlank(dto.getRealName())) {
List<AppUserLogin> appUserLoins = userFeign.getOne(dto.getPhone(), dto.getRealName());
if (CollectionUtil.isNotEmpty(appUserLoins)) {
......@@ -128,19 +129,11 @@ public class BackStageOrderController extends CommonBaseController implements Us
return ObjectRestResponse.succ(new PageDataVO<>());
}
}
UserDTO userDTO = getAdminUserInfo();
if (userDTO == null) {
return ObjectRestResponse.succ(new PageDataVO<>());
}
//权限
if (userDTO.getDataAll()!=1&&dto.getType() != null && dto.getType() != 3) {
//获取权限公司列表
List<BranchCompany> branchCompanies = vehicleFeign.companyAll(userDTO.getDataAll(), userDTO.getDataCompany(), userDTO.getDataZone());
List<Integer> companyIds = branchCompanies.stream().map(BranchCompany::getId).collect(Collectors.toList());
dto.setCompanyIds(companyIds);
}
//大区查询
List<Integer> companyId = branchCompanies.stream().map(BranchCompany::getId).collect(Collectors.toList());
dto.setCompanyIds(companyId);
//大区搜索
if (dto.getZoneId() != null) {
if (userDTO.getDataAll() != 1 && !dto.getZoneId().equals(userDTO.getZoneId())) {
return ObjectRestResponse.succ(new PageDataVO<>());
......@@ -167,11 +160,11 @@ public class BackStageOrderController extends CommonBaseController implements Us
dto.setVehicleIds(vehicleIds);
}
//
// if (dto.getStartTime() != null) {
// if (dto.getEndTime() == null) {
// dto.setEndTime(new Date().getTime());
// }
// }
if (dto.getStartTime() != null) {
if (dto.getEndTime() == null) {
dto.setEndTime(new Date().getTime());
}
}
Query query = new Query(dto);
PageDataVO pageDataVO = PageDataVO.pageInfo(query, () -> baseOrderBiz.listOrder(query.getSuper()));
......@@ -457,7 +450,6 @@ public class BackStageOrderController extends CommonBaseController implements Us
return backgroundBaseOrderBiz.getAllOrderList(dto);
}
@Data
public static class ChangeVehicleDTO {
String no;
......
......@@ -47,6 +47,8 @@ import java.util.*;
@Service
@Slf4j
public class CertificationService {
@Value("${certification.frequency:2}")
private Integer FREQUENCY;
@Autowired
private UserAuthentication authentication;
......@@ -106,13 +108,13 @@ public class CertificationService {
if (idInformation.getIdNumber().equals(number)) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "证件号不一致");
}
//判断是否超过认证次数
Example exa = new Example(IdInformation.class);
exa.createCriteria().andEqualTo("idNumber", number);
List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa);
if (CollectionUtil.isNotEmpty(idInformatics)) {
log.error("该身份证已存在,不要重复认证");
log.info("图片已解析,未认证");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该身份证已存在,不要重复认证");
if (CollectionUtils.isNotEmpty(idInformatics) && idInformatics.size() > FREQUENCY) {
log.error("该身份证已超过最大认证次数");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该身份证已超过最大认证次数");
}
//3.验证
boolean result = authentication.certificate(new UserMessage() {{
......@@ -180,8 +182,8 @@ public class CertificationService {
return ObjectRestResponse.succ(idInformation.getId());
} catch (Exception e) {
log.error(e.getMessage(), e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "认证失败,请重新认证");
TransactionAspectSupport.currentTransactionStatus();
return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "无法识别,请重新上传");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment