|
|
@@ -21,6 +21,7 @@ import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
+import org.jeecg.common.system.vo.SysDepartModel;
|
|
|
import org.jeecg.common.util.UUIDGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.smscheck.configs.CheckStateCode;
|
|
|
@@ -62,7 +63,6 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
@Autowired
|
|
|
private ISmsCheckCustomerInfoService customerInfoService;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 特审复开审批稽核业务
|
|
|
*/
|
|
|
@@ -141,10 +141,7 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
|
|
|
@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
|
|
|
- ) {
|
|
|
+ public Result<IPage<SpecialExamination>> queryList(SpecialExamination specialExamination, @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());
|
|
|
@@ -159,10 +156,7 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
|
|
|
@ApiOperation(value = "客户资料-个人列表查询", notes = "客户资料-个人列表查询")
|
|
|
@GetMapping(value = "/all/list/page")
|
|
|
- public Result<IPage<SpecialExamination>> adminList(SpecialExamination specialExamination,
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize
|
|
|
- ) {
|
|
|
+ public Result<IPage<SpecialExamination>> adminList(SpecialExamination specialExamination, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @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());
|
|
|
@@ -175,7 +169,9 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
@AutoLog(value = "特审复开审批-添加")
|
|
|
@ApiOperation(value = "特审复开审批-添加", notes = "特审复开审批-添加")
|
|
|
@PostMapping(value = "/edit/info")
|
|
|
- public Result<?> uploadFiles(@RequestBody SpecialExamination specialExamination) {
|
|
|
+ public Result<?> uploadFiles(@RequestBody SpecialExaminationVo specialExaminationVo) {
|
|
|
+ SpecialExamination specialExamination = new SpecialExamination();
|
|
|
+ BeanUtil.copyProperties(specialExaminationVo, specialExamination);
|
|
|
String infoId = specialExamination.getInfoId();
|
|
|
SmsCheckCustomerInfo customerInfo = infoService.getById(infoId);
|
|
|
if (null == customerInfo) {
|
|
|
@@ -194,7 +190,22 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
specialExamination.setId(list.get(0).getId());
|
|
|
specialExaminationService.updateById(specialExamination);
|
|
|
}
|
|
|
- //修改客户信息列;关停标签/有无特审单
|
|
|
+ // 客户经理手机号
|
|
|
+ if (StringUtils.isNotEmpty(specialExaminationVo.getAccountManagerPhone())) {
|
|
|
+ customerInfo.setAccountManagerPhone(specialExaminationVo.getAccountManagerPhone());
|
|
|
+ }
|
|
|
+ // 申请复开号码
|
|
|
+ if (StringUtils.isNotEmpty(specialExaminationVo.getOpeningNumber())) {
|
|
|
+ customerInfo.setSmsNumber(specialExaminationVo.getOpeningNumber());
|
|
|
+ }
|
|
|
+ // 客户名称
|
|
|
+ if (StringUtils.isNotEmpty(specialExaminationVo.getCustomerName())) {
|
|
|
+ customerInfo.setCustomerName(specialExaminationVo.getCustomerName());
|
|
|
+ }
|
|
|
+ // 材料标签有无特审单
|
|
|
+ if (specialExaminationVo.getMaterialLabel() != null) {
|
|
|
+ customerInfo.setMaterialLabel(String.valueOf(specialExaminationVo.getMaterialLabel() == 1 ? '无' : '有'));
|
|
|
+ }
|
|
|
//客户信息状态
|
|
|
customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_2);
|
|
|
//获取关停标签
|
|
|
@@ -204,10 +215,13 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
if (updateById) {
|
|
|
// 发送邮件
|
|
|
EmailSendMsgHandle emailSendMsgHandle = new EmailSendMsgHandle();
|
|
|
+ //liutt3.bj@chinatelecom.cn
|
|
|
emailSendMsgHandle.SendMsg("liutt3.bj@chinatelecom.cn",
|
|
|
- customerInfo.getCreateBy() + "提交复开申请",
|
|
|
- "工号:" + customerInfo.getStaffNo() + " 工单创建人:" + customerInfo.getCreateBy() + " 提交了复开号码为" + customerInfo.getSmsNumber() + "的复开申请,请及时进行稽核。"
|
|
|
- );
|
|
|
+ customerInfo.getCreateBy() +
|
|
|
+ "提交复开申请", "工号:" + customerInfo.getStaffNo() +
|
|
|
+ " 工单创建人:" + customerInfo.getCreateBy() +
|
|
|
+ " 提交了复开号码为" + customerInfo.getSmsNumber() +
|
|
|
+ "的复开申请,请及时进行稽核。");
|
|
|
}
|
|
|
return Result.OK("已成功提交申请");
|
|
|
}
|
|
|
@@ -343,7 +357,6 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
return Result.ok("批量暂存完成");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@PostMapping(value = "/status/adopt")
|
|
|
public Result<?> adopt(@RequestBody SpecialExamination specialExamination) {
|
|
|
String infoId = specialExamination.getInfoId();
|
|
|
@@ -394,13 +407,11 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
params.setTitleRows(0);
|
|
|
try {
|
|
|
// 工具类缺陷,默认导入全部sheet页,会导致
|
|
|
- List<SpecialExaminationCustomerVo> list = ExcelImportUtil.importExcel(
|
|
|
- file.getInputStream(), SpecialExaminationCustomerVo.class, params);
|
|
|
+ List<SpecialExaminationCustomerVo> list = ExcelImportUtil.importExcel(file.getInputStream(), SpecialExaminationCustomerVo.class, params);
|
|
|
List<SpecialExaminationCustomerVo> voList = new ArrayList<>();
|
|
|
int errorCount = 0;
|
|
|
for (SpecialExaminationCustomerVo vo : list) {
|
|
|
- if (StringUtils.isNotEmpty(vo.getCustomerName()) && StringUtils.isNotEmpty(vo.getSmsNumber())
|
|
|
- && vo.getMaterialLabel() != null && StringUtils.isNotEmpty(vo.getNameFindCompliance())) {
|
|
|
+ if (StringUtils.isNotEmpty(vo.getCustomerName()) && StringUtils.isNotEmpty(vo.getSmsNumber()) && vo.getMaterialLabel() != null && StringUtils.isNotEmpty(vo.getNameFindCompliance())) {
|
|
|
voList.add(vo);
|
|
|
}
|
|
|
}
|
|
|
@@ -447,23 +458,40 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
if (saveLogMap.get(info.getSmsNumber()) != null) {
|
|
|
infoVo.setResult("0");
|
|
|
infoVo.setErrorMsg("本次已导入过此号码");
|
|
|
-
|
|
|
- } else if (StringUtils.isNotEmpty(info.getCustomerName())
|
|
|
- && StringUtils.isNotEmpty(info.getSmsNumber())
|
|
|
- && StringUtils.isNotEmpty(info.getMaterialLabel())
|
|
|
- && StringUtils.isNotEmpty(info.getNameFindCompliance())
|
|
|
- ) {
|
|
|
- List<String> deptName2 = iSmsCheckTaskService.getDeptNameByWorkNo("1", sysUser.getWorkNo());
|
|
|
- List<String> deptName3 = iSmsCheckTaskService.getDeptNameByWorkNo("2", sysUser.getWorkNo());
|
|
|
- List<String> deptName4 = iSmsCheckTaskService.getDeptNameByWorkNo("3", sysUser.getWorkNo());
|
|
|
- if (deptName2 != null) {
|
|
|
- info.setStaffDeptLevel2Name(Joiner.on(",").join(deptName2));
|
|
|
- }
|
|
|
- if (deptName3 != null) {
|
|
|
- info.setStaffDeptLevel3Name(Joiner.on(",").join(deptName3));
|
|
|
- }
|
|
|
- if (deptName4 != null) {
|
|
|
- info.setStaffDeptLevel4Name(Joiner.on(",").join(deptName4));
|
|
|
+ } else if (!"有".equals(info.getMaterialLabel()) && !"无".equals(info.getMaterialLabel())) {
|
|
|
+ infoVo.setResult("0");
|
|
|
+ infoVo.setErrorMsg("有无特审单字段必须填写有或者无");
|
|
|
+ } else if (!"是".equals(info.getNameFindCompliance()) && !"否".equals(info.getNameFindCompliance())) {
|
|
|
+ infoVo.setResult("0");
|
|
|
+ infoVo.setErrorMsg("是否自查实名制合规必须填写是或者否");
|
|
|
+ } else if (StringUtils.isNotEmpty(info.getCustomerName()) && StringUtils.isNotEmpty(info.getSmsNumber()) && StringUtils.isNotEmpty(info.getMaterialLabel()) && StringUtils.isNotEmpty(info.getNameFindCompliance())) {
|
|
|
+ List<SysDepartModel> sysDepartModel = customerInfoService.getSysDepartModel();
|
|
|
+ Map<String, SysDepartModel> sysDepartModelMap
|
|
|
+ = sysDepartModel.stream().collect(Collectors.toMap(SysDepartModel::getOrgCode, Function.identity(), (o, n) -> o));
|
|
|
+ List<String> deptNameByUserId = iSmsCheckTaskService.getDeptNameByUserId(sysUser.getWorkNo());
|
|
|
+ if (!deptNameByUserId.isEmpty()) {
|
|
|
+ Set<String> strings = new HashSet<>();
|
|
|
+ Set<String> stringsOrg = new HashSet<>();
|
|
|
+ Set<String> stringsThree = new HashSet<>();
|
|
|
+ Set<String> stringsThreeOrg = new HashSet<>();
|
|
|
+ for (String s : deptNameByUserId) {
|
|
|
+ if (s.length() >= 3) {
|
|
|
+ String substring = s.substring(0, 3);
|
|
|
+ strings.add(sysDepartModelMap.get(substring).getDepartName());
|
|
|
+ stringsOrg.add(substring);
|
|
|
+ }
|
|
|
+ if (s.length() >= 6) {
|
|
|
+ String substring = s.substring(0, 6);
|
|
|
+ stringsThree.add(sysDepartModelMap.get(substring).getDepartName());
|
|
|
+ stringsThreeOrg.add(substring);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setStaffDeptLevel2No(stringsOrg.toString());
|
|
|
+ info.setStaffDeptLevel2Name(strings.toString());
|
|
|
+ info.setStaffDeptLevel2(strings.toString() + "(" + stringsOrg.toString() + ")");
|
|
|
+ info.setStaffDeptLevel3No(stringsThreeOrg.toString());
|
|
|
+ info.setStaffDeptLevel3Name(stringsThree.toString());
|
|
|
+ info.setStaffDeptLevel3(stringsThree.toString() + "(" + stringsThreeOrg.toString() + ")");
|
|
|
}
|
|
|
infoVo.setResult("1");
|
|
|
customerCount++;
|
|
|
@@ -571,43 +599,32 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
//0:未处理;1:未完善;2:待稽核; ;4:待整改;5:稽核通过;*/
|
|
|
// 客户总数
|
|
|
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);
|
|
|
+ countQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
long count = customerInfoService.count(countQueryWrapper);
|
|
|
|
|
|
// 未处理
|
|
|
QueryWrapper<SmsCheckCustomerInfo> handelCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
- handelCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
- .in(SmsCheckCustomerInfo::getCheckState, 0)
|
|
|
- .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ handelCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).in(SmsCheckCustomerInfo::getCheckState, 0).eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
long handelCount = customerInfoService.count(handelCountQueryWrapper);
|
|
|
|
|
|
// 未完善
|
|
|
QueryWrapper<SmsCheckCustomerInfo> undoCountQueryWrapper = QueryGenerator.initQueryWrapper(new SmsCheckCustomerInfo(), request.getParameterMap());
|
|
|
- undoCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3)
|
|
|
- .in(SmsCheckCustomerInfo::getCheckState, 1)
|
|
|
- .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ undoCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).in(SmsCheckCustomerInfo::getCheckState, 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))
|
|
|
- .eq(SmsCheckCustomerInfo::getDelFlag, CommonConstant.DEL_FLAG_0);
|
|
|
+ uncheckCountQueryWrapper.lambda().eq(SmsCheckCustomerInfo::getType, CheckTypeCode.CHECK_TYPE_3).in(SmsCheckCustomerInfo::getCheckState, Arrays.asList(2)).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);
|
|
|
+ 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);
|
|
|
+ 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);
|
|
|
@@ -636,13 +653,11 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
List<SmsCheckCustomerInfo> infoList = customerInfoService.list(queryWrapper);
|
|
|
// 获取上传资料数据
|
|
|
List<SpecialExamination> logList = specialExaminationService.list();
|
|
|
- Map<String, SpecialExamination> logMap
|
|
|
- = logList.stream().collect(Collectors.toMap(v -> v.getInfoId(), Function.identity(), (o, n) -> o));
|
|
|
+ Map<String, SpecialExamination> logMap = logList.stream().collect(Collectors.toMap(v -> v.getInfoId(), Function.identity(), (o, n) -> o));
|
|
|
|
|
|
// 获取稽核资料数据
|
|
|
List<SmcSpecialCheckLog> dataList = smcSpecialCheckLogService.list();
|
|
|
- Map<String, SmcSpecialCheckLog> dataMap
|
|
|
- = dataList.stream().collect(Collectors.toMap(v -> v.getInfoId(), Function.identity(), (o, n) -> o));
|
|
|
+ Map<String, SmcSpecialCheckLog> dataMap = dataList.stream().collect(Collectors.toMap(v -> v.getInfoId(), Function.identity(), (o, n) -> o));
|
|
|
|
|
|
List<SpecialExaminationExport> pageList = new ArrayList<>();
|
|
|
// 组装复开数据
|
|
|
@@ -704,6 +719,9 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
if (smcSpecialCheckLog.getConsumptionVoucherState() != null && !smcSpecialCheckLog.getConsumptionVoucherState().equals(smcSpecialCheckLogHistory.getConsumptionVoucherState())) {
|
|
|
specialExaminationExport.setConsumptionVoucherStateIs(1);
|
|
|
}
|
|
|
+ if (smcSpecialCheckLog.getHandNumberCardState() != null && !smcSpecialCheckLog.getHandNumberCardState().equals(smcSpecialCheckLogHistory.getHandNumberCardState())) {
|
|
|
+ specialExaminationExport.setHandNumberCardStateIs(1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -738,7 +756,7 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
|
|
|
|
|
|
private String getId(SpecialExaminationExport item) {
|
|
|
try {
|
|
|
- return PropertyUtils.getProperty(item, "dataId").toString();
|
|
|
+ return PropertyUtils.getProperty(item, "infoId").toString();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return null;
|