Commit 521c340c authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.5.1' into MVP1.5.1

parents 60274e00 5acd40f1
...@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper; ...@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService; import com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.FileItemFactory;
...@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
*/ */
private R unZip(File srcFile, String destDirPath) throws RuntimeException { private R unZip(File srcFile, String destDirPath) throws RuntimeException {
// 调用字典服务,渲染字典值 Map<String, String> elecTypeMap = new HashMap<>();
R<Map<String, Map<String, Map<String, String>>>> dictR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId() // 渲染字典值
, "/dict/inner/getDictToLable", null, Map.class, SecurityConstants.FROM_IN); Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
Map<String, Map<String, Map<String, String>>> dictMap; .get(CacheConstants.DICT_DETAILS
// 电子档案类型 + CommonConstants.COLON_STRING
Map<String, Map<String, String>> elecTypeMapData; + "literature_types");
Map<String, String> elecTypeMap; if (Common.isNotNull(dicObj)) {
if (dictR == null) { for (Map.Entry<String, String> entry : dicObj.entrySet()) {
elecTypeMap.put(entry.getValue(),entry.getKey());
}
}
if (!elecTypeMap.isEmpty()) {
return R.failed("获取字典失败!"); return R.failed("获取字典失败!");
} else {
dictMap = dictR.getData();
elecTypeMapData = dictMap.get("data");
elecTypeMap = elecTypeMapData.get("literature_types");
} }
// 判断源文件是否存在 // 判断源文件是否存在
if (!srcFile.exists()) { if (!srcFile.exists()) {
...@@ -173,15 +173,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -173,15 +173,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Set<String> infoList =new HashSet<>(); Set<String> infoList =new HashSet<>();
Set<String> idCardList =new HashSet<>(); Set<String> idCardList =new HashSet<>();
Set<String> cardType =new HashSet<>(); Set<String> cardType =new HashSet<>();
TEmployeeInfo tEmployeeInfo;
ZipEntry entry;
while (entriesCheck.hasMoreElements()) { while (entriesCheck.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entriesCheck.nextElement(); entry = (ZipEntry) entriesCheck.nextElement();
//添加进filesName //添加进filesName
String empInfo = entry.getName(); String empInfo = entry.getName();
infoList.add(empInfo); infoList.add(empInfo);
String dataType = ""; String dataType = "";
if (empInfo.length() == empInfo.lastIndexOf("/") + 1) { if (empInfo.length() == empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/")); String idCard = empInfo.substring(0, empInfo.indexOf("/"));
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda() tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT) .eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT));
...@@ -191,7 +194,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -191,7 +194,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
idCardList.add(idCard); idCardList.add(idCard);
if (empInfo.length() > 20) { if (empInfo.length() > 20) {
dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/")); dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
if (Common.isNotNull(elecTypeMap)) {
if (!Common.isNotNull(elecTypeMap.get(dataType))) { if (!Common.isNotNull(elecTypeMap.get(dataType))) {
return R.failed("资料类型错误:" + dataType); return R.failed("资料类型错误:" + dataType);
} }
...@@ -199,26 +201,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -199,26 +201,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
} }
} }
} }
}
for (String idCarInfo : idCardList) { for (String idCarInfo : idCardList) {
if (!infoList.stream().anyMatch(e-> containsCheckTwo(e,idCarInfo))) { if (infoList.stream().noneMatch(e-> containsCheckTwo(e,idCarInfo))) {
return R.failed(idCarInfo + ":"+"证件数据不可为空"); return R.failed(idCarInfo + ":"+"证件数据不可为空");
} }
} }
if (cardType.size() > CommonConstants.ZERO_INT) { if (cardType.size() > CommonConstants.ZERO_INT) {
for (String typeInfo :cardType) { for (String typeInfo :cardType) {
if (!infoList.stream().anyMatch(e -> containsCheckOne(e, typeInfo))) { if (infoList.stream().noneMatch(e -> containsCheckOne(e, typeInfo))) {
return R.failed(typeInfo + ":" + "证件数据不可为空"); return R.failed(typeInfo + ":" + "证件数据不可为空");
} }
} }
} }
Map<String, String> insMap = new HashMap<>(); Map<String, String> insMap = new HashMap<>();
TEmployeeInfo employeeInfo;
List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>();
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement(); entry = (ZipEntry) entries.nextElement();
//添加进filesName //添加进filesName
String empInfo = entry.getName(); String empInfo = entry.getName();
// 如果是文件夹,就创建个文件夹 // 如果是文件夹,就创建个文件夹
...@@ -249,26 +248,22 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -249,26 +248,22 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
String idCard = empInfo.substring(0, empInfo.indexOf("/")); String idCard = empInfo.substring(0, empInfo.indexOf("/"));
String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/")); String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
String empName = ""; String empName = "";
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda() employeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT) .eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isNotNull(tEmployeeInfo)) { if (Common.isNotNull(employeeInfo)) {
empName = tEmployeeInfo.getEmpName(); empName = employeeInfo.getEmpName();
} }
tElecEmployeeInfo.setEmpIdcard(idCard); tElecEmployeeInfo.setEmpIdcard(idCard);
tElecEmployeeInfo.setEmpName(empName); tElecEmployeeInfo.setEmpName(empName);
if (Common.isNotNull(elecTypeMap)) {
if (Common.isNotNull(elecTypeMap.get(dataType))) { if (Common.isNotNull(elecTypeMap.get(dataType))) {
tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType)); tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType));
} }
}
String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType); String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType);
if (Common.isEmpty(id)) { if (Common.isEmpty(id)) {
infolist.add(tElecEmployeeInfo);
this.save(tElecEmployeeInfo); this.save(tElecEmployeeInfo);
insMap.put(idCard + CommonConstants.DOWN_LINE_STRING + dataType, tElecEmployeeInfo.getId()); insMap.put(idCard + CommonConstants.DOWN_LINE_STRING + dataType, tElecEmployeeInfo.getId());
} }
list.add(insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_INT, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType)); fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_INT, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
} }
......
...@@ -159,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -159,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List<TEmployeeProject> updateList = new ArrayList<>(); List<TEmployeeProject> updateList = new ArrayList<>();
Set<String> errorMsg; Set<String> errorMsg;
//对象声明
TEmpChangeInfoVO excel;
TSettleDomain tSettleDomain;
TEmployeeProject employeeProject;
TEmployeeProject updateTEmployeePro;
TEmployeeProject tEmployeeProjectOld;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个 // 已有验证报错直接下一个
...@@ -166,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -166,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
continue; continue;
} }
errorMsg = new HashSet<>(); errorMsg = new HashSet<>();
TEmpChangeInfoVO excel = excelVOList.get(i); excel = excelVOList.get(i);
excel.setUnsettleDeal(CommonConstants.IS_NO_CHANGE); excel.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) { if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
errorMsg.add("划转起始月长度不能超过6位"); errorMsg.add("划转起始月长度不能超过6位");
...@@ -184,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -184,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
} }
//项目编码校验 //项目编码校验
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getNewSettleCode()) .eq(TSettleDomain::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING) .eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
...@@ -193,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -193,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
} }
//待划转员工已在目标项目下不可划转 //待划转员工已在目标项目下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() employeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode()) .eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(tEmployeeProject)) { if (Common.isNotNull(employeeProject)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_NEW_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
} }
// 数据合法情况 // 数据合法情况
if (CollUtil.isEmpty(errorMsg)) { if (CollUtil.isEmpty(errorMsg)) {
//划转,更新项目信息 //划转,更新项目信息
TEmployeeProject updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() updateTEmployeePro = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode()) .eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)); .eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) { if (Common.isNotNull(updateTEmployeePro)) {
...@@ -214,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -214,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) { if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) { } else if (Common.isNotNull(tSettleDomain)) {
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId()); tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo()); updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo());
updateTEmployeePro.setDeptId(tSettleDomain.getId()); updateTEmployeePro.setDeptId(tSettleDomain.getId());
updateTEmployeePro.setDeptName(tSettleDomain.getDepartName()); updateTEmployeePro.setDeptName(tSettleDomain.getDepartName());
...@@ -300,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -300,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/ */
@Override @Override
public R<List<TCustomerInfo>> getAllUint(String customerName) { public R<List<TCustomerInfo>> getAllUint(String customerName) {
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName); List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName);
return R.ok(list); return R.ok(list);
} }
......
...@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 新老项目档案List // 新老项目档案List
List<EmployeeProjectNewOldVO> updateProjectList = new ArrayList<>(); List<EmployeeProjectNewOldVO> updateProjectList = new ArrayList<>();
EmployeeProjectUpdateVO excel;
TEmployeeProject tEmployeeProject;
TEmployeeInfo tEmployeeInfo;
TEmployeeProject tEmployeeProjectOld;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
EmployeeProjectUpdateVO excel = excelVOList.get(i); excel = excelVOList.get(i);
String checkCount = excel.getEmpIdcard().concat(excel.getDeptNo()); String checkCount = excel.getEmpIdcard().concat(excel.getDeptNo());
if (Common.isNotNull(checkCountMap.get(checkCount))) { if (Common.isNotNull(checkCountMap.get(checkCount))) {
...@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
checkCountMap.put(checkCount, i + 2); checkCountMap.put(checkCount, i + 2);
} }
//根据身份证和项目编码获取项目档案 //根据身份证和项目编码获取项目档案
TEmployeeProject tEmployeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda() tEmployeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()) .eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard())
.eq(TEmployeeProject::getDeptNo, excel.getDeptNo()) .eq(TEmployeeProject::getDeptNo, excel.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)); .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
...@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
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 {
updateExcelProj(excel, updateList, tEmployeeProject); updateExcelProj(excel, updateList, tEmployeeProject);
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId()); tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
newOldProject = new EmployeeProjectNewOldVO(); newOldProject = new EmployeeProjectNewOldVO();
newOldProject.setOldProjectEmployee(tEmployeeProjectOld); newOldProject.setOldProjectEmployee(tEmployeeProjectOld);
newOldProject.setNewProjectEmployee(tEmployeeProject); newOldProject.setNewProjectEmployee(tEmployeeProject);
updateProjectList.add(newOldProject); updateProjectList.add(newOldProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda() tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard()) .eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard())
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT) .eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)); .eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
...@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
} }
if (Common.isNotEmpty(list)) { if (Common.isNotEmpty(list)) {
TEmployeeInfo tEmployeeInfo;
int i = 0; int i = 0;
for (TEmployeeProject delProject : list) { for (TEmployeeProject delProject : list) {
++i; ++i;
...@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (CommonConstants.dingleDigitIntArray[0] == delProject.getStatus()) { if (CommonConstants.dingleDigitIntArray[0] == delProject.getStatus()) {
delProject.setDeleteFlag(CommonConstants.ONE_STRING); delProject.setDeleteFlag(CommonConstants.ONE_STRING);
updList.add(delProject); updList.add(delProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda() tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, delProject.getEmpIdcard()) .eq(TEmployeeInfo::getEmpIdcard, delProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)); .eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
infoUpdList.add(tEmployeeInfo); infoUpdList.add(tEmployeeInfo);
......
...@@ -1806,7 +1806,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1806,7 +1806,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准 //查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
detail = success.getDetail(); detail = success.getDetail();
actualMoney = detail.getActualPremium(); actualMoney = detail.getActualPremium();
boolean booleanInvoiceNo = false;
if (StringUtils.isNotBlank(success.getInvoiceNo())){ if (StringUtils.isNotBlank(success.getInvoiceNo())){
if (Common.isEmpty(detail.getInvoiceNo()) || success.getInvoiceNo().equals(detail.getInvoiceNo())) {
booleanInvoiceNo = true;
}
detail.setInvoiceNo(success.getInvoiceNo()); detail.setInvoiceNo(success.getInvoiceNo());
//如果发票号不为空,将替换类型的发票号也全部更新 //如果发票号不为空,将替换类型的发票号也全部更新
list = tInsuranceReplaceService.list(Wrappers.<TInsuranceReplace>query().lambda() list = tInsuranceReplaceService.list(Wrappers.<TInsuranceReplace>query().lambda()
...@@ -1831,7 +1835,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1831,7 +1835,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.ONE_INT); doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.ONE_INT);
} }
} }
boolean booleanPolicyNo = false;
if (StringUtils.isNotBlank(success.getPolicyNo())){ if (StringUtils.isNotBlank(success.getPolicyNo())){
if (Common.isEmpty(detail.getPolicyNo()) || success.getPolicyNo().equals(detail.getPolicyNo())) {
booleanPolicyNo = true;
}
detail.setPolicyNo(success.getPolicyNo()); detail.setPolicyNo(success.getPolicyNo());
//保单号不为空,维护到保单表中 //保单号不为空,维护到保单表中
one = tInsurancePolicyService.getOne(Wrappers.<TInsurancePolicy>query().lambda() one = tInsurancePolicyService.getOne(Wrappers.<TInsurancePolicy>query().lambda()
...@@ -1933,12 +1941,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1933,12 +1941,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
boolean booleanInvoiceNo = StringUtils.isNotBlank(success.getInvoiceNo()) && !success.getInvoiceNo().equals(detail.getInvoiceNo());
boolean booleanPolicyNo = StringUtils.isNotBlank(success.getPolicyNo()) && !success.getPolicyNo().equals(detail.getPolicyNo());
boolean isEquals = Common.isNotNull(detail.getActualPremium()) && Common.isNotNull(success.getActualPremium()) && new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) == 0;
//如果当前保费为空,且保单号或发票号不一样 //如果当前保费为空,且保单号或发票号不一样
if ((StringUtils.isBlank(success.getActualPremium()) || isEquals) && (booleanInvoiceNo || booleanPolicyNo) if ((StringUtils.isBlank(success.getActualPremium()) || (Common.isNotNull(detail.getActualPremium())
&& StringUtils.isNotBlank(detail.getDefaultSettleId())) { && Common.isNotNull(success.getActualPremium()) && new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) == 0))
&& (booleanInvoiceNo || booleanPolicyNo) && StringUtils.isNotBlank(detail.getDefaultSettleId())) {
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()) { if (Optional.ofNullable(settle).isPresent()) {
//如果当前实缴信息未推送,则新增实缴单推送 //如果当前实缴信息未推送,则新增实缴单推送
...@@ -3568,12 +3574,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3568,12 +3574,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
//商险办理地权限校验 //商险办理地权限校验
Integer c = detail.getInsuranceHandleCity(); String c = detail.getInsuranceHandleCity().toString();
Integer p = detail.getInsuranceHandleProvince(); if(insuranceAreaResList.stream().noneMatch(s -> c.equals(s.getCity()))){
log.error("省市权限:" + c.toString() + "_" + p.toString());
if(insuranceAreaResList.stream().noneMatch(s -> c.equals(s.getCity()) && p.equals(s.getProvince()))){
TInsuranceAreaRes a = insuranceAreaResList.get(0);
log.error("数据库省市权限:" + a.getProvince() + "_" + a.getCity());
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION); param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
continue; continue;
} }
......
...@@ -663,6 +663,13 @@ public class TPaymentInfo extends BaseEntity { ...@@ -663,6 +663,13 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty("支出信息付款状态") @ExcelProperty("支出信息付款状态")
private String payCollectFlag; private String payCollectFlag;
/**
* EKP的 是否BPO: 是 否
*/
@Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore
private String bpoFlag;
/** /**
* 是否需要生成收入 * 是否需要生成收入
*/ */
......
...@@ -211,6 +211,15 @@ public class TProvidentFund extends BaseEntity { ...@@ -211,6 +211,15 @@ public class TProvidentFund extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目" ) @ExcelProperty("项目" )
private String settleDomain; private String settleDomain;
/**
* 项目编码
*/
@Length(max = 32, message = "项目编码 不能超过32个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码" )
private String settleDomainCode;
/** /**
* 缴纳地-省 * 缴纳地-省
*/ */
......
...@@ -314,6 +314,15 @@ public class TSocialInfo extends BaseEntity { ...@@ -314,6 +314,15 @@ public class TSocialInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目" ) @ExcelProperty("项目" )
private String settleDomain; private String settleDomain;
/**
* 项目编码
*/
@Length(max = 32, message = "项目编码 不能超过32个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码" )
private String settleDomainCode;
/** /**
* 缴纳地-省 * 缴纳地-省
*/ */
......
...@@ -260,5 +260,12 @@ public class TPaymentInfoPushVo implements Serializable { ...@@ -260,5 +260,12 @@ public class TPaymentInfoPushVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
private String createTime; private String createTime;
/**
* 是否bpo标识
*/
@Schema(description = "是否bpo标识")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否bpo标识")
private String bpoFlag;
} }
...@@ -1373,6 +1373,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1373,6 +1373,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund.setDeleteFlag(CommonConstants.ZERO_STRING); fund.setDeleteFlag(CommonConstants.ZERO_STRING);
fund.setBelongUnit(excel.getCustomerId()); fund.setBelongUnit(excel.getCustomerId());
fund.setSettleDomain(excel.getSettleDomainId()); fund.setSettleDomain(excel.getSettleDomainId());
fund.setSettleDomainCode(excel.getSettleDomainCode());
if (Common.isNotNull(empVo)){ if (Common.isNotNull(empVo)){
fund.setEmpId(empVo.getId()); fund.setEmpId(empVo.getId());
fund.setEmpNo(empVo.getEmpNo()); fund.setEmpNo(empVo.getEmpNo());
...@@ -1504,6 +1505,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1504,6 +1505,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 封装单位信息 结算信息 // 封装单位信息 结算信息
social.setBelongUnit(excel.getCustomerId()); social.setBelongUnit(excel.getCustomerId());
social.setSettleDomain(excel.getSettleDomainId()); social.setSettleDomain(excel.getSettleDomainId());
social.setSettleDomainCode(excel.getSettleDomainCode());
if (Common.isNotNull(empVo)){ if (Common.isNotNull(empVo)){
social.setEmpId(empVo.getId()); social.setEmpId(empVo.getId());
social.setEmpName(empVo.getEmpName()); social.setEmpName(empVo.getEmpName());
......
...@@ -510,11 +510,7 @@ public class DoJointSocialTask { ...@@ -510,11 +510,7 @@ public class DoJointSocialTask {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
} }
//是否为BPO业务 //是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) { socialParam.setFd_3b178dfcf9e3e6(library.getBpoFlag());
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称 //客户名称
if (Common.isNotNull(library.getUnitName())) { if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName()); socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
...@@ -809,11 +805,7 @@ public class DoJointSocialTask { ...@@ -809,11 +805,7 @@ public class DoJointSocialTask {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
} }
//是否为BPO业务 //是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) { fundParam.setFd_3b178ea361cabe(library.getBpoFlag());
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴 //单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) { if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString()); fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
......
...@@ -103,8 +103,9 @@ ...@@ -103,8 +103,9 @@
<result property="isIncomeStatus" column="IS_INCOME_STATUS"/> <result property="isIncomeStatus" column="IS_INCOME_STATUS"/>
<result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/> <result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/>
<result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/> <result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/>
<result property="paySettleFlag" column="PAY_COLLECT_FLAG"/> <result property="paySettleFlag" column="PAY_SETTLE_FLAG"/>
<result property="payCollectFlag" column="PAY_SETTLE_FLAG"/> <result property="payCollectFlag" column="PAY_COLLECT_FLAG"/>
<result property="bpoFlag" column="BPO_FLAG"/>
</resultMap> </resultMap>
<resultMap id="tPaymentInfoSumMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo"> <resultMap id="tPaymentInfoSumMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo">
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
...@@ -188,6 +189,7 @@ ...@@ -188,6 +189,7 @@
<result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/> <result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="bpoFlag" column="BPO_FLAG"/>
</resultMap> </resultMap>
<resultMap id="tPaymentInfoBatchMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo"> <resultMap id="tPaymentInfoBatchMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo">
...@@ -1178,6 +1180,7 @@ ...@@ -1178,6 +1180,7 @@
SUM( a.PERSONAL_MEDICAL_MONEY ) AS PERSONAL_MEDICAL_MONEY, SUM( a.PERSONAL_MEDICAL_MONEY ) AS PERSONAL_MEDICAL_MONEY,
SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY, SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY,
SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY, SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY,
a.BPO_FLAG,
a.CREATE_NAME, a.CREATE_NAME,
DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME DATE_FORMAT(a.CREATE_TIME,'%Y-%m-%d') AS CREATE_NAME
FROM t_payment_info a FROM t_payment_info a
...@@ -1297,7 +1300,11 @@ ...@@ -1297,7 +1300,11 @@
<!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询--> <!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询-->
<select id="getAllPushInfoById" resultMap="tPaymentInfoMap"> <select id="getAllPushInfoById" resultMap="tPaymentInfoMap">
SELECT SELECT
* ID,
INCOME_SETTLE_FLAG,
INCOME_COLLECT_FLAG,
PAY_COLLECT_FLAG,
PAY_SETTLE_FLAG
FROM t_payment_info a FROM t_payment_info a
where a.ID in (${idStr}) where a.ID in (${idStr})
</select> </select>
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/> <result property="empIdcard" column="EMP_IDCARD"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/> <result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="fundProvince" column="FUND_PROVINCE"/> <result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/> <result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/> <result property="fundTown" column="FUND_TOWN"/>
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<result property="cardinalId" column="CARDINAL_ID"/> <result property="cardinalId" column="CARDINAL_ID"/>
<result property="oldId" column="OLD_ID"/> <result property="oldId" column="OLD_ID"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/> <result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/> <result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/> <result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/> <result property="socialTown" column="SOCIAL_TOWN"/>
......
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