Commit 9d5ca1ab by 翁国栋 Committed by 284718418@qq.com

8小时后台--

保单列表查询
parent e9d69663
...@@ -158,7 +158,7 @@ public class InsureUser extends Model<InsureUser> { ...@@ -158,7 +158,7 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty(value = "批改原因") @ApiModelProperty(value = "批改原因")
private String reason; private String reason;
@ApiModelProperty(value = "批改原因") @ApiModelProperty(value = "录单时间")
private Date createTime; private Date createTime;
......
...@@ -235,13 +235,15 @@ public class CallBackContorll { ...@@ -235,13 +235,15 @@ public class CallBackContorll {
insurePolicy.setStatus("2"); insurePolicy.setStatus("2");
insurePolicy.setUpdateTime(new Date()); insurePolicy.setUpdateTime(new Date());
insurePolicy.updateById(); insurePolicy.updateById();
InsureLog.builder().type(7).createTime(new Date()).requestType(1).requestPath(base_api_url + "/payCallBack")
.returnCode("suc").returnMsg(dataMap.get("errmsg").toString()).build().insert();
} else if (dataMap.get("errcode").toString().equals("suc")) { } else if (dataMap.get("errcode").toString().equals("suc")) {
InsureLog.builder().type(7).createTime(new Date()).requestType(1).requestPath(base_api_url + "/payCallBack") InsureLog.builder().type(7).createTime(new Date()).requestType(1).requestPath(base_api_url + "/payCallBack")
.returnCode("suc").returnMsg("确认支付成功,支付方式:" + insurePay.getPayType() + ",支付金额:" + callBack.getAmount()).policyId(insurePay.getPolicyId()).build().insert(); .returnCode("suc").returnMsg("确认支付成功,支付方式:" + insurePay.getPayType() + ",支付金额:" + callBack.getAmount()).policyId(insurePay.getPolicyId()).build().insert();
} else { } else {
InsureLog.builder().requestParam(JSONObject.toJSONString(setParams(JSONObject.toJSONString(bodyMap), appid, secret))).type(6) InsureLog.builder().requestParam(JSONObject.toJSONString(setParams(JSONObject.toJSONString(bodyMap), appid, secret))).type(7)
.requestData(JSONObject.toJSONString(bodyMap)).createTime(new Date()).requestType(1).returnBody(data).requestPath(getPolicyUrl) .requestData(JSONObject.toJSONString(bodyMap)).createTime(new Date()).requestType(1).returnBody(data).requestPath(getPolicyUrl)
.returnCode(dataMap.get("errcode").toString()).returnMsg(dataMap.get("errmsg").toString()).build().insert(); .returnCode(dataMap.get("errcode").toString()).policyId(insurePay.getPolicyId()).returnMsg(dataMap.get("errmsg").toString()).build().insert();
} }
} }
map.put("status", "1"); map.put("status", "1");
...@@ -293,6 +295,8 @@ public class CallBackContorll { ...@@ -293,6 +295,8 @@ public class CallBackContorll {
insurePolicy.updateById(); insurePolicy.updateById();
insurePay.updateById(); insurePay.updateById();
} }
InsureLog.builder().type(7).createTime(new Date()).requestType(1).returnBody(sb.toString()).requestPath(getPolicyUrl)
.returnCode(callBack.getStatus()).policyId(insurePay.getPolicyId()).returnMsg(callBack.getErr_msg()).build().insert();
return map; return map;
} }
} }
...@@ -17,6 +17,9 @@ import cn.timer.api.utils.ExcelUtils; ...@@ -17,6 +17,9 @@ import cn.timer.api.utils.ExcelUtils;
import cn.timer.api.utils.Page; import cn.timer.api.utils.Page;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.oss.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.beust.jcommander.internal.Lists; import com.beust.jcommander.internal.Lists;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -64,6 +67,12 @@ public class InsureUserController{ ...@@ -64,6 +67,12 @@ public class InsureUserController{
@ApiOperation(value = "3.保单列表--8小时端", httpMethod = "POST", notes = "保单列表") @ApiOperation(value = "3.保单列表--8小时端", httpMethod = "POST", notes = "保单列表")
public Result<Object> userPolicyList(@CurrentUser UserBean userBean, @RequestBody PolicyDto policyDto) { public Result<Object> userPolicyList(@CurrentUser UserBean userBean, @RequestBody PolicyDto policyDto) {
Map map = Maps.newHashMap(); Map map = Maps.newHashMap();
if(!StringUtils.isNullOrEmpty(policyDto.getCreateTime())){
List arr= JSONObject.parseArray(policyDto.getCreateTime(), String.class);
policyDto.setPolicyDateStart(arr.get(0).toString());
policyDto.setPolicyDateEnd(arr.get(1).toString());
}
policyDto.setOrgCode(String.valueOf(userBean.getOrgCode()));
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto); List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
map.put("list", Optional.ofNullable(list).orElse(Lists.newArrayList())); map.put("list", Optional.ofNullable(list).orElse(Lists.newArrayList()));
map.put("total", insureUserMapper.totalUser(policyDto)); map.put("total", insureUserMapper.totalUser(policyDto));
......
...@@ -44,5 +44,5 @@ public class PolicyDto { ...@@ -44,5 +44,5 @@ public class PolicyDto {
private Integer payId; private Integer payId;
private Integer policyId; private Integer policyId;
private Integer applyType; private Integer applyType;
private String monthD;
} }
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<select id="selectPolicyList" resultType="cn.timer.api.dto.insure.PolicyDto"> <select id="selectPolicyList" resultType="cn.timer.api.dto.insure.PolicyDto">
select select
iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,io.name as schemeName,iu.policy_date_start,iu.insure_status, iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,io.name as schemeName,iu.policy_date_start,iu.insure_status,
iu.policy_date_end,ip.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price, iu.policy_date_end,iu.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory, iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory,
iu.policy_id as policyId, iu.policy_id as policyId,
iu.apply_type as applyType iu.apply_type as applyType
...@@ -311,23 +311,27 @@ ...@@ -311,23 +311,27 @@
<if test="policyDto.name !=null and policyDto.name !=''"> <if test="policyDto.name !=null and policyDto.name !=''">
and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%') and iu.insured_e_contact like CONCAT('%',#{policyDto.name},'%')
</if> </if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''"> <!-- <if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !=''">-->
and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateStart} <!-- and iu.policy_date_start <![CDATA[<=]]> #{policyDto.policyDateStart}-->
</if> <!-- </if>-->
<if test="policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''"> <!-- <if test="policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''">-->
and iu.policy_date_end <![CDATA[<=]]> #{policyDto.policyDateEnd} <!-- and iu.policy_date_start <![CDATA[>=]]> #{policyDto.policyDateEnd}-->
</if> <!-- </if>-->
<if test="policyDto.status !=null and policyDto.status !=''">
and iu.insure_status = #{policyDto.status}
</if>
<if test="policyDto.status !=null and policyDto.status !=''"> <if test="policyDto.status !=null and policyDto.status !=''">
and iu.insure_status = #{policyDto.status} and iu.insure_status = #{policyDto.status}
</if> </if>
<if test="policyDto.applyType !=null and policyDto.applyType !=''"> <if test="policyDto.applyType !=null and policyDto.applyType !=''">
and iu.apply_type = #{policyDto.applyType} and iu.apply_type = #{policyDto.applyType}
</if> </if>
<if test="policyDto.monthD !=null and policyDto.monthD !=''">
AND DATE_FORMAT(iu.policy_date_start,'%Y-%m') = #{policyDto.monthD}
</if>
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !='' and policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''">
and iu.create_time BETWEEN #{policyDto.policyDateStart} and #{policyDto.policyDateEnd}
</if>
</where> </where>
order by iu.policy_date_start desc order by iu.create_time desc
<if test="policyDto.page.offset != null and policyDto.page.totalPage !=null"> <if test="policyDto.page.offset != null and policyDto.page.totalPage !=null">
LIMIT #{policyDto.page.offset},#{policyDto.page.totalPage} LIMIT #{policyDto.page.offset},#{policyDto.page.totalPage}
</if> </if>
......
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