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