Commit 751fde42 by 陶湘宇

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into develop

* 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200:
  8小时后台-- 保单列表查询
parents be69a4f8 d4ee79ac
...@@ -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;
} }
} }
...@@ -331,6 +331,7 @@ public class InsureContorll { ...@@ -331,6 +331,7 @@ public class InsureContorll {
insureUser.setPolicyDateEnd(dtf3.parse(insureDto.getPolicyDateEnd())); insureUser.setPolicyDateEnd(dtf3.parse(insureDto.getPolicyDateEnd()));
insureUser.setApplyType(2);//投保类型 insureUser.setApplyType(2);//投保类型
insureUser.setPolicyId(insurePolicy.getId()); insureUser.setPolicyId(insurePolicy.getId());
insureUser.setCreateTime(new Date());
insureUser.insert(); insureUser.insert();
if (dataMap.get("errcode").toString().equals("suc")) { if (dataMap.get("errcode").toString().equals("suc")) {
y.setIsInsure(1); y.setIsInsure(1);
......
...@@ -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;
} }
...@@ -287,7 +287,7 @@ insure: ...@@ -287,7 +287,7 @@ insure:
secret: 'acb329868c31d5b3ba03de40dac13dd9' secret: 'acb329868c31d5b3ba03de40dac13dd9'
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload' uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy' insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing//Home/Index/index' getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息 #查询保单信息
policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy' policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote' createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
......
...@@ -254,11 +254,12 @@ wxgzh: ...@@ -254,11 +254,12 @@ wxgzh:
encodingAesKey: 'chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX' encodingAesKey: 'chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure: insure:
#投保
appid: '1002303100602312445' appid: '1002303100602312445'
secret: 'acb329868c31d5b3ba03de40dac13dd9' secret: 'acb329868c31d5b3ba03de40dac13dd9'
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload' uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy' insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing//Home/Index/index' getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息 #查询保单信息
policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy' policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote' createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
......
...@@ -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