Commit d56d42d9 authored by huyuchen's avatar huyuchen

Merge branch 'feature/MVP1.0' into develop

parents 8084b2d7 ee3e2b80
...@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO { ...@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO {
/** /**
* 身份证-省 * 身份证-省
*/ */
@ExcelAttribute(name = "户籍所在省", isArea = true) @ExcelAttribute(name = "户籍所在省")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在省") @ExcelProperty(value = "户籍所在省")
private String idProvince; private String idProvince;
...@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO { ...@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在市") @ExcelProperty(value = "户籍所在市")
@ExcelAttribute(name = "户籍所在市", isArea = true, parentField = "idProvince") @ExcelAttribute(name = "户籍所在市")
private String idCity; private String idCity;
/** /**
...@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO { ...@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在县") @ExcelProperty(value = "户籍所在县")
@ExcelAttribute(name = "户籍所在县", isArea = true, parentField = "idCity") @ExcelAttribute(name = "户籍所在县")
private String idTown; private String idTown;
/** /**
...@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO { ...@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省") @ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true) @ExcelAttribute(name = "档案所在省")
private String fileProvince; private String fileProvince;
/** /**
...@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO { ...@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市") @ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince") @ExcelAttribute(name = "档案所在市")
private String fileCity; private String fileCity;
/** /**
...@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO { ...@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县") @ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity") @ExcelAttribute(name = "档案所在县")
private String fileTown; private String fileTown;
/** /**
...@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO { ...@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO {
/** /**
* 人员档案状态(0草稿、1已审核) * 人员档案状态(0草稿、1已审核)
* , readConverterExp = "0=草稿,1=已审核"
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员档案状态") @ExcelProperty(value = "人员档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核") @ExcelAttribute(name = "人员档案状态")
private String proStatus; private String proStatus;
/** /**
...@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO { ...@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="近3个月发薪") @ExcelProperty(value ="近3个月发薪")
@ExcelAttribute(name = "近3个月发薪", readConverterExp = "0=无,1=是,2=否") @ExcelAttribute(name = "近3个月发薪", isDataId = true,dataType = ExcelAttributeConstants.FILE_SALARY_STATUS)
private String salaryStatus; private String salaryStatus;
/** /**
......
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService ...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService; import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.util.Common;
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.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
...@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException; ...@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
...@@ -181,6 +183,9 @@ public class TSettleDomainController { ...@@ -181,6 +183,9 @@ public class TSettleDomainController {
List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos(); List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos();
TSettleDomainListVo listVo = new TSettleDomainListVo(); TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list); listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSlectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k)));
}
return listVo; return listVo;
} }
...@@ -318,5 +323,4 @@ public class TSettleDomainController { ...@@ -318,5 +323,4 @@ public class TSettleDomainController {
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) { public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo)); return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
} }
} }
...@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject); IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
/**
* 获得导出的项目档案列表
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造 // getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
......
...@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFieldNames(includeColumnFiledNames).build(); ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(includeColumnFiledNames).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
WriteSheet writeSheet; WriteSheet writeSheet;
ExcelUtil<EmployeeProjectExportVO> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build(); writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
......
...@@ -194,28 +194,28 @@ ...@@ -194,28 +194,28 @@
a.TRY_PERIOD, a.TRY_PERIOD,
a.PROJECT_SOURCE, a.PROJECT_SOURCE,
a.CONTRACT_STATUS, a.CONTRACT_STATUS,
b.STATUS AS PROSTATUS, if(b.STATUS=0,'草稿','已审核') AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME, b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME, b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE, b.EMP_PHONE,
a.INSURANCE_STATUS, a.INSURANCE_STATUS,
a.SOCIAL_STATUS, a.SOCIAL_STATUS,
a.FUND_STATUS, a.FUND_STATUS,
b.FILE_PROVINCE, a4.AREA_NAME FILE_PROVINCE,
b.FILE_CITY, a5.AREA_NAME FILE_CITY,
b.FILE_TOWN, a6.AREA_NAME FILE_TOWN,
a.SOCIAL_PROVINCE, a7.AREA_NAME SOCIAL_PROVINCE,
a.SOCIAL_CITY, a8.AREA_NAME SOCIAL_CITY,
a.SOCIAL_TOWN, a9.AREA_NAME SOCIAL_TOWN,
a.SALARY_STATUS, a.SALARY_STATUS,
b.VALIDITY_START, b.VALIDITY_START,
b.VALIDITY_END, b.VALIDITY_END,
b.EMP_MARRI_STATUS, b.EMP_MARRI_STATUS,
b.EMP_NATIONAL, b.EMP_NATIONAL,
b.POLITICAL_STATUS, b.POLITICAL_STATUS,
b.ID_PROVINCE, a1.AREA_NAME ID_PROVINCE,
b.ID_CITY, a2.AREA_NAME ID_CITY,
b.ID_TOWN, a3.AREA_NAME ID_TOWN,
b.EMP_REGIS_TYPE, b.EMP_REGIS_TYPE,
b.IS_COLLEGE, b.IS_COLLEGE,
b.HIGN_EDUCATION, b.HIGN_EDUCATION,
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
b.ADMISSION_DATE, b.ADMISSION_DATE,
b.GRADUTION_DATE, b.GRADUTION_DATE,
b.REMARK, b.REMARK,
a.STATUS, if(a.STATUS=0,'草稿','已审核') STATUS,
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
b.EMP_EMAIL, b.EMP_EMAIL,
...@@ -799,21 +799,6 @@ ...@@ -799,21 +799,6 @@
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--tEmployeeInfo导出查询-->
<select id="getTEmployeeProjectExportPage" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03--> <!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap"> <select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
...@@ -821,6 +806,15 @@ ...@@ -821,6 +806,15 @@
<include refid="Base_Export_List"/> <include refid="Base_Export_List"/>
FROM t_employee_project a FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=b.ID_CITY
LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN
LEFT JOIN sys_area a4 on a4.id=b.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=b.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=b.FILE_TOWN
LEFT JOIN sys_area a7 on a7.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.SOCIAL_CITY
LEFT JOIN sys_area a9 on a9.id=a.SOCIAL_TOWN
<where> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/> <include refid="exportTEmployeeProject_where"/>
......
...@@ -505,4 +505,6 @@ public interface CommonConstants { ...@@ -505,4 +505,6 @@ public interface CommonConstants {
// 权限使用的 // 权限使用的
public static final String A_DEPT_ID = "a.dept_id"; public static final String A_DEPT_ID = "a.dept_id";
public static final String A_CREATE_BY = "a.CREATE_BY"; public static final String A_CREATE_BY = "a.CREATE_BY";
String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!";
} }
...@@ -28,6 +28,8 @@ public class ExcelAttributeConstants { ...@@ -28,6 +28,8 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state"; public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state";
// 公积金状态 // 公积金状态
public static final String FUND_STATUS = "fund_status"; public static final String FUND_STATUS = "fund_status";
// 档案近3个月发薪状态
public static final String FILE_SALARY_STATUS = "file_salary_status";
// 减档原因 // 减档原因
public static final String DOWNSHIFT_REASON = "downshift_reason"; public static final String DOWNSHIFT_REASON = "downshift_reason";
......
...@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity { ...@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键") @Schema(description = "主键")
private Integer id; private String id;
/** /**
* 附件名 * 附件名
......
...@@ -59,9 +59,9 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService; ...@@ -59,9 +59,9 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask; import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -2508,6 +2508,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2508,6 +2508,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0){ if (count > 0){
List<TPaymentInfo> unPushs; List<TPaymentInfo> unPushs;
int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT); int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j=0;j<i;j++){ for (int j=0;j<i;j++){
unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
...@@ -2516,10 +2517,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2516,10 +2517,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this){ synchronized (this){
if (Common.isNotNull(unPushs)) { if (Common.isNotNull(unPushs)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushSocialParam(unPushs); initEkpPushSocialParam(unPushs,mapSelectVo);
} }
} }
} }
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
} }
} }
...@@ -2532,6 +2536,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2532,6 +2536,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) { if (count > 0) {
List<TPaymentInfo> unPushInfo; List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
...@@ -2541,10 +2546,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2541,10 +2546,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushFundParam(unPushInfo); initEkpPushFundParam(unPushInfo,mapSelectVo);
} }
} }
} }
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
} }
} }
...@@ -2553,18 +2561,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2553,18 +2561,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L); redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据 Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
createPaymentSocialInfoReal(user,searchVo); //手动推送未推送的社保公积金明细数据
createPaymentFundInfoReal(user,searchVo); createPaymentSocialInfoReal(user, searchVo,mapSelectVo);
//推送社保公积金收入数据 createPaymentFundInfoReal(user, searchVo,mapSelectVo);
createPaymentInfoIncomeReal(user,searchVo); //推送社保公积金收入数据
createPaymentFundIncomeReal(user,searchVo); createPaymentInfoIncomeReal(user, searchVo,mapSelectVo);
redisUtil.remove(key); createPaymentFundIncomeReal(user, searchVo,mapSelectVo);
} catch (Exception e) { if (Common.isNotNull(mapSelectVo)) {
log.error("社保缴费库:" + e); mapSelectVo.clear();
redisUtil.remove(key); }
} redisUtil.remove(key);
} }
@Override @Override
...@@ -2594,6 +2602,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2594,6 +2602,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入 //判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
...@@ -2603,10 +2612,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2603,10 +2612,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 //生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING); createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
} }
} }
} }
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
} }
} }
...@@ -2620,6 +2632,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2620,6 +2632,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) { if (count > 0) {
List<TPaymentInfo> sumList; List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT); int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) {
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda() sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING) .eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
...@@ -2628,10 +2641,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2628,10 +2641,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 //生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING); createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
} }
} }
} }
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
} }
} }
...@@ -2659,7 +2675,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2659,7 +2675,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的社保实缴明细数据 //获取所有未推送的社保实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialPushCount(searchVo,user.getId()); long count = baseMapper.getTPaymentSocialPushCount(searchVo,user.getId());
...@@ -2671,14 +2688,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2671,14 +2688,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushSocialParam(unPushInfo); initEkpPushSocialParam(unPushInfo,mapSelectVo);
} }
} }
} }
} }
} }
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的公积金实缴明细数据 //获取所有未推送的公积金实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundPushCount(searchVo,user.getId()); long count = baseMapper.getTPaymentFundPushCount(searchVo,user.getId());
...@@ -2690,14 +2708,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2690,14 +2708,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(unPushInfo)) { if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送 //推送数据封装并推送
initEkpPushFundParam(unPushInfo); initEkpPushFundParam(unPushInfo,mapSelectVo);
} }
} }
} }
} }
} }
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId()); long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId());
if (count > 0) { if (count > 0) {
...@@ -2708,14 +2727,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2708,14 +2727,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成收入 //生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING); createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
} }
} }
} }
} }
} }
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) { public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
searchVo.setLockStatus(CommonConstants.ONE_STRING); searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId()); long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId());
if (count > 0) { if (count > 0) {
...@@ -2726,7 +2746,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2726,7 +2746,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) { synchronized (this) {
if (Common.isNotNull(sumList)) { if (Common.isNotNull(sumList)) {
//生成公积金收入 //生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING); createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
} }
} }
} }
...@@ -2744,372 +2764,365 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2744,372 +2764,365 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return paymentVo; return paymentVo;
} }
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) { public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
for (TPaymentInfo library : unPushInfo) { TSettleDomain settleDomain;
//获取项目信息 try {
TSettleDomain settleDomain = new TSettleDomain(); for (TPaymentInfo library : unPushInfo) {
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); //获取项目信息
if (Common.isNotNull(listVo)) { if (Common.isNotNull(mapSelectVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); settleDomain = mapSelectVo.get(library.getSettleDomainCode());
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { } else {
settleDomainR = tSettleDomainListVo.getListSelectVO(); settleDomain = null;
for (TSettleDomainSelectVo vo : settleDomainR) { }
BeanUtils.copyProperties(vo, settleDomain); EkpPushSocialParam socialParam = new EkpPushSocialParam();
} //员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
} }
EkpPushSocialParam socialParam = new EkpPushSocialParam(); }catch (Exception e) {
//员工姓名 log.error("生成社保明细异常",e);
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
} }
} }
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) { public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TSettleDomainSelectVo> settleDomainR; TSettleDomain settleDomain;
R<TSettleDomainListVo> listVo; try {
for (TPaymentInfo library : unPushInfo) { for (TPaymentInfo library : unPushInfo) {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); if (Common.isNotNull(mapSelectVo)) {
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); settleDomain = mapSelectVo.get(library.getSettleDomainCode());
if (Common.isNotNull(listVo)) { } else {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); settleDomain = null;
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { }
settleDomainR = tSettleDomainListVo.getListSelectVO(); EkpPushFundParam fundParam = new EkpPushFundParam();
for (TSettleDomainSelectVo vo : settleDomainR) { //员工姓名
BeanUtils.copyProperties(vo, settleDomain); fundParam.setFd_3adfe8c79989d4(library.getEmpName());
} //员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
} }
EkpPushFundParam fundParam = new EkpPushFundParam(); }catch (Exception e) {
//员工姓名 log.error("生成公积金明细异常",e);
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
} }
} }
...@@ -3154,125 +3167,123 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3154,125 +3167,123 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag) { public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TIncomeDetail> exitIncome; List<TIncomeDetail> exitIncome;
for (TPaymentInfo paymentInfo : updateList) { TSettleDomain settleDomain;
boolean exitFlag = false; try {
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { for (TPaymentInfo paymentInfo : updateList) {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() boolean exitFlag = false;
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth()) exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING)); .eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth())
} else { .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() .eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING));
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) } else {
.eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth()) exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING)); .eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
} .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
if (Common.isNotNull(exitIncome)) { .eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
BigDecimal sumMoney = BigDecimal.ZERO; }
for (TIncomeDetail income : exitIncome) { if (Common.isNotNull(exitIncome)) {
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney); BigDecimal sumMoney = BigDecimal.ZERO;
if (paymentInfo.getId().equals(income.getSourceId())) { for (TIncomeDetail income : exitIncome) {
exitFlag = true; sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney);
} if (paymentInfo.getId().equals(income.getSourceId())) {
} exitFlag = true;
if (exitFlag) { }
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); }
continue; if (exitFlag) {
} baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) { continue;
exitFlag = true; }
} if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
} exitFlag = true;
}
//获取项目信息 }
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR; //获取项目信息
R<TSettleDomainListVo> listVo; if (Common.isNotNull(mapSelectVo)) {
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId()); settleDomain = mapSelectVo.get(paymentInfo.getSettleDomainCode());
if (Common.isNotNull(listVo)) { } else {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); settleDomain = null;
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { }
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) { int isSum = 0;
BeanUtils.copyProperties(vo, settleDomain); if (Common.isNotNull(settleDomain)) {
} boolean isIncomeFlag = false;
} // 含有社保,则计算收入
} if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
int isSum = 0; && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (Common.isNotNull(settleDomain)) { //预估模式
boolean isIncomeFlag = false; if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
// 含有社保,则计算收入 BigDecimal gMoney;
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) gMoney = settleDomain.getManagementFee();
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
//预估模式 gMoney = settleDomain.getManagementFee();
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) { } else {
BigDecimal gMoney; isSum = 1;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = settleDomain.getManagementFee(); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { settleDomain.getManagementFee().divide(new BigDecimal("100"),
gMoney = settleDomain.getManagementFee(); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
isSum = 1; gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { settleDomain.getManagementFee().divide(new BigDecimal("100"),
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getManagementFee().divide(new BigDecimal("100"), }
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); }
} else { if (!exitFlag || isSum == 1) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), isIncomeFlag = true;
settleDomain.getManagementFee().divide(new BigDecimal("100"), createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
} gMoney, socialFundFlag);
} }
if (!exitFlag || isSum == 1) { }
isIncomeFlag = true; }
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
gMoney, socialFundFlag); && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
} //预估模式
} if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
} CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) BigDecimal money;
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { money = settleDomain.getRiskFundFee();
//预估模式 } else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) && money = settleDomain.getRiskFundFee();
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { } else {
BigDecimal money; isSum = 2;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = settleDomain.getRiskFundFee(); money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
money = settleDomain.getRiskFundFee(); CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
isSum = 2; money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), }
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); }
} else { if (!exitFlag || isSum == 2) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), isIncomeFlag = true;
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
} money, socialFundFlag);
} }
if (!exitFlag || isSum == 2) { }
isIncomeFlag = true; }
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, if (!isIncomeFlag) {
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
money, socialFundFlag); }
} }
} }
} }catch (Exception e) {
if (!isIncomeFlag) { log.error("生成社保收入异常",e);
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); }
}
}
}
} }
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType, public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
...@@ -3448,4 +3459,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3448,4 +3459,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public boolean findList(TPaymentInfo t,YifuUser user) { public boolean findList(TPaymentInfo t,YifuUser user) {
return CommonConstants.ONE_STRING.equals(t.getLockStatus()) && user.getId().equals(t.getCreateBy()); return CommonConstants.ONE_STRING.equals(t.getLockStatus()) && user.getId().equals(t.getCreateBy());
} }
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
if (Common.isNotNull(settleDomainR) && Common.isNotNull(settleDomainR.getData())){
mapSelectVo = settleDomainR.getData().getMapSlectVo();
}
if (Common.isEmpty(mapSelectVo)){
ServiceUtil.runTimeExceptionDiy(CommonConstants.SETTLE_DOMAIN_GET_ERROR);
}
return mapSelectVo;
}
} }
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