|
|
@@ -1,6 +1,10 @@
|
|
|
package org.jeecg.modules.smscheck.controller;
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.lang.Dict;
|
|
|
+import cn.hutool.core.lang.Tuple;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@@ -13,16 +17,21 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
+import org.jeecg.common.system.api.ISysBaseAPI;
|
|
|
+import org.jeecg.common.system.vo.DictModel;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.common.util.MinioUtil;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.config.shiro.ShiroRealm;
|
|
|
import org.jeecg.modules.smscheck.configs.CheckStateCode;
|
|
|
import org.jeecg.modules.smscheck.entity.*;
|
|
|
-import org.jeecg.modules.smscheck.service.ISmsCheckCustomerInfoService;
|
|
|
-import org.jeecg.modules.smscheck.service.ISmsCheckTaskService;
|
|
|
-import org.jeecg.modules.smscheck.service.SpecialExaminationService;
|
|
|
+import org.jeecg.modules.smscheck.service.*;
|
|
|
+import org.jeecg.modules.smscheck.vo.SmsCheckCustomerInfoVo;
|
|
|
+import org.jeecg.modules.smscheck.vo.SpecialExaminationCustomerVo;
|
|
|
+import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
+import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
@@ -30,6 +39,9 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.lang.reflect.Field;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Api(tags = "特审复开审批")
|
|
|
@@ -41,22 +53,35 @@ public class SpecialExaminationContrller {
|
|
|
@Resource
|
|
|
private SpecialExaminationService specialExaminationService;
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
|
- private ShiroRealm shiroRealm;
|
|
|
+ private ISmsCheckCustomerInfoService customerInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISmsCheckTaskService taskService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 特审复开审批稽核业务
|
|
|
+ */
|
|
|
+ @Autowired
|
|
|
+ private SmcSpecialCheckLogService smcSpecialCheckLogService;
|
|
|
/**
|
|
|
* 客户信息业务
|
|
|
*/
|
|
|
@Autowired
|
|
|
private ISmsCheckCustomerInfoService infoService;
|
|
|
+ /**
|
|
|
+ * 底层共通业务API,提供其他独立模块调用
|
|
|
+ */
|
|
|
+ @Autowired
|
|
|
+ private ISysBaseAPI sysBaseApi;
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "客户资料-信息查询查询", notes = "客户资料-个人列表查询")
|
|
|
@PostMapping(value = "/find/user/id")
|
|
|
- public Result<?> findUserId(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> findUserId(@RequestBody SpecialExamination specialExamination) {
|
|
|
String infoId = specialExamination.getInfoId();
|
|
|
- if(StrUtil.isBlank(infoId)){
|
|
|
+ if (StrUtil.isBlank(infoId)) {
|
|
|
return Result.error("查询失败");
|
|
|
}
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
@@ -66,25 +91,22 @@ public class SpecialExaminationContrller {
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/find/id")
|
|
|
- public Result<?> findId(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> findId(@RequestBody SpecialExamination specialExamination) {
|
|
|
String infoId = specialExamination.getInfoId();
|
|
|
- if(StrUtil.isBlank(infoId)){
|
|
|
+ if (StrUtil.isBlank(infoId)) {
|
|
|
return Result.error("查询失败");
|
|
|
}
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
queryWrapperData.eq(SpecialExamination::getInfoId, specialExamination.getInfoId());
|
|
|
- SpecialExamination byId = specialExaminationService.getOne(queryWrapperData);
|
|
|
+ SpecialExamination byId = specialExaminationService.getOne(queryWrapperData, false);
|
|
|
return Result.ok(byId);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
|
|
|
@PostMapping(value = "/remove/user/id")
|
|
|
- public Result<?> removeId(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> removeId(@RequestBody SpecialExamination specialExamination) {
|
|
|
String id = specialExamination.getId();
|
|
|
- if(StrUtil.isBlank(id)){
|
|
|
+ if (StrUtil.isBlank(id)) {
|
|
|
return Result.error("删除失败");
|
|
|
}
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
@@ -92,20 +114,19 @@ public class SpecialExaminationContrller {
|
|
|
String staffNo = byId.getStaffNo();
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
String workNo = sysUser.getWorkNo();
|
|
|
- if (StrUtil.isNotBlank(staffNo) && workNo.equals(staffNo)){
|
|
|
+ if (StrUtil.isNotBlank(staffNo) && workNo.equals(staffNo)) {
|
|
|
specialExaminationService.removeById(byId.getId());
|
|
|
return Result.ok("删除成功");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
return Result.error("删除失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
|
|
|
@PostMapping(value = "/remove")
|
|
|
- public Result<?> remove(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> remove(@RequestBody SpecialExamination specialExamination) {
|
|
|
String id = specialExamination.getId();
|
|
|
- if(StrUtil.isBlank(id)){
|
|
|
+ if (StrUtil.isBlank(id)) {
|
|
|
return Result.error("删除失败");
|
|
|
}
|
|
|
specialExaminationService.removeById(id);
|
|
|
@@ -115,14 +136,14 @@ public class SpecialExaminationContrller {
|
|
|
@ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
|
|
|
@GetMapping(value = "/list/page")
|
|
|
public Result<IPage<SpecialExamination>> queryList(SpecialExamination specialExamination,
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
|
|
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
|
|
|
) {
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
- queryWrapperData.eq(specialExamination.getStatus() != null,SpecialExamination::getStatus, specialExamination.getStatus());
|
|
|
- queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()),SpecialExamination::getCustomerName, specialExamination.getCustomerName());
|
|
|
- queryWrapperData.eq(SpecialExamination::getStaffNo,sysUser.getWorkNo());
|
|
|
+ queryWrapperData.eq(specialExamination.getStatus() != null, SpecialExamination::getStatus, specialExamination.getStatus());
|
|
|
+ queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()), SpecialExamination::getCustomerName, specialExamination.getCustomerName());
|
|
|
+ queryWrapperData.eq(SpecialExamination::getStaffNo, sysUser.getWorkNo());
|
|
|
queryWrapperData.orderByDesc(SpecialExamination::getCreateTime);
|
|
|
Page<SpecialExamination> page = new Page<>(pageNo, pageSize);
|
|
|
IPage<SpecialExamination> pageList = specialExaminationService.page(page, queryWrapperData);
|
|
|
@@ -137,15 +158,14 @@ public class SpecialExaminationContrller {
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
|
|
|
) {
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
- queryWrapperData.eq(specialExamination.getStatus() != null,SpecialExamination::getStatus, specialExamination.getStatus());
|
|
|
- queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()),SpecialExamination::getCustomerName, specialExamination.getCustomerName());
|
|
|
+ queryWrapperData.eq(specialExamination.getStatus() != null, SpecialExamination::getStatus, specialExamination.getStatus());
|
|
|
+ queryWrapperData.like(StrUtil.isNotBlank(specialExamination.getCustomerName()), SpecialExamination::getCustomerName, specialExamination.getCustomerName());
|
|
|
queryWrapperData.orderByDesc(SpecialExamination::getCreateTime);
|
|
|
Page<SpecialExamination> page = new Page<>(pageNo, pageSize);
|
|
|
IPage<SpecialExamination> pageList = specialExaminationService.page(page, queryWrapperData);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@AutoLog(value = "特审复开审批号-添加")
|
|
|
@ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
|
|
|
@PostMapping(value = "/upload/files")
|
|
|
@@ -195,6 +215,7 @@ public class SpecialExaminationContrller {
|
|
|
//申请复开原因
|
|
|
String reasonReopening = request.getParameter("reasonReopening");
|
|
|
|
|
|
+
|
|
|
String filePathIdCard = null;
|
|
|
List<MultipartFile> fileListIdCard = multipartRequest.getFiles("fileListIdCard");
|
|
|
for (MultipartFile file : fileListIdCard) {
|
|
|
@@ -287,6 +308,26 @@ public class SpecialExaminationContrller {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ MultipartFile specialReviewForm = multipartRequest.getFile("specialReviewForm");
|
|
|
+ String filePathSpecialReviewForm = null;
|
|
|
+ if (specialReviewForm != null) {
|
|
|
+ filePathSpecialReviewForm = MinioUtil.upload(specialReviewForm, bizPath);
|
|
|
+ if (oConvertUtils.isEmpty(filePathSpecialReviewForm)) {
|
|
|
+ return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ MultipartFile nameFindCompliance = multipartRequest.getFile("nameFindCompliance");
|
|
|
+ String filePathNameFindCompliance = null;
|
|
|
+ if (nameFindCompliance != null) {
|
|
|
+ filePathNameFindCompliance = MinioUtil.upload(nameFindCompliance, bizPath);
|
|
|
+ if (oConvertUtils.isEmpty(filePathNameFindCompliance)) {
|
|
|
+ return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //系统实名制备注信息
|
|
|
+ String nameFindComplianceRemark = request.getParameter("nameFindComplianceRemark");
|
|
|
+
|
|
|
SpecialExamination specialExamination = new SpecialExamination();
|
|
|
specialExamination.setInfoId(infoId);
|
|
|
specialExamination.setShutdownLabel(shutdownLabelInt);
|
|
|
@@ -306,15 +347,26 @@ public class SpecialExaminationContrller {
|
|
|
specialExamination.setUserCertificate(filePathUserCertificate);
|
|
|
specialExamination.setConsumptionVoucher(filePathVoucher);
|
|
|
specialExamination.setCommitmentVideo(filePathVideo);
|
|
|
+ specialExamination.setNameFindCompliance(filePathNameFindCompliance);
|
|
|
+ specialExamination.setSpecialReviewForm(filePathSpecialReviewForm);
|
|
|
+ //系统实名制备注信息
|
|
|
+ specialExamination.setNameFindComplianceRemark(nameFindComplianceRemark);
|
|
|
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
specialExamination.setCreateUser(sysUser.getUsername());
|
|
|
specialExamination.setStaffNo(sysUser.getWorkNo());
|
|
|
|
|
|
specialExamination.setStatus(0);
|
|
|
- boolean save = specialExaminationService.save(specialExamination);
|
|
|
- if (!save) {
|
|
|
- Result.error("申请失败");
|
|
|
+
|
|
|
+ LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapperData.eq(SpecialExamination::getInfoId, infoId);
|
|
|
+
|
|
|
+ List<SpecialExamination> list = specialExaminationService.list(queryWrapperData);
|
|
|
+ if (list.size() == 0) {
|
|
|
+ specialExaminationService.save(specialExamination);
|
|
|
+ } else {
|
|
|
+ specialExamination.setId(list.get(0).getId());
|
|
|
+ specialExaminationService.updateById(specialExamination);
|
|
|
}
|
|
|
SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_2);
|
|
|
@@ -322,7 +374,6 @@ public class SpecialExaminationContrller {
|
|
|
return Result.OK("已成功提交申请");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@AutoLog(value = "特审复开审批号-添加")
|
|
|
@ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
|
|
|
@PostMapping(value = "/add")
|
|
|
@@ -342,18 +393,17 @@ public class SpecialExaminationContrller {
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@PostMapping(value = "/status/adopt")
|
|
|
- public Result<?> adopt(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> adopt(@RequestBody SpecialExamination specialExamination) {
|
|
|
String infoId = specialExamination.getInfoId();
|
|
|
Integer status = specialExamination.getStatus();
|
|
|
- if(StrUtil.isBlank(infoId)){
|
|
|
+ if (StrUtil.isBlank(infoId)) {
|
|
|
return Result.error("修改失败");
|
|
|
}
|
|
|
SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
- if (status == 5){
|
|
|
+ if (status == 5) {
|
|
|
customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_5);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_4);
|
|
|
}
|
|
|
infoService.updateById(customerInfo);
|
|
|
@@ -366,9 +416,9 @@ public class SpecialExaminationContrller {
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/status/refuse")
|
|
|
- public Result<?> refuse(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> refuse(@RequestBody SpecialExamination specialExamination) {
|
|
|
String id = specialExamination.getId();
|
|
|
- if(StrUtil.isBlank(id)){
|
|
|
+ if (StrUtil.isBlank(id)) {
|
|
|
return Result.error("修改失败");
|
|
|
}
|
|
|
specialExamination.setStatus(2);
|
|
|
@@ -376,5 +426,166 @@ public class SpecialExaminationContrller {
|
|
|
return Result.ok("驳回成功");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 通过excel导入数据
|
|
|
+ *
|
|
|
+ * @param file 请求
|
|
|
+ * @return 导入结果
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/importCustomerExcel")
|
|
|
+ public Result<?> importCustomerExcel(@RequestPart("file") MultipartFile file) {
|
|
|
+ String filename = file.getOriginalFilename();
|
|
|
+ if (!filename.endsWith(".xlsx") && !filename.endsWith(".xls")) {
|
|
|
+ return Result.error("文件类型不正确!请导入文件类型->.xlsx或.xls");
|
|
|
+ }
|
|
|
+ Dict dict = new Dict();
|
|
|
+
|
|
|
+ ImportParams params = new ImportParams();
|
|
|
+ params.setTitleRows(0);
|
|
|
+ try {
|
|
|
+ // 工具类缺陷,默认导入全部sheet页,会导致
|
|
|
+ List<SpecialExaminationCustomerVo> list = ExcelImportUtil.importExcel(
|
|
|
+ file.getInputStream(), SpecialExaminationCustomerVo.class, params);
|
|
|
+ List<SpecialExaminationCustomerVo> voList = new ArrayList<>();
|
|
|
+ int errorCount = 0;
|
|
|
+
|
|
|
+ // 获取所有字典值
|
|
|
+ List<DictModel> dictModels = sysBaseApi.getDictItems("user_type");
|
|
|
+ Dict dictItemMap = Dict.create();
|
|
|
+ dictModels.forEach(model -> {
|
|
|
+ dictItemMap.put(model.getValue(), model.getText());
|
|
|
+ });
|
|
|
+
|
|
|
+ Tuple dictTuple = new Tuple(dictItemMap);
|
|
|
+
|
|
|
+ for (SpecialExaminationCustomerVo vo : list) {
|
|
|
+ if (ObjectUtil.isNotNull(vo)) {
|
|
|
+ if (StrUtil.isNotBlank(vo.getErrorMsg())) {
|
|
|
+ errorCount++;
|
|
|
+ }
|
|
|
+ voList.add(vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dict.put("errorCount", errorCount);
|
|
|
+ dict.put("data", voList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("客户信息导入失败", e);
|
|
|
+ }
|
|
|
+
|
|
|
+ return Result.ok(dict);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过excel导入数据
|
|
|
+ *
|
|
|
+ * @param taskId 任务id
|
|
|
+ * @param list 数据
|
|
|
+ * @return 导入结果
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/{taskId}/importCustomerData")
|
|
|
+ public Result<?> importCustomerData(@PathVariable String taskId, @RequestBody List<SpecialExaminationCustomerVo> list) {
|
|
|
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ List<SmsCheckCustomerInfo> dataList = new ArrayList<>();
|
|
|
+ //导入失败数据
|
|
|
+ List<SpecialExaminationCustomerVo> listErro = new ArrayList<>();
|
|
|
+ int customerCount = 0;
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ SpecialExaminationCustomerVo infoVo = list.get(i);
|
|
|
+ infoVo.setTaskId(taskId);
|
|
|
+ SmsCheckCustomerInfo info = new SmsCheckCustomerInfo();
|
|
|
+ BeanUtil.copyProperties(infoVo, info, true);
|
|
|
+ info.setStaffUsername(sysUser.getUsername());
|
|
|
+ info.setStaffName(sysUser.getRealname());
|
|
|
+ info.setDelFlag(CommonConstant.DEL_FLAG_0);
|
|
|
+ // 0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;
|
|
|
+ info.setCheckState(0);
|
|
|
+ dataList.add(info);
|
|
|
+ info.setTaskId(taskId);
|
|
|
+ long count = customerInfoService.count(
|
|
|
+ new LambdaQueryWrapper<SmsCheckCustomerInfo>()
|
|
|
+ .eq(SmsCheckCustomerInfo::getTaskId, info.getTaskId())
|
|
|
+ .eq(SmsCheckCustomerInfo::getUserNo, info.getUserNo())
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0));
|
|
|
+ if (count > 0) {
|
|
|
+ infoVo.setResult("0");
|
|
|
+ infoVo.setErrorMsg("公司信息已存在");
|
|
|
+ listErro.add(infoVo);
|
|
|
+ // TODO 重复处理,放校验里面?
|
|
|
+// return Result.error("客户[" + info.getCustomerNo() + "]已存在!");
|
|
|
+ } else {
|
|
|
+ customerCount++;
|
|
|
+ customerInfoService.save(info);
|
|
|
+ infoVo.setResult("1");
|
|
|
+ listErro.add(infoVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ SmsCheckTask task = taskService.getById(taskId);
|
|
|
+ // 更新导入
|
|
|
+ if (customerCount > 0) {
|
|
|
+ task.setCustomerCount(task.getCustomerCount() + customerCount);
|
|
|
+ taskService.updateById(task);
|
|
|
+ }
|
|
|
+ return Result.OK("导入成功!导入条数" + customerCount, listErro);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @AutoLog(value = "特审复开审批稽核-插入修改")
|
|
|
+ @ApiOperation(value = "特审复开审批稽核-插入修改", notes = "特审复开审批稽核-插入修改")
|
|
|
+ @PostMapping(value = "/check/info")
|
|
|
+ public Result<String> editLotLog(@RequestBody SmcSpecialCheckLog smcSpecialCheckLog) {
|
|
|
+ try {
|
|
|
+ //客户信息ID
|
|
|
+ String infoId = smcSpecialCheckLog.getInfoId();
|
|
|
+ //客户资料ID
|
|
|
+ String dataId = smcSpecialCheckLog.getDataId();
|
|
|
+ if (StringUtils.isEmpty(infoId) || StringUtils.isEmpty(dataId)) {
|
|
|
+ return Result.error("客户编码不能为空");
|
|
|
+ }
|
|
|
+ SmsCheckCustomerInfo info = infoService.getById(infoId);
|
|
|
+ if (null == infoService.getById(infoId)) {
|
|
|
+ return Result.error("客户信息不存在");
|
|
|
+ }
|
|
|
+ //任务ID
|
|
|
+ String taskId = info.getTaskId();
|
|
|
+ smcSpecialCheckLog.setTaskId(taskId);
|
|
|
+ LambdaQueryWrapper<SmcSpecialCheckLog> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapperData.eq(SmcSpecialCheckLog::getDataId, smcSpecialCheckLog.getDataId());
|
|
|
+ List<SmcSpecialCheckLog> lotList = smcSpecialCheckLogService.list(queryWrapperData);
|
|
|
+ if (lotList.size() == 0) {
|
|
|
+ smcSpecialCheckLogService.save(smcSpecialCheckLog);
|
|
|
+ } else {
|
|
|
+ String id = lotList.get(0).getId();
|
|
|
+ smcSpecialCheckLog.setId(id);
|
|
|
+ smcSpecialCheckLogService.updateById(smcSpecialCheckLog);
|
|
|
+ }
|
|
|
+ SmcSpecialCheckLogStateVo smcSpecialCheckLogStateVo = new SmcSpecialCheckLogStateVo();
|
|
|
+ BeanUtil.copyProperties(smcSpecialCheckLog, smcSpecialCheckLogStateVo);
|
|
|
+ Boolean stateBoolean = smcSpecialCheckLogService.reflectCheck(smcSpecialCheckLogStateVo);
|
|
|
+ int lotStatus = stateBoolean ? 5 : 4;
|
|
|
+ //修改客户信息稽核结果
|
|
|
+ info.setCheckState(lotStatus);
|
|
|
+ infoService.updateById(info);
|
|
|
+ return Result.OK("稽核成功!");
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ return Result.error("特审复开稽核失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @AutoLog(value = "特审复开审批稽核-资料结果查询")
|
|
|
+ @ApiOperation(value = "特审复开审批稽核-资料结果查询", notes = "特审复开审批稽核-资料结果查询")
|
|
|
+ @PostMapping(value = "/find/check/log")
|
|
|
+ public Result<SmcSpecialCheckLog> findCheckLog(@RequestBody SmcSpecialCheckLog smcSpecialCheckLog) {
|
|
|
+ String dataId = smcSpecialCheckLog.getDataId();
|
|
|
+ if (StringUtils.isEmpty(dataId)) {
|
|
|
+ return Result.error("客户资料ID不能为空");
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<SmcSpecialCheckLog> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapperData.eq(SmcSpecialCheckLog::getDataId, smcSpecialCheckLog.getDataId());
|
|
|
+ SmcSpecialCheckLog one = smcSpecialCheckLogService.getOne(queryWrapperData, false);
|
|
|
+ return Result.ok(one);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|