Commit c580ddc8 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop'

parents a7b8c5a1 90b8e4c5
...@@ -247,6 +247,28 @@ public class TEmpContractAlert extends BaseEntity { ...@@ -247,6 +247,28 @@ public class TEmpContractAlert extends BaseEntity {
@ExcelIgnore @ExcelIgnore
private String contractId; private String contractId;
/**
* 客户id
*/
@Schema(description = "客户id")
private String unitId;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String unitName;
/**
* 客户编码
*/
@Schema(description = "客户编码")
private String unitNo;
/**
* 手机号码
*/
@Schema(description = "手机号码")
private String empPhone;
/** /**
* 合同截止日期 * 合同截止日期
*/ */
......
...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; ...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
...@@ -151,7 +152,15 @@ public class EmployeeContractExportAuditVO implements Serializable { ...@@ -151,7 +152,15 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours") @Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制") @ExcelProperty("工时制")
private String workingHours; private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
/** /**
* 离职日期 * 离职日期
*/ */
......
...@@ -209,6 +209,32 @@ public class EmployeeContractExportVO implements Serializable { ...@@ -209,6 +209,32 @@ public class EmployeeContractExportVO implements Serializable {
@Schema(description = "归档状态", name = "isFile") @Schema(description = "归档状态", name = "isFile")
private String isFile; private String isFile;
/**
* 合同岗位
*/
@Length(max = 32, message = "合同岗位不能超过32个字符")
@ExcelAttribute(name = "合同岗位", maxLength = 32, needExport = true)
@ExcelProperty("合同岗位")
@Schema(description = "合同岗位", name = "post")
private String post;
/**
* 工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制
*/
@ExcelAttribute(name = "工时制")
@Schema(description = "工时制(数据字典) 1标准工时 2 综合工时 3不定时工时制", name = "workingHours")
@ExcelProperty("工时制")
private String workingHours;
/**
* 合同编码
*/
@NotBlank(message = "合同编码不能为空")
@Length(max = 50, message = "合同编码不能超过50个字符")
@ExcelAttribute(name = "合同编码", maxLength = 50)
@ExcelProperty("合同编码")
@Schema(description = "合同编码", name = "contractNo")
private String contractNo;
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建人") @ExcelProperty("创建人")
private String createName; private String createName;
......
...@@ -108,5 +108,5 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac ...@@ -108,5 +108,5 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo); void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
int getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId); String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
} }
...@@ -237,6 +237,15 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -237,6 +237,15 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if (Common.isNotNull(entity.getDaysDue())){ if (Common.isNotNull(entity.getDaysDue())){
wrapper.eq(TEmpContractAlert::getDaysDue,entity.getDaysDue()); wrapper.eq(TEmpContractAlert::getDaysDue,entity.getDaysDue());
} }
if (Common.isNotNull(entity.getUnitId())) {
wrapper.eq(TEmpContractAlert::getUnitId, entity.getUnitId());
}
if (Common.isNotNull(entity.getEmpPhone())) {
wrapper.eq(TEmpContractAlert::getEmpPhone, entity.getEmpPhone());
}
if (Common.isNotNull(entity.getUnitNo())) {
wrapper.eq(TEmpContractAlert::getUnitNo, entity.getUnitNo());
}
return wrapper; return wrapper;
} }
/** /**
...@@ -348,6 +357,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -348,6 +357,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}else { }else {
alert.setFirstAlertTime(new Date()); alert.setFirstAlertTime(new Date());
} }
// 2023-4-3 09:38:21 hgw 添加
alert.setUnitId(contract.getCustomerId());
alert.setUnitName(contract.getSubjectUnit());
alert.setUnitNo(contract.getUnitNo());
alert.setEmpPhone(employeeInfo.getEmpPhone());
alert.setCreateBy(contract.getCreateBy()); alert.setCreateBy(contract.getCreateBy());
alert.setCreateName(contract.getCreateName()); alert.setCreateName(contract.getCreateName());
alert.setContractId(contract.getId()); alert.setContractId(contract.getId());
......
...@@ -676,6 +676,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -676,6 +676,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
tEmployeeContractInfo.setAuditUserName(user.getNickname()); tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setContractNo(contractInfo.getContractNo());
// 不是待提交,记录审核记录 // 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
this.updateById(tEmployeeContractInfo); this.updateById(tEmployeeContractInfo);
...@@ -1352,6 +1353,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1352,6 +1353,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo = new TEmployeeContractInfo(); tEmployeeContractInfo = new TEmployeeContractInfo();
tEmployeeContractInfo.setAuditRemark(contractAuditVo.getAuditRemark()); tEmployeeContractInfo.setAuditRemark(contractAuditVo.getAuditRemark());
tEmployeeContractInfo.setAuditStatus(contractAuditVo.getAuditStatus()); tEmployeeContractInfo.setAuditStatus(contractAuditVo.getAuditStatus());
tEmployeeContractInfo.setContractNo(contract.getContractNo());
tEmployeeContractInfo.setAuditUserName(user.getNickname()); tEmployeeContractInfo.setAuditUserName(user.getNickname());
tEmployeeContractInfo.setId(contract.getId()); tEmployeeContractInfo.setId(contract.getId());
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
...@@ -1522,9 +1524,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1522,9 +1524,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Override @Override
public R<String> getContractByEmpIdCardAndDeptId(String mpIdCard, String deptId) { public R<String> getContractByEmpIdCardAndDeptId(String mpIdCard, String deptId) {
int count = baseMapper.getContractByEmpIdCardAndDeptId(mpIdCard, deptId); String contractStart = baseMapper.getContractByEmpIdCardAndDeptId(mpIdCard, deptId);
if (count >0) { if (Common.isNotNull(contractStart)) {
return R.ok(); return R.ok(contractStart);
} else { } else {
return R.failed("未找到合同"); return R.failed("未找到合同");
} }
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="reason" column="REASON"/> <result property="reason" column="REASON"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
<result property="leaveDate" column="LEAVE_DATE"/> <result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/> <result property="reduceReason" column="REDUCE_REASON"/>
...@@ -136,7 +136,9 @@ ...@@ -136,7 +136,9 @@
<result property="endDate" column="END_DATE"/> <result property="endDate" column="END_DATE"/>
<result property="history" column="HISTORY"/> <result property="history" column="HISTORY"/>
<result property="type" column="TYPE"/> <result property="type" column="TYPE"/>
<result property="contractNo" column="CONTRACT_NO"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="post" column="POST"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -489,6 +491,12 @@ ...@@ -489,6 +491,12 @@
if(a.IS_FILE = 0,'有附件','无附件') FILES, if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE, if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
a.CREATE_NAME, a.CREATE_NAME,
a.CONTRACT_NO,
a.POST,
CASE WHEN a.WORKING_HOURS=1 THEN "标准工时"
WHEN a.WORKING_HOURS =2 THEN "综合工时"
WHEN a.WORKING_HOURS =3 THEN "不定时工时制"
ELSE a.WORKING_HOURS END as "WORKING_HOURS",
CASE WHEN a.type=0 THEN "派增-社保派单" CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签" WHEN a.type =1 THEN "派增-无社保新签"
WHEN a.type =2 THEN "派增-续签" WHEN a.type =2 THEN "派增-续签"
...@@ -555,6 +563,12 @@ ...@@ -555,6 +563,12 @@
if(a.IN_USE = 0,'可用','不可用') IN_USE, if(a.IN_USE = 0,'可用','不可用') IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES, if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE, if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
max(a.CONTRACT_NO) CONTRACT_NO,
max(a.POST) POST,
CASE WHEN max(a.WORKING_HOURS)=1 THEN "标准工时"
WHEN max(a.WORKING_HOURS) =2 THEN "综合工时"
WHEN max(a.WORKING_HOURS) =3 THEN "不定时工时制"
ELSE max(a.WORKING_HOURS) END as "WORKING_HOURS",
a.CREATE_NAME, a.CREATE_NAME,
CASE WHEN a.type=0 THEN "派增-社保派单" CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签" WHEN a.type =1 THEN "派增-无社保新签"
...@@ -629,6 +643,7 @@ ...@@ -629,6 +643,7 @@
a.REASON, a.REASON,
a.TYPE, a.TYPE,
a.LEAVE_DATE, a.LEAVE_DATE,
a.CONTRACT_NO,
a.REDUCE_REASON a.REDUCE_REASON
FROM t_employee_contract_info a FROM t_employee_contract_info a
<where> <where>
...@@ -791,9 +806,9 @@ ...@@ -791,9 +806,9 @@
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0'; where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update> </update>
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.Integer"> <select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.String">
select select
count(1) e.CONTRACT_START
from t_employee_contract_info e from t_employee_contract_info e
where e.EMP_IDCARD = #{empIdCard} and e.SETTLE_DOMAIN = #{deptId} where e.EMP_IDCARD = #{empIdCard} and e.SETTLE_DOMAIN = #{deptId}
and e.DELETE_FLAG = '0' and e.DELETE_FLAG = '0'
...@@ -802,5 +817,6 @@ ...@@ -802,5 +817,6 @@
OR OR
( e.AUDIT_STATUS = '1' AND e.IN_USE = '1' ) ( e.AUDIT_STATUS = '1' AND e.IN_USE = '1' )
) )
limit 1
</select> </select>
</mapper> </mapper>
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
WHERE 1=1 WHERE 1=1
<if test="idNameNoVo != null"> <if test="idNameNoVo != null">
<if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''"> <if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''">
and a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%') and (a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%') or a.CUSTOMER_NO like concat('%', #{idNameNoVo.name} ,'%'))
</if> </if>
<if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''"> <if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''">
and a.CUSTOMER_NO = #{idNameNoVo.no} and a.CUSTOMER_NO = #{idNameNoVo.no}
......
...@@ -5,12 +5,14 @@ public class CASproperties { ...@@ -5,12 +5,14 @@ public class CASproperties {
/** /**
* 当前应用程序的登陆界面 * 当前应用程序的登陆界面
*/ */
public static String CLIENT_LOGIN_PAGE = "http://mvp.wanxinwork.com/login"; public static String CLIENT_LOGIN_PAGE = "https://qas-mvp-1.worfu.com/login";
/** /**
* CAS服务器地址 * CAS服务器地址
*/ */
public static String CAS_SERVER_PATH = "http://192.168.0.240:8443/cas"; public static String CAS_SERVER_PATH = "http://192.168.1.62:8443/cas";
public static String SPRING_SECURITY_CAS_SERVER = "http://192.168.1.62:8443/cas/v1/tickets";
public static String SPRING_SECURITY_CAS_SERVER = "http://192.168.0.240:8443/cas/v1/tickets";
} }
...@@ -71,9 +71,9 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter ...@@ -71,9 +71,9 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter
wholeForm.clear(); wholeForm.clear();
wholeForm.add("service", CASproperties.CLIENT_LOGIN_PAGE); wholeForm.add("service", CASproperties.CLIENT_LOGIN_PAGE);
wholeForm.add("ticket", st); wholeForm.add("ticket", st);
obj = restTemplate.exchange(CASproperties.CAS_SERVER_PATH + "/p3/serviceValidate?service=" + CASproperties.CLIENT_LOGIN_PAGE + "&ticket=" + st + "&format=JSON" obj = restTemplate.getForEntity(CASproperties.CAS_SERVER_PATH + "/p3/serviceValidate?service=" + CASproperties.CLIENT_LOGIN_PAGE + "&ticket=" + st + "&format=JSON"
, HttpMethod.GET,entity, String.class); , String.class,CASproperties.CLIENT_LOGIN_PAGE,st,"JSON");
log.info("cas返回用户信息》》》", JSON.toJSONString(obj)); log.info("cas返回用户信息》》》",JSON.toJSONString(obj));
if(obj.getStatusCode().value() == 200){ if(obj.getStatusCode().value() == 200){
try { try {
JSONObject result = JSON.parseObject(obj.getBody()); JSONObject result = JSON.parseObject(obj.getBody());
......
...@@ -151,4 +151,7 @@ public interface CacheConstants { ...@@ -151,4 +151,7 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import"; String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import";
String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import"; String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import";
//社保公积金派单
String PAYMENT_DISPATCH_BATCH_IMPORT = "payment_dispatch_batch_import";
} }
...@@ -351,6 +351,8 @@ public interface CommonConstants { ...@@ -351,6 +351,8 @@ public interface CommonConstants {
// 给量大的表导出使用 // 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000; int EXCEL_EXPORT_LIMIT_3 = 30000;
int EXCEL_EXPORT_LIMIT_1 = 10000;
String USER = "用户"; String USER = "用户";
/** /**
......
...@@ -428,6 +428,10 @@ public interface ErrorCodes { ...@@ -428,6 +428,10 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录 * 派减异常: 本次派增已存在对应身份证号的派减记录
*/ */
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists"; String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists";
/**
* 无可派单项,请确认后再次操作
*/
String EMP_DISPATCH_ITEM_EMPTY_EXISTS = "emp.dispatch.item.empty.exists";
/** /**
* 当前社保导入队列不足或者数据量过大,请稍后重试! * 当前社保导入队列不足或者数据量过大,请稍后重试!
*/ */
......
...@@ -134,7 +134,7 @@ emp.dispatch.fund.percent.not.exist=\u6D3E\u589E\u5F02\u5E38\uFF1A\u672A\u627E\u ...@@ -134,7 +134,7 @@ emp.dispatch.fund.percent.not.exist=\u6D3E\u589E\u5F02\u5E38\uFF1A\u672A\u627E\u
emp.dispatch.social.and.fund.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6B64\u4E3A\u793E\u4FDD\u516C\u79EF\u91D1\u6D3E\u5355\u6A21\u677F\uFF0C\u5982\u5355\u6D3E\u6863\u6848\uFF0C\u8BF7\u81F3\u201C\u5728\u6863\u4EBA\u5458\u201D\u83DC\u5355\u5904\u64CD\u4F5C emp.dispatch.social.and.fund.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6B64\u4E3A\u793E\u4FDD\u516C\u79EF\u91D1\u6D3E\u5355\u6A21\u677F\uFF0C\u5982\u5355\u6D3E\u6863\u6848\uFF0C\u8BF7\u81F3\u201C\u5728\u6863\u4EBA\u5458\u201D\u83DC\u5355\u5904\u64CD\u4F5C
emp.dispatch.project.not.found=\u6D3E\u589E\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u4FE1\u606F emp.dispatch.project.not.found=\u6D3E\u5355\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u4FE1\u606F
emp.dispatch.add.emp.error=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0\u589E\u6863\u6848\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5 emp.dispatch.add.emp.error=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0\u589E\u6863\u6848\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5
...@@ -156,6 +156,8 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58 ...@@ -156,6 +156,8 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58
socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01 socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
emp.dispatch.item.empty.exists=\u65E0\u53EF\u6D3E\u5355\u9879\uFF0C\u8BF7\u786E\u8BA4\u540E\u518D\u6B21\u64CD\u4F5C
emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u201C\u7F34\u7EB3\u7C7B\u578B\u201D\u4E3A\u201C\u81EA\u5B9A\u4E49\u201D\uFF0C\u5404\u9669\u79CD\u57FA\u6570\u76F8\u540C\uFF0C\u8BF7\u586B\u5199\u201C\u517B\u8001\u57FA\u6570\u201D\uFF0C\u5982\u57FA\u6570\u4E0D\u540C\uFF0C\u5219\u6240\u6709\u9669\u79CD\u57FA\u6570\u90FD\u9700\u586B\u5199 emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u201C\u7F34\u7EB3\u7C7B\u578B\u201D\u4E3A\u201C\u81EA\u5B9A\u4E49\u201D\uFF0C\u5404\u9669\u79CD\u57FA\u6570\u76F8\u540C\uFF0C\u8BF7\u586B\u5199\u201C\u517B\u8001\u57FA\u6570\u201D\uFF0C\u5982\u57FA\u6570\u4E0D\u540C\uFF0C\u5219\u6240\u6709\u9669\u79CD\u57FA\u6570\u90FD\u9700\u586B\u5199
emp.dispatch.social.diy.medical_not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u548C\u517B\u8001\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u4E3A\u7A7A emp.dispatch.social.diy.medical_not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u548C\u517B\u8001\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u4E3A\u7A7A
......
...@@ -37,9 +37,7 @@ public class MenuUtil { ...@@ -37,9 +37,7 @@ public class MenuUtil {
public void setAuthSql(YifuUser user, BaseEntity entity) { public void setAuthSql(YifuUser user, BaseEntity entity) {
// 普通用户: // 普通用户:
log.error("userINfo:"+ user.getUserGroup() +"}"+user.getId() +"|" + entity.getMId());
if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) { if (user != null && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
log.error("userINfo:"+ user.getUserGroup() +"}"+user.getId() +"|" + entity.getMId());
// 菜单id // 菜单id
String menuId = entity.getMId(); String menuId = entity.getMId();
if (Common.isEmpty(menuId)) { if (Common.isEmpty(menuId)) {
......
insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel #insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20 insurance.insuranceDocStatus=20
......
ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel #ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6 ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183 ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus=20 ekp.docStatus=20
......
spring.ldap.urls=ldap://192.168.0.240:389 spring.ldap.urls=ldap://192.168.1.65:389
spring.ldap.username=cn=admin,dc=worfu,dc=com spring.ldap.username=cn=admin,dc=worfu,dc=com
spring.ldap.password=Yifu123456! spring.ldap.password=yifu123456!
spring.ldap.base=dc=worfu,dc=com spring.ldap.base=dc=worfu,dc=com
\ No newline at end of file
ldap.url=192.168.0.240 ldap.url=192.168.1.65
ldap.port=389 ldap.port=389
ldap.userName=cn=admin,dc=worfu,dc=com ldap.userName=cn=admin,dc=worfu,dc=com
ldap.password=Yifu123456! ldap.password=yifu123456!
ldap.dn=dc=worfu,dc=com ldap.dn=dc=worfu,dc=com
ldap.baseDn=ou=\u7696\u4FE1\u4EBA\u529B\u96C6\u56E2,ou=wanxin,dc=worfu,dc=com ldap.baseDn=ou=\u7696\u4FE1\u4EBA\u529B\u96C6\u56E2,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
...@@ -317,9 +317,9 @@ public class InsurancesConstants { ...@@ -317,9 +317,9 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间"; public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/** /**
* 保单起止时间不能超过365天 * 保单起止时间不能超过一年
*/ */
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天"; public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过一年";
/** /**
* 保单结束时间不能为空 * 保单结束时间不能为空
*/ */
...@@ -413,9 +413,9 @@ public class InsurancesConstants { ...@@ -413,9 +413,9 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制"; public static final String POLICY_NO_MORE_THAN_50 = "保单号长度超过50字符限制";
/** /**
* 发票号不能为空 * 保单号和发票号不可都为空
*/ */
public static final String INVOICE_NO_EMPTY = "发票号不能为空"; public static final String INVOICE_NO_EMPTY = "保单号和发票号不可都为空";
/** /**
* 变更原因不能为空 * 变更原因不能为空
*/ */
......
...@@ -33,6 +33,11 @@ public class EkpUpdateParam implements Serializable { ...@@ -33,6 +33,11 @@ public class EkpUpdateParam implements Serializable {
*/ */
private String fd_3b5bf030ab1a56; private String fd_3b5bf030ab1a56;
/**
* 保单号
*/
private String fd_3bb431933ee968;
/** /**
* 购买标准 * 购买标准
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author huyc
* @description 导出办理VO
* @date 2023-04-06 14:21:39
*/
@Data
@Schema(description = "导出办理VO")
public class InsuranceExportListOneVO implements Serializable {
private static final long serialVersionUID = -8159190612104775933L;
/**
* 主键
*/
private String id;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private Long buyDay;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
}
...@@ -76,6 +76,12 @@ public class InsuranceRegisterInvoiceNoParam implements Serializable { ...@@ -76,6 +76,12 @@ public class InsuranceRegisterInvoiceNoParam implements Serializable {
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/** /**
* 数据传递对象 * 数据传递对象
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -12,6 +13,12 @@ import java.util.List; ...@@ -12,6 +13,12 @@ import java.util.List;
*/ */
@Data @Data
public class InsuranceSearchVo extends TBusinessInsuranceVo{ public class InsuranceSearchVo extends TBusinessInsuranceVo{
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
private List<String> idList; private List<String> idList;
/** /**
......
...@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "商险购买地市") @ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市") @Schema(name = "商险购买地市")
private String insuranceCityName; private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险办理地市")
@Schema(name = "商险办理地市")
private String insuranceHandleCityName;
/** /**
* 是否有效 0有效 1无效 * 是否有效 0有效 1无效
*/ */
......
...@@ -218,6 +218,13 @@ public class TBusinessInsuranceVo implements Serializable { ...@@ -218,6 +218,13 @@ public class TBusinessInsuranceVo implements Serializable {
@ExcelProperty(value = "商险购买地市") @ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市") @Schema(name = "商险购买地市")
private String insuranceCityName; private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险办理地市")
@Schema(name = "商险办理地市")
private String insuranceHandleCityName;
/** /**
* 是否有效 0有效 1无效 * 是否有效 0有效 1无效
*/ */
......
...@@ -227,6 +227,21 @@ public class TInsuranceDetailController { ...@@ -227,6 +227,21 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getInsuranceExportList(param,mId); return tInsuranceDetailService.getInsuranceExportList(param,mId);
} }
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListOneVO>>}
*/
@Operation(summary = "导出办理(新)", description = "导出办理(新)")
@PostMapping("/getInsuranceExportOneList")
@PreAuthorize("@pms.hasPermission('handle_insure_export')")
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(@RequestBody InsuranceExportListParam param,
@RequestParam(required = false) String mId) {
return tInsuranceDetailService.getInsuranceExportOneList(param,mId);
}
/** /**
* 投保退回 * 投保退回
* *
......
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -77,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -77,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param); List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param);
/**
* 导出办理勾选查询结果
*
* @author licancan
* @param idList
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOneListBySelect(@Param("idList") List<String> idList);
/**
* 导出办理非勾选查询结果
*
* @author licancan
* @param param
* @return {@link List< InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOnetList(@Param("param") InsuranceExportListParam param);
/** /**
* 批量更新保单号 * 批量更新保单号
* *
...@@ -285,11 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -285,11 +302,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/ **/
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param, @Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains); @Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<String> idList);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO); List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<String> idList);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO); int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<String> idList);
void batchexpireIgnore(@Param("idList")List<String> idList); void batchexpireIgnore(@Param("idList")List<String> idList);
} }
...@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId); R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId);
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListVO>>}
*/
R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId);
/** /**
* 投保退回 * 投保退回
* *
......
...@@ -959,6 +959,169 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -959,6 +959,169 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list; return list;
} }
/**
* 导出办理(新)
*
* @param param
* @return {@link List<InsuranceExportListOneVO>}
* @author huyc
*/
@Override
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (Common.isNotNull(mId)) {
param.setMId(mId);
}
param.setCreateBy(user.getId());
//设置updateBy字段是给导出使用的
param.setUpdateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceExportListOneVO> insuranceExportList;
//如果是待投保状态,sql中HANDLED_BY过滤条件不需要,这里强制变为null
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
param.setUpdateBy(null);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportOneListBySelect(param.getIdList());
}else {
insuranceExportList = baseMapper.getInsuranceExportOnetList(param);
}
if (CollectionUtils.isNotEmpty(insuranceExportList)){
List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
ProjectSetInfoVo jsonObject;
for (InsuranceExportListOneVO record : insuranceExportList) {
jsonObject = null;
if (data != null) {
jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//购买天数
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == record.getBuyType()){
if (Objects.isNull(record.getPolicyEffect())){
record.setBuyMonth(null);
record.setBuyDay(null);
}else {
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
record.setBuyDay(LocalDateUtil.betweenDay(record.getPolicyEffect().toString(),record.getPolicyEnd().toString()));
}
}
//如果是待投保,需要处理相关逻辑,投保中、投保成功只是单纯的导出
if(param.getBuyHandleStatus() == CommonConstants.ONE_INT){
TInsuranceDetail detail = new TInsuranceDetail();
detail.setId(record.getId());
//update状态由「待投保」置为「投保中」
detail.setBuyHandleStatus(CommonConstants.TWO_INT);
if (record.getBuyType() == CommonConstants.ONE_INT){
// if 投保类型 == 新增,then 更新保单生效日期为:T+1,无需考虑节假日
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
detail.setHandledBy(user.getId());
detail.setHandledTime(LocalDateTime.now());
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
if (Common.isNotNull(jsonObject)){
detail.setDeptId(jsonObject.getId());
detail.setDeptName(jsonObject.getDepartName());
detail.setUnitId(jsonObject.getCustomerId());
detail.setUnitName(jsonObject.getCustomerName());
detail.setUnitNo(jsonObject.getCustomerCode());
}
detailList.add(detail);
}
}
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
}
//操作记录
addOperate(detailList,user,InsurancesConstants.EXPORT,null,CommonConstants.ONE_INT);
//针对是替换类型的做处理,每一条替换数据对应一条被替换数据
List<InsuranceExportListOneVO> listVOS = insuranceExportList.stream().filter(e -> e.getBuyType() == CommonConstants.FOUR_INT).collect(Collectors.toList());
List<InsuranceExportListOneVO> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listVOS)){
for (InsuranceExportListOneVO listVO : listVOS) {
listVO.setRemark(InsurancesConstants.INSERT);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, listVO.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()){
InsuranceExportListOneVO vo = new InsuranceExportListOneVO();
BeanCopyUtils.copyProperties(byId,vo);
if (StringUtils.isNotBlank(byId.getPolicyNo())){
listVO.setPolicyNo(byId.getPolicyNo());
}
//购买月数
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//购买天数
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == vo.getBuyType()){
if (Objects.isNull(vo.getPolicyEffect())){
vo.setBuyMonth(null);
vo.setBuyDay(null);
}else {
vo.setBuyMonth(LocalDateUtil.betweenMonth(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyEffect().toString(),vo.getPolicyEnd().toString()));
}
}
vo.setRemark(InsurancesConstants.QUIT);
vo.setBuyType(CommonConstants.FOUR_INT);
vo.setProjectName(byId.getDeptName());
list.add(vo);
}
}
}
if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称
List<String> collectList = list.stream().map(InsuranceExportListOneVO::getDeptNo).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodesList.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceExportListOneVO record : list) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceExportListOneVO record : list) {
record.setProjectName(CommonConstants.EMPTY_STRING);
record.setInvoiceTitle(CommonConstants.EMPTY_STRING);
}
log.error(InsurancesConstants.GET_DEPT_DETAIL_ERROR+e);
}
insuranceExportList.removeAll(listVOS);
insuranceExportList.addAll(crossMergerOne(list,listVOS));
}
}
}
return R.ok(insuranceExportList);
}
/** /**
* 导出办理 * 导出办理
* *
...@@ -991,12 +1154,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -991,12 +1154,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList = baseMapper.getInsuranceExportList(param); insuranceExportList = baseMapper.getInsuranceExportList(param);
} }
if (CollectionUtils.isNotEmpty(insuranceExportList)){ if (CollectionUtils.isNotEmpty(insuranceExportList)){
/*if(insuranceExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}*/
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
//根据项目编码获取项目名称 //根据项目编码获取项目名称
List<String> collect = insuranceExportList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList()); List<String> collect = insuranceExportList.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
...@@ -1095,7 +1255,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1095,7 +1255,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
if (CollectionUtils.isNotEmpty(list)){ if (CollectionUtils.isNotEmpty(list)){
//根据项目编码获取项目名称 //根据项目编码获取项目名称
List<String> collectList = list.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList()); List<String> collectList = list.stream().map(InsuranceExportListVO::getDeptNo).distinct().collect(Collectors.toList());
try{ try{
R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList); R<SetInfoVo> setInfoByCodesList = archivesDaprUtil.getSetInfoByCodes(collectList);
if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) { if (null != setInfoByCodesList && setInfoByCodesList.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodesList.getData())) {
...@@ -2096,32 +2256,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2096,32 +2256,52 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceRegisterInvoiceNoParam> listSuccess = operateList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList()); List<InsuranceRegisterInvoiceNoParam> listSuccess = operateList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList());
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
boolean invoiceNoFlag = false;
boolean policeNoFlag = false;
String invoiceNoInfo = "";
String policeNoInfo = "";
for (InsuranceRegisterInvoiceNoParam success : listSuccess) { for (InsuranceRegisterInvoiceNoParam success : listSuccess) {
TInsuranceDetail detail = success.getDetail(); TInsuranceDetail detail = success.getDetail();
if (Optional.ofNullable(detail).isPresent()){ if (Optional.ofNullable(detail).isPresent()){
//当两次发票号不一致时才更新 //判断本地更新了保单号还是发票号还是两个都更新了
if (!success.getInvoiceNo().equals(detail.getInvoiceNo())){ //当两次发票号不一致时
//只有当结算id存在的时候修改数据才会推给ekp if (Common.isNotNull(success.getInvoiceNo()) && !success.getInvoiceNo().equals(detail.getInvoiceNo())){
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){ invoiceNoFlag = true;
invoiceNoInfo = ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo();
detail.setInvoiceNo(success.getInvoiceNo());
}
//当两次保单号不一致时
if (Common.isNotNull(success.getPolicyNo()) && !success.getPolicyNo().equals(detail.getPolicyNo())){
policeNoFlag = true;
policeNoInfo = ";变更前保单号:" + detail.getPolicyNo() + ";变更后保单号:" + success.getPolicyNo();
detail.setPolicyNo(success.getPolicyNo());
}
detailList.add(detail);
//当两次发票号或发票号不一致时才更新
if ((policeNoFlag || invoiceNoFlag) && StringUtils.isNotBlank(detail.getDefaultSettleId())){
try { try {
//推送修改信息 //推送修改信息
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam(); EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart()); ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStart());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd()); ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType())); ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(detail.getBuyType()));
if (invoiceNoFlag) {
ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo()); ekpUpdateParam.setFd_3b5bf030ab1a56(success.getInvoiceNo());
} else {
ekpUpdateParam.setFd_3b5bf030ab1a56(detail.getInvoiceNo());
}
if (policeNoFlag) {
ekpUpdateParam.setFd_3bb431933ee968(success.getPolicyNo());
} else {
ekpUpdateParam.setFd_3bb431933ee968(detail.getPolicyNo());
}
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard()); ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId()); ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:"+user.getNickname() + ";操作时间:"+LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + ";变更前发票号:" + detail.getInvoiceNo() + ";变更后发票号:" + success.getInvoiceNo()); ekpUpdateParam.setFd_3b5bf0b7b4c058("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + invoiceNoInfo + policeNoInfo);
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam); eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){ } catch (Exception e) {
log.error("pushEkp error registeredInvoiceNo:",e.getMessage()); log.error("pushEkp error registeredInvoiceNo:", e.getMessage());
}
} }
//设置发票号
detail.setInvoiceNo(success.getInvoiceNo());
detailList.add(detail);
} }
} }
} }
...@@ -2520,7 +2700,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2520,7 +2700,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){ if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT) {
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365); param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param); listResult.add(param);
continue; continue;
...@@ -3245,7 +3425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3245,7 +3425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){ //日期比较
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT){
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365); param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param); listResult.add(param);
continue; continue;
...@@ -3760,7 +3941,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3760,7 +3941,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY); param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
continue; continue;
} }
if (StringUtils.isBlank(param.getInvoiceNo())){ if (StringUtils.isBlank(param.getInvoiceNo()) || StringUtils.isBlank(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.INVOICE_NO_EMPTY); param.setErrorMessage(InsurancesConstants.INVOICE_NO_EMPTY);
continue; continue;
} }
...@@ -4092,6 +4273,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4092,6 +4273,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return list; return list;
} }
/**
* 将集合交叉合并,list1 是第一个顺序 list2 是第二个顺序
*
* @author huyc
* @param list1
* @param list2
* @return {@link List<InsuranceExportListOneVO>}
*/
private List<InsuranceExportListOneVO> crossMergerOne (List<InsuranceExportListOneVO> list1, List<InsuranceExportListOneVO> list2){
//将list放入到链表队列
LinkedList<InsuranceExportListOneVO> st1 = new LinkedList<>(list1);
LinkedList<InsuranceExportListOneVO> st2 = new LinkedList<>(list2);
//计算较大的数组长度
int max = list1.size() > list2.size() ? list1.size() : list2.size();
//新建一个最终结果的list
List<InsuranceExportListOneVO> list = new ArrayList<>(list1.size() + list2.size());
for ( int i = 0; i < max;i++){
//如果队列没取完,继续取
if (!st1.isEmpty()){
list.add(st1.poll());
}
//如果队列没取完,继续取
if (!st2.isEmpty()){
list.add(st2.poll());
}
}
return list;
}
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
...@@ -7431,11 +7641,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7431,11 +7641,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition.setInsuranceProvinces(provinces); condition.setInsuranceProvinces(provinces);
condition.setInsuranceCitys(citys); condition.setInsuranceCitys(citys);
} }
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())) { IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, sdRes.getData().getListSelectVO()); int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize();
condition.setLimitStart(limitStart);
condition.setLimitEnd(limitEnd);
recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds()));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else { }else {
return baseMapper.getInsuranceExpireWarnVoPage(page, condition, null); recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
} }
return recordsPage;
} }
@Override @Override
...@@ -7661,10 +7883,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7661,10 +7883,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet; WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet(InsurancesConstants.INSURANCE_ALERT_EXPORT+index).build(); writeSheet = EasyExcel.writerSheet(InsurancesConstants.INSURANCE_ALERT_EXPORT+index).build();
...@@ -7711,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7711,18 +7933,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) { private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return baseMapper.noPageDiy(searchVo,domainIds);
return baseMapper.noPageDiy(searchVo,listSelectVO);
} }
private int noPageCountDiy(InsuranceSearchVo searchVo) { private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return baseMapper.noPageCountDiy(searchVo,domainIds);
return baseMapper.noPageCountDiy(searchVo,listSelectVO);
} }
private List<TSettleDomainSelectVo> getExportCondition(InsuranceSearchVo searchVo, List<TSettleDomainSelectVo> listSelectVO) { private List<String> getExportCondition(InsuranceSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId()); R<TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda() List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
...@@ -7742,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7742,15 +7962,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
searchVo.setCreateBy(SecurityUtils.getUser().getId()); searchVo.setCreateBy(SecurityUtils.getUser().getId());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){ if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
listSelectVO = sdRes.getData().getListSelectVO(); return sdRes.getData().getDeptIds();
} }
return listSelectVO; return null;
} }
@Override @Override
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo(); InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<TSettleDomainSelectVo> listSelectVO =null; List<String> domainIds = getExportCondition(searchVo);
listSelectVO = getExportCondition(searchVo, listSelectVO); return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds));
return R.ok(baseMapper.noPageCountDiy(searchVo,listSelectVO));
} }
} }
...@@ -461,6 +461,101 @@ ...@@ -461,6 +461,101 @@
</if> </if>
ORDER BY a.CREATE_TIME DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<!--导出办理勾选查询结果-->
<select id="getInsuranceExportOneListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY a.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select id="getInsuranceExportOnetList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListOneVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.updateBy != null and param.updateBy.trim() != ''">
and a.HANDLED_BY = #{param.updateBy}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
<if test="param.buyStandardMin != null">
AND a.BUY_STANDARD <![CDATA[ >= ]]> #{param.buyStandardMin}
</if>
<if test="param.buyStandardMax != null">
AND a.BUY_STANDARD <![CDATA[ <= ]]> #{param.buyStandardMax}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--批量更新保单号--> <!--批量更新保单号-->
<update id="updatePolicyNoBatch"> <update id="updatePolicyNoBatch">
<foreach collection="details" index="index" item="item" separator=";"> <foreach collection="details" index="index" item="item" separator=";">
...@@ -1626,14 +1721,7 @@ ...@@ -1626,14 +1721,7 @@
</sql> </sql>
<sql id="expire_sql_where"> <sql id="expire_sql_where">
<where> <where>
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null"> <if test="param != null">
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%') AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%')
...@@ -1641,17 +1729,45 @@ ...@@ -1641,17 +1729,45 @@
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''"> <if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
AND a.EMP_IDCARD_NO like CONCAT('%' ,#{param.empIdcardNo},'%') AND a.EMP_IDCARD_NO like CONCAT('%' ,#{param.empIdcardNo},'%')
</if> </if>
<if test="param.insuranceCityName != null and param.insuranceCityName.trim() != ''">
AND a.INSURANCE_CITY_NAME like CONCAT(#{param.insuranceCityName},'%')
</if>
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if>
<if test="param.idList != null and param.idList.size() > 0"> <if test="param.idList != null and param.idList.size() > 0">
and a.id in and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")" <foreach collection="param.idList" item="param" index="index" open="(" close=")"
separator=","> separator=",">
#{param} #{param}
</foreach> </foreach>
</if>
</if>
</where>
</sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from
(select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if> </if>
<if test="param.insuranceProvinces != null and param.insuranceProvinces != null"> and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0"> <if test="param.insuranceProvinces.size() > 0">
and a.INSURANCE_PROVINCE in or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")" <foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=","> separator=",">
#{param} #{param}
...@@ -1659,74 +1775,212 @@ ...@@ -1659,74 +1775,212 @@
</if> </if>
</if> </if>
<if test="param.insuranceCitys != null and param.insuranceCitys != null"> <if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0"> <if test="param.insuranceCitys.size() > 0">
and a.INSURANCE_CITY in or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" separator=","> <foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param} #{param}
</foreach> </foreach>
</if> </if>
</if> </if>
<if test="param.insuranceCitys != null and param.insuranceProvinces != null"> )
<if test="param.insuranceCitys.size() > 0 and param.insuranceProvinces.size() > 0"> </if>
) a
<include refid="expire_sql_where"/>
) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and ( and (
a.INSURANCE_PROVINCE in date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")" <foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=","> separator=",">
#{param} #{param}
</foreach> </foreach>
or a.INSURANCE_CITY in
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" <foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=","> separator=",">
#{param} #{param}
</foreach> </foreach>
)
</if>
</if> </if>
</if> </if>
<!--数据权限判断--> <!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy} or a.CREATE_BY = #{param.createBy}
<if test="domains != null"> <if test="domains != null">
<if test="domains.size() > 0"> <if test="domains.size() > 0">
or a.SETTLEMENT_ORGAN in or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=","> <foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param} #{param}
</foreach> </foreach>
</if> </if>
</if> </if>
) )
</where> </if>
</sql> ) a
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>
from t_insurance_detail a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> <if test="param != null and param.limitStart != null">
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo"> limit #{param.limitStart},#{param.limitEnd}
<include refid="expire_export_sql_param"/> </if>
from t_insurance_detail a ) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null"> <if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd} limit #{param.limitStart},#{param.limitEnd}
</if> </if>
)a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
group by a.id
</select> </select>
<select id="noPageCountDiy" resultType="java.lang.Integer"> <select id="noPageCountDiy" resultType="java.lang.Integer">
select select
count(1) count(1)
from t_insurance_detail a from (select * from t_insurance_detail a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select> </select>
<update id="batchexpireIgnore"> <update id="batchexpireIgnore">
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">
......
...@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable { ...@@ -130,4 +130,13 @@ public class TConfigSalary extends BaseEntity implements Serializable {
@ExcelProperty(value="发放方式(0:现金;1:转账)") @ExcelProperty(value="发放方式(0:现金;1:转账)")
private Integer grantType; private Integer grantType;
/**
* 收入月份
*/
@NotNull(message = "收入月份不能为空")
@ExcelAttribute(name = "收入月份", isNotEmpty = true,errorInfo = "收入月份不能为空" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value="收入月份")
private Integer incomeMonth;
} }
...@@ -445,6 +445,13 @@ public class TSalaryStandard extends BaseEntity { ...@@ -445,6 +445,13 @@ public class TSalaryStandard extends BaseEntity {
@Schema(description = "是否差额单") @Schema(description = "是否差额单")
private String isDiff; private String isDiff;
/**
* 收入月份
* 2023-4-7 09:31:39 hgw新增
*/
@Schema(description = "收入月份")
private String incomeMonth;
/** /**
* 工资月份-起 * 工资月份-起
*/ */
......
...@@ -67,10 +67,9 @@ public class TSalaryStandardIssueRes implements Serializable { ...@@ -67,10 +67,9 @@ public class TSalaryStandardIssueRes implements Serializable {
@Schema(description = "薪资主表id") @Schema(description = "薪资主表id")
private String salaryId; private String salaryId;
/** /**
* money * money 2023-4-4 11:11:56 hgw 去掉了金额限制,mvp1.5.3版本
*/ */
@ExcelAttribute(name = "money", isNotEmpty = true, errorInfo = "money不能为空") @ExcelAttribute(name = "money")
@NotBlank(message = "money不能为空")
@ExcelProperty("money") @ExcelProperty("money")
@Schema(description = "money") @Schema(description = "money")
private BigDecimal money; private BigDecimal money;
......
...@@ -106,4 +106,15 @@ public class TSalaryAccountExportVo { ...@@ -106,4 +106,15 @@ public class TSalaryAccountExportVo {
private BigDecimal costReduction; private BigDecimal costReduction;
@ExcelProperty("表单上传人") @ExcelProperty("表单上传人")
private String createName; private String createName;
@ExcelProperty("个人代扣明细")
private String pdeductionDetail;
@ExcelProperty("个人代扣金额")
private String pdeductionMoney;
/**
* 支出信息结算状态 0 已结算 1 结算中 2 未结算
*/
@ExcelProperty("支出结算状态")
private String paySettleFlag;
} }
...@@ -397,4 +397,19 @@ public class TSalaryAccountController { ...@@ -397,4 +397,19 @@ public class TSalaryAccountController {
return wp; return wp;
} }
/**
* 报账跨年查询导出
* @author hgw
* @date 2023-3-30 15:36:00
**/
@Operation(description = "报账跨年查询导出 hasPermission('account_all_year_export')")
@PostMapping("/allYearExport")
@PreAuthorize("@pms.hasPermission('account_all_year_export')")
public R<List<TSalaryAccount>> allYearExport(@RequestBody TSalaryAccountSearchVo tSalaryAccount) {
if (Common.isEmpty(tSalaryAccount.getEmpIdcard())) {
return R.failed("身份证不可为空!");
}
return R.ok(tSalaryAccountService.allYearExport(tSalaryAccount));
}
} }
...@@ -184,4 +184,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -184,4 +184,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId); , @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId); TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId);
/**
* @param tSalaryAccount
* @Description: 报账按身份证导出,可以导出2个报账年份表
* @Author: hgw
* @Date: 2023/3/31 15:14
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> allYearExport(@Param("tSalaryAccount") TSalaryAccountSearchVo tSalaryAccount);
} }
...@@ -205,4 +205,6 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -205,4 +205,6 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo * @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo
**/ **/
TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId); TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId);
List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount);
} }
...@@ -199,9 +199,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -199,9 +199,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (Common.isEmpty(res.getIssueId())) { if (Common.isEmpty(res.getIssueId())) {
return R.failed("代发户配置id不可为空"); return R.failed("代发户配置id不可为空");
} }
if (Common.isEmpty(res.getMoney())) {
return R.failed("代发户金额不可为空");
}
if (Common.isEmpty(res.getBankName())) { if (Common.isEmpty(res.getBankName())) {
return R.failed("代发户开户行不可为空"); return R.failed("代发户开户行不可为空");
} }
...@@ -228,11 +225,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -228,11 +225,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// return R.ok(saList) // return R.ok(saList)
//薪资导入 //薪资导入
if (CommonConstants.ZERO_STRING.equals(salaryType)) { if (CommonConstants.ZERO_STRING.equals(salaryType)) {
return this.saveAndSubmit(saList, vo, dept); return this.saveAndSubmit(configSalary, saList, vo, dept);
} }
//劳务费和稿酬导入 //劳务费和稿酬导入
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) { if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
return this.saveLaborSubmit(saList, dept, salaryType, orderId); return this.saveLaborSubmit(configSalary, saList, dept, salaryType, orderId);
} }
} else { } else {
return R.failed("导入数据不可为空"); return R.failed("导入数据不可为空");
...@@ -256,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -256,8 +253,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 9:44 * @Date: 2019/9/26 9:44
* @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard * @return: com.yifu.cloud.v1.hrms.api.entity.TSalaryStandard
**/ **/
public R<TSalaryStandard> saveNewTSalary(TSalaryAccountVo sav, TSettleDomainSelectVo dept, YifuUser user public R<TSalaryStandard> saveNewTSalary(TConfigSalary configSalary, TSalaryAccountVo sav, TSettleDomainSelectVo dept
, LocalDateTime nowTime, String invoiceTitle) { , YifuUser user, LocalDateTime nowTime, String invoiceTitle) {
TSalaryStandard s = null; TSalaryStandard s = null;
if (sav != null) { if (sav != null) {
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
...@@ -296,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -296,6 +293,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//s.setSettlementAmount() //s.setSettlementAmount()
s.setStatus(SalaryConstants.AUDIT_STATUS[0]); s.setStatus(SalaryConstants.AUDIT_STATUS[0]);
s.setBpoFlag(dept.getBpoFlag()); s.setBpoFlag(dept.getBpoFlag());
if (configSalary != null && Common.isNotNull(configSalary.getIncomeMonth())) {
s.setIncomeMonth(DateUtil.addMonth(configSalary.getIncomeMonth()));
} else {
s.setIncomeMonth(sav.getSalaryMonth());
}
} }
return new R<>(s); return new R<>(s);
} }
...@@ -307,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -307,7 +309,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/20 17:05 * @Date: 2019/9/20 17:05
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
private R saveAndSubmit(List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) { private R saveAndSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, SalaryUploadParamVo vo, TSettleDomainSelectVo dept) {
if (Common.isNotNull(savList) && !savList.isEmpty()) { if (Common.isNotNull(savList) && !savList.isEmpty()) {
String orderId = vo.getOrderId(); String orderId = vo.getOrderId();
// 代发户 // 代发户
...@@ -327,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -327,7 +329,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
TSalaryStandard salary; TSalaryStandard salary;
//工资主表 //工资主表
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表 R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle); //工资主表
if (sr == null || sr.getCode() == CommonConstants.FAIL) { if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr; return sr;
} else { } else {
...@@ -1431,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1431,7 +1433,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/8/16 * @Date: 2022/8/16
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
public R saveLaborSubmit(List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) { public R saveLaborSubmit(TConfigSalary configSalary, List<TSalaryAccountVo> savList, TSettleDomainSelectVo dept, String salaryType, String orderId) {
if (Common.isNotNull(savList) && !savList.isEmpty()) { if (Common.isNotNull(savList) && !savList.isEmpty()) {
TSalaryAccountVo salaryAccountVo = savList.get(0); TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List List<TSalaryAccountItem> saiList = null; //报账明细List
...@@ -1440,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1440,7 +1442,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
//工资主表 //工资主表
String invoiceTitle = dept.getBusinessSubjectName(); String invoiceTitle = dept.getBusinessSubjectName();
R<TSalaryStandard> sr = this.saveNewTSalary(salaryAccountVo, dept, user, nowTime, invoiceTitle); R<TSalaryStandard> sr = this.saveNewTSalary(configSalary, salaryAccountVo, dept, user, nowTime, invoiceTitle);
if (sr == null || sr.getCode() == CommonConstants.FAIL) { if (sr == null || sr.getCode() == CommonConstants.FAIL) {
return sr; return sr;
......
...@@ -379,4 +379,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -379,4 +379,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId) { public TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId) {
return baseMapper.getAccountSumBySalaryId(salaryId); return baseMapper.getAccountSumBySalaryId(salaryId);
} }
@Override
public List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount) {
return baseMapper.allYearExport(tSalaryAccount);
}
} }
...@@ -541,7 +541,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -541,7 +541,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
fd3b71f20933e0d2.add(""); fd3b71f20933e0d2.add("");
} }
fd3b745c35ff27a8.add(res.getBankName()); fd3b745c35ff27a8.add(res.getBankName());
if (Common.isNotNull(res.getMoney())) {
fd3b73a736cc9cc8.add(String.valueOf(res.getMoney())); fd3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
} else {
fd3b73a736cc9cc8.add("");
}
} }
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f207c0cfd0", fd3b71f207c0cfd0); sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f207c0cfd0", fd3b71f207c0cfd0);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20883301a", fd3b71f20883301a); sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20883301a", fd3b71f20883301a);
......
...@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask { ...@@ -118,7 +118,7 @@ public class DoJointSalaryAsyncTask {
private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) { private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
detail.setApplyNo(tSalaryStandard.getApplyNo()); detail.setApplyNo(tSalaryStandard.getApplyNo());
detail.setPayMonth(tSalaryStandard.getSalaryMonth()); detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setIdCardList(idCardList); detail.setIdCardList(idCardList);
detail.setDeptId(dept.getId()); detail.setDeptId(dept.getId());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
...@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask { ...@@ -175,14 +175,14 @@ public class DoJointSalaryAsyncTask {
if (Common.isEmpty(value) || value == 0) { if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail(); detail = new TIncomeDetail();
detail.setRedisKey(redisKey); detail.setRedisKey(redisKey);
detail.setPayMonth(account.getSalaryMonth()); detail.setPayMonth(tSalaryStandard.getIncomeMonth());
detail.setDeptId(account.getDeptId()); detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName()); detail.setDeptName(account.getDeptName());
detail.setDeptNo(account.getDeptNo()); detail.setDeptNo(account.getDeptNo());
detail.setUnitId(tSalaryStandard.getUnitId()); detail.setUnitId(tSalaryStandard.getUnitId());
detail.setUnitName(tSalaryStandard.getUnitName()); detail.setUnitName(tSalaryStandard.getUnitName());
detail.setUnitNo(tSalaryStandard.getUnitNo()); detail.setUnitNo(tSalaryStandard.getUnitNo());
detail.setCreateMonth(account.getSalaryMonth()); detail.setCreateMonth(tSalaryStandard.getSettlementMonth());
detail.setEmpIdcard(account.getEmpIdcard()); detail.setEmpIdcard(account.getEmpIdcard());
detail.setEmpName(account.getEmpName()); detail.setEmpName(account.getEmpName());
detail.setFeeMode(dept.getManagementType()); detail.setFeeMode(dept.getManagementType());
......
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
<result property="sumPrivatePension" column="SUM_PRIVATE_PENSION"/> <result property="sumPrivatePension" column="SUM_PRIVATE_PENSION"/>
<result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/> <result property="incomeSettleFlag" column="INCOME_SETTLE_FLAG"/>
<result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/> <result property="incomeCollectFlag" column="INCOME_COLLECT_FLAG"/>
<result property="paySettleFlag" column="PAY_COLLECT_FLAG"/> <result property="paySettleFlag" column="PAY_SETTLE_FLAG"/>
<result property="payCollectFlag" column="PAY_SETTLE_FLAG"/> <result property="payCollectFlag" column="PAY_COLLECT_FLAG"/>
<result property="isDiff" column="IS_DIFF"/> <result property="isDiff" column="IS_DIFF"/>
</resultMap> </resultMap>
...@@ -280,7 +280,8 @@ ...@@ -280,7 +280,8 @@
a.SUM_CONTINUING_EDUCATION_MONEY, a.SUM_CONTINUING_EDUCATION_MONEY,
a.SUM_BABY_MONEY, a.SUM_BABY_MONEY,
a.SUM_PRIVATE_PENSION, a.SUM_PRIVATE_PENSION,
a.IS_DIFF a.IS_DIFF,
a.PAY_SETTLE_FLAG
</sql> </sql>
<sql id="tSalaryAccount_where"> <sql id="tSalaryAccount_where">
...@@ -802,16 +803,20 @@ ...@@ -802,16 +803,20 @@
a.SUM_PRIVATE_PENSION as sumPrivatePension, a.SUM_PRIVATE_PENSION as sumPrivatePension,
a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney, a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney,
a.COST_REDUCTION as costReduction, a.COST_REDUCTION as costReduction,
a.CREATE_NAME as createName a.CREATE_NAME as createName,
GROUP_CONCAT(pdeduction.CN_NAME,':',pdeduction.SALARY_MONEY,';') pdeductionDetail,
sum(ifnull(pdeduction.SALARY_MONEY,0)) pdeductionMoney,
if(a.PAY_SETTLE_FLAG = '0','已结算',if(a.PAY_SETTLE_FLAG = '1','结算中',if(a.PAY_SETTLE_FLAG = '2','未结算','-'))) paySettleFlag
from from
t_salary_account a 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 annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax' left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity' left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
<include refid="where_export"/> <include refid="where_export"/>
ORDER BY a.CREATE_TIME desc GROUP BY a.id ORDER BY a.CREATE_TIME desc
<if test="searchVo != null"> <if test="searchVo != null">
<if test="searchVo.limitStart != null"> <if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd} limit #{searchVo.limitStart},#{searchVo.limitEnd}
...@@ -1180,4 +1185,36 @@ ...@@ -1180,4 +1185,36 @@
left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit' left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit'
where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId} where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId}
</select> </select>
<!-- 根据idList获取报账信息 -->
<select id="allYearExport" resultMap="tSalaryAccountMap">
select * from (
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,if(a.FORM_TYPE='3',a.RELAY_SALARY_UNIT,a.RELAY_SALARY) RELAY_SALARY
,a.ACTUAL_SALARY,ifnull(SALARY_TAX_UNIT,0) + ifnull(a.SALARY_TAX,0) SALARY_TAX
FROM
t_salary_account a
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
union all
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,relaySalary.SALARY_MONEY RELAY_SALARY
,actualSalarySum.SALARY_MONEY ACTUAL_SALARY,salaryTax.SALARY_MONEY SALARY_TAX
FROM
t_salary_account_hro_2021 a
left join t_salary_account_item_hro_2021 relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item_hro_2021 actualSalarySum on actualSalarySum.SALARY_ACCOUNT_ID = a.id and actualSalarySum.JAVA_FIED_NAME='actualSalarySum'
left join t_salary_account_item_hro_2021 salaryTax on salaryTax.SALARY_ACCOUNT_ID = a.id and salaryTax.JAVA_FIED_NAME='salaryTax'
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
) a
where 1=1
<include refid="tSalaryAccount_where"/>
order by a.SALARY_MONTH desc
</select>
</mapper> </mapper>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<result property="incomeEndTime" column="INCOME_END_TIME"/> <result property="incomeEndTime" column="INCOME_END_TIME"/>
<result property="issueStatus" column="ISSUE_STATUS"/> <result property="issueStatus" column="ISSUE_STATUS"/>
<result property="isDiff" column="IS_DIFF"/> <result property="isDiff" column="IS_DIFF"/>
<result property="incomeMonth" column="INCOME_MONTH"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -137,7 +138,8 @@ ...@@ -137,7 +138,8 @@
a.INCOME_START_TIME, a.INCOME_START_TIME,
a.INCOME_END_TIME, a.INCOME_END_TIME,
a.ISSUE_STATUS, a.ISSUE_STATUS,
a.IS_DIFF a.IS_DIFF,
a.INCOME_MONTH
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
......
...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelIgnore; ...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
...@@ -63,6 +64,15 @@ public class TDispatchInfo extends BaseEntity { ...@@ -63,6 +64,15 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("派单申请编码" ) @ExcelProperty("派单申请编码" )
private String dispatchCode; private String dispatchCode;
/**
* 重新派单号
*/
@ExcelAttribute(name = "重新派单号", maxLength = 30)
@Schema(description = "重新派单号" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("重新派单号" )
private String againDispatchCode;
/** /**
* 员工ID * 员工ID
*/ */
...@@ -697,4 +707,12 @@ public class TDispatchInfo extends BaseEntity { ...@@ -697,4 +707,12 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("订单ID" ) @ExcelProperty("订单ID" )
private String orderId; private String orderId;
/**
* 原派单ID
* 2023-4-11 14:37:17
* hgw增加
*/
@TableField(exist = false)
private String pid;
} }
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2023/4/10
* @Description
* @Version 1.0
*/
@Data
public class DispatchOneDetailVo implements Serializable {
/**
* 派单
**/
private TDispatchInfo dispatch;
/**
* 社保公积金查询
**/
private TSocialFundInfo social;
}
...@@ -4,12 +4,15 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -4,12 +4,15 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; 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; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
/** /**
* @Author fxj * @Author fxj
...@@ -171,6 +174,27 @@ public class FundHandleExportVo implements Serializable { ...@@ -171,6 +174,27 @@ public class FundHandleExportVo implements Serializable {
@ExcelProperty("委托备注" ) @ExcelProperty("委托备注" )
private String fundTrustRemark; private String fundTrustRemark;
/**
* 离职日期
*/
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 离职原因
*/
@Length(max = 32, message = "离职原因 不能超过32个字符" )
@ExcelAttribute(name = "离职原因", maxLength = 32,isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON)
@Schema(description = "离职原因" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("离职原因" )
private String reduceReason;
/*******************************导出字段结束*************************************************/ /*******************************导出字段结束*************************************************/
} }
...@@ -194,7 +194,7 @@ public class SocialHandleExportVo implements Serializable { ...@@ -194,7 +194,7 @@ public class SocialHandleExportVo implements Serializable {
@Schema(description = "合同年限") @Schema(description = "合同年限")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同年限" ) @ExcelProperty("合同年限" )
private Double contractTerm; private String contractTerm;
/** /**
* 合同起始时间 * 合同起始时间
*/ */
......
...@@ -110,4 +110,21 @@ public class TDispatchReduceVo extends RowIndex implements Serializable { ...@@ -110,4 +110,21 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
@ExcelProperty("委托备注" ) @ExcelProperty("委托备注" )
private String trustRemark; private String trustRemark;
/**
* 是否是失败项重新派单 0 是
*/
@ExcelAttribute(name = "是否是失败项重新派单")
@Schema(description = "是否是失败项重新派单" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否是失败项重新派单" )
private String isAgainFlag;
/**
* 重新派单的ID
*/
@ExcelAttribute(name = "重新派单的ID")
@Schema(description = "重新派单的ID" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("重新派单的ID" )
private String isAgainId;
} }
/*
* 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.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 社保公积金查询表
*
* @author huyc
* @date 2023-04-10 11:38:05
*/
@Data
public class TSocialFundInfoOneVo {
/**
* id
*/
@Schema(description = "id" )
private String id;
/**
* 员工身份证
*/
@Schema(description = "身份证号" )
private String empIdcard;
}
...@@ -31,7 +31,9 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; ...@@ -31,7 +31,9 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchOneDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoOneVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -86,6 +88,17 @@ public class TSocialFundInfoController { ...@@ -86,6 +88,17 @@ public class TSocialFundInfoController {
return R.ok(tSocialFundInfoService.noPageDiy(tSocialFundInfo)); return R.ok(tSocialFundInfoService.noPageDiy(tSocialFundInfo));
} }
/**
* 重新派单明细查询
* @param tSocialFundInfo 社保公积金查询表
* @return
*/
@Operation(summary = "重新派单明细查询", description = "重新派单明细查询")
@PostMapping("/dispatchAgainInfo" )
public R<DispatchOneDetailVo> getTSocialFundInfoOne(@RequestBody TSocialFundInfoOneVo tSocialFundInfo) {
return R.ok(tSocialFundInfoService.getTSocialFundInfoOne(tSocialFundInfo));
}
/** /**
* 通过id查询社保公积金查询表 * 通过id查询社保公积金查询表
* @param id id * @param id id
......
...@@ -24,7 +24,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; ...@@ -24,7 +24,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchOneDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoOneVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -64,6 +66,8 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -64,6 +66,8 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
List<TSocialFundInfo> noPageDiy(TSocialFundInfoSearchVo searchVo); List<TSocialFundInfo> noPageDiy(TSocialFundInfoSearchVo searchVo);
DispatchOneDetailVo getTSocialFundInfoOne(TSocialFundInfoOneVo searchVo);
/** /**
* @param id * @param id
* @Description: 社保公积金查询的详情 * @Description: 社保公积金查询的详情
......
...@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; 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.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
...@@ -573,7 +575,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -573,7 +575,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
// 新增派单信息 // 新增派单信息
excel.setOrderId(orderId); excel.setOrderId(orderId);
initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury); if (initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury)){
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
if (Common.isNotNull(dispatchMap.get(excel.getEmpIdcard())) && "公积金".equals(dispatchMap.get(excel.getEmpIdcard()).getDispatchItem())){
socialsMap.remove(excel.getEmpIdcard());
excel.setSocialHousehold(null);
}
// 变更社保公积金查询 // 变更社保公积金查询
initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel); initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel);
} }
...@@ -686,6 +696,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -686,6 +696,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(social)){ if (Common.isNotNull(social)){
dispatch.setSocialId(social.getId()); dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName()); dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
} }
if (Common.isNotNull(fund)){ if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId()); dispatch.setFundId(fund.getId());
...@@ -697,13 +708,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -697,13 +708,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(project)){ if (Common.isNotNull(project)){
dispatch.setEmpNo(project.getEmpNo()); dispatch.setEmpNo(project.getEmpNo());
} }
}
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
insertDispatch(emp, dispatch); insertDispatch(emp, dispatch);
// 新增派单申请提交记录 // 新增派单申请提交记录
auditInfo = new TAuditInfo(); auditInfo = new TAuditInfo();
addAuditInfo(dispatch, auditInfo); addAuditInfo(dispatch, auditInfo);
} }
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了 // 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
if (Common.isNotNull(socialFundAddMap)){ if (Common.isNotNull(socialFundAddMap)){
socialFund = socialFundAddMap.get(excel.getEmpIdcard()); socialFund = socialFundAddMap.get(excel.getEmpIdcard());
...@@ -819,6 +829,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -819,6 +829,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
baseMapper.insert(dispatch); baseMapper.insert(dispatch);
if (Common.isNotNull(dispatch.getPid())) {
TDispatchInfo old = new TDispatchInfo();
old.setId(dispatch.getPid());
old.setAgainDispatchCode(dispatch.getApplyNo());
baseMapper.updateById(old);
}
} }
} }
...@@ -1177,7 +1193,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1177,7 +1193,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int num = 3 - nowNums.length(); int num = 3 - nowNums.length();
return zeroArr[num] + nowNums; return zeroArr[num] + nowNums;
} }
private void initDispatchAddInfo(YifuUser user, private boolean initDispatchAddInfo(YifuUser user,
Map<String, TDispatchInfo> dispatchMap, Map<String, TDispatchInfo> dispatchMap,
DispatchEmpVo empVo, DispatchEmpVo empVo,
SysBaseSetInfo socialSet, SysBaseSetInfo socialSet,
...@@ -1189,6 +1205,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1189,6 +1205,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化派单项 // 初始化派单项
dispatch.setOrderId(excel.getOrderId()); dispatch.setOrderId(excel.getOrderId());
initAddHandleItem(excel, socialFund,dispatch,socialSet,injury); initAddHandleItem(excel, socialFund,dispatch,socialSet,injury);
if (Common.isEmpty(dispatch.getDispatchItem())){
return true;
}
dispatch.setOrganName(user.getDeptName()); dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId()); dispatch.setCreateBy(user.getId());
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
...@@ -1208,7 +1227,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1208,7 +1227,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setSettleDomainName(excel.getDepartName()); dispatch.setSettleDomainName(excel.getDepartName());
dispatch.setSettleDomainCode(excel.getSettleDomainCode()); dispatch.setSettleDomainCode(excel.getSettleDomainCode());
dispatch.setSettleDomain(excel.getSettleDomainId()); dispatch.setSettleDomain(excel.getSettleDomainId());
if (Common.isNotNull(excel.getSocialHousehold())){ if (Common.isNotNull(excel.getSocialHousehold()) && !"公积金".equals(dispatch.getDispatchItem())){
dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING); dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING);
} }
if (Common.isNotNull(excel.getProvidentHousehold())){ if (Common.isNotNull(excel.getProvidentHousehold())){
...@@ -1278,7 +1297,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1278,7 +1297,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
// 生成申请编码 // 生成申请编码
dispatch.setApplyNo(getApplyCode()); dispatch.setApplyNo(getApplyCode());
dispatch.setPid(excel.getDispatchId());
dispatchMap.put(excel.getEmpIdcard(),dispatch); dispatchMap.put(excel.getEmpIdcard(),dispatch);
return false;
} }
private void initAddHandleItem(TDispatchImportVo excel, TSocialFundInfo socialFund, TDispatchInfo dispatch, SysBaseSetInfo socialSet, boolean injury) { private void initAddHandleItem(TDispatchImportVo excel, TSocialFundInfo socialFund, TDispatchInfo dispatch, SysBaseSetInfo socialSet, boolean injury) {
...@@ -1955,6 +1976,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1955,6 +1976,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setSettleDomain(setInfoVo.getId()); contract.setSettleDomain(setInfoVo.getId());
contract.setDeptNo(setInfoVo.getDepartNo()); contract.setDeptNo(setInfoVo.getDepartNo());
contract.setCustomerId(setInfoVo.getCustomerId()); contract.setCustomerId(setInfoVo.getCustomerId());
contract.setUnitNo(setInfoVo.getCustomerCode());
contract.setSubjectUnit(setInfoVo.getCustomerName()); contract.setSubjectUnit(setInfoVo.getCustomerName());
contract.setSubjectDepart(setInfoVo.getDepartName()); contract.setSubjectDepart(setInfoVo.getDepartName());
contract.setEmpNatrue(excel.getEmpType()); contract.setEmpNatrue(excel.getEmpType());
...@@ -2719,9 +2741,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2719,9 +2741,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard()); excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
// 初始化派单 和 社保公积金查询信息 // 初始化派单 和 社保公积金查询信息
dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user); dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user);
if (Common.isEmpty(dispatch.getDispatchItem())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
try { try {
dispatch.setOrderId(orderId); dispatch.setOrderId(orderId);
dispatch.setApplyNo(getApplyCode()); dispatch.setApplyNo(getApplyCode());
if (CommonConstants.ZERO_STRING.equals(excel.getIsAgainFlag())) {
TDispatchInfo dispatchInfo = baseMapper.selectById(excel.getIsAgainId());
dispatchInfo.setAgainDispatchCode(dispatch.getApplyNo());
baseMapper.updateById(dispatchInfo);
}
dispatch.setStatus(CommonConstants.ONE_STRING); dispatch.setStatus(CommonConstants.ONE_STRING);
baseMapper.insert(dispatch); baseMapper.insert(dispatch);
socialFundMapper.updateById(socialFund); socialFundMapper.updateById(socialFund);
...@@ -3364,7 +3395,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3364,7 +3395,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark) { String handleRemark, String socialType, String remark) {
try {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (null == user) { if (null == user) {
return R.failed(CommonConstants.USER_FAIL); return R.failed(CommonConstants.USER_FAIL);
...@@ -3382,16 +3412,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3382,16 +3412,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} else { } else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过"); return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
} }
String key = CacheConstants.PAYMENT_DISPATCH_BATCH_IMPORT + CommonConstants.DOWN_LINE_STRING +user.getId() ;
// 获取redis分布式事务锁
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
if (Common.isNotNull(requestId)) {
try {
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus, List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType,remark); Common.isNullToString(handleRemark), socialType, remark);
if (errorInfo == null || errorInfo.isEmpty()) { if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null,"办理成功!"); return R.ok(null, "办理成功!");
} else { } else {
return R.ok(errorInfo,"派单办理结果:"); return R.ok(errorInfo, "派单办理结果:");
} }
} catch (Exception e) { } catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage()); log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!"); return R.failed("数据异常,办理失败!");
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
} }
} }
...@@ -4046,6 +4092,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4046,6 +4092,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialStatus(CommonConstants.ELEVEN_STRING); sf.setSocialStatus(CommonConstants.ELEVEN_STRING);
sf.setSocialReduceStatus(CommonConstants.FIVE_STRING); sf.setSocialReduceStatus(CommonConstants.FIVE_STRING);
} }
// 有部分办理失败的多次派单 优化,存在办理失败的 更新为 部分办理失败
if (CommonConstants.EIGHT_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
sf.setSocialReduceDate(null);
}
if (CommonConstants.NINE_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.THREE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.THREE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.THREE_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.THREE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
}
} }
// 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病) // 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
if (CommonConstants.ZERO_STRING.equals(dis.getType()) && Common.isNotNull(dis.getSocialId())){ if (CommonConstants.ZERO_STRING.equals(dis.getType()) && Common.isNotNull(dis.getSocialId())){
...@@ -4151,6 +4219,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4151,6 +4219,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
) )
|| Common.isEmpty(socialInfo.getBigailmentHandle())) || Common.isEmpty(socialInfo.getBigailmentHandle()))
){ ){
if (partHandleStatus(socialInfo, sf, dis)) return;
if (CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle()) if (CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle()) || CommonConstants.TWO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle()) || CommonConstants.TWO_STRING.equals(socialInfo.getBirthHandle())
...@@ -4194,6 +4263,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4194,6 +4263,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())) && CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| Common.isEmpty(socialInfo.getBigailmentHandle())) || Common.isEmpty(socialInfo.getBigailmentHandle()))
){ ){
// 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj
if (partHandleStatus(socialInfo, sf, dis)) return;
socialInfo.setHandleStatus(CommonConstants.THREE_STRING); socialInfo.setHandleStatus(CommonConstants.THREE_STRING);
sf.setSocialStatus(CommonConstants.EIGHT_STRING); sf.setSocialStatus(CommonConstants.EIGHT_STRING);
sf.setSocialReduceStatus(CommonConstants.TWO_STRING); sf.setSocialReduceStatus(CommonConstants.TWO_STRING);
...@@ -4238,6 +4309,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4238,6 +4309,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dis.setSocialHandleStatus(CommonConstants.THREE_STRING); dis.setSocialHandleStatus(CommonConstants.THREE_STRING);
} }
private boolean partHandleStatus(TSocialInfo socialInfo, TSocialFundInfo sf, TDispatchInfo dis) {
// 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj
if (CommonConstants.FIVE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FIVE_STRING.equals(sf.getBigailmentHandle())
) {
//办理中
socialInfo.setHandleStatus(CommonConstants.SIX_STRING);
sf.setSocialStatus(CommonConstants.ELEVEN_STRING);
sf.setSocialReduceStatus(CommonConstants.FIVE_STRING);
socialInfo.setReduceCan(CommonConstants.ONE_STRING);
dis.setSocialHandleStatus(CommonConstants.FOUR_STRING);
return true;
}
return false;
}
private void updateSocialByHandle(int flag, TSocialInfo socialInfo, TDispatchInfo dis, TSocialFundInfo sf) { private void updateSocialByHandle(int flag, TSocialInfo socialInfo, TDispatchInfo dis, TSocialFundInfo sf) {
if (CommonConstants.ZERO_INT== flag if (CommonConstants.ZERO_INT== flag
&& Common.isNotNull(dis.getSocialId()) && Common.isNotNull(dis.getSocialId())
......
...@@ -42,10 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; ...@@ -42,10 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*; import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundHistoryVo; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -165,6 +162,22 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -165,6 +162,22 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
} }
@Override
public DispatchOneDetailVo getTSocialFundInfoOne(TSocialFundInfoOneVo searchVo) {
if (Common.isNotNull(searchVo.getEmpIdcard()) && Common.isNotNull(searchVo.getId())) {
LambdaQueryWrapper<TSocialFundInfo> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TSocialFundInfo::getEmpIdcard, searchVo.getEmpIdcard());
wrapper.last(CommonConstants.LAST_ONE_SQL);
TSocialFundInfo socialFundInfo = baseMapper.selectOne(wrapper);
TDispatchInfo dispatchInfo = tDispatchInfoService.getById(searchVo.getId());
DispatchOneDetailVo detailVo = new DispatchOneDetailVo();
detailVo.setSocial(socialFundInfo);
detailVo.setDispatch(dispatchInfo);
return detailVo;
}
return null;
}
private List<TSocialFundInfoExportVo> export(TSocialFundInfoSearchVo searchVo) { private List<TSocialFundInfoExportVo> export(TSocialFundInfoSearchVo searchVo) {
if (Common.isNotNull(searchVo.getIdList())) { if (Common.isNotNull(searchVo.getIdList())) {
searchVo.setIdList(searchVo.getIdList()); searchVo.setIdList(searchVo.getIdList());
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/> <result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="belongUnitName" column="BELONG_UNIT_NAME"/> <result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="dispatchCode" column="DISPATCH_CODE"/> <result property="dispatchCode" column="DISPATCH_CODE"/>
<result property="againDispatchCode" column="AGAIN_DISPATCH_CODE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/> <result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractId" column="CONTRACT_ID"/> <result property="contractId" column="CONTRACT_ID"/>
<result property="educationName" column="EDUCATION_NAME"/> <result property="educationName" column="EDUCATION_NAME"/>
...@@ -280,6 +281,7 @@ ...@@ -280,6 +281,7 @@
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
a.BELONG_UNIT_NAME, a.BELONG_UNIT_NAME,
a.DISPATCH_CODE, a.DISPATCH_CODE,
a.AGAIN_DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE, a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME, a.CONTRACT_SUB_NAME,
a.CONTRACT_ID, a.CONTRACT_ID,
...@@ -949,6 +951,8 @@ ...@@ -949,6 +951,8 @@
<result property="fundTown" column="FUND_TOWN"/> <result property="fundTown" column="FUND_TOWN"/>
<result property="belongUnit" column="BELONG_UNIT_NAME"/> <result property="belongUnit" column="BELONG_UNIT_NAME"/>
<result property="fundTrustRemark" column="TRUST_REMARK"/> <result property="fundTrustRemark" column="TRUST_REMARK"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
</resultMap> </resultMap>
<!--tDispatchInfo 社保花名册数据查询--> <!--tDispatchInfo 社保花名册数据查询-->
...@@ -1065,7 +1069,9 @@ ...@@ -1065,7 +1069,9 @@
f.FUND_PROVINCE, f.FUND_PROVINCE,
f.FUND_CITY, f.FUND_CITY,
f.FUND_TOWN, f.FUND_TOWN,
a.TRUST_REMARK a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON
<include refid="where_getFundRecord"/> <include refid="where_getFundRecord"/>
</select> </select>
......
...@@ -196,7 +196,7 @@ public class UserController { ...@@ -196,7 +196,7 @@ public class UserController {
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('sys_user_edit')") @PreAuthorize("@pms.hasPermission('sys_user_edit')")
public R<Boolean> updateUser(@Valid @RequestBody UserDTO userDto) { public R<Boolean> updateUser(@Valid @RequestBody UserDTO userDto) {
userDto.setType(CommonConstants.ZERO_STRING); ///userDto.setType(CommonConstants.ZERO_STRING); 2023-04-07 fxj 解决变更LDAP 用户的问题
return R.ok(userService.updateUser(userDto)); return R.ok(userService.updateUser(userDto));
} }
......
...@@ -187,7 +187,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -187,7 +187,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
user.setPassword(ENCODER.encode(password)); user.setPassword(ENCODER.encode(password));
}else { }else {
// 登录失败,随机密码,保证用户密码不一致 // 登录失败,随机密码,保证用户密码不一致
user.setPassword(password+RandomUtil.getSix()); user = null;
//user.setPassword(password+RandomUtil.getSix());
throw new RuntimeException("LDAP登录失败:"+ username);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("LDAP登录异常",e); log.error("LDAP登录异常",e);
......
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