Commit 2f8d37e4 authored by hongguangwu's avatar hongguangwu

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

parents 262d6b7f 269c6cca
......@@ -147,12 +147,11 @@
SELECT
gongzi.fd_3b10afe8c70742 AS detailsId,
if(gongzi.fd_3adfee4ba5ad36 = '已结算','0',if(gongzi.fd_3adfee4ba5ad36 = '结算中','1',if(gongzi.fd_3adfee4ba5ad36 = '已冻结','3','2'))) earningStatus,
if(jiesuandan.fd_3b46bb64c5a172 = '已收','0',if(jiesuandan.fd_3b46bb64c5a172 = '垫付','2','1')) receiptStatus,
if(gongzi.fd_3adfee4c0c59ee = '已收','0',if(gongzi.fd_3adfee4c0c59ee = '垫付','2','1')) receiptStatus,
if(gongzi.fd_3adfeef9440ab2 = '已结算','0',if(gongzi.fd_3adfeef9440ab2 = '结算中','1','2')) zhichuEarningStatus,
if(fukuan.fd_3b148bc0c28e48 = '已付','0','1') payStatus
FROM
ekp_salary_info gongzi
LEFT JOIN ekp_39864c6f16e8f4f9ebc3 jiesuandan ON gongzi.fd_3adfee5dd14866 = jiesuandan.fd_3adff6ff7f48e4
LEFT JOIN ekp_db4ed54e25543f4b7a9a fukuan ON gongzi.fd_id = fukuan.fd_3b1fe00b0f5dde
where
1 = 1
......
......@@ -465,10 +465,10 @@ public class QiWeiServiceImpl extends ServiceImpl<EkpQiweiChuchaiMapper, EkpQiwi
reimburse.setFdBusinessLine(formData.getString("业务条线归属"));
// 代为发起随行人员出差流程,标识含义:1:是;2:否
if(CommonConstants.ONE_STRING.equals(formData.getString("代为发起随行人员出差流程"))){
reimburse.setFdPersonTravelProcess(formData.getString("是"));
reimburse.setFdPersonTravelProcess("是");
}
if(CommonConstants.TWO_STRING.equals(formData.getString("代为发起随行人员出差流程"))){
reimburse.setFdPersonTravelProcess(formData.getString("否"));
reimburse.setFdPersonTravelProcess("否");
}
}
......
......@@ -306,7 +306,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Override
public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) {
String pre = this.checkNewEmpBankAndPhone(employee, false);
if (pre != null) return pre;
if (pre != null) {return pre;}
if (notLabour) {
this.save(employee);
}
......@@ -321,8 +321,10 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<String> phoneList = new ArrayList<>();
TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : saveNewEmpList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
log.error("走到了》》》》saveNewEmployeeList");
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
//&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
......@@ -340,10 +342,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
Map<String, Boolean> bankMap = new HashMap<>();
Map<String, Boolean> phoneMap = new HashMap<>();
if (!bankList.isEmpty()) {
log.error("走到了》》》》批量校验 卡号");
R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
bankMap = checkListR.getData().getCheckMap();
log.error("走到了》》》》bankMap>>{}",bankMap.toString());
}
}
if (!phoneList.isEmpty()) {
......@@ -356,12 +360,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
boolean isFalse = false;
for (TSalaryEmployee employee : saveNewEmpList) {
log.error("走到了》》》》代发户的新员工也校验银行卡号");
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
//&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
&& (Common.isEmpty(employee.getSalaryGiveTime())
|| CommonConstants.ZERO_STRING.equals(employee.getSalaryGiveTime())
|| (CommonConstants.ONE_STRING.equals(employee.getSalaryGiveTime()) && Common.isNotNull(employee.getBankNo())))) {
if (bankMap.get(employee.getBankNo()) != null) {
log.error("走到了》》》》校验银行卡号>>{}",bankMap.get(employee.getBankNo()));
if (Boolean.FALSE.equals(bankMap.get(employee.getBankNo()))) {
errorList.add(new ErrorMessage((employee.getLineNums() ), "第" + (employee.getLineNums() ) + "行:该员工新建失败:【姓名与卡号验证:认证不一致】"));
isFalse = true;
......@@ -397,8 +404,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
List<TCheckBankNo> bankList = new ArrayList<>();
TCheckBankNo checkBankNo;
for (TSalaryEmployee employee : updateEmployeeBankList) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
log.error("走到了》》》》updateEmployeeBankList");
if (Common.isNotNull(employee.getBankNo())
&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
//&& (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))
) {
checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
checkBankNo.setBankNo(employee.getBankNo());
......@@ -419,11 +429,13 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
String areaCity;
TSalaryEmployee oldEmp;
ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class);
TSalaryEmpModLog log;
TSalaryEmpModLog empLog;
List<TSalaryEmpModLog> saveLogList = new ArrayList<>();
for (TSalaryEmployee employee : updateEmployeeBankList) {
log.error("走到了》》》》updateEmployeeBankList2");
if (Common.isNotNull(employee.getBankNo())) {
if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) {
// cyx-mvp1.7.0:调整 代发户的新员工也校验银行卡号
//if (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT)) {
oldEmp = updateEmpBankMap.get(employee.getEmpIdcard());
if (oldEmp != null) {
if (Common.isNotNull(employee.getBankProvince())) {
......@@ -445,7 +457,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
isFalse = true;
}
}
log.error("走到了》》》》updateEmployeeBank校验银行卡号>>{}",bankMap.get(employee.getBankNo()));
log.error("走到了》》》》updateEmployeeBank校验银行卡号>>employee>>{}",employee.toString());
// 有变更才更新
if ((Common.isNotNull(employee.getBankNo()) && !employee.getBankNo().equals(oldEmp.getBankNo()))
|| (Common.isNotNull(employee.getBankProvince()) && !employee.getBankProvince().equals(oldEmp.getBankProvince()))
......@@ -463,31 +476,32 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
isFalse = true;
}
if (!isFalse) {
log = logService.checkEditToLog(employee, oldEmp, CommonConstants.FOUR_STRING, employee.getCreateName(), util);
if (log != null) {
saveLogList.add(log);
empLog = logService.checkEditToLog(employee, oldEmp, CommonConstants.FOUR_STRING, employee.getCreateName(), util);
if (empLog != null) {
saveLogList.add(empLog);
}
}
}
}
} else if (employee.getIssueStatus().equals(CommonConstants.ONE_INT) && Common.isNotNull(employee.getBankProvince())) {
areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
if (Common.isNotNull(areaProvince)) {
if (Common.isNotNull(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);
} else {
employee.setBankCity(null);
}
}
employee.setBankProvince(areaProvince);
} else {
employee.setBankProvince(null);
}
}
//}
// else if (employee.getIssueStatus().equals(CommonConstants.ONE_INT) && Common.isNotNull(employee.getBankProvince())) {
// areaProvince = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + employee.getBankProvince().trim());
// if (Common.isNotNull(areaProvince)) {
// if (Common.isNotNull(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);
// } else {
// employee.setBankCity(null);
// }
// }
// employee.setBankProvince(areaProvince);
// } else {
// employee.setBankProvince(null);
// }
// }
}
}
for (TSalaryEmployee employee : updateEmployeeBankList) {
......@@ -557,7 +571,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
// 银行卡
// 代发户的,不校验卡号,下次使用的时候校验卡号
if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
// todo cyx-mvp1.7.0: 本次是代发户,是新员工,也要要校验银行卡(但是薪酬导入类型是劳务费才会走到这里)
if (Common.isNotNull(employee.getBankNo())) {
//if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
// 调用校验服务
TCheckBankNo checkBankNo = new TCheckBankNo();
checkBankNo.setName(employee.getEmpName());
......@@ -1164,7 +1180,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TSalaryEmployee old = baseMapper.selectById(tSalaryEmployee.getId());
// 2024-2-4 16:05:56 hgw 银行卡需要校验
String pre = getCheckBankNo(tSalaryEmployee, old);
if (pre != null) return R.failed(pre);
if (pre != null) {return R.failed(pre);}
// 变更日志 fxj 2023-10-24
logService.initModLog(tSalaryEmployee,old,CommonConstants.ZERO_STRING,user.getNickname(),null);
......
......@@ -278,6 +278,7 @@ public class SalaryAccountUtil implements Serializable {
newEmp.setEmpName(empName);
}
// todo cyx-mvp1.7.0修复:去掉重复判断
if ((SalaryConstants.IF_NEW_EMPLOYEE.equals(dbFiedName) || SalaryConstants.IS_NEW_EMPLOYEE.equals(dbFiedName))
&& SalaryConstants.IS_NEW.equals(cellValueStr)) {
isNewEmployee = true;
......@@ -555,6 +556,7 @@ public class SalaryAccountUtil implements Serializable {
otherEmp = otherEmpMap.get(newEmps.getEmpIdcard());
if (otherEmp == null) {
if (CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())) {
// 赋值新员工信息
if (!this.setNewEmpBase(newEmps, newEmps.getLineNums() + dataRow, errorList, notLabour
, entity, salaryType, dept, user, entity.getSalaryStyle()
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime()), invoiceTitle
......@@ -629,12 +631,17 @@ public class SalaryAccountUtil implements Serializable {
}
}
if (canSave) {
log.error("走到了》》》》canSave");
log.error("走到了》》》》saveNewEmpList>>>{}",saveNewEmpList.toString());
// 新增
if (!saveNewEmpList.isEmpty()) {
log.error("走到了》》》》saveNewEmpList");
tSalaryEmployeeService.saveNewEmployeeList(saveNewEmpList, errorList);
}
log.error("走到了》》》》updateEmpBankList>>>{}",updateEmpBankList.toString());
// 更新人员信息
if (!updateEmpBankList.isEmpty()) {
log.error("走到了》》》》updateEmpBankList");
tSalaryEmployeeService.updateEmployeeBankList(updateEmpBankList, updateEmpBankMap, errorList);
}
}
......@@ -731,6 +738,11 @@ public class SalaryAccountUtil implements Serializable {
checkBankInfoEmpList.add(emp);
}
// cyx-mvp1.7.0: 新增:本次是代发户,是新员工,要校验银行卡
// if (isIssue == 1 && isNewEmployee && Common.isNotNull(emp.getBankNo())) {
// checkBankInfoEmpList.add(emp);
// }
entity.setEmpId(emp.getId());
entity.setEmpIdcard(emp.getEmpIdcard());
entity.setEmpName(emp.getEmpName());
......
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