Commit 6aac2bbc authored by hongguangwu's avatar hongguangwu

MVP1.7.1 预入职更新在项时的薪资人员

parent fe2dca0c
......@@ -187,6 +187,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (dept == null) {
return R.failed("未找到项目信息!");
}
TSalaryEmployee tSalaryEmployee = null;
R<TSalaryEmployee> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getSalaryEmployee", empIdCard, TSalaryEmployee.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null) {
tSalaryEmployee = sdr.getData();
}
TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId);
TEmployeeInfo employee = null;
String empId = null;
......@@ -308,6 +314,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProject.setCreateTime(LocalDateTime.now());
tPreEmployeeProjectService.saveOrUpdate(tPreEmployeeProject);
vo.setTpreEmployeeProject(tPreEmployeeProject);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
if (tSalaryEmployee != null) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
tPreEmployeeInfoService.updateById(tPreEmployeeInfo);
}
}
} else {
tPreEmployeeInfo = new TPreEmployeeInfo();
......@@ -530,20 +546,14 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTpreEmployeeInfo(tPreEmployeeInfo);
}
tPreEmployeeInfo = vo.getTpreEmployeeInfo();
if (tPreEmployeeInfo != null && Common.isEmpty(tPreEmployeeInfo.getBankNo()) && Common.isNotNull(tPreEmployeeInfo.getEmpIdcard())) {
// 去薪资服务获取卡号
R<TSalaryEmployee> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getSalaryEmployee", tPreEmployeeInfo.getEmpIdcard(), TSalaryEmployee.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null) {
TSalaryEmployee tSalaryEmployee = sdr.getData();
if (tSalaryEmployee != null && Common.isNotNull(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
}
}
// 去薪资服务获取卡号
if (tPreEmployeeInfo != null && Common.isEmpty(tPreEmployeeInfo.getBankNo())
&& tSalaryEmployee != null && Common.isNotNull(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
}
// 预入职-项目档案表
if (vo.getTpreEmployeeProject() == null) {
......@@ -1420,6 +1430,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setAdmissionDate(tPreEmpEducation.getEntryDate());
tPreEmployeeInfo.setGradutionDate(tPreEmpEducation.getGradutionDate());
}
// 有在项,则更新薪资人员
boolean isMustUpdateSalary = false;
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())
&& Common.isNotNull(tPreEmployeeProject.getOldId())) {
empId = tPreEmployeeInfo.getOldId();
......@@ -1455,8 +1467,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
project.setCreateTime(LocalDateTime.now());
project.setDeleteFlag(CommonConstants.STATUS_NORMAL);
project.setProjectStatus(CommonConstants.ZERO_INT);
} else if (CommonConstants.ZERO_INT == project.getProjectStatus()) {
isMustUpdateSalary = true;
}
tEmployeeProjectService.updateById(project);
} else {
this.saveTEmployeeProject(project, user, tPreEmployeeProject, emp, dept);
}
......@@ -1478,7 +1493,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
return R.failed("新建员工失败!");
}
// 更新或新增薪资人员
if (Common.isNotNull(tPreEmployeeInfo.getBankNo())) {
// 2024-11-6 16:56:46 新逻辑:在项人员,要更新薪资人员,及时卡号为空也要更新
if (Common.isNotNull(tPreEmployeeInfo.getBankNo()) || isMustUpdateSalary) {
TSalaryEmployee newEmp = new TSalaryEmployee();
newEmp.setFileStatus(CommonConstants.ZERO_STRING);
......
......@@ -344,7 +344,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
MybankEnterpriseAccountQuerybankinfoRequestV1 request = new MybankEnterpriseAccountQuerybankinfoRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("QBKNC");
bizContent.setTranDate("20240821");
// 当天
String nowDate = DateUtil.getThisDay();
bizContent.setTranDate(nowDate);
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
......
......@@ -20,10 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -138,6 +135,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -145,6 +143,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -152,6 +151,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -160,6 +160,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -168,6 +169,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 手机号码
......@@ -184,6 +186,7 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String taxMonth;
/**
* 在职状态(0在职;1离职)
......
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