Commit c475c2f7 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents edd37720 ae31790d
...@@ -158,6 +158,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -158,6 +158,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isEmpty(tEmployeeInfo)) { if (Common.isEmpty(tEmployeeInfo)) {
return R.failed("该人员暂无档案信息,禁止关联项目,如要添加,请先至“在档人员”处建档"); return R.failed("该人员暂无档案信息,禁止关联项目,如要添加,请先至“在档人员”处建档");
} }
//身份证实名认证
if (!Common.isEmpty(tEmployeeInfo)) {
if (!tEmployeeProject.getEmpName().equals(tEmployeeInfo.getEmpName())) {
return R.failed("姓名和身份证不一致,请确认后再次新增");
}
}
//判断是否已经减档 //判断是否已经减档
if (tEmployeeInfo.getFileStatus() == CommonConstants.dingleDigitIntArray[1]) { if (tEmployeeInfo.getFileStatus() == CommonConstants.dingleDigitIntArray[1]) {
map.put("employeeId", tEmployeeInfo.getId()); map.put("employeeId", tEmployeeInfo.getId());
...@@ -190,7 +196,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -190,7 +196,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
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_STRING)){ } else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){
return R.failed(check.getMessage()); return R.failed(check.getMessage());
} }
} else { } else {
...@@ -219,6 +225,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -219,6 +225,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override @Override
public R updateProject(TEmployeeProject tEmployeeProject) { public R updateProject(TEmployeeProject tEmployeeProject) {
TCheckBankNo check = new TCheckBankNo();
check.setBankNo(tEmployeeProject.getBankNo());
check.setIdNum(tEmployeeProject.getEmpIdcard());
check.setName(tEmployeeProject.getEmpName());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData();
if (Common.isEmpty(vo)) {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
return R.failed(vo.getRes().getMsg());
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){
return R.failed(check.getMessage());
}
} else {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
}
TEmployeeProject compareProject = this.getById(tEmployeeProject.getId()); TEmployeeProject compareProject = this.getById(tEmployeeProject.getId());
boolean flag = this.updateById(tEmployeeProject); boolean flag = this.updateById(tEmployeeProject);
TEmployeeProject newProject = this.getById(tEmployeeProject.getId()); TEmployeeProject newProject = this.getById(tEmployeeProject.getId());
...@@ -760,7 +785,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -760,7 +785,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
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_STRING)){ } 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 {
...@@ -800,7 +825,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -800,7 +825,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
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_STRING)){ } 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 {
...@@ -959,6 +984,27 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -959,6 +984,27 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (tEmployeeProject.getProjectStatus() != CommonConstants.dingleDigitIntArray[0]) { if (tEmployeeProject.getProjectStatus() != CommonConstants.dingleDigitIntArray[0]) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.CHECKS_EMP_DELETE_ERROR))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.CHECKS_EMP_DELETE_ERROR)));
} else { } else {
if (Common.isNotNull(excel.getBankNo())) {
TCheckBankNo check = new TCheckBankNo();
check.setBankNo(excel.getBankNo());
check.setIdNum(excel.getEmpIdcard());
check.setName(tEmployeeProject.getEmpName());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData();
if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage()));
}
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
}
}
updateExcelProj(excel, updateList, tEmployeeProject); updateExcelProj(excel, updateList, tEmployeeProject);
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId()); TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
newOldProject = new EmployeeProjectNewOldVO(); newOldProject = new EmployeeProjectNewOldVO();
......
...@@ -121,6 +121,11 @@ public interface CommonConstants { ...@@ -121,6 +121,11 @@ public interface CommonConstants {
*/ */
String ZERO_STRING = "0"; String ZERO_STRING = "0";
/**
* number 0
*/
String ZERO_ONE = "01";
/** /**
* number 0 * number 0
*/ */
......
...@@ -55,35 +55,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -55,35 +55,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
@Override @Override
public R saveInfo(SysHouseHoldInfo sysHouseHoldInfo) { public R saveInfo(SysHouseHoldInfo sysHouseHoldInfo) {
SysHouseHoldInfo info = null; SysHouseHoldInfo info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
if (null != sysHouseHoldInfo.getTown()){ .eq(SysHouseHoldInfo::getType,sysHouseHoldInfo.getType())
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda() .eq(SysHouseHoldInfo::getName,sysHouseHoldInfo.getName())
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getTown,info.getTown())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysHouseHoldInfo.getCity() && null == sysHouseHoldInfo.getTown()){
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getCity,info.getCity())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.isNull(SysHouseHoldInfo::getTown)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysHouseHoldInfo.getProvince() && null == sysHouseHoldInfo.getCity()){
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getProvince,info.getProvince())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.isNull(SysHouseHoldInfo::getCity)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != info){ if (null != info){
return R.failed("对应户、地市、所属机构的配置已存在!"); return R.failed("对应账户性质、户名的配置已存在!");
} }
baseMapper.insert(sysHouseHoldInfo); baseMapper.insert(sysHouseHoldInfo);
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