Commit ec86982f authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:修改商险减员新增逻辑,优化订单减员查询"

See merge request fangxinjiang/yifu!210
parents e21a52e3 bc9702e1
...@@ -303,6 +303,12 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -303,6 +303,12 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "创建人所在部门名称") @Schema(description = "创建人所在部门名称")
private String createUserDeptName; private String createUserDeptName;
/**
* 减员id
*/
@Schema(description = "减员id")
private String refundId;
......
...@@ -2920,14 +2920,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2920,14 +2920,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(StringUtils.isNotBlank(refund.getRemark())){ if(StringUtils.isNotBlank(refund.getRemark())){
insuranceRefund.setRemark(refund.getRemark()); insuranceRefund.setRemark(refund.getRemark());
} }
if(null == refund.getReduceHandleStatus()){ tInsuranceRefundService.save(insuranceRefund);
tInsuranceRefundService.save(insuranceRefund);
}else{
tInsuranceRefundService.updateByInsDetailId(insuranceRefund);
}
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(TInsuranceDetail :: getUpdateBy,user.getId()) updateWrapper.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now()) .set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now())
.set(TInsuranceDetail :: getRefundId,insuranceRefund.getId())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.ONE_INT); .set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.ONE_INT);
updateWrapper.eq(TInsuranceDetail :: getId,refund.getId()); updateWrapper.eq(TInsuranceDetail :: getId,refund.getId());
update(updateWrapper); update(updateWrapper);
...@@ -3175,7 +3172,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3175,7 +3172,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
detail.setReduceHandleStatus(CommonConstants.TWO_INT); detail.setReduceHandleStatus(CommonConstants.TWO_INT);
detailList.add(detail); detailList.add(detail);
refund.setInsDetailId(record.getId()); refund.setId(detail.getRefundId());
refund.setReduceHandleStatus(CommonConstants.TWO_INT); refund.setReduceHandleStatus(CommonConstants.TWO_INT);
refund.setUpdateBy(user.getId()); refund.setUpdateBy(user.getId());
refund.setUpdateTime(LocalDateTime.now()); refund.setUpdateTime(LocalDateTime.now());
...@@ -3256,7 +3253,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3256,7 +3253,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail.setUpdateTime(LocalDateTime.now()); tInsuranceDetail.setUpdateTime(LocalDateTime.now());
successList.add(tInsuranceDetail); successList.add(tInsuranceDetail);
//更新减员记录 //更新减员记录
refund.setInsDetailId(tInsuranceDetail.getId()); refund.setId(tInsuranceDetail.getRefundId());
refund.setUpdateBy(user.getId()); refund.setUpdateBy(user.getId());
refund.setUpdateTime(LocalDateTime.now()); refund.setUpdateTime(LocalDateTime.now());
refund.setReduceHandleStatus(refundType); refund.setReduceHandleStatus(refundType);
......
...@@ -585,7 +585,7 @@ ...@@ -585,7 +585,7 @@
where where
detail.DELETE_FLAG = 0 detail.DELETE_FLAG = 0
and and
detail.ID = refund.INS_DETAIL_ID detail.REFUND_ID = refund.ID
and and
detail.REDUCE_HANDLE_STATUS = 4 detail.REDUCE_HANDLE_STATUS = 4
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
t_insurance_detail detail, t_insurance_detail detail,
t_insurance_refund refund t_insurance_refund refund
where where
detail.ID = refund.INS_DETAIL_ID detail.REFUND_ID = refund.ID
and and
detail.DELETE_FLAG = 0 detail.DELETE_FLAG = 0
and and
...@@ -717,7 +717,7 @@ ...@@ -717,7 +717,7 @@
t_insurance_detail detail, t_insurance_detail detail,
t_insurance_refund refund t_insurance_refund refund
where where
detail.ID = refund.INS_DETAIL_ID detail.REFUND_ID = refund.ID
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%') and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if> </if>
...@@ -781,7 +781,7 @@ ...@@ -781,7 +781,7 @@
where where
detail.DELETE_FLAG = 0 detail.DELETE_FLAG = 0
and and
detail.ID = refund.INS_DETAIL_ID detail.REFUND_ID = refund.ID
and and
detail.BUY_HANDLE_STATUS = 5 detail.BUY_HANDLE_STATUS = 5
and and
...@@ -979,7 +979,7 @@ ...@@ -979,7 +979,7 @@
union all( union all(
select select
detail.id as id, detail.id as id,
detail.BUY_TYPE as buyType, refund.BUY_TYPE as buyType,
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
...@@ -997,6 +997,8 @@ ...@@ -997,6 +997,8 @@
t_insurance_refund refund t_insurance_refund refund
where where
detail.DELETE_FLAG = 0 detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and and
refund.ORDER_NO = #{param.orderNo} refund.ORDER_NO = #{param.orderNo}
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</if> </if>
REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus} REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
where where
INS_DETAIL_ID = #{param.insDetailId} ID = #{param.id}
</update> </update>
<update id="updateRefundMoney"> <update id="updateRefundMoney">
update update
......
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