Commit 6ec6dd1f authored by huyuchen's avatar huyuchen

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

parents cce579d3 8e7eaf35
......@@ -81,7 +81,7 @@ public class TAttaInfo extends BaseEntity {
@TableField(exist = false)
private String attaUrl;
/**
* 附件变更类型:0 增加 1 减少。 档案编辑附件时需要告知后端是增加还是减少
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField(exist = false)
private String handleType;
......
......@@ -78,7 +78,7 @@ public class TEmpOtherFile {
@TableField(exist = false)
private List<TAttaInfo> attaList;
/**
* 档案编辑其他附件分租信息处理类型 0 新增 1 更新 2 删除
* 档案编辑其他附件分租信息处理类型 0 新增 1 更新 2 删除 3 不变
*/
@TableField(exist = false)
private String handleType;
......
......@@ -249,22 +249,32 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
this.doUpdateEducationCore(education, employeeInfo);
// 更新附件信息 fxj 2024-09-09
updateOtherAtta(employeeInfo);
// 获取最新附件信息 fxj 2024-09-09
getAttaInfo(employeeInfo);
if (updateOtherAtta(employeeInfo)){
// 获取最新附件信息 fxj 2024-09-09
getAttaInfo(employeeInfo);
} else{
old.setOtherFiles(null);
employeeInfo.setOtherFiles(null);
}
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], old.getId(), "", old, employeeInfo);
return R.ok(this.updateById(employeeInfo));
}
private void updateOtherAtta(TEmployeeInfo employeeInfo) {
private boolean updateOtherAtta(TEmployeeInfo employeeInfo) {
List<TEmpOtherFile> otherFileList = employeeInfo.getOtherFiles();
boolean flag = false;
if (Common.isNotNull(otherFileList)){
List<TAttaInfo> attaInfos = new ArrayList<>();
for (TEmpOtherFile otherFile:otherFileList){
//处理新增或删除其他附件分租的逻辑
handleOtherFile(otherFile);
if (!flag){
flag = handleOtherFile(otherFile);
}else {
handleOtherFile(otherFile);
}
if (Common.isNotNull(otherFile.getAttaList())){
attaInfos.addAll(otherFile.getAttaList());
}
......@@ -276,27 +286,29 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (CommonConstants.ZERO_STRING.equals(attaInfo.getHandleType())){
adds.add(attaInfo);
}
if (CommonConstants.ONE_STRING.equals(attaInfo.getHandleType())){
adds.add(attaInfo);
}
if (CommonConstants.TWO_STRING.equals(attaInfo.getHandleType())){
deleteIds.add(attaInfo.getId());
}
}
if (Common.isNotNull(deleteIds)){
attaInfoService.removeBatchByIds(deleteIds);
flag =true;
}
if (Common.isNotNull(adds)){
attaInfoService.updateBatchById(adds);
flag =true;
}
}
}
return flag;
}
private void handleOtherFile(TEmpOtherFile otherFile) {
private boolean handleOtherFile(TEmpOtherFile otherFile) {
boolean flag =false;
// 新增时先增加 empOtherFile
if (CommonConstants.ZERO_STRING.equals(otherFile.getHandleType())){
empOtherFileService.save(otherFile);
flag = true;
if (Common.isNotNull(otherFile.getAttaList())){
for (TAttaInfo info: otherFile.getAttaList()){
info.setDomainId(otherFile.getId());
......@@ -304,6 +316,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 更新
}if (CommonConstants.ONE_STRING.equals(otherFile.getHandleType())){
flag = true;
if (Common.isNotNull(otherFile.getId())){
empOtherFileService.updateById(otherFile);
if (Common.isNotNull(otherFile.getAttaList())){
......@@ -313,9 +326,20 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
// 删除时
}else if (CommonConstants.TWO_STRING.equals(otherFile.getHandleType())){
}if (CommonConstants.THREE_STRING.equals(otherFile.getHandleType())){
if (Common.isNotNull(otherFile.getId())){
if (Common.isNotNull(otherFile.getAttaList())){
for (TAttaInfo info: otherFile.getAttaList()){
info.setDomainId(otherFile.getId());
}
}
}
// 删除时
}else if (CommonConstants.TWO_STRING.equals(otherFile.getHandleType())){
empOtherFileService.removeById(otherFile.getId());
flag = true;
}
return flag;
}
private void getAttaInfo(TEmployeeInfo emp) {
......
......@@ -1447,7 +1447,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
employee.setEmpPhone(vo.getMobile());
}
if(Common.isEmpty(vo.getFlag())){
employee.setIsCollege(CommonConstants.ZERO_INT);
if (Common.isNotNull(vo.getHighEducation())) {
employee.setHignEducation(vo.getHighEducation());
if ("5".equals(employee.getHignEducation())
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import lombok.Getter;
import lombok.Setter;
......@@ -47,4 +48,7 @@ public class SalaryUploadOriginalParamVo {
// 新员工是否更新:0否;1是
String newEmpUpdateFlag;
// @ExcelProperty("是否固定列")
Integer isFixedColumn;
}
......@@ -53,4 +53,7 @@ public class SalaryUploadParamVo {
// 新员工是否更新:0否;1是
String newEmpUpdateFlag;
// @ExcelProperty("是否固定列")
Integer isFixedColumn;
}
......@@ -360,6 +360,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (Common.isNotNull(vo.getOriginalSetName())){
salary.setOriginalSetName(vo.getOriginalSetName());
}
if (Common.isNotNull(vo.getIsFixedColumn())){
salary.setIsFixedColumn(vo.getIsFixedColumn());
}
// 薪资导入、删除前加锁:
TSalaryLock lock = salaryLockService.lambdaQuery()
.eq(TSalaryLock::getDeptId, dept.getId())
......
......@@ -70,6 +70,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 薪酬人员表
......@@ -488,6 +490,21 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
}
}
for (TSalaryEmployee employee : updateEmployeeBankList) {
if (Common.isNotNull(employee.getBankProvince()) && !regNumber(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(employee.getBankCity()) && !regNumber(employee.getBankCity())) {
areaCity = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + employee.getBankProvince().trim());
if (Common.isNotNull(areaCity)) {
employee.setBankCity(areaCity);
}
}
employee.setBankProvince(areaProvince);
}
}
}
if (isFalse) {
return null;
}
......@@ -499,6 +516,16 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return null;
}
private static boolean regNumber(String content) {
boolean flag = false;
Pattern p = Pattern.compile("^[0-9]*$");
Matcher m = p.matcher(content);
if (m.matches()) {
flag = true;
}
return flag;
}
/**
* @param employee
* @Description: 校验卡号与手机号
......
......@@ -1078,6 +1078,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
returnVo.setSetName(excelVo.getSetName());
returnVo.setOriginalSetName(excelVo.getOriginalSetName());
returnVo.setNewEmpUpdateFlag(excelVo.getNewEmpUpdateFlag());
returnVo.setIsFixedColumn(excelVo.getIsFixedColumn());
//数据保存
return R.ok(returnVo);
}
......
......@@ -774,7 +774,7 @@ public class SalaryAccountUtil implements Serializable {
} else {
emp.setBankProvince(entity.getBankProvince());
}
if (Common.isEmpty(emp.getBankCity())) {
if (Common.isEmpty(entity.getBankCity())) {
if (Common.isEmpty(emp.getBankCity())) {
error = "第" + i + SalaryConstants.LINE_EMP + emp.getEmpIdcard() + "-发放方式为银行发放,但是-开户行市-为空,请在工资模板正确填写!";
errorList.add(new ErrorMessage(i, error));
......
......@@ -1357,9 +1357,9 @@
<select id="getAccountSumBySalaryId" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo">
select
sum(a.RELAY_SALARY) RELAY_SALARY
,sum(a.ACTUAL_SALARY) ACTUAL_SALARY
,sum(a.SALARY_TAX) SALARY_TAX
sum(ifnull(a.RELAY_SALARY,0)) RELAY_SALARY
,sum(ifnull(a.ACTUAL_SALARY,0)) ACTUAL_SALARY
,sum(ifnull(a.SALARY_TAX,0)) SALARY_TAX
,sum(ifnull(annualBonus.SALARY_MONEY,0)) annual_Bonus
,sum(ifnull(a.ANNUAL_BONUS_TAX,0)) ANNUAL_BONUS_TAX
,sum(ifnull(a.UNIT_SOCIAL,0))+sum(ifnull(a.PERSON_SOCIAL,0)) ALL_SOCIAL
......@@ -1373,8 +1373,8 @@
,sum(ifnull(enterpriseAnnuityUnit.SALARY_MONEY,0)) enterprise_Annuity_Unit
,sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeduction
,sum(ifnull(exemptionPersionTax.SALARY_MONEY,0)) exemptionPersionTax
,a.SALARY_MONTH salaryMonth
,count(1) num
,max(a.SALARY_MONTH) salaryMonth
,count(distinct a.id) num
from t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
......
......@@ -263,6 +263,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
this.getOneAppGetModuleDetail(socialIdList, file, socialType);
}
} catch (Exception e) {
log.error("提交社保士兵异常2:",e);
if (!logList.isEmpty()) {
for (TSocialSoldierLog logTemp : logList) {
logTemp.setRemark("提交社保士兵异常!");
......@@ -330,6 +331,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
this.getOneAppGetModuleDetail(socialIdList, file, socialType);
}
} catch (Exception e) {
log.error("提交社保士兵异常1:",e);
if (!logList.isEmpty()) {
for (TSocialSoldierLog logTemp : logList) {
logTemp.setRemark("提交社保士兵异常!");
......@@ -486,6 +488,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
try {
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
} catch (Exception e) {
log.error(errorRemark +"2:",e);
if (!logList.isEmpty()) {
// 异常时,更新日志
for (TSocialSoldierLog logTemp : logList) {
......@@ -524,6 +527,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
try {
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
} catch (Exception e) {
log.error(errorRemark +"1:",e);
if (!logList.isEmpty()) {
// 异常时,更新日志
for (TSocialSoldierLog logTemp : logList) {
......@@ -563,6 +567,7 @@ public class TSocialSoldierPushServiceImpl extends ServiceImpl<TSocialSoldierMap
try {
this.getOneAppGetModuleDetailByAudit(socialIdList, file, sheetName);
} catch (Exception e) {
log.error(errorRemark +"3:",e);
if (!logList.isEmpty()) {
// 异常时,更新日志
for (TSocialSoldierLog logTemp : logList) {
......
......@@ -56,5 +56,6 @@ soldier:
authorizations : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODA2ZjRlYzYzZjY0NjVlOGFlZjRmZmVlOTYwMzcxNiIsInN1YiI6IjIiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLmtYvor5UiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiMiIsIm5iZiI6MTcxMjg5Mjk1OCwiZXhwIjoxNzIzMjYwOTU4LCJpYXQiOjE3MTI4OTI5NTh9.oTmhLfv1tLq8aPOfO3LeqM1IDYT76YGXkqpz3dwBX4M
urlPre : http://172.16.24.66:55555
#线上社保士兵,一般不允许用,用之前要清理测试环境当月的社保自动化数据,否则有可能产生费用
#authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MzcwYWIyZDRhZTI0NjQ2YTg0MTE0Mzk1Y2M2MTkzMiIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcxNjE3OTIxOSwiZXhwIjoxNzI2NTQ3MjE5LCJpYXQiOjE3MTYxNzkyMTl9.Ei-52hRlfMLXLzpzmbP2xCVFZKE5sHHexzfX5PtmZ_M
#原先的老的 : authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MzcwYWIyZDRhZTI0NjQ2YTg0MTE0Mzk1Y2M2MTkzMiIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcxNjE3OTIxOSwiZXhwIjoxNzI2NTQ3MjE5LCJpYXQiOjE3MTYxNzkyMTl9.Ei-52hRlfMLXLzpzmbP2xCVFZKE5sHHexzfX5PtmZ_M
#authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ZmRjOGJmYWM0Yjg0NTkzYmMzNjllYzAwN2ExODgzZCIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcyNjcxMjQzOSwiZXhwIjo1NTExMDMyNDM5LCJpYXQiOjE3MjY3MTI0Mzl9.o91Ay4hRJofg76WCColUaixuyOyWvsuMDTWZMKSThc0
#urlPre: http://60.168.131.18:55555
\ No newline at end of file
......@@ -53,5 +53,5 @@ spring:
password: '@yf_2022'
#社保士兵相关属性配置
soldier:
authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MzcwYWIyZDRhZTI0NjQ2YTg0MTE0Mzk1Y2M2MTkzMiIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcxNjE3OTIxOSwiZXhwIjoxNzI2NTQ3MjE5LCJpYXQiOjE3MTYxNzkyMTl9.Ei-52hRlfMLXLzpzmbP2xCVFZKE5sHHexzfX5PtmZ_M
authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ZmRjOGJmYWM0Yjg0NTkzYmMzNjllYzAwN2ExODgzZCIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcyNjcxMjQzOSwiZXhwIjo1NTExMDMyNDM5LCJpYXQiOjE3MjY3MTI0Mzl9.o91Ay4hRJofg76WCColUaixuyOyWvsuMDTWZMKSThc0
urlPre: http://60.168.131.18:55555
\ No newline at end of file
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