Commit 80f30a38 authored by huyuchen's avatar huyuchen

预估库导入人部门修改

parent 4439b10b
......@@ -108,7 +108,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
Map<String, Object> map = new HashMap<>();
//身份证系统中是否已有
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
......@@ -157,13 +156,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} else {
if (Common.isEmpty(tEmployeeInfo)) {
return R.failed("该人员暂无档案信息,禁止关联项目,如要添加,请先至“在档人员”处建档");
}
//身份证实名认证
if (!Common.isEmpty(tEmployeeInfo)) {
if (!tEmployeeProject.getEmpName().equals(tEmployeeInfo.getEmpName())) {
} else if (!tEmployeeProject.getEmpName().equals(tEmployeeInfo.getEmpName())) {
return R.failed("姓名和身份证不一致,请确认后再次新增");
}
}
//判断是否已经减档
if (tEmployeeInfo.getFileStatus() == CommonConstants.dingleDigitIntArray[1]) {
map.put("employeeId", tEmployeeInfo.getId());
......@@ -234,7 +230,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
!CommonConstants.ZERO_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
}
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum().intValue() + CommonConstants.ONE_INT);
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() + CommonConstants.ONE_INT);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],
tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
......@@ -574,9 +570,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
List<EmployeeProjectNewOldVO> updateProjectList = new ArrayList<>();
// 执行数据插入操作 组装 PostDto
for (int i = 0; i < excelVOList.size(); i++) {
EmployeeXProjectVO excel = excelVOList.get(i);
for (EmployeeXProjectVO excel : excelVOList) {
//根据身份证和项目编码获取项目档案
TEmployeeProject tEmployeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard())
......@@ -916,7 +910,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
public R<List<ErrorMessage>> importEmpProjectUpdate(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<EmployeeProjectUpdateVO> util1 = new ExcelUtil<>(EmployeeProjectUpdateVO.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
......@@ -976,8 +969,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* @Date 19:25 2022/6/21
**/
public void importEmpProjectUpdate(List<EmployeeProjectUpdateVO> excelVOList, List<ErrorMessage> errorMessageList) {
// 通用校验获取失败的数据
Map<Long, ErrorMessage> errorMsgMap = new HashMap<>();
// 项目档案更新List
List<TEmployeeProject> updateList = new ArrayList<>();
......@@ -988,8 +979,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 新老档案List
List<EmployeeNewOldVO> updateInfoList = new ArrayList<>();
// 新老档案vo
EmployeeNewOldVO newOld;
// 新老项目档案vo
EmployeeProjectNewOldVO newOldProject;
// 新老项目档案List
......@@ -997,10 +986,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
if (Common.isNotNull(errorMsgMap.get(i + 2))) {
continue;
}
EmployeeProjectUpdateVO excel = excelVOList.get(i);
String checkCount = excel.getEmpIdcard().concat(excel.getDeptNo());
......@@ -1069,14 +1054,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
doJointTask.doUpdateEmployeeInfo(updEmpInfoList, user);
}
// 记录变更日志
if (updateInfoList.size() > CommonConstants.dingleDigitIntArray[0]) {
for (EmployeeNewOldVO newOldInfo : updateInfoList) {
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0]
, newOldInfo.getOldEmployee().getId(), ""
, newOldInfo.getOldEmployee(), newOldInfo.getNewEmployee());
if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) {
for (EmployeeProjectNewOldVO newOldProjectLog : updateProjectList) {
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1]
, newOldProjectLog.getNewProjectEmployee().getId(), ""
, newOldProjectLog.getOldProjectEmployee(), newOldProjectLog.getNewProjectEmployee());
}
}
} catch (Exception e) {
log.error("数据更新异常", e);
}
......@@ -1125,13 +1109,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
@Transactional
public R<List<ErrorMessage>> batchRemoveByIds(String ids) {
List<ErrorMessage> errorList = new ArrayList<ErrorMessage>();
List<ErrorMessage> errorList = new ArrayList<>();
List<TEmployeeProject> updList = new ArrayList<>();
List<TEmployeeInfo> infoUpdList = new ArrayList<>();
List<String> idsList = null;
List<String> idsList;
if (!Common.isEmpty(ids)) {
idsList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
} else {
......@@ -1197,13 +1181,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
String fileName = "项目档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
// 根据用户传入确定要导出的字段
Set<String> includeColumnFiledNames = new HashSet<String>();
Set<String> includeColumnFiledNames = new HashSet<>();
for (String exportField : exportFields) {
includeColumnFiledNames.add(exportField);
}
//获取要导出的列表
List<EmployeeProjectExportVO> list = new ArrayList<>();
List<EmployeeProjectExportVO> list;
//获取记录
list = gettEmpProInfoExportVos(idstr, projectDTO);
......@@ -1268,7 +1252,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
tEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
tEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
TCustomerInfo tCustomerInfo = tCustomerInfoMapper.selectById(tSettleDomain.getCustomerId());
tEmployeeProject.setUnitId(tSettleDomain.getCustomerId());
tEmployeeProject.setUnitNo(tSettleDomain.getCustomerNo());
tEmployeeProject.setUnitName(tSettleDomain.getCustomerName());
......
......@@ -692,7 +692,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 5.封装地市派单限制日
initDayLimit(dayConfMap, info);
// 6.保存 有异常也保存 要标识
info.setUserDeptName(selectVo.getDepartName());
info.setUserDeptName(user.getDeptName());
info.setPreStatus(CommonConstants.ZERO_STRING);
// 为验重添加到MAP
existsMap.put(info.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + info.getPayAddress(), info);
......@@ -763,11 +763,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 4.封装地市派单限制日
initDayLimit(dayConfMap, info);
// 5.保存 有异常也保存 要做标识
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(user.getDeptId().toString());
if (Common.isNotNull(domainR) && Common.isNotNull(domainR.getData())) {
TSettleDomainSelectVo selectVo = domainR.getData();
info.setUserDeptName(selectVo.getDepartName());
}
info.setUserDeptName(user.getDeptName());
info.setPreStatus(CommonConstants.ZERO_STRING);
// 如果已经存在未派单的派增 这个时候派减 直接标记异常 客服自行判断是否派单
if (null != preAddMap.get(info.getEmpIdcard())) {
......
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