Commit 33448bf4 by 翁国栋

8小时后台--

保单列表模糊查询、分页
parent 4f452ff9
......@@ -747,10 +747,11 @@ public class InsureContorll {
@PostMapping(value = "/policyTotalList")
@ApiOperation(value = "11.保单统计列表 -- 8小时端", httpMethod = "POST", notes = "保单统计列表")
public Result<Object> policyTotal(@CurrentUser UserBean userBean) {
public Result<Object> policyTotal(@CurrentUser UserBean userBean,@RequestBody PolicyDto policyDto) {
Map map = Maps.newHashMap();
List<InsureUserDto> list = insurePolicyMapper.selectPolicyListByorgCode(userBean.getOrgCode());
List<InsureUserDto> list = insurePolicyMapper.selectPolicyListByorgCode(userBean.getOrgCode(),policyDto);
map.put("list", list);
map.put("total",insurePolicyMapper.selectPolicyTotalByorgCode(userBean.getOrgCode(),policyDto));
return ResultUtil.data(map);
}
......
......@@ -25,7 +25,8 @@ public interface InsurePolicyMapper extends BaseMapper<InsurePolicy> {
PolicyDto getPolicyDetail(@Param("id")Integer id);
Integer totalPolicy(@Param("policy")PolicyDto policyDto);
List<PolicyDto> policyTotalList();
List<InsureUserDto> selectPolicyListByorgCode(@Param("orgCode")Integer id);
List<InsureUserDto> selectPolicyListByorgCode(@Param("orgCode")Integer id,@Param("policy")PolicyDto policyDto);
Integer selectPolicyTotalByorgCode(@Param("orgCode")Integer id,@Param("policy")PolicyDto policyDto);
List<InsurePolicy> selectPolicyListByStatus(@Param("date") Date date);
Integer selectPlansTotalByorgCode(@Param("orgCode")Integer id);
......
......@@ -350,9 +350,28 @@
insure_policy ip
LEFT JOIN insure_product ir on ir.id=ip.product_id
WHERE ip.org_code=#{orgCode}
<if test="policy.policyNo !=null and policy.policyNo!=''">
and ip.policy_no = #{policy.policyNo}
</if>
order by ip.update_time desc
<if test="policy.page.offset != null and policy.page.totalPage != null">
limit #{policy.page.offset}, #{policy.page.totalPage}
</if>
</select>
<select id="selectPolicyTotalByorgCode" resultType="java.lang.Integer">
SELECT
count(ip.id)
FROM
insure_policy ip
LEFT JOIN insure_product ir on ir.id=ip.product_id
WHERE ip.org_code=#{orgCode}
<if test="policy.policyNo !=null and policy.policyNo!=''">
and ip.policy_no = #{policy.policyNo}
</if>
</select>
<select id="selectPlansTotalByorgCode" resultType="java.lang.Integer">
SELECT
count(ip.id)
......
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