Commit c1319299 authored by huyuchen's avatar huyuchen

Merge branch 'MVP1.6.1' into develop

parents 02c15d1c e6098502
......@@ -441,6 +441,14 @@ public class EmployeeProjectExportVO {
@ExcelAttribute(name = "项目档案来源", isDataId = true,dataType = ExcelAttributeConstants.PROJECT_EMP_SOURCE)
private String projectSource;
/**
* 通信地址
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="通信地址")
@ExcelAttribute(name = "通信地址")
private String contactAddress;
/**
* 项目档案状态(0=正常,1=已减项)
*/
......
......@@ -118,6 +118,7 @@
<result property="contractStatus" column="CONTRACT_STATUS"/>
<result property="empLabel" column="EMP_LABEL"/>
<result property="contractParty" column="CONTRACT_PARTY"/>
<result property="contactAddress" column="contact_address"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -835,7 +836,7 @@
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
<include refid="Base_Export_List"/>,b.contact_address
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN (
......
......@@ -146,6 +146,8 @@ public interface CommonConstants {
String SIXTEEN_STRING = "16";
public static final String DEFAULT_PASSWORD = "123456";
/**
* number 0
*/
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @Author huyc
* @Date 2024-1-31 15:38:08
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource("classpath:daprConfig.properties")
@ConfigurationProperties(value = "dapr.permission", ignoreInvalidFields = false)
public class DaprPermissionProperties {
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String appUrl;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String appId;
String appPort;
String httpPort;
String grpcPort;
String metricsPort;
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprPermissionProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
/**
* @Author huyc
* @Date 2024-01-31
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprPermissionProperties.class)
public class PermissionDaprUtil {
@Autowired
private DaprPermissionProperties daprProperties;
/**
* @Author huyc
* @Description 新增用户初始化角色信息
* @Date 2024/1/31
* @Param
* @return
**/
public void saveSysUserRole(HcmInitRoleInfoVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/sysuserroleres/inner/saveSysUserRole", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
}
}
......@@ -5,4 +5,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.PermissionDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
......@@ -65,8 +65,13 @@ public class PersonVo {
* 用户密码
*/
@Attribute(name = "userPassword")
private String password;
private Object password;
/**
* 用户角色
*/
@Attribute(name = "x-init-role-ids")
private String roleIds;
/**
* 创建时间
......
......@@ -28,6 +28,9 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if (null != attributes.get("ou")) {
personVo.setDeptName((String) attributes.get("ou").get());
}
if (null != attributes.get("x-init-role-ids")) {
personVo.setRoleIds((String) attributes.get("x-init-role-ids").get());
}
return personVo;
}
}
......@@ -62,6 +62,18 @@ public class InsuranceRefundParam extends BaseEntity implements Serializable {
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyJingQueStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyJingQueEnd;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
......
......@@ -66,6 +66,18 @@ public class InsuredParam extends BaseEntity implements Serializable {
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyJingQueStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyJingQueEnd;
/**
* 发票号
*/
......
......@@ -634,12 +634,13 @@
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and (param.policyEnd == null or param.policyEnd.trim() == '')">
AND a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00')
<if test="param.policyJingQueStart != null and param.policyJingQueStart.trim() != ''">
AND DATE_FORMAT(a.POLICY_START,"%Y-%m-%d") = #{param.policyJingQueStart}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and (param.policyStart == null or param.policyStart.trim() == '')">
AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
<if test="param.policyJingQueEnd != null and param.policyJingQueEnd.trim() != ''">
AND DATE_FORMAT(a.POLICY_END,"%Y-%m-%d") = #{param.policyJingQueEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
......@@ -745,6 +746,12 @@
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and (param.policyStart == null or param.policyStart.trim() == '')">
AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.policyJingQueStart != null and param.policyJingQueStart.trim() != ''">
AND DATE_FORMAT(a.POLICY_START,"%Y-%m-%d") = #{param.policyJingQueStart}
</if>
<if test="param.policyJingQueEnd != null and param.policyJingQueEnd.trim() != ''">
AND DATE_FORMAT(a.POLICY_END,"%Y-%m-%d") = #{param.policyJingQueEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
......@@ -819,6 +826,12 @@
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and (param.policyStart == null or param.policyStart.trim() == '')">
AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.policyJingQueStart != null and param.policyJingQueStart.trim() != ''">
AND DATE_FORMAT(a.POLICY_START,"%Y-%m-%d") = #{param.policyJingQueStart}
</if>
<if test="param.policyJingQueEnd != null and param.policyJingQueEnd.trim() != ''">
AND DATE_FORMAT(a.POLICY_END,"%Y-%m-%d") = #{param.policyJingQueEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
......@@ -903,6 +916,12 @@
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and (param.policyStart == null or param.policyStart.trim() == '')">
AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.policyJingQueStart != null and param.policyJingQueStart.trim() != ''">
AND DATE_FORMAT(a.POLICY_START,"%Y-%m-%d") = #{param.policyJingQueStart}
</if>
<if test="param.policyJingQueEnd != null and param.policyJingQueEnd.trim() != ''">
AND DATE_FORMAT(a.POLICY_END,"%Y-%m-%d") = #{param.policyJingQueEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
......@@ -983,6 +1002,12 @@
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and (param.policyStart == null or param.policyStart.trim() == '')">
AND a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if test="param.policyJingQueStart != null and param.policyJingQueStart.trim() != ''">
AND DATE_FORMAT(a.POLICY_START,"%Y-%m-%d") = #{param.policyJingQueStart}
</if>
<if test="param.policyJingQueEnd != null and param.policyJingQueEnd.trim() != ''">
AND DATE_FORMAT(a.POLICY_END,"%Y-%m-%d") = #{param.policyJingQueEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(a.POLICY_START <![CDATA[ <= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyEnd}, ' 23:59:59')) OR
......
......@@ -64,6 +64,16 @@ public class SysUserRoleRes {
@Schema(description = "角色ID")
private String roleId;
/**
* 登录名
*/
@ExcelAttribute(name = "登录名", isNotEmpty = true, errorInfo = "登录名不能为空", maxLength = 50)
@NotBlank(message = "登录名")
@Length(max = 50, message = "登录名不能超过50个字符")
@ExcelProperty("登录名")
@Schema(description = "登录名")
private String loginName;
@TableField(exist = false)
private String roleName;
......
......@@ -3,8 +3,10 @@ package com.yifu.cloud.plus.v1.permission.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo;
import io.swagger.v3.oas.annotations.Operation;
......@@ -121,4 +123,17 @@ public class SysUserRoleResController {
return R.ok(sysUserRoleResService.removeById(fdId));
}
/**
* @param vo
* @Description: 新增用户角色信息
* @Author: huyc
* @Date: 2024/2/18
* @return:
**/
@Inner
@PostMapping("/inner/saveSysUserRole")
public void saveSysUserRole(@RequestBody HcmInitRoleInfoVo vo) {
sysUserRoleResService.saveSysUserRole(vo);
}
}
......@@ -51,13 +51,13 @@ public interface SysRoleInfoMapper extends BaseMapper<SysRoleInfo> {
List<String> getRoleDataAuthByRoleId(@Param("roleIdList") List<String> roleIdList);
/**
* @param userId
* @param loginName
* @Description: 获取账号的所有权限
* @Author: hgw
* @Date: 2023/9/8 9:22
* @return: java.util.List<java.lang.String>
**/
List<String> getAllRoleDataAuthByUserId(@Param("userId") String userId);
List<String> getAllRoleDataAuthByUserId(@Param("loginName") String loginName);
/**
* @param roleName
......
......@@ -51,7 +51,7 @@ public interface SysUserInfoMapper extends BaseMapper<SysUserInfo> {
List<SysUserInfo> getEkpUser();
List<SysUserRoleRes> getResAndRoleNameUserId(@Param("userId") String userId);
List<SysUserRoleRes> getResAndRoleNameUserId(@Param("loginName") String loginName);
/**
......
......@@ -49,7 +49,7 @@ public interface SysUserRoleResMapper extends BaseMapper<SysUserRoleRes> {
**/
List<String> getSysUserByRoleId(@Param("roleId") String roleId);
boolean deleteByUserId(@Param("userId") String userId);
boolean deleteByUserId(@Param("loginName") String loginName);
boolean deleteByRoleId(@Param("roleId") String roleId);
}
......@@ -62,13 +62,13 @@ public interface SysRoleInfoService extends IService<SysRoleInfo> {
List<SysRoleInfo> noPageDiy(SysRoleInfoSearchVo searchVo);
/**
* @param userId
* @param loginName
* @Description: 各种角色的权限融合
* @Author: hgw
* @Date: 2023/8/30 18:06
* @return: java.lang.String
**/
String getAllRoleDataAuthByUserId(String userId);
String getAllRoleDataAuthByUserId(String loginName);
/**
* @param roleIdList
......
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.permission.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo;
......@@ -52,4 +53,6 @@ public interface SysUserRoleResService extends IService<SysUserRoleRes> {
**/
boolean deleteByRoleId(String roleId);
void saveSysUserRole(HcmInitRoleInfoVo vo);
}
......@@ -137,8 +137,8 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo
}
@Override
public String getAllRoleDataAuthByUserId(String userId) {
List<String> authList = baseMapper.getAllRoleDataAuthByUserId(userId);
public String getAllRoleDataAuthByUserId(String loginName) {
List<String> authList = baseMapper.getAllRoleDataAuthByUserId(loginName);
return this.getAuths(authList);
}
......
......@@ -124,11 +124,11 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
SysUserInfoSaveVo vo = new SysUserInfoSaveVo();
SysUserInfo user = this.getById(fdId);
if (user != null && Common.isNotNull(user.getFdId())) {
List<SysUserRoleRes> resList = baseMapper.getResAndRoleNameUserId(user.getFdId());
List<SysUserRoleRes> resList = baseMapper.getResAndRoleNameUserId(user.getFdLoginName());
vo.setUser(user);
if (resList != null && !resList.isEmpty()) {
// 各种角色的权限融合
String dataAuth = sysRoleInfoService.getAllRoleDataAuthByUserId(user.getFdId());
String dataAuth = sysRoleInfoService.getAllRoleDataAuthByUserId(user.getFdLoginName());
vo.setDataAuth(dataAuth);
}
vo.setResList(resList);
......@@ -148,12 +148,13 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
SysUserInfo user = vo.getUser();
List<SysUserRoleRes> resList = vo.getResList();
if (user != null && Common.isNotNull(user.getFdName()) && resList != null && !resList.isEmpty()) {
if (Common.isNotNull(user.getFdId())) {
sysUserRoleResService.deleteByUserId(user.getFdId());
if (Common.isNotNull(user.getFdLoginName())) {
sysUserRoleResService.deleteByUserId(user.getFdLoginName());
}
this.saveOrUpdate(user);
for (SysUserRoleRes res : resList) {
res.setUserId(user.getFdId());
res.setLoginName(user.getFdLoginName());
}
sysUserRoleResService.saveBatch(resList);
return R.ok("保存成功");
......
......@@ -22,7 +22,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.permission.mapper.SysUserRoleResMapper;
import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.HcmInitRoleInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo;
import lombok.extern.log4j.Log4j2;
......@@ -76,8 +78,8 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
}
@Override
public boolean deleteByUserId(String userId) {
return baseMapper.deleteByUserId(userId);
public boolean deleteByUserId(String loginName) {
return baseMapper.deleteByUserId(loginName);
}
@Override
......@@ -85,6 +87,13 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
return baseMapper.deleteByRoleId(roleId);
}
@Override
public void saveSysUserRole(HcmInitRoleInfoVo vo) {
SysUserRoleRes roleRes = new SysUserRoleRes();
BeanCopyUtils.copyProperties(vo,roleRes);
baseMapper.insert(roleRes);
}
private LambdaQueryWrapper buildQueryWrapper(SysUserRoleResSearchVo entity) {
LambdaQueryWrapper<SysUserRoleRes> wrapper = Wrappers.lambdaQuery();
return wrapper;
......
......@@ -116,7 +116,7 @@
a.data_auth
FROM sys_role_info a
left join sys_user_role_res r on r.role_id = a.fd_id
where a.delete_flag = 0 and r.user_id = #{userId}
where a.delete_flag = 0 and r.login_name = #{loginName}
</select>
<!-- 根据角色Id获取所有的角色的权限-->
......
......@@ -119,7 +119,7 @@
SELECT
<include refid="Base_Column_List"/>
FROM sys_user_info a
LEFT JOIN sys_user_role_res res on a.fd_id=res.user_id
LEFT JOIN sys_user_role_res res on a.fd_login_name=res.login_name
LEFT JOIN sys_role_info r on res.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
<where>
1=1
......@@ -153,7 +153,7 @@
,r.role_name as roleName
FROM sys_user_role_res a
LEFT JOIN sys_role_info r on a.role_id=r.fd_id and r.delete_flag = 0 and r.status = 0
where a.user_id=#{userId}
where a.login_name=#{loginName}
</select>
<!--给EKP用的,获取列表是否全量的权限-->
......
......@@ -31,6 +31,7 @@
<sql id="Base_Column_List">
a.fd_id,
a.user_id,
a.login_name,
a.role_id
</sql>
<sql id="sysUserRoleRes_where">
......@@ -68,7 +69,7 @@
<!-- 根据账号删除关联表 -->
<delete id="deleteByUserId">
delete from sys_user_role_res where user_id = #{userId}
delete from sys_user_role_res where login_name = #{loginName}
</delete>
<!-- 根据角色删除关联表 -->
......
......@@ -1212,6 +1212,15 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty("公积金状态" )
private String fundStatus;
/**
* 社保公积金查询的快照id
*/
@ExcelAttribute(name = "社保公积金查询的快照id", maxLength = 32)
@Schema(description = "社保公积金查询的快照id" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保公积金查询的快照id" )
private String reduceSocialFundId;
/**
* 派单ID (实时更新)
*/
......
......@@ -3,10 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import lombok.Data;
import java.io.Serializable;
......@@ -40,6 +37,10 @@ public class DispatchDetailVo implements Serializable {
* 社保
**/
private TSocialInfo social;
/**
* 社保
**/
private TDispatchSocialFundInfo dispatchSocial;
/**
* 公积金
**/
......
......@@ -4,7 +4,6 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -46,7 +45,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 养老办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "养老状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "养老状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="养老办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老状态" )
......@@ -54,7 +53,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 医疗办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "医疗状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "医疗状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="医疗办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗状态" )
......@@ -62,7 +61,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 失业办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "失业状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "失业状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="失业办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业状态" )
......@@ -70,7 +69,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 工伤办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "工伤状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "工伤状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="工伤办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤状态" )
......@@ -78,7 +77,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 生育办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "生育状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "生育状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="生育办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育状态" )
......@@ -86,7 +85,7 @@ public class SocialHandleExportVo implements Serializable {
/**
* 大病办理状态:0待办理1办理成功2办理失败3已派减4派减失败
*/
@ExcelAttribute(name = "大病状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@ExcelAttribute(name = "大病状态" , maxLength = 1 , readConverterExp = "0=派增待办理,1=派增办理成功,2=派增办理失败,3=派减-已派减,4=派减失败,5=派减待办理,null=——", needExport = true)
@Schema(description="大病办理状态:0待办理1办理成功2办理失败3已派减")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病状态" )
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tsocialfundinfo" )
@Tag(name = "社保公积金查询表管理")
public class TDispatchSocialFundInfoController {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@Mapper
public interface TDispatchSocialFundInfoMapper extends BaseMapper<TDispatchSocialFundInfo> {
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
public interface TDispatchSocialFundInfoService extends IService<TDispatchSocialFundInfo> {
}
......@@ -60,10 +60,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
......@@ -73,6 +70,7 @@ import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
......@@ -136,6 +134,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired
private DoSocialTask socialTask;
private final TDispatchSocialFundInfoService infoService;
/**
* 派单信息记录表简单分页查询
*
......@@ -347,6 +347,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TDispatchInfo::getCreateName, entity.getCreateName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TDispatchInfo::getEmpIdcard, entity.getEmpIdcard());
}
return wrapper;
}
......@@ -2990,6 +2993,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
socialFundMapper.updateById(socialFund);
//派减时生成社保公积金查询快照
TDispatchSocialFundInfo infoEntity = new TDispatchSocialFundInfo();
BeanUtils.copyProperties(socialFund,infoEntity);
infoEntity.setReduceSocialFundId(dispatch.getId());
infoEntity.setId(String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
infoService.save(infoEntity);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){
log.error("批量派减异常:",e);
......@@ -3217,6 +3226,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfo dispatch = baseMapper.selectById(id);
detailVo.setDispatch(dispatch);
if (Common.isNotNull(dispatch)){
TDispatchSocialFundInfo info = infoService.getOne(Wrappers.<TDispatchSocialFundInfo>query().lambda()
.eq(TDispatchSocialFundInfo::getReduceSocialFundId, id)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(info) && CommonConstants.ONE_STRING.equals(dispatch.getType())){
detailVo.setDispatchSocial(info);
}
if (Common.isNotNull(dispatch.getSocialId())){
detailVo.setSocial(socialMapper.selectById(dispatch.getSocialId()));
}
......@@ -3306,6 +3321,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int forecastFlag;
// 是否SSC,true是
boolean isSSC;
TDispatchSocialFundInfo socialFundInfo;
for (TDispatchInfo dis : dispatchs) {
isSSC = CommonConstants.FIVE_STRING.equals(dis.getStatus());
forecastFlag = getForecastFlag(dis);
......@@ -3539,8 +3556,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dis.setAuditTime(now);
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
//派减的申请审核完更新社保公积金查询快照表
if (CommonConstants.ONE_STRING.equals(dis.getType())) {
socialFundInfo = infoService.getOne(Wrappers.<TDispatchSocialFundInfo>query().lambda()
.eq(TDispatchSocialFundInfo::getReduceSocialFundId, dis.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(socialFundInfo)) {
socialFundInfo.setSocialStatus(sf.getSocialStatus());
socialFundInfo.setSocialReduceStatus(sf.getSocialReduceStatus());
socialFundInfo.setSocialReduceDate(sf.getSocialReduceDate());
socialFundInfo.setSocialAddStatus(sf.getSocialAddStatus());
socialFundInfo.setPensionHandle(sf.getPensionHandle());
socialFundInfo.setMedicalHandle(sf.getMedicalHandle());
socialFundInfo.setWorkInjuryHandle(sf.getWorkInjuryHandle());
socialFundInfo.setUnemployHandle(sf.getUnemployHandle());
socialFundInfo.setBirthHandle(sf.getBirthHandle());
socialFundInfo.setBigailmentHandle(sf.getBigailmentHandle());
infoService.updateById(socialFundInfo);
}
}
// 派增审核不通过
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())
&& CommonConstants.ONE_INT == flag){
......@@ -3752,6 +3789,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// auditFlag 表示社保办理无办理项是不保存
boolean auditFlag = true;
boolean partSuccess = false;
TDispatchSocialFundInfo socialFundInfo;
for (TDispatchInfo dis : disList) {
auditFlag = true;
if (CommonConstants.ZERO_STRING.equals(typeSub)) {
......@@ -4062,6 +4100,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
//派减的申请审核完更新社保公积金查询快照表
if (CommonConstants.ONE_STRING.equals(dis.getType())) {
socialFundInfo = infoService.getOne(Wrappers.<TDispatchSocialFundInfo>query().lambda()
.eq(TDispatchSocialFundInfo::getReduceSocialFundId, dis.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(socialFundInfo)) {
String reduceSocialFundId = socialFundInfo.getReduceSocialFundId();
String id = socialFundInfo.getId();
BeanUtils.copyProperties(sf,socialFundInfo);
socialFundInfo.setId(id);
socialFundInfo.setReduceSocialFundId(reduceSocialFundId);
infoService.updateById(socialFundInfo);
}
}
//1.派增办理失败 刷新预估数据
if (CommonConstants.ZERO_STRING.equals(dis.getType())) {
// 全部办理失败 社保和公积金派增办理失败 减少预估
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchSocialFundInfoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2024-02-01 11:38:05
*/
@Log4j2
@RequiredArgsConstructor
@Service
public class TDispatchSocialFundInfoServiceImpl extends ServiceImpl<TDispatchSocialFundInfoMapper, TDispatchSocialFundInfo> implements TDispatchSocialFundInfoService {
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Data
public class HcmInitRoleInfoVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "角色id")
private String roleId;
@Schema(description = "用户id")
private String userId;
@Schema(description = "登录名")
private String loginName;
}
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -30,10 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO;
import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.*;
import com.yifu.cloud.plus.v1.yifu.admin.api.util.ParamResolver;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.BusinessUserVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserPasswordVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.*;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.*;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysMenuService;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysUserService;
......@@ -42,8 +40,12 @@ 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.enums.MenuTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
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.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.PermissionDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.ldap.entity.PersonVo;
import com.yifu.cloud.plus.v1.yifu.common.ldap.util.LdapUtil;
import lombok.RequiredArgsConstructor;
......@@ -92,6 +94,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
private final ArchivesDaprUtil archivesDaprUtil;
private final PermissionDaprUtil permissionDaprUtil;
/**
* 保存用户信息
* @param userDto DTO 对象
......@@ -494,6 +498,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (list1.stream().anyMatch(e -> e.equals(personVo.getUid()))) {
updateList.add(personVo);
} else {
//新增用户赋初始密码
personVo.setPassword(ENCODER.encode(CommonConstants.DEFAULT_PASSWORD));
insertList.add(personVo);
}
}
......@@ -502,6 +508,35 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
if (!insertList.isEmpty()) {
baseMapper.batchInsertUser(insertList);
//新增用户的初始化角色
JSONObject jsonObject;
for (PersonVo personVo :insertList) {
if (Common.isNotNull(personVo.getRoleIds())) {
SysUser user = this.getOne(Wrappers.<SysUser>query().lambda().
eq(SysUser::getUsername, personVo.getUid()).last(CommonConstants.LAST_ONE_SQL));
jsonObject = JSONObject.parseObject(personVo.getRoleIds());
//获取mvp用户的角色
String userRole=jsonObject.get("hro")==null?"":jsonObject.getString("hro");
if (!userRole.isEmpty()) {
Common.getList(userRole).stream().map(roleId -> {
SysUserRole role = new SysUserRole();
role.setUserId(user.getUserId());
role.setRoleId(Long.valueOf(roleId));
return role;
}).forEach(sysUserRoleMapper::insert);
}
//获取ekp用户的角色
String ekpUserRole=jsonObject.get("ekp")==null?"":jsonObject.getString("ekp");
if (!ekpUserRole.isEmpty()) {
for (String roleId : Common.getList(ekpUserRole)) {
HcmInitRoleInfoVo vo = new HcmInitRoleInfoVo();
vo.setLoginName(user.getUsername());
vo.setRoleId(roleId);
permissionDaprUtil.saveSysUserRole(vo);
}
}
}
}
}
}
List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay();
......
......@@ -214,12 +214,13 @@
<insert id="batchInsertUser" parameterType="java.util.List">
insert into sys_user
(user_id,username,phone,email,nickname,create_time)
(user_id,username,password,phone,email,nickname,create_time)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
REPLACE(UUID(),"-",""),
#{item.uid},
#{item.password},
#{item.telephoneNumber},
#{item.email},
#{item.personName},
......
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