Commit 05bfa418 authored by huyuchen's avatar huyuchen

户配置代码提交

parent 640905a4
...@@ -234,13 +234,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -234,13 +234,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE); return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
return R.failed(vo.getRes().getMsg()); return R.failed(vo.getRes().getMsg());
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
return R.failed(check.getMessage()); return R.failed(check.getMessage());
} }
} else { } else {
...@@ -264,9 +264,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -264,9 +264,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -310,7 +310,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -310,7 +310,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(tEmployeeInfo)) { if (Common.isNotNull(tEmployeeInfo)) {
updList.add(tEmployeeInfo); updList.add(tEmployeeInfo);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updList,user); doJointTask.doUpdateEmployeeInfo(updList, user);
} }
return R.ok(); return R.ok();
} }
...@@ -353,9 +353,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -353,9 +353,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -387,9 +387,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -387,9 +387,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -582,13 +582,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -582,13 +582,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
String errorMessage = ""; String errorMessage = "";
if (Common.isNotNull(excel.getEmpName())) { if (Common.isNotNull(excel.getEmpName())) {
errorMessage = errorMessage.concat(excel.getEmpName()).concat(";"); errorMessage = errorMessage.concat(excel.getEmpName()).concat(";");
}else { } else {
errorMessage = " ".concat(";"); errorMessage = " ".concat(";");
} }
errorMessage = errorMessage + excel.getEmpIdcard() + ";" + excel.getDeptNo() + ";" + leaveReason + ";"; errorMessage = errorMessage + excel.getEmpIdcard() + ";" + excel.getDeptNo() + ";" + leaveReason + ";";
if (Common.isNotNull(excel.getLeaveRemark())) { if (Common.isNotNull(excel.getLeaveRemark())) {
errorMessage = errorMessage.concat(excel.getLeaveRemark()).concat(";"); errorMessage = errorMessage.concat(excel.getLeaveRemark()).concat(";");
}else { } else {
errorMessage = errorMessage.concat(" ").concat(";"); errorMessage = errorMessage.concat(" ").concat(";");
} }
if (Common.isNotNull(tEmployeeProject)) { if (Common.isNotNull(tEmployeeProject)) {
...@@ -629,7 +629,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -629,7 +629,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (updList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updList.size() > CommonConstants.dingleDigitIntArray[0]) {
List<TEmployeeInfo> updEmpInfoList = updList.stream().distinct().collect(Collectors.toList()); List<TEmployeeInfo> updEmpInfoList = updList.stream().distinct().collect(Collectors.toList());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updEmpInfoList,user); doJointTask.doUpdateEmployeeInfo(updEmpInfoList, user);
} }
// 记录变更日志 // 记录变更日志
if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) {
...@@ -703,6 +703,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -703,6 +703,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/** /**
* 新增档案 * 新增档案
*
* @param excelVOList * @param excelVOList
* @param errorMessageList * @param errorMessageList
* @param idAdd * @param idAdd
...@@ -781,13 +782,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -781,13 +782,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage()));
} }
} else { } else {
...@@ -795,7 +796,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -795,7 +796,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
} }
updateExcelPost(updateList, tEmployeeInfo); updateExcelPost(updateList, tEmployeeInfo);
insertExcelPro(excel, proInsList,tEmployeeInfo); insertExcelPro(excel, proInsList, tEmployeeInfo);
//档案有(在档人员),项目有(草稿/已审核); //档案有(在档人员),项目有(草稿/已审核);
} else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus() } else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus()
&& Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[0] == tEmployeeProject.getProjectStatus()) { && Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[0] == tEmployeeProject.getProjectStatus()) {
...@@ -821,13 +822,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -821,13 +822,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage()));
} }
} else { } else {
...@@ -863,7 +864,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -863,7 +864,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
try { try {
if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updateList,user); doJointTask.doUpdateEmployeeInfo(updateList, user);
} }
if (proInsList.size() > CommonConstants.dingleDigitIntArray[0]) { if (proInsList.size() > CommonConstants.dingleDigitIntArray[0]) {
baseMapper.insertExcelEmpProject(proInsList); baseMapper.insertExcelEmpProject(proInsList);
...@@ -994,13 +995,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -994,13 +995,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage()));
} }
} else { } else {
...@@ -1032,7 +1033,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1032,7 +1033,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (updTEmployeeList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updTEmployeeList.size() > CommonConstants.dingleDigitIntArray[0]) {
List<TEmployeeInfo> updEmpInfoList = updTEmployeeList.stream().distinct().collect(Collectors.toList()); List<TEmployeeInfo> updEmpInfoList = updTEmployeeList.stream().distinct().collect(Collectors.toList());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updEmpInfoList,user); doJointTask.doUpdateEmployeeInfo(updEmpInfoList, user);
} }
// 记录变更日志 // 记录变更日志
if (updateInfoList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateInfoList.size() > CommonConstants.dingleDigitIntArray[0]) {
...@@ -1052,7 +1053,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1052,7 +1053,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/** /**
* 插入excel Pro * 插入excel Pro
*/ */
private void insertExcelPro(EmployeeProjectVO excel, List<TEmployeeProject> proInsList,TEmployeeInfo tEmployeeInfo) { private void insertExcelPro(EmployeeProjectVO excel, List<TEmployeeProject> proInsList, TEmployeeInfo tEmployeeInfo) {
TEmployeeProject insTEmployeePro = new TEmployeeProject(); TEmployeeProject insTEmployeePro = new TEmployeeProject();
BeanUtil.copyProperties(excel, insTEmployeePro); BeanUtil.copyProperties(excel, insTEmployeePro);
...@@ -1137,13 +1138,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1137,13 +1138,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.failed(errorList); return R.failed(errorList);
} else { } else {
if (updList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updList.size() > CommonConstants.dingleDigitIntArray[0]) {
for (TEmployeeProject tEmployeeProject:updList) { for (TEmployeeProject tEmployeeProject : updList) {
baseMapper.updateById(tEmployeeProject); baseMapper.updateById(tEmployeeProject);
} }
} }
if (infoUpdList.size() > CommonConstants.dingleDigitIntArray[0]) { if (infoUpdList.size() > CommonConstants.dingleDigitIntArray[0]) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(infoUpdList,user); doJointTask.doUpdateEmployeeInfo(infoUpdList, user);
} }
} }
return R.ok(); return R.ok();
......
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