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 {
/**
* 身份证-省
*/
@ExcelAttribute(name = "户籍所在省", isArea = true)
@ExcelAttribute(name = "户籍所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在省")
private String idProvince;
......@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在市")
@ExcelAttribute(name = "户籍所在市", isArea = true, parentField = "idProvince")
@ExcelAttribute(name = "户籍所在市")
private String idCity;
/**
......@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在县")
@ExcelAttribute(name = "户籍所在县", isArea = true, parentField = "idCity")
@ExcelAttribute(name = "户籍所在县")
private String idTown;
/**
......@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true)
@ExcelAttribute(name = "档案所在省")
private String fileProvince;
/**
......@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince")
@ExcelAttribute(name = "档案所在市")
private String fileCity;
/**
......@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity")
@ExcelAttribute(name = "档案所在县")
private String fileTown;
/**
......@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO {
/**
* 人员档案状态(0草稿、1已审核)
* , readConverterExp = "0=草稿,1=已审核"
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核")
@ExcelAttribute(name = "人员档案状态")
private String proStatus;
/**
......@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="近3个月发薪")
@ExcelAttribute(name = "近3个月发薪", readConverterExp = "0=无,1=是,2=否")
@ExcelAttribute(name = "近3个月发薪", isDataId = true,dataType = ExcelAttributeConstants.FILE_SALARY_STATUS)
private String salaryStatus;
/**
......
......@@ -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.vo.*;
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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
......@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
......@@ -181,6 +183,9 @@ public class TSettleDomainController {
List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos();
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSlectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k)));
}
return listVo;
}
......@@ -318,5 +323,4 @@ public class TSettleDomainController {
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
}
}
......@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
/**
* 获得导出的项目档案列表
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
......
......@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("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,然后文件流会自动关闭
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;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeProjectExportVO> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
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)){
writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
......
......@@ -194,28 +194,28 @@
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.CONTRACT_STATUS,
b.STATUS AS PROSTATUS,
if(b.STATUS=0,'草稿','已审核') AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a4.AREA_NAME FILE_PROVINCE,
a5.AREA_NAME FILE_CITY,
a6.AREA_NAME FILE_TOWN,
a7.AREA_NAME SOCIAL_PROVINCE,
a8.AREA_NAME SOCIAL_CITY,
a9.AREA_NAME SOCIAL_TOWN,
a.SALARY_STATUS,
b.VALIDITY_START,
b.VALIDITY_END,
b.EMP_MARRI_STATUS,
b.EMP_NATIONAL,
b.POLITICAL_STATUS,
b.ID_PROVINCE,
b.ID_CITY,
b.ID_TOWN,
a1.AREA_NAME ID_PROVINCE,
a2.AREA_NAME ID_CITY,
a3.AREA_NAME ID_TOWN,
b.EMP_REGIS_TYPE,
b.IS_COLLEGE,
b.HIGN_EDUCATION,
......@@ -224,7 +224,7 @@
b.ADMISSION_DATE,
b.GRADUTION_DATE,
b.REMARK,
a.STATUS,
if(a.STATUS=0,'草稿','已审核') STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_EMAIL,
......@@ -799,21 +799,6 @@
</where>
order by a.CREATE_TIME desc
</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-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
......@@ -821,6 +806,15 @@
<include refid="Base_Export_List"/>
FROM t_employee_project a
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>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
......
......@@ -505,4 +505,6 @@ public interface CommonConstants {
// 权限使用的
public static final String A_DEPT_ID = "a.dept_id";
public static final String A_CREATE_BY = "a.CREATE_BY";
String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!";
}
......@@ -28,6 +28,8 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state";
// 公积金状态
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";
......
......@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity {
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Integer id;
private String id;
/**
* 附件名
......
......@@ -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.TPaymentInfoService;
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 lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -2508,6 +2508,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0){
List<TPaymentInfo> unPushs;
int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j=0;j<i;j++){
unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
......@@ -2516,10 +2517,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this){
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
if (count > 0) {
List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
......@@ -2541,9 +2546,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
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);
redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
redisUtil.remove(key);
createPaymentInfoIncomeReal(user, searchVo,mapSelectVo);
createPaymentFundIncomeReal(user, searchVo,mapSelectVo);
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
redisUtil.remove(key);
}
@Override
......@@ -2594,6 +2602,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) {
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
......@@ -2603,9 +2612,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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
if (count > 0) {
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
......@@ -2628,10 +2641,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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
}
}
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的社保实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialPushCount(searchVo,user.getId());
......@@ -2671,14 +2688,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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);
long count = baseMapper.getTPaymentFundPushCount(searchVo,user.getId());
......@@ -2690,14 +2708,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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);
long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2708,14 +2727,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
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);
long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2726,7 +2746,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING);
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
}
}
}
......@@ -2744,23 +2764,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return paymentVo;
}
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) {
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名
......@@ -2809,7 +2822,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getSocialType()) &&
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
......@@ -2824,13 +2837,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
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.getBpoFlag())) {
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
......@@ -2981,24 +2994,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
}
}catch (Exception e) {
log.error("生成社保明细异常",e);
}
}
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) {
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名
......@@ -3027,7 +3037,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getFundType()) &&
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
......@@ -3042,13 +3052,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
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.getBpoFlag())) {
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
......@@ -3111,6 +3121,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
}
}catch (Exception e) {
log.error("生成公积金明细异常",e);
}
}
public void signIncomeFlag(List<TPaymentInfo> updateList) {
......@@ -3154,8 +3167,11 @@ 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;
TSettleDomain settleDomain;
try {
for (TPaymentInfo paymentInfo : updateList) {
boolean exitFlag = false;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
......@@ -3189,18 +3205,10 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(paymentInfo.getSettleDomainCode());
} else {
settleDomain = null;
}
int isSum = 0;
......@@ -3273,6 +3281,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}catch (Exception e) {
log.error("生成社保收入异常",e);
}
}
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
......@@ -3448,4 +3459,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public boolean findList(TPaymentInfo t,YifuUser user) {
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