Commit 16c50c06 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 80804c98 2321a50d
...@@ -1079,6 +1079,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1079,6 +1079,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
pushResult= pushEstimate(detail, CommonConstants.FIVE_INT); pushResult= pushEstimate(detail, CommonConstants.FIVE_INT);
}else { }else {
//预估结算中已结算,推送预估红冲 //预估结算中已结算,推送预估红冲
detail.setDefaultSettleId(burden.getId());
pushResult = pushEstimate(detail, CommonConstants.THREE_INT); pushResult = pushEstimate(detail, CommonConstants.THREE_INT);
} }
} }
...@@ -1089,6 +1090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1089,6 +1090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
pushResult= pushEstimate(detail, CommonConstants.FIVE_INT); pushResult= pushEstimate(detail, CommonConstants.FIVE_INT);
}else{ }else{
//预估结算中,已结算,实缴已推送,推送实缴红冲信息 //预估结算中,已结算,实缴已推送,推送实缴红冲信息
detail.setDefaultSettleId(burden.getId());
pushResult= pushEstimate(detail, CommonConstants.SIX_INT); pushResult= pushEstimate(detail, CommonConstants.SIX_INT);
} }
} }
...@@ -1099,6 +1101,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1099,6 +1101,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
pushResult= pushEstimate(detail, CommonConstants.FIVE_INT); pushResult= pushEstimate(detail, CommonConstants.FIVE_INT);
}else{ }else{
//实缴结算中,已结算,推送实缴红冲信息 //实缴结算中,已结算,推送实缴红冲信息
detail.setDefaultSettleId(burden.getId());
pushResult= pushEstimate(detail, CommonConstants.SIX_INT); pushResult= pushEstimate(detail, CommonConstants.SIX_INT);
} }
} }
...@@ -1258,6 +1261,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1258,6 +1261,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService.save(settle); tInsuranceSettleService.save(settle);
detail.setDefaultSettleId(settle.getId()); detail.setDefaultSettleId(settle.getId());
successList.add(detail); successList.add(detail);
//生成收入数据
createInsuranceInfo(detail);
}else { }else {
//按天 //按天
//计算起止时间的天数 //计算起止时间的天数
...@@ -1290,10 +1295,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1290,10 +1295,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService.save(settle); tInsuranceSettleService.save(settle);
detail.setDefaultSettleId(settle.getId()); detail.setDefaultSettleId(settle.getId());
successList.add(detail); successList.add(detail);
}
//生成收入数据 //生成收入数据
createInsuranceInfo(detail); createInsuranceInfo(detail);
} }
}
//实缴 //实缴
if(detail.getSettleType() == CommonConstants.ONE_INT){ if(detail.getSettleType() == CommonConstants.ONE_INT){
if (detail.getBuyType() == CommonConstants.THREE_INT){ if (detail.getBuyType() == CommonConstants.THREE_INT){
...@@ -3984,15 +3989,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3984,15 +3989,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
interactiveParam.setEstimatePremium(success.getEstimatePremium()); interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium()); interactiveParam.setActualPremium(success.getActualPremium());
interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); interactiveParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam); String estimateBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
//推送成功,更新预估和实际保费的推送状态 //推送成功,更新预估和实际保费的推送状态
if(StringUtils.isNotBlank(actualBody)){ if (StringUtils.isNotBlank(estimateBody)) {
newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setEstimatePushTime(LocalDateTime.now()); newInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT); newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
//推送实缴单
interactiveParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
interactiveParam.setEstimatePremium(success.getEstimatePremium());
interactiveParam.setActualPremium(success.getActualPremium());
String actualBody = eKPInsuranceUtil.sendToEkp(interactiveParam);
if (StringUtils.isNotBlank(actualBody)) {
//推送成功后更新本地推送状态
newInsuranceSettle.setActualPushTime(LocalDateTime.now()); newInsuranceSettle.setActualPushTime(LocalDateTime.now());
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT);
newInsuranceSettle.setUpdateTime(LocalDateTime.now()); newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle); tInsuranceSettleService.updateById(newInsuranceSettle);
}else{
//异常处理
saveInsuranceEkp(interactiveParam,CommonConstants.TWO_INT);
}
}else{ }else{
//异常处理 //异常处理
saveInsuranceEkp(interactiveParam,CommonConstants.ONE_INT); saveInsuranceEkp(interactiveParam,CommonConstants.ONE_INT);
...@@ -5614,7 +5632,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5614,7 +5632,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//冲正取负数 //冲正取负数
if(null != byId.getEstimatePremium()){ if(null != byId.getEstimatePremium()){
param.setEstimatePremium(byId.getEstimatePremium().negate()); param.setEstimatePremium(byId.getEstimatePremium());
} }
param.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); param.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
param.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); param.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
...@@ -5626,7 +5644,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5626,7 +5644,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//冲正取负数 //冲正取负数
if(null != byId.getActualPremium()){ if(null != byId.getActualPremium()){
param.setActualPremium(byId.getActualPremium().negate()); param.setActualPremium(byId.getActualPremium());
} }
param.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); param.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
param.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL); param.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
...@@ -5716,7 +5734,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5716,7 +5734,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
incomeDetail.setDeptNo(insuranceDetail.getDeptNo()); incomeDetail.setDeptNo(insuranceDetail.getDeptNo());
incomeDetail.setSourceType(CommonConstants.THREE_STRING); incomeDetail.setSourceType(CommonConstants.THREE_STRING);
R<TIncomeDetailReturnVo> detailList = socialDaprUtils.getTIncomeDetailList(incomeDetail); R<TIncomeDetailReturnVo> detailList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS){ if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS
&& detailList.getData().getDetailList().size() > 0){
isExist = true; isExist = true;
} }
...@@ -5804,7 +5823,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5804,7 +5823,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setSourceId(insuranceDetail.getId()); detail.setSourceId(insuranceDetail.getId());
detail.setSourceType(CommonConstants.THREE_STRING); detail.setSourceType(CommonConstants.THREE_STRING);
detail.setCreateMonth(DateUtil.getYearAndMonth(insuranceDetail.getHandledTime(),0)); detail.setCreateMonth(DateUtil.getYearAndMonth(insuranceDetail.getHandledTime(),0));
detail.setPayMonth(insuranceDetail.getSettleMonth()); detail.setPayMonth(insuranceDetail.getSettleMonth().replace("-",""));
detail.setMoney(money); detail.setMoney(money);
detail.setFeeType(feeType); detail.setFeeType(feeType);
detail.setFeeMode(feeMode); detail.setFeeMode(feeMode);
......
...@@ -58,6 +58,16 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem> ...@@ -58,6 +58,16 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
**/ **/
List<TSalaryAccountItem> getAllItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle); List<TSalaryAccountItem> getAllItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:04
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
List<TSalaryAccountItem> getSalaryItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/** /**
* @param deptId 结算主体id * @param deptId 结算主体id
* @param javaFiedName 属性名 * @param javaFiedName 属性名
......
...@@ -41,6 +41,15 @@ public interface TSalaryAccountItemService extends IService<TSalaryAccountItem> ...@@ -41,6 +41,15 @@ public interface TSalaryAccountItemService extends IService<TSalaryAccountItem>
**/ **/
Map<String, List<TSalaryAccountItem>> getAllItemVoList(List<String> idCardList, String invoiceTitle); Map<String, List<TSalaryAccountItem>> getAllItemVoList(List<String> idCardList, String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: huyc
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle);
/** /**
* 工资报账表附加-工资明细简单分页查询 * 工资报账表附加-工资明细简单分页查询
......
...@@ -100,6 +100,32 @@ public class TSalaryAccountItemServiceImpl extends ServiceImpl<TSalaryAccountIte ...@@ -100,6 +100,32 @@ public class TSalaryAccountItemServiceImpl extends ServiceImpl<TSalaryAccountIte
return itemMap; return itemMap;
} }
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
@Override
public Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle) {
List<TSalaryAccountItem> list = baseMapper.getSalaryItemVoList(idCardList, invoiceTitle);
Map<String, List<TSalaryAccountItem>> itemMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
List<TSalaryAccountItem> voList;
for (TSalaryAccountItem item : list) {
voList = itemMap.get(item.getEmpIdcard());
if (voList == null) {
voList = new ArrayList<>();
}
voList.add(item);
itemMap.put(item.getEmpIdcard(), voList);
}
}
return itemMap;
}
/** /**
* @param settleDepartId 结算主体id * @param settleDepartId 结算主体id
* @param javaFiedName 属性名 * @param javaFiedName 属性名
......
...@@ -434,6 +434,36 @@ ...@@ -434,6 +434,36 @@
AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7 AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
</where> </where>
</select> </select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select id="getSalaryItemVoList" resultMap="itemVoMap">
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.FORM_TYPE
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
<if test="idCardList != null">
AND a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="invoiceTitle != null and invoiceTitle.trim() != ''">
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
AND a.DELETE_FLAG = 0 and a.FORM_TYPE = 0
</where>
</select>
<select id="getSumByAccountId" resultType="java.util.Map"> <select id="getSumByAccountId" resultType="java.util.Map">
SELECT SELECT
a.SALARY_ACCOUNT_ID as 'key', a.SALARY_ACCOUNT_ID as 'key',
......
...@@ -288,4 +288,13 @@ public class TForecastLibraryController { ...@@ -288,4 +288,13 @@ public class TForecastLibraryController {
tForecastLibraryService.createForecastFundInfo(); tForecastLibraryService.createForecastFundInfo();
} }
@PostMapping("/createFundInfo")
public void createFundInfo() {
tForecastLibraryService.createForecastFundInfo();
}
@PostMapping("/createSocialInfo")
public void createSocialInfo() {
tForecastLibraryService.createForecastInfo();
}
} }
...@@ -341,6 +341,16 @@ public class TPaymentInfoController { ...@@ -341,6 +341,16 @@ public class TPaymentInfoController {
tPaymentInfoService.createPaymentFundInfo(); tPaymentInfoService.createPaymentFundInfo();
} }
@PostMapping("/createFundInfo")
public void createFundInfo() {
tPaymentInfoService.createPaymentFundInfo();
}
@PostMapping("/createSocialInfo")
public void createSocialInfo() {
tPaymentInfoService.createPaymentSocialInfo();
}
/** /**
* @Description: 定时生成缴费库的收入数据 * @Description: 定时生成缴费库的收入数据
* @Author: huyc * @Author: huyc
......
...@@ -2209,6 +2209,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2209,6 +2209,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public List<String> initEkpPushSocialParam(List<TForecastLibrary> unPushInfo) { public List<String> initEkpPushSocialParam(List<TForecastLibrary> unPushInfo) {
List<String> pushList = new ArrayList<>(); List<String> pushList = new ArrayList<>();
for (TForecastLibrary library:unPushInfo) { for (TForecastLibrary library:unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
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);
}
}
}
EkpPushSocialParam socialParam = new EkpPushSocialParam(); EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名 //员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName()); socialParam.setFd_3adfe8c79989d4(library.getEmpName());
...@@ -2298,13 +2312,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2298,13 +2312,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
//社保缴纳月份 //社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) { if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(library.getSocialPayMonth()); socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else { } else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//社保生成月份 //社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) { if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth()); socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else { } else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
...@@ -2313,7 +2327,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2313,7 +2327,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//是否有预估 //是否有预估
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE); socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算 //与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.EMPTY_STRING); socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码 //项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getDeptNo()); socialParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称 //项目名称
...@@ -2321,7 +2335,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2321,7 +2335,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//单号 //单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码 //客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
}else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//客户名称 //客户名称
socialParam.setFd_3adfe8c81a0e42(library.getUnitName()); socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
//社保户 //社保户
...@@ -2419,6 +2437,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2419,6 +2437,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public List<String> initEkpPushFundParam(List<TForecastLibrary> unPushInfo) { public List<String> initEkpPushFundParam(List<TForecastLibrary> unPushInfo) {
List<String> pushList = new ArrayList<>(); List<String> pushList = new ArrayList<>();
for (TForecastLibrary library:unPushInfo) { for (TForecastLibrary library:unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
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);
}
}
}
EkpPushFundParam fundParam = new EkpPushFundParam(); EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名 //员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName()); fundParam.setFd_3adfe8c79989d4(library.getEmpName());
...@@ -2438,13 +2470,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2438,13 +2470,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
//缴纳月份 //缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) { if (Common.isNotNull(library.getSocialPayMonth())) {
fundParam.setFd_3adfe8cf632700(library.getSocialPayMonth()); fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else { } else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//生成月份 //生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) { if (Common.isNotNull(library.getSocialCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth()); fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else { } else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
...@@ -2463,7 +2495,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2463,7 +2495,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//是否有预估 //是否有预估
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE); fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
//与工资合并结算 //与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.EMPTY_STRING); fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码 //项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getDeptNo()); fundParam.setFd_3adfe8c70d3fd4(library.getDeptNo());
//项目名称 //项目名称
...@@ -2471,7 +2503,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2471,7 +2503,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//单号 //单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码 //客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//单位代缴 //单位代缴
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
//个人代缴 //个人代缴
...@@ -2543,7 +2579,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2543,7 +2579,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String sourceType = ""; String sourceType = "";
if (Common.isNotNull(library.getProvidentId())) { if (Common.isNotNull(library.getProvidentId())) {
sourceType = CommonConstants.TWO_STRING; sourceType = CommonConstants.TWO_STRING;
} else { }else if (Common.isNotNull(library.getSocialId())) {
sourceType = CommonConstants.ONE_STRING; sourceType = CommonConstants.ONE_STRING;
} }
...@@ -2565,8 +2601,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2565,8 +2601,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
int isSum = 0; int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && (settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
|| settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING))) { && CommonConstants.ONE_STRING.equals(sourceType)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING))
&& CommonConstants.ONE_STRING.equals(sourceType))) {
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
...@@ -2597,8 +2634,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2597,8 +2634,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && (settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
|| settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING))) { && CommonConstants.ONE_STRING.equals(sourceType)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING))
&& CommonConstants.ONE_STRING.equals(sourceType))) {
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
...@@ -2651,7 +2689,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2651,7 +2689,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (CommonConstants.ONE_STRING.equals(sourceType)) { if (CommonConstants.ONE_STRING.equals(sourceType)) {
detail.setCreateMonth(library.getSocialCreateMonth()); detail.setCreateMonth(library.getSocialCreateMonth());
detail.setPayMonth(library.getSocialPayMonth()); detail.setPayMonth(library.getSocialPayMonth());
} else { } else if (CommonConstants.TWO_STRING.equals(sourceType)) {
detail.setCreateMonth(library.getProvidentCreateMonth()); detail.setCreateMonth(library.getProvidentCreateMonth());
detail.setPayMonth(library.getProvidentPayMonth()); detail.setPayMonth(library.getProvidentPayMonth());
} }
...@@ -2664,4 +2702,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2664,4 +2702,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
incomeService.saveDetail(detail); incomeService.saveDetail(detail);
} }
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
String replaceMonth = sb.toString();
return replaceMonth;
}
} }
...@@ -64,6 +64,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo; ...@@ -64,6 +64,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.BeanUtils; 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;
...@@ -2311,6 +2312,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2311,6 +2312,21 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public List<String> initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) { public List<String> initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) {
List<String> pushList = new ArrayList<>(); List<String> pushList = new ArrayList<>();
for (TPaymentInfo library:unPushInfo) { for (TPaymentInfo library:unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
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);
}
}
}
EkpPushSocialParam socialParam = new EkpPushSocialParam(); EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名 //员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName()); socialParam.setFd_3adfe8c79989d4(library.getEmpName());
...@@ -2352,22 +2368,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2352,22 +2368,27 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
//社保缴纳月份 //社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) { if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(library.getSocialPayMonth()); socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else { } else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//社保生成月份 //社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) { if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(library.getSocialCreateMonth()); socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else { } else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
//订单类型 //订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR); socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估 //是否有预估
socialParam.setFd_3add9de0be85e4(CommonConstants.EMPTY_STRING); if (Common.isNotNull(settleDomain.getMrSettleType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算 //与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.EMPTY_STRING); socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码 //项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode()); socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称 //项目名称
...@@ -2375,9 +2396,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2375,9 +2396,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单号 //单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码 //客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//客户名称 //客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName()); socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户 //社保户
if (Common.isNotNull(library.getSocialHousehold())) { if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold()); socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
...@@ -2521,6 +2550,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2521,6 +2550,20 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public List<String> initEkpPushFundParam(List<TPaymentInfo> unPushInfo) { public List<String> initEkpPushFundParam(List<TPaymentInfo> unPushInfo) {
List<String> pushList = new ArrayList<>(); List<String> pushList = new ArrayList<>();
for (TPaymentInfo library:unPushInfo) { for (TPaymentInfo library:unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR = null;
R<TSettleDomainListVo> listVo = null;
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);
}
}
}
EkpPushFundParam fundParam = new EkpPushFundParam(); EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名 //员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName()); fundParam.setFd_3adfe8c79989d4(library.getEmpName());
...@@ -2532,13 +2575,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2532,13 +2575,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份 //缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) { if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(library.getProvidentPayMonth()); fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else { } else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//生成月份 //生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) { if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(library.getProvidentCreateMonth()); fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else { } else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
} }
...@@ -2555,9 +2598,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2555,9 +2598,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//订单类型 //订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR); fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估 //是否有预估
fundParam.setFd_3add9de0be85e4(CommonConstants.EMPTY_STRING); if (Common.isNotNull(settleDomain.getMrSettleType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算 //与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.EMPTY_STRING); fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码 //项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode()); fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称 //项目名称
...@@ -2565,7 +2613,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2565,7 +2613,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//单号 //单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码 //客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//单位代缴 //单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) { if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString()); fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
...@@ -2771,4 +2823,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2771,4 +2823,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail.setId(CommonConstants.NULL); detail.setId(CommonConstants.NULL);
incomeService.saveDetail(detail); incomeService.saveDetail(detail);
} }
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
String replaceMonth = sb.toString();
return replaceMonth;
}
} }
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