Commit 640905a4 authored by huyuchen's avatar huyuchen

户配置代码提交

parent c475c2f7
......@@ -225,35 +225,35 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//该人员该结算主体有项目档案
if (null != tEmployeeProject) {
//如果是减项状态就复项
TEmployeeProject tEmployeeProjectCompare = employeeProjectMapper.selectById(tEmployeeProject.getId());
if (CommonConstants.ONE_INT == tEmployeeProject.getProjectStatus()) {
tEmployeeProject.setProjectStatus(CommonConstants.ZERO_INT);
employeeProjectMapper.updateById(tEmployeeProject);
TEmployeeProject tEmployeeProjectCompare = employeeProjectMapper.selectById(tEmployeeProject.getId());
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeProjectCompare,tEmployeeProject);
}
//判断人员档案的状态,如果是减档状态就复档
TEmployeeInfo tEmployeeInfoCompare = employeeInfoService.getById(tEmployeeProject.getEmpId());
if (CommonConstants.ONE_INT == tEmployeeInfo.getFileStatus()) {
tEmployeeInfo.setFileStatus(CommonConstants.ZERO_INT);
employeeInfoService.updateById(tEmployeeInfo);
TEmployeeInfo tEmployeeInfoCompare = employeeInfoService.getById(tEmployeeProject.getEmpId());
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",tEmployeeInfoCompare,tEmployeeInfo);
}
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING));
//更新项目档案
tEmployeeProject.setEmpNatrue(fddContractTemplate.getType());
tEmployeeProject.setPost(fddContractAttachInfo.getPost());
employeeProjectMapper.updateById(tEmployeeProject);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeProjectCompare,tEmployeeProject);
//更新人员档案
tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType());
employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",tEmployeeInfoCompare,tEmployeeInfo);
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING));
//无可用合同
if (null == employeeContractInfo) {
//新增合同
......@@ -285,10 +285,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo);
//新增项目档案
TEmployeeProject project = new TEmployeeProject();
saveEmployeeproject(fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo, project);
} else {
//新增人员档案
TEmployeeInfo newEmployeeInfo = new TEmployeeInfo();
newEmployeeInfo.setEmpName(fddContractAttachInfo.getEmpName());
newEmployeeInfo.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
......@@ -311,26 +313,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//新增项目档案
TEmployeeProject newTEmpProject = new TEmployeeProject();
saveEmployeeproject(fddContractAttachInfo, settleDomain, fddContractTemplate, newEmployeeInfo,tCustomerInfo, tEmployeeProject);
newTEmpProject.setEmpName(fddContractAttachInfo.getEmpName());
newTEmpProject.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newTEmpProject.setEmpPhone(fddContractAttachInfo.getEmpPhone());
newTEmpProject.setDeptId(settleDomain.getId());
newTEmpProject.setDeptNo(settleDomain.getDepartNo());
newTEmpProject.setDeptName(settleDomain.getDepartName());
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setUnitId(tCustomerInfo.getId());
newTEmpProject.setUnitName(tCustomerInfo.getCustomerName());
newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode());
newTEmpProject.setContractType(fddContractTemplate.getType());
newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]);
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue());
newTEmpProject.setEmpCode(newEmployeeInfo.getEmpCode());
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
newTEmpProject.setEmpNo(empNO);
//新增档案
tEmployeeProjectMapper.insert(newTEmpProject);
//新增合同
TEmployeeContractInfo newEmployeeContractInfo1 = new TEmployeeContractInfo();
saveTEmployeeContractInfo(newEmployeeContractInfo1, fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo,newTEmpProject);
......@@ -588,6 +572,43 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
}
}
/**
* @param fddContractAttachInfo
* @param settleDomain
* @param fddContractTemplate
* @param newEmployeeInfo
* @param tEmployeeProject
* @Author: huyc
* @Date: 2022/06/01
* @Description: 新增项目档案
* @return:
**/
public void saveEmployeeproject(FddContractAttachInfo fddContractAttachInfo,TSettleDomain settleDomain,FddContractTemplate fddContractTemplate,
TEmployeeInfo newEmployeeInfo, TCustomerInfo tCustomerInfo, TEmployeeProject newTEmpProject) {
//新增项目档案
newTEmpProject.setEmpName(fddContractAttachInfo.getEmpName());
newTEmpProject.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newTEmpProject.setEmpPhone(fddContractAttachInfo.getEmpPhone());
newTEmpProject.setDeptId(settleDomain.getId());
newTEmpProject.setDeptNo(settleDomain.getDepartNo());
newTEmpProject.setDeptName(settleDomain.getDepartName());
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setUnitId(tCustomerInfo.getId());
newTEmpProject.setUnitName(tCustomerInfo.getCustomerName());
newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode());
newTEmpProject.setContractType(fddContractTemplate.getType());
newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]);
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue());
newTEmpProject.setEmpCode(newEmployeeInfo.getEmpCode());
String empNO = "";
empNO = getEmpNo(newTEmpProject.getDeptNo());
newTEmpProject.setEmpNo(empNO);
//新增档案
tEmployeeProjectMapper.insert(newTEmpProject);
}
//获取员工编码
public String getEmpNo(String deptNo) {
String str = "";
......
......@@ -183,24 +183,26 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(tEmployeeInfo)) {
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)) {
if (Common.isNotNull(tEmployeeProject.getBankNo())) {
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);
} 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);
}
TEmployeeInfo tEmployeeInfoCompare = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
......
......@@ -70,7 +70,7 @@
AND a.ORGAN_ID = #{sysHouseHoldInfo.organId}
</if>
<if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''">
AND a.NAME = #{sysHouseHoldInfo.name}
AND a.NAME like CONCAT('%',#{sysHouseHoldInfo.name},'%')
</if>
<if test="sysHouseHoldInfo.createTime != null">
AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
......
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