Commit b6ed50c0 authored by zhaji's avatar zhaji

"feature-zhaJi:优化紧急出险的修改逻辑"

parent 7c1e06d9
......@@ -3196,10 +3196,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(CommonConstants.ZERO_INT != isOverdue){
return R.failed("保单信息已过期,不能进行出险操作");
}
insuranceDetail.setIsUse(CommonConstants.ONE_INT);
insuranceDetail.setUpdateBy(user.getId());
insuranceDetail.setUpdateTime(LocalDateTime.now());
return R.ok(updateById(insuranceDetail),"出险成功");
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<TInsuranceDetail>();
updateWrapper.eq(TInsuranceDetail::getId,id)
.set(TInsuranceDetail::getUpdateTime,LocalDateTime.now())
.set(TInsuranceDetail::getIsUse,CommonConstants.ONE_INT)
.set(TInsuranceDetail::getUpdateBy,user.getId());
update(updateWrapper);
return R.ok("出险成功");
}
/**
......@@ -3955,16 +3958,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CollectionUtils.isEmpty(list)){
return R.failed("无可出险的保单");
}
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
for (TInsuranceDetail tInsuranceDetail : list) {
tInsuranceDetail.setIsUse(CommonConstants.ONE_INT);
tInsuranceDetail.setUpdateTime(LocalDateTime.now());
}
boolean b = updateBatchById(list);
if(b){
return R.ok("EKP紧急出险成功");
}else{
return R.ok("EKP紧急出险失败");
updateWrapper.eq(TInsuranceDetail :: getId,tInsuranceDetail.getId())
.set(TInsuranceDetail :: getIsUse,CommonConstants.ONE_INT)
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
return R.ok("EKP紧急出险成功");
}
/**
......
......@@ -65,7 +65,7 @@
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID
</sql>
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
......@@ -473,7 +473,7 @@
(detail.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
ORDER BY refund.CREATE_TIME DESC
ORDER BY refund.CREATE_TIME,detail.ID DESC
</select>
<!-- 已减员列表不分页查询-->
<select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
......@@ -581,7 +581,7 @@
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
ORDER BY refund.CREATE_TIME DESC
ORDER BY refund.CREATE_TIME ,detail.ID DESC
</select>
<!-- 减员办理列表不分页查询-->
<select id="getInsuranceRefundHandlingList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
......@@ -770,7 +770,6 @@
#{item}
</foreach>
</update>
<!--根据身份证查询商险信息-->
<select id="getInsuranceListByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListByIdCardVo">
SELECT
......@@ -785,8 +784,9 @@
</select>
<select id="selectListByempIdcardNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurance_detail
<include refid="Base_Column_List"/>
FROM
t_insurance_detail
<where>
EMP_IDCARD_NO = #{empIdcardNo}
AND IS_EFFECT = 0
......@@ -797,6 +797,5 @@
and (REDUCE_HANDLE_STATUS is null or REDUCE_HANDLE_STATUS = 3)
</where>
ORDER BY CREATE_TIME desc
</select>
</mapper>
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