Commit 9ee7bcde authored by huyuchen's avatar huyuchen

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

parents 4a0f4631 7cc707ba
......@@ -132,6 +132,27 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
WriteNullStringAsEmpty, WriteDateUseDateFormat
};
private static final List<String> IGNORE_FIELD = new ArrayList<>();
static {
IGNORE_FIELD.add("joinLeaveDate");
IGNORE_FIELD.add("createTime");
IGNORE_FIELD.add("modelType");
IGNORE_FIELD.add("empPhone");
IGNORE_FIELD.add("employeeName");
IGNORE_FIELD.add("empIdcard");
IGNORE_FIELD.add("deptNo");
IGNORE_FIELD.add("deptName");
IGNORE_FIELD.add("deptId");
IGNORE_FIELD.add("customerUsername");
IGNORE_FIELD.add("customerUserLoginname");
IGNORE_FIELD.add("dataSource");
IGNORE_FIELD.add("position");
IGNORE_FIELD.add("createBy");
IGNORE_FIELD.add("createName");
IGNORE_FIELD.add("updateBy");
}
@Override
public void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap) {
......@@ -187,8 +208,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isNotNull(newInsurance.getId())) {
oldInsurance = oldMap.get(newInsurance.getId());
if (oldInsurance != null) {
initDateHour(oldInsurance);
differenceInsuranceKey = HrEquator.comparisonValue(oldInsurance, newInsurance);
differenceInsuranceKey = HrEquator.comparisonValueIgnoreField(oldInsurance, newInsurance, IGNORE_FIELD);
}
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail();
......@@ -262,29 +282,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
/**
* @Description: 设置日期为08点
* @Author: hgw
* @Date: 2025/4/14 18:52
* @return: void
**/
public void initDateHour(TEmployeeInsurancePre oldInsurance) {
if (oldInsurance != null) {
oldInsurance.setModelType(CommonConstants.TWO_STRING);
if (Common.isNotNull(oldInsurance.getPolicyStart())) {
oldInsurance.setPolicyStart(DateUtil.setHourByDate(oldInsurance.getPolicyStart()));
}
if (Common.isNotNull(oldInsurance.getPolicyEnd())) {
oldInsurance.setPolicyEnd(DateUtil.setHourByDate(oldInsurance.getPolicyEnd()));
}
if (Common.isNotNull(oldInsurance.getPolicyEffect())) {
oldInsurance.setPolicyEffect(DateUtil.setHourByDate(oldInsurance.getPolicyEffect()));
}
if (Common.isNotNull(oldInsurance.getJoinLeaveDate())) {
oldInsurance.setJoinLeaveDate(DateUtil.setHourByDate(oldInsurance.getJoinLeaveDate()));
}
}
}
@Override
public void saveUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, String userId, String nickName, Map<String, TEmployeeInsurancePre> oldMap) {
......
......@@ -41,11 +41,12 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "手机号码")
private String empPhone;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
@Schema(description = "入职日期")
private Date joinLeaveDate;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
@Schema(description = "登记日期")
private Date registTime;
......@@ -70,7 +71,7 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "项目id")
private String deptId;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
@Schema(description = "预计派单时间")
private LocalDateTime expectedCollectionTime;
......@@ -89,15 +90,15 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "购买类型, 1新增、3批增、4替换")
private Integer buyType;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
@Schema(description = "保单开始时间")
private Date policyStart;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
@Schema(description = "保单结束时间")
private Date policyEnd;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
@Schema(description = "预计生效日期")
private Date policyEffect;
......
......@@ -233,5 +233,13 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
Integer selectDivitionCount(@Param("name")String name);
Integer selectDivitionLineCount(@Param("name")String name);
//变更后项目负责人
List<SysUserPermission> getUserPermissionByAutoCreateXMBG1(String fdId);
//变更前项目负责人
List<SysUserPermission> getUserPermissionByAutoCreateXMBG2(String fdId);
//变更后项目团队
List<SysUserPermission> getUserPermissionByAutoCreateXMBG3(String fdId);
//变更前项目团队
List<SysUserPermission> getUserPermissionByAutoCreateXMBG4(String fdId);
}
......@@ -485,7 +485,28 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
list = baseMapper.getUserPermissionByAutoCreateXM(fdId); break;
case "项目变更": //项目服务团队及项目负责人变更 fxj 20250410 V1.7.9
deleteType = CommonConstants.dingleDigitStrArray[5];
list = baseMapper.getUserPermissionByAutoCreateXMBG(fdId); break;
//list = baseMapper.getUserPermissionByAutoCreateXMBG(fdId);
List<SysUserPermission> temp;
//变更后项目负责人
temp = baseMapper.getUserPermissionByAutoCreateXMBG1(fdId);
list = new ArrayList<>();
//无变更取值变更前项目负责人
if (Common.isEmpty(temp)){
temp = baseMapper.getUserPermissionByAutoCreateXMBG2(fdId);
}
if (Common.isNotNull(temp)){
list.addAll(temp);
}
//变更后服务团队
temp = baseMapper.getUserPermissionByAutoCreateXMBG3(fdId);
//无变更取值变更前服务团队
if (Common.isEmpty(temp)){
temp = baseMapper.getUserPermissionByAutoCreateXMBG4(fdId);
}
if (Common.isNotNull(temp)){
list.addAll(temp);
}
break;
default:
list = new ArrayList<>();
}
......
......@@ -494,4 +494,63 @@
from ekp_shenhepeizhi_table a
where a.fd_tiaoxian = #{name}
</select>
<!-- 变更后项目团队 -->
<select id="getUserPermissionByAutoCreateXMBG3" resultMap="sysUserPermissionMap">
select a.EMP_NAME,a.EMP_LOGIN_NAME,a.EMP_DEPT,a.PERMISSION_TYPE,a.NAME,a.CODE,a.SOURCE_TYPE,a.IS_CONTAINS,a.PERMISSION_STATUS,a.DELETE_FLAG,a.USER_ID,a.DOMAIN_ID
from (
select
e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN ekporg_195eb1d6815b96ceb269 f on f.fd_parent_id = d.fd_id
LEFT JOIN sys_org_element e on e.fd_id = f.sys_org_person_id JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 变更后项目负责人 -->
<select id="getUserPermissionByAutoCreateXMBG1" resultMap="sysUserPermissionMap">
select a.EMP_NAME,a.EMP_LOGIN_NAME,a.EMP_DEPT,a.PERMISSION_TYPE,a.NAME,a.CODE,a.SOURCE_TYPE,a.IS_CONTAINS,a.PERMISSION_STATUS,a.DELETE_FLAG,a.USER_ID,a.DOMAIN_ID
from (
select
e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN sys_org_element e on e.fd_id = d.fd_changeafter
JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 变更前项目团队 -->
<select id="getUserPermissionByAutoCreateXMBG4" resultMap="sysUserPermissionMap">
select a.EMP_NAME,a.EMP_LOGIN_NAME,a.EMP_DEPT,a.PERMISSION_TYPE,a.NAME,a.CODE,a.SOURCE_TYPE,a.IS_CONTAINS,a.PERMISSION_STATUS,a.DELETE_FLAG,a.USER_ID,a.DOMAIN_ID
from (
select
e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN ekporg_18622320f73771d520db f on f.fd_parent_id = d.fd_id
LEFT JOIN sys_org_element e on e.fd_id = f.sys_org_person_id JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
<!-- 变更前项目负责人 -->
<select id="getUserPermissionByAutoCreateXMBG2" resultMap="sysUserPermissionMap">
select a.EMP_NAME,a.EMP_LOGIN_NAME,a.EMP_DEPT,a.PERMISSION_TYPE,a.NAME,a.CODE,a.SOURCE_TYPE,a.IS_CONTAINS,a.PERMISSION_STATUS,a.DELETE_FLAG,a.USER_ID,a.DOMAIN_ID
from (
select
e.fd_name EMP_NAME,p.fd_login_name EMP_LOGIN_NAME,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) EMP_DEPT
,'5' PERMISSION_TYPE,d.fd_3b8797876dc13c_text NAME,d.fd_3b879793d37afe CODE,0 SOURCE_TYPE
,'1' IS_CONTAINS,'0' PERMISSION_STATUS,'1' DELETE_FLAG,e.fd_id USER_ID,d.fd_id DOMAIN_ID
from ekp_d701e3e72794ff390ca8 d
LEFT JOIN sys_org_element e on e.fd_id = d.fd_changebefore
JOIN sys_org_person p on e.fd_id=p.fd_id
where d.fd_id = #{fdId}
) a GROUP BY a.USER_ID
</select>
</mapper>
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