Commit cf84f2bd authored by huyuchen's avatar huyuchen

huych-商险接口推送优化

parent c7dc2161
...@@ -30,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties; ...@@ -30,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants; import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*; import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceAreaResMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceAreaResMapper;
...@@ -111,8 +110,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -111,8 +110,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsuranceRefundService tInsuranceRefundService; private TInsuranceRefundService tInsuranceRefundService;
@Resource @Resource
private TInsuranceEkpService tInsuranceEkpService; private TInsuranceEkpService tInsuranceEkpService;
@Resource
private EkpInsuranceUtil eKPInsuranceUtil;
@Resource @Resource
private EkpSettleService ekpSettleService; private EkpSettleService ekpSettleService;
......
...@@ -6,17 +6,16 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -6,17 +6,16 @@ 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.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.ekp.constant.EkpConstants; import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEkpMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEkpMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils; import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.DoJointInsuranceTask;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -40,18 +39,15 @@ import java.util.List; ...@@ -40,18 +39,15 @@ import java.util.List;
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService { public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Resource @Resource
EkpInsuranceUtil ekpInsuranceUtil; @Lazy
private DoJointInsuranceTask doJointInsuranceTask;
@Resource @Resource
TInsuranceSettleService tInsuranceSettleService; TInsuranceSettleService tInsuranceSettleService;
@Resource
@Lazy
TInsuranceDetailService tInsuranceDetailService;
@Resource @Resource
@Lazy @Lazy
EkpSettleService ekpSettleService; TInsuranceDetailService tInsuranceDetailService;
@Override @Override
public R resend() { public R resend() {
...@@ -113,7 +109,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -113,7 +109,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} else{ } else{
ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now()) settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT); .set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT);
...@@ -145,7 +141,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -145,7 +141,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}else{ }else{
ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
settleUpdate.set(TInsuranceSettle :: getActualPushTime,LocalDateTime.now()) settleUpdate.set(TInsuranceSettle :: getActualPushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsActualPush,CommonConstants.ONE_INT); .set(TInsuranceSettle ::getIsActualPush,CommonConstants.ONE_INT);
...@@ -187,7 +183,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -187,7 +183,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}else{ }else{
ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL);
ekpParam.setSettleType(CommonConstants.EMPTY_STRING); ekpParam.setSettleType(CommonConstants.EMPTY_STRING);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
...@@ -203,7 +199,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -203,7 +199,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(eStatus && aStatus){ if(eStatus && aStatus){
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
...@@ -219,7 +215,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -219,7 +215,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
BigDecimal estimatePremium = ekpParam.getEstimatePremium(); BigDecimal estimatePremium = ekpParam.getEstimatePremium();
ekpParam.setEstimatePremium(estimatePremium.negate()); ekpParam.setEstimatePremium(estimatePremium.negate());
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
...@@ -233,7 +229,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -233,7 +229,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
BigDecimal actualPremium = ekpParam.getActualPremium(); BigDecimal actualPremium = ekpParam.getActualPremium();
ekpParam.setActualPremium(actualPremium.negate()); ekpParam.setActualPremium(actualPremium.negate());
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
...@@ -248,7 +244,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -248,7 +244,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.FIVE_INT == pushType){ if(CommonConstants.FIVE_INT == pushType){
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
...@@ -261,7 +257,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -261,7 +257,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.SIX_INT == pushType){ if(CommonConstants.SIX_INT == pushType){
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL); ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL); ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam); s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT) ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now()); .set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......
...@@ -724,7 +724,7 @@ public class DoJointInsuranceTask { ...@@ -724,7 +724,7 @@ public class DoJointInsuranceTask {
public void initValues(EkpInsurancesInfo pushParam,EkpInsuranceDeptInfoVo deptInfoVo,EkpInteractiveParam param) throws ParseException { public void initValues(EkpInsurancesInfo pushParam,EkpInsuranceDeptInfoVo deptInfoVo,EkpInteractiveParam param) throws ParseException {
//单号 //单号
pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.ISO_DATE_FORMAT) pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.ISO_DATE_FORMAT)
+ "_" + param.getDetailId()); + param.getDetailId());
//项目id 项目编码 //项目id 项目编码
pushParam.setFd_3b16dfb32778f2(deptInfoVo.getFdId()); pushParam.setFd_3b16dfb32778f2(deptInfoVo.getFdId());
pushParam.setFd_3b16dfb32778f2_text(deptInfoVo.getDeptNo()); pushParam.setFd_3b16dfb32778f2_text(deptInfoVo.getDeptNo());
......
...@@ -50,18 +50,22 @@ ...@@ -50,18 +50,22 @@
<select id="getSettle" resultMap="BaseResultMap"> <select id="getSettle" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"></include> fd_id,
fd_3b0a5743acab7e as fd_3b05ba46bb042e,
MAX(case when fd_3adfe6af71a1cc = '预估' THEN fd_3adfe6ec6a8cbe END) AS fd_3b05ba4808a3ca,
MAX(case when fd_3adfe6af71a1cc = '实缴' THEN fd_3adfe6ec6a8cbe END) AS fd_3b05bd5ed0b976
from from
ekp_f80727b647a403b975ae ekp_insurances_info
where where
fd_3b05ba46bb042e = #{id} fd_3b0a5743acab7e = #{id}
group by fd_3b0a5743acab7e
</select> </select>
<select id="getSettleStatusFromEkpInsuranceDetail" resultType="java.lang.String"> <select id="getSettleStatusFromEkpInsuranceDetail" resultType="java.lang.String">
select select
fd_3adfe6ec6a8cbe fd_3adfe6ec6a8cbe
from from
ekp_e96a0a28442447c81ec0 ekp_insurances_info
where where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1 fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1
</select> </select>
...@@ -70,7 +74,7 @@ ...@@ -70,7 +74,7 @@
select select
<include refid="Base_Column_Dept"></include> <include refid="Base_Column_Dept"></include>
from from
ekp_e96a0a28442447c81ec0 ekp_insurances_info
where where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1 fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1
</select> </select>
...@@ -79,7 +83,7 @@ ...@@ -79,7 +83,7 @@
select select
<include refid="Base_Column_Dept"></include> <include refid="Base_Column_Dept"></include>
from from
ekp_e96a0a28442447c81ec0 ekp_insurances_info
where where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '预估' limit 1 fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '预估' limit 1
</select> </select>
......
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