|
|
@@ -2,6 +2,7 @@ package org.jeecg.modules.smscheck.controller;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
@@ -38,6 +39,8 @@ public class SmsTruckCustomerDataController extends JeecgController<SmsTruckCus
|
|
|
@Autowired
|
|
|
private ISmsCheckCustomerInfoService infoService;
|
|
|
@Autowired
|
|
|
+ private ISmsCheckTaskService iSmsCheckTaskService;
|
|
|
+ @Autowired
|
|
|
private ISmsTrcukCustomerDataLogBillServiceImpl iSmsTrcukCustomerDataLogBillService;
|
|
|
@Autowired
|
|
|
private SmsCheckZGHistoryService smsCheckZGHistoryService;
|
|
|
@@ -159,7 +162,22 @@ public class SmsTruckCustomerDataController extends JeecgController<SmsTruckCus
|
|
|
}
|
|
|
return Result.OK("查询完成", data);
|
|
|
}
|
|
|
+ @AutoLog(value = "查询任务类型")
|
|
|
+ @ApiOperation(value = "查询任务类型", notes = "查询任务类型")
|
|
|
+ @GetMapping(value = "/query/getTaskType")
|
|
|
+ public Result<SmsCheckTask> getTaskType(@RequestParam(name = "id") String id) {
|
|
|
|
|
|
+ if (StringUtils.isEmpty(id)) {
|
|
|
+ return Result.error("id为空");
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<SmsCheckTask> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapperData.eq(SmsCheckTask::getId, id);
|
|
|
+ SmsCheckTask data = iSmsCheckTaskService.getOne(queryWrapperData);
|
|
|
+ if (data == null) {
|
|
|
+ return Result.error("未找到对应数据");
|
|
|
+ }
|
|
|
+ return Result.OK("查询完成", data);
|
|
|
+ }
|
|
|
@AutoLog(value = "客户资料Log-添加")
|
|
|
@ApiOperation(value = "客户资料Log-添加", notes = "客户资料Log-添加")
|
|
|
@PostMapping(value = "/addLog")
|
|
|
@@ -227,9 +245,10 @@ public class SmsTruckCustomerDataController extends JeecgController<SmsTruckCus
|
|
|
|
|
|
boolean saveData = smsTruckCustomerDataService.saveOrUpdate(truckCustomerData);
|
|
|
|
|
|
+ List<StepsNowVo> strings = JSONArray.parseArray(smsTruckCheckCustomerDataAndLog.getStepsNow(), StepsNowVo.class);
|
|
|
|
|
|
if (saveLog && saveData){
|
|
|
- Map<String, String> mapByResult = getMapByResult(truckCheckLog);
|
|
|
+ Map<String, String> mapByResult = getMapByResult(truckCheckLog,strings);
|
|
|
// 修改客户状态为 未完善/未上传
|
|
|
SmsCheckCustomerInfo smsCheckCustomerInfo = new SmsCheckCustomerInfo();
|
|
|
/** 稽核状态 0:未处理;1:未完善;2:待稽核;3:已整改;4:待整改;5:稽核通过; */
|
|
|
@@ -250,60 +269,99 @@ public class SmsTruckCustomerDataController extends JeecgController<SmsTruckCus
|
|
|
}
|
|
|
return Result.error("新增失败");
|
|
|
}
|
|
|
- private Map<String,String>getMapByResult(SmcTruckCheckLog smsCheckCustomerDataLog){
|
|
|
+ private Map<String,String>getMapByResult(SmcTruckCheckLog smsCheckCustomerDataLog,List<StepsNowVo>string){
|
|
|
HashMap <String,String> map =new HashMap<>();
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getApplySignResult() ) && !smsCheckCustomerDataLog.getApplySignResult().equals("1")){
|
|
|
- map.put("applySignResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getInfoResult() ) && !smsCheckCustomerDataLog.getInfoResult().equals("1")){
|
|
|
- map.put("infoResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getThreePhotosResult() ) && !smsCheckCustomerDataLog.getThreePhotosResult().equals("1")){
|
|
|
- map.put("getThreePhotosResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getCommitmentBookResult() ) && !smsCheckCustomerDataLog.getCommitmentBookResult().equals("1")){
|
|
|
- map.put("getCommitmentBookResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getIsPriceApprovalResult() ) && !smsCheckCustomerDataLog.getIsPriceApprovalResult().equals("1")){
|
|
|
- map.put("getIsPriceApprovalResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getLegalIdCardResult() ) && !smsCheckCustomerDataLog.getLegalIdCardResult().equals("1")){
|
|
|
- map.put("getLegalIdCardResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getOperatorIdCardResult() ) && !smsCheckCustomerDataLog.getOperatorIdCardResult().equals("1")){
|
|
|
- map.put("getOperatorIdCardResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAuthorizeBookResult() ) && !smsCheckCustomerDataLog.getAuthorizeBookResult().equals("1")){
|
|
|
- map.put("getAuthorizeBookResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getZZBusinessLicenseResult() ) && !smsCheckCustomerDataLog.getZZBusinessLicenseResult().equals("1")){
|
|
|
- map.put("getZZBusinessLicenseResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getCenterBusinessResult() ) && !smsCheckCustomerDataLog.getCenterBusinessResult().equals("1")){
|
|
|
- map.put("getCenterBusinessResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getContractOrProveResult() ) && !smsCheckCustomerDataLog.getContractOrProveResult().equals("1")){
|
|
|
- map.put("getContractOrProveResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getRiskTableResult() ) && !smsCheckCustomerDataLog.getRiskTableResult().equals("1")){
|
|
|
- map.put("getRiskTableResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getTrunkTableResult() ) && !smsCheckCustomerDataLog.getTrunkTableResult().equals("1")){
|
|
|
- map.put("getTrunkTableResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getTrunkContractResult() ) && !smsCheckCustomerDataLog.getTrunkContractResult().equals("1")){
|
|
|
- map.put("getTrunkContractResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessPhoneResult() ) && !smsCheckCustomerDataLog.getAccessPhoneResult().equals("1")){
|
|
|
- map.put("getRiskTableResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessPhotoResult() ) && !smsCheckCustomerDataLog.getAccessPhotoResult().equals("1")){
|
|
|
- map.put("getTrunkTableResult","未通过");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessTableResult() ) && !smsCheckCustomerDataLog.getAccessTableResult().equals("1")){
|
|
|
- map.put("getTrunkContractResult","未通过");
|
|
|
+ for (StepsNowVo stepsNowVo : string) {
|
|
|
+
|
|
|
+ if (stepsNowVo.getId().equals("legalIdCard")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getLegalIdCardResult() ) && !smsCheckCustomerDataLog.getLegalIdCardResult().equals("1")){
|
|
|
+ map.put("getLegalIdCardResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("isPriceApproval")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getIsPriceApprovalResult() ) && !smsCheckCustomerDataLog.getIsPriceApprovalResult().equals("1")){
|
|
|
+ map.put("getIsPriceApprovalResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("commitmentBook")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getCommitmentBookResult() ) && !smsCheckCustomerDataLog.getCommitmentBookResult().equals("1")){
|
|
|
+ map.put("getCommitmentBookResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("threePhotos")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getThreePhotosResult() ) && !smsCheckCustomerDataLog.getThreePhotosResult().equals("1")){
|
|
|
+ map.put("getThreePhotosResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getInfoResult() ) && !smsCheckCustomerDataLog.getInfoResult().equals("1")){
|
|
|
+ map.put("infoResult","未通过");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (stepsNowVo.getId().equals("applySign")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getApplySignResult() ) && !smsCheckCustomerDataLog.getApplySignResult().equals("1")){
|
|
|
+ map.put("applySignResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (stepsNowVo.getId().equals("contractOrProve")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getContractOrProveResult() ) && !smsCheckCustomerDataLog.getContractOrProveResult().equals("1")){
|
|
|
+ map.put("getContractOrProveResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("centerBusiness")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getCenterBusinessResult() ) && !smsCheckCustomerDataLog.getCenterBusinessResult().equals("1")){
|
|
|
+ map.put("getCenterBusinessResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("zZBusinessLicense")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getZZBusinessLicenseResult() ) && !smsCheckCustomerDataLog.getZZBusinessLicenseResult().equals("1")){
|
|
|
+ map.put("getZZBusinessLicenseResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("authorizeBook")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAuthorizeBookResult() ) && !smsCheckCustomerDataLog.getAuthorizeBookResult().equals("1")){
|
|
|
+ map.put("getAuthorizeBookResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("operatorIdCard")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getOperatorIdCardResult() ) && !smsCheckCustomerDataLog.getOperatorIdCardResult().equals("1")){
|
|
|
+ map.put("getOperatorIdCardResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("accessPhoto")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessPhotoResult() ) && !smsCheckCustomerDataLog.getAccessPhotoResult().equals("1")){
|
|
|
+ map.put("getTrunkTableResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("accessTable")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessTableResult() ) && !smsCheckCustomerDataLog.getAccessTableResult().equals("1")){
|
|
|
+ map.put("getTrunkContractResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("accessPhone")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getAccessPhoneResult() ) && !smsCheckCustomerDataLog.getAccessPhoneResult().equals("1")){
|
|
|
+ map.put("getRiskTableResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("trunkContract")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getTrunkContractResult() ) && !smsCheckCustomerDataLog.getTrunkContractResult().equals("1")){
|
|
|
+ map.put("getTrunkContractResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("trunkTable")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getTrunkTableResult() ) && !smsCheckCustomerDataLog.getTrunkTableResult().equals("1")){
|
|
|
+ map.put("getTrunkTableResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stepsNowVo.getId().equals("riskTable")){
|
|
|
+ if (StringUtils.isNotBlank(smsCheckCustomerDataLog.getRiskTableResult() ) && !smsCheckCustomerDataLog.getRiskTableResult().equals("1")){
|
|
|
+ map.put("getRiskTableResult","未通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
return map;
|
|
|
}
|
|
|
@AutoLog(value = "客户资料-添加-暂存")
|