|
|
@@ -7,6 +7,7 @@ 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.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -17,15 +18,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.aspect.annotation.PermissionData;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
|
+import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
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.UUIDGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.config.shiro.ShiroRealm;
|
|
|
import org.jeecg.modules.smscheck.configs.CheckStateCode;
|
|
|
+import org.jeecg.modules.smscheck.configs.CheckTypeCode;
|
|
|
+import org.jeecg.modules.smscheck.configs.ShutdownLabelByCode;
|
|
|
import org.jeecg.modules.smscheck.entity.*;
|
|
|
import org.jeecg.modules.smscheck.service.*;
|
|
|
import org.jeecg.modules.smscheck.vo.SmsCheckCustomerInfoVo;
|
|
|
@@ -36,11 +43,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -48,7 +57,7 @@ import java.util.List;
|
|
|
@RestController
|
|
|
@RequestMapping("/special/examination")
|
|
|
@Slf4j
|
|
|
-public class SpecialExaminationContrller {
|
|
|
+public class SpecialExaminationContrller extends JeecgController<SmsCheckCustomerSpeciaInfo, SmsCheckCustomerSpeciaInfoService> {
|
|
|
|
|
|
@Resource
|
|
|
private SpecialExaminationService specialExaminationService;
|
|
|
@@ -76,7 +85,6 @@ public class SpecialExaminationContrller {
|
|
|
@Autowired
|
|
|
private ISysBaseAPI sysBaseApi;
|
|
|
|
|
|
-
|
|
|
@ApiOperation(value = "客户资料-信息查询查询", notes = "客户资料-个人列表查询")
|
|
|
@PostMapping(value = "/find/user/id")
|
|
|
public Result<?> findUserId(@RequestBody SpecialExamination specialExamination) {
|
|
|
@@ -166,201 +174,25 @@ public class SpecialExaminationContrller {
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
|
|
|
- @AutoLog(value = "特审复开审批号-添加")
|
|
|
- @ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
|
|
|
- @PostMapping(value = "/upload/files")
|
|
|
- public Result<?> uploadFiles(HttpServletRequest request) {
|
|
|
- String infoId = request.getParameter("infoId");
|
|
|
- if (null == infoService.getById(infoId)) {
|
|
|
+ @AutoLog(value = "特审复开审批-添加")
|
|
|
+ @ApiOperation(value = "特审复开审批-添加", notes = "特审复开审批-添加")
|
|
|
+ @PostMapping(value = "/edit/info")
|
|
|
+ public Result<?> uploadFiles(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ String infoId = specialExamination.getInfoId();
|
|
|
+ SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
+ if (null == customerInfo) {
|
|
|
return Result.error("客户信息不存在");
|
|
|
}
|
|
|
-
|
|
|
- Result<?> result = new Result<>();
|
|
|
- String bizPath = request.getParameter("biz");
|
|
|
- //LOWCOD-2580 sys/common/upload接口存在任意文件上传漏洞
|
|
|
- if (oConvertUtils.isNotEmpty(bizPath) && (bizPath.contains("../") || bizPath.contains("..\\"))) {
|
|
|
- throw new JeecgBootException("上传目录bizPath,格式非法!");
|
|
|
- }
|
|
|
- if (oConvertUtils.isEmpty(bizPath)) {
|
|
|
- bizPath = "";
|
|
|
- }
|
|
|
-
|
|
|
- //关停标签
|
|
|
- String shutdownLabel = request.getParameter("shutdownLabel");
|
|
|
- //材料标签
|
|
|
- String materialLabel = request.getParameter("materialLabel");
|
|
|
- //用户标签
|
|
|
- String userLable = request.getParameter("userLable");
|
|
|
- //客户名称/使用人名称
|
|
|
- String customerName = request.getParameter("customerName");
|
|
|
- //复开号码
|
|
|
- String openingNumber = request.getParameter("openingNumber");
|
|
|
-
|
|
|
- if (StrUtil.isBlank(shutdownLabel) && StrUtil.isBlank(materialLabel)
|
|
|
- || StrUtil.isBlank(userLable) || StrUtil.isBlank(customerName)
|
|
|
- || StrUtil.isBlank(openingNumber)) {
|
|
|
- return Result.error("参数不全");
|
|
|
- }
|
|
|
-
|
|
|
- Integer shutdownLabelInt = Integer.valueOf(shutdownLabel);
|
|
|
- Integer materialLabelInt = Integer.valueOf(materialLabel);
|
|
|
- Integer userLableInt = Integer.valueOf(userLable);
|
|
|
-
|
|
|
- MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
|
|
-
|
|
|
- //单位名称
|
|
|
- String unitName = request.getParameter("unitName");
|
|
|
- //关停时间
|
|
|
- String shutdownTime = request.getParameter("shutdownTime");
|
|
|
- //申请复开原因
|
|
|
- String reasonReopening = request.getParameter("reasonReopening");
|
|
|
-
|
|
|
-
|
|
|
- String filePathIdCard = null;
|
|
|
- List<MultipartFile> fileListIdCard = multipartRequest.getFiles("fileListIdCard");
|
|
|
- for (MultipartFile file : fileListIdCard) {
|
|
|
- String file_url = MinioUtil.upload(file, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(file_url)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- if (filePathIdCard == null) {
|
|
|
- filePathIdCard = file_url;
|
|
|
- } else {
|
|
|
- filePathIdCard = filePathIdCard + "," + file_url;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- String filePathUserCertificate = null;
|
|
|
- List<MultipartFile> fileListUserCertificate = multipartRequest.getFiles("fileListUserCertificate");
|
|
|
- for (MultipartFile file : fileListUserCertificate) {
|
|
|
- String file_url = MinioUtil.upload(file, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(file_url)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- if (filePathUserCertificate == null) {
|
|
|
- filePathUserCertificate = file_url;
|
|
|
- } else {
|
|
|
- filePathUserCertificate = filePathUserCertificate + "," + file_url;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- MultipartFile fileListHandCertificate = multipartRequest.getFile("fileListHandCertificate");
|
|
|
- String filePathHandCertificate = null;
|
|
|
- if (fileListHandCertificate != null) {
|
|
|
- filePathHandCertificate = MinioUtil.upload(fileListHandCertificate, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathHandCertificate)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListNumberCard = multipartRequest.getFile("fileListNumberCard");
|
|
|
- String filePathNumberCard = null;
|
|
|
- if (fileListNumberCard != null) {
|
|
|
- filePathNumberCard = MinioUtil.upload(fileListNumberCard, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathNumberCard)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListLetter = multipartRequest.getFile("fileListLetter");
|
|
|
- String filePathLetter = null;
|
|
|
- if (fileListLetter != null) {
|
|
|
- filePathLetter = MinioUtil.upload(fileListLetter, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathLetter)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListBusiness = multipartRequest.getFile("fileListBusiness");
|
|
|
- String filePathBusiness = null;
|
|
|
- if (fileListBusiness != null) {
|
|
|
- filePathBusiness = MinioUtil.upload(fileListBusiness, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathBusiness)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListIntroduction = multipartRequest.getFile("fileListIntroduction");
|
|
|
- String filePathIntroduction = null;
|
|
|
- if (fileListIntroduction != null) {
|
|
|
- filePathIntroduction = MinioUtil.upload(fileListIntroduction, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathIntroduction)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListVoucher = multipartRequest.getFile("fileListVoucher");
|
|
|
- String filePathVoucher = null;
|
|
|
- if (fileListVoucher != null) {
|
|
|
- filePathVoucher = MinioUtil.upload(fileListVoucher, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathVoucher)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- MultipartFile fileListVideo = multipartRequest.getFile("fileListVideo");
|
|
|
- String filePathVideo = null;
|
|
|
- if (fileListVideo != null) {
|
|
|
- filePathVideo = MinioUtil.upload(fileListVideo, bizPath);
|
|
|
- if (oConvertUtils.isEmpty(filePathVideo)) {
|
|
|
- return Result.error("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- 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("上传失败,请检查配置信息是否正确!");
|
|
|
- }
|
|
|
+ if (CheckStateCode.CHECK_STSTE_5.equals(customerInfo.getCheckState())){
|
|
|
+ return Result.error("该资料已经通过稽核不可再次修改");
|
|
|
}
|
|
|
- //系统实名制备注信息
|
|
|
- String nameFindComplianceRemark = request.getParameter("nameFindComplianceRemark");
|
|
|
-
|
|
|
- SpecialExamination specialExamination = new SpecialExamination();
|
|
|
- specialExamination.setInfoId(infoId);
|
|
|
- specialExamination.setShutdownLabel(shutdownLabelInt);
|
|
|
- specialExamination.setMaterialLabel(materialLabelInt);
|
|
|
- specialExamination.setUserLable(userLableInt);
|
|
|
- specialExamination.setOpeningNumber(openingNumber);
|
|
|
- specialExamination.setCustomerName(customerName);
|
|
|
- specialExamination.setUnitName(unitName);
|
|
|
- specialExamination.setShutdownTime(shutdownTime);
|
|
|
- specialExamination.setReasonReopening(reasonReopening);
|
|
|
- specialExamination.setIdCard(filePathIdCard);
|
|
|
- specialExamination.setHandCertificate(filePathHandCertificate);
|
|
|
- specialExamination.setNumberCard(filePathNumberCard);
|
|
|
- specialExamination.setLetterCommitment(filePathLetter);
|
|
|
- specialExamination.setBusinessLicense(filePathBusiness);
|
|
|
- specialExamination.setLetterIntroduction(filePathIntroduction);
|
|
|
- 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);
|
|
|
-
|
|
|
LambdaQueryWrapper<SpecialExamination> queryWrapperData = new LambdaQueryWrapper<>();
|
|
|
queryWrapperData.eq(SpecialExamination::getInfoId, infoId);
|
|
|
-
|
|
|
List<SpecialExamination> list = specialExaminationService.list(queryWrapperData);
|
|
|
if (list.size() == 0) {
|
|
|
specialExaminationService.save(specialExamination);
|
|
|
@@ -368,12 +200,65 @@ public class SpecialExaminationContrller {
|
|
|
specialExamination.setId(list.get(0).getId());
|
|
|
specialExaminationService.updateById(specialExamination);
|
|
|
}
|
|
|
- SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
+ //修改客户信息列;关停标签/有无特审单
|
|
|
+ //客户信息状态
|
|
|
customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_2);
|
|
|
+ //获取关停标签
|
|
|
+ String shutdownLabel = ShutdownLabelByCode.msg(specialExamination.getShutdownLabel().toString());
|
|
|
+ customerInfo.setShutdownLabel(shutdownLabel);
|
|
|
+ //获取材料标签=是否特审
|
|
|
+ String materialLabel = specialExamination.getMaterialLabel() == 0 ? "是" : "否";
|
|
|
+ customerInfo.setMaterialLabel(materialLabel);
|
|
|
infoService.updateById(customerInfo);
|
|
|
return Result.OK("已成功提交申请");
|
|
|
}
|
|
|
|
|
|
+ @AutoLog(value = "特审复开审批-资料批量上传")
|
|
|
+ @ApiOperation(value = "特审复开审批-资料批量上传", notes = "特审复开审批-资料批量上传")
|
|
|
+ @PostMapping(value = "/batch/edit/info")
|
|
|
+ public Result<?> batchUploadFiles(@RequestBody SpecialExaminationBatchVo specialExaminationBatchVo) {
|
|
|
+ List<String> infoIds = specialExaminationBatchVo.getInfoIds();
|
|
|
+ if (infoIds.size() == 0) {
|
|
|
+ return Result.error("客户信息不能为空");
|
|
|
+ }
|
|
|
+ for (String infoId : infoIds) {
|
|
|
+ //获取客户信息
|
|
|
+ SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
+ if ( CheckStateCode.CHECK_STSTE_5.equals(customerInfo.getCheckState())){
|
|
|
+ //待稽核客户信息不能修改
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ SpecialExamination specialExamination = new SpecialExamination();
|
|
|
+ BeanUtil.copyProperties(specialExaminationBatchVo, specialExamination);
|
|
|
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ specialExamination.setCreateUser(sysUser.getUsername());
|
|
|
+ specialExamination.setStaffNo(sysUser.getWorkNo());
|
|
|
+ specialExamination.setStatus(0);
|
|
|
+ specialExamination.setInfoId(infoId);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ //客户信息状态
|
|
|
+ customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_2);
|
|
|
+ //修改客户信息列;关停标签/有无特审单
|
|
|
+ //获取关停标签
|
|
|
+ String shutdownLabel = ShutdownLabelByCode.msg(specialExamination.getShutdownLabel().toString());
|
|
|
+ customerInfo.setShutdownLabel(shutdownLabel);
|
|
|
+ //获取材料标签=是否特审
|
|
|
+ String materialLabel = specialExamination.getMaterialLabel() == 0 ? "是" : "否";
|
|
|
+ customerInfo.setMaterialLabel(materialLabel);
|
|
|
+ infoService.updateById(customerInfo);
|
|
|
+ }
|
|
|
+ return Result.OK("已成功提交申请");
|
|
|
+ }
|
|
|
+
|
|
|
@AutoLog(value = "特审复开审批号-添加")
|
|
|
@ApiOperation(value = "特审复开审批号-添加", notes = "特审复开审批号-添加")
|
|
|
@PostMapping(value = "/add")
|
|
|
@@ -427,10 +312,10 @@ public class SpecialExaminationContrller {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 通过excel导入数据
|
|
|
+ * 读取excel数据
|
|
|
*
|
|
|
* @param file 请求
|
|
|
- * @return 导入结果
|
|
|
+ * @return 读取结果
|
|
|
*/
|
|
|
@PostMapping(value = "/importCustomerExcel")
|
|
|
public Result<?> importCustomerExcel(@RequestPart("file") MultipartFile file) {
|
|
|
@@ -439,7 +324,6 @@ public class SpecialExaminationContrller {
|
|
|
return Result.error("文件类型不正确!请导入文件类型->.xlsx或.xls");
|
|
|
}
|
|
|
Dict dict = new Dict();
|
|
|
-
|
|
|
ImportParams params = new ImportParams();
|
|
|
params.setTitleRows(0);
|
|
|
try {
|
|
|
@@ -448,21 +332,9 @@ public class SpecialExaminationContrller {
|
|
|
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++;
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(vo.getCustomerName()) && StringUtils.isNotEmpty(vo.getSmsNumber())
|
|
|
+ && vo.getMaterialLabel() != null && StringUtils.isNotEmpty(vo.getNameFindCompliance())) {
|
|
|
voList.add(vo);
|
|
|
}
|
|
|
}
|
|
|
@@ -477,7 +349,7 @@ public class SpecialExaminationContrller {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 通过excel导入数据
|
|
|
+ * 导入excel数据
|
|
|
*
|
|
|
* @param taskId 任务id
|
|
|
* @param list 数据
|
|
|
@@ -486,47 +358,36 @@ public class SpecialExaminationContrller {
|
|
|
@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<>();
|
|
|
+ String generate = UUIDGenerator.generate();
|
|
|
//导入失败数据
|
|
|
- List<SpecialExaminationCustomerVo> listErro = new ArrayList<>();
|
|
|
+ List<SpecialExaminationCustomerVo> listExcel = 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.setTaskId(generate);
|
|
|
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 {
|
|
|
+ info.setCheckState(CheckStateCode.CHECK_STSTE_0);
|
|
|
+ info.setType(CheckTypeCode.CHECK_TYPE_3);
|
|
|
+ if (StringUtils.isNotEmpty(info.getCustomerName())
|
|
|
+ && StringUtils.isNotEmpty(info.getSmsNumber())
|
|
|
+ && StringUtils.isNotEmpty(info.getMaterialLabel())
|
|
|
+ && StringUtils.isNotEmpty(info.getNameFindCompliance())
|
|
|
+ ) {
|
|
|
+ infoVo.setResult("1");
|
|
|
customerCount++;
|
|
|
customerInfoService.save(info);
|
|
|
- infoVo.setResult("1");
|
|
|
- listErro.add(infoVo);
|
|
|
+ } else {
|
|
|
+ infoVo.setResult("0");
|
|
|
+ infoVo.setErrorMsg("缺失必填项");
|
|
|
}
|
|
|
+ listExcel.add(infoVo);
|
|
|
}
|
|
|
- SmsCheckTask task = taskService.getById(taskId);
|
|
|
- // 更新导入
|
|
|
- if (customerCount > 0) {
|
|
|
- task.setCustomerCount(task.getCustomerCount() + customerCount);
|
|
|
- taskService.updateById(task);
|
|
|
- }
|
|
|
- return Result.OK("导入成功!导入条数" + customerCount, listErro);
|
|
|
+ return Result.OK("导入成功!导入条数" + customerCount, listExcel);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -587,5 +448,63 @@ public class SpecialExaminationContrller {
|
|
|
return Result.ok(one);
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/exportXls")
|
|
|
+ public ModelAndView exportXlsSpecial(HttpServletRequest request, SmsCheckCustomerSpeciaInfo smsCheckCustomerSpeciaInfo) {
|
|
|
+ return super.exportXls(request, smsCheckCustomerSpeciaInfo, SmsCheckCustomerSpeciaInfo.class, "特审复开客户信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过id查询 稽核统计数
|
|
|
+ *
|
|
|
+ * @return 数据
|
|
|
+ */
|
|
|
+ //@AutoLog(value = "客户信息-通过id查询")
|
|
|
+ @ApiOperation(value = "客户信息-通过id查询 稽核统计数", notes = "客户信息-通过id查询 稽核统计数")
|
|
|
+ @GetMapping(value = "/type/count")
|
|
|
+ @PermissionData(pageComponent = "smscheck/modules/TaskCheckList")
|
|
|
+ public Result<Dict> count(HttpServletRequest request) {
|
|
|
+ Dict dict = Dict.create();
|
|
|
+ // 客户总数
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> countQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
+ countQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ long count = customerInfoService.count(countQueryWrapper);
|
|
|
+
|
|
|
+ // 未处理数
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> undoCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
+ undoCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
+ .in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(0, 1))
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ long undoCount = customerInfoService.count(undoCountQueryWrapper);
|
|
|
+
|
|
|
+ // 待稽核数
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> uncheckCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
+ uncheckCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
+ .in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(2, 3))
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ long uncheckCount = customerInfoService.count(uncheckCountQueryWrapper);
|
|
|
+
|
|
|
+ // 待整改数
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> checkedCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
+ checkedCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
+ .eq(SmsCheckCustomerInfo::getCheckState, 4)
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ long checkedCount = customerInfoService.count(checkedCountQueryWrapper);
|
|
|
+
|
|
|
+ // 稽核完成数
|
|
|
+ QueryWrapper<SmsCheckCustomerInfo> passedCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
+ passedCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
+ .eq(SmsCheckCustomerInfo::getCheckState, 5)
|
|
|
+ .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ long passedCount = customerInfoService.count(passedCountQueryWrapper);
|
|
|
+
|
|
|
+ dict.put("count", count);
|
|
|
+ dict.put("undoCount", undoCount);
|
|
|
+ dict.put("uncheckCount", uncheckCount);
|
|
|
+ dict.put("checkedCount", checkedCount);
|
|
|
+ dict.put("passedCount", passedCount);
|
|
|
+
|
|
|
+ return Result.OK(dict);
|
|
|
+ }
|
|
|
|
|
|
}
|