Преглед на файлове

添加任务渠道添加的检索条件

hxl13994548489 преди 2 години
родител
ревизия
421cab7e9a

+ 1 - 1
src/main/java/com/ydtech/modules/admin/controller/SysDeptController.java

@@ -139,7 +139,7 @@ public class SysDeptController extends BaseController {
         return HttpResult.ok(sysDeptService.findTree("9",null));
     }
     @ApiOperation(value = "省市区门店列表查询 省级parentId=99 市县传值上级id,level传值省市县门店1,2,3,4")
-    @PostMapping(value = "/queryListByParentId/{level}/{parentId}")
+    @GetMapping(value = "/queryListByParentId/{level}/{parentId}")
     public HttpResult<List<SysDept>> queryListByParentId(@PathVariable("level")  String level, @PathVariable("parentId") String parentId) {
         if(parentId==null || "".equals(parentId)) {
             return HttpResult.error("parentId父级id不能为空");

+ 4 - 1
src/main/java/com/ydtech/modules/order/entity/InsOrders.java

@@ -235,7 +235,10 @@ public class InsOrders implements Serializable {
     @TableField(exist = false)
     private String auditTime;   //订单费用审核时间
 
-
+    @TableField(exist = false)
+    private String agreementCode;   //协议code
+    @TableField(exist = false)
+    private String agreementName;   //协议名称
     public InsOrders(SysUser user, SysDept dept, BaseQuoteInfoVo quoteInfoVo) {
         // 2. 组装订单
         this.setQuoteno(String.valueOf(quoteInfoVo.getQuoteno()));

+ 55 - 12
src/main/java/com/ydtech/modules/order/entity/vo/OrderQueryVo.java

@@ -20,17 +20,11 @@ public class OrderQueryVo {
     @NotEmpty(message = "用户ID不能为空")
     private String userId;
 
+
     @ApiModelProperty(value = "订单号")
     private String orderNo;
 
-    @ApiModelProperty(value = "车牌号")
-    private String licenseNo;
-
-    @ApiModelProperty(value = "车架号(Vin码)")
-    private String frameNo;
 
-    @ApiModelProperty(value = "投保人姓名")
-    private String insuredName;
 
     @ApiModelProperty(value = "订单状态")
     private String orderStatus;
@@ -39,9 +33,6 @@ public class OrderQueryVo {
     @NotEmpty(message = "部门不能为空")
     private String deptId;
 
-    @ApiModelProperty("保险公司编号")
-    private String companyId;
-
     @ApiModelProperty("费用审核状态0未审核 1审核通过")
     private String auditStatus;
 
@@ -66,12 +57,64 @@ public class OrderQueryVo {
     private String endDateStr;
 
 
-    @ApiModelProperty(value = "业务员工号")
+    @ApiModelProperty(value = "省机构id")
+    private String provinceId;
+
+    @ApiModelProperty(value = "市机构id")
+    private String cityId;
+
+    @ApiModelProperty(value = "县机构id")
+    private String countyId;
+
+    @ApiModelProperty(value = "门店机构id")
+    private String houseId;
+
+    @ApiModelProperty(value = "任务池号")
+    private String taskNo;
+
+    @ApiModelProperty("保险公司编号")
+    private String companyId;
+
+    @ApiModelProperty("协议Id")
+    private String agreeId;
+
+
+    @ApiModelProperty(value = "车牌号")
+    private String licenseNo;
+
+    @ApiModelProperty(value = "车架号(Vin码)")
+    private String frameNo;
+
+    @ApiModelProperty(value = "发动机号")
+    private String engineNo;
+
+    @ApiModelProperty(value = "险种代码")
+    private String riskCode;
+
+    @ApiModelProperty(value = "代理人工号")
     private String operatorId;
 
-    @ApiModelProperty(value = "业务员姓名")
+    @ApiModelProperty(value = "代理人姓名")
     private String operatorName;
 
+    @ApiModelProperty(value = "受理人工号")
+    private String auditId;
+
+    @ApiModelProperty(value = "投保人姓名")
+    private String insuredName;
+
+    @ApiModelProperty(value = "报价开始时间")
+    private String quoteStartDateStr;
+
+    @ApiModelProperty(value = "报价结束时间")
+    private String quoteEndDateStr;
+
+    @ApiModelProperty(value = "起保开始时间")
+    private String attachStartDateStr;
+    @ApiModelProperty(value = "起保结束时间")
+    private String attachEndDateStr;
+
+
     public LocalDate getEndDatePlusOneDay() {
         if(ObjectUtils.isEmpty(endDate)){
             return endDate;

+ 85 - 8
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -42,6 +42,9 @@
                 javaType="com.alibaba.fastjson.JSONObject"
                 typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
         <result property="subOrderId" column="subOrderId" jdbcType="VARCHAR"/>
+        <result property="agreementCode" column="agreementCode" jdbcType="VARCHAR"/>
+        <result property="agreementName" column="agreementName" jdbcType="VARCHAR"/>
+
     </resultMap>
     <resultMap id="OrderResultMap" type="com.ydtech.modules.order.entity.vo.OrderVo">
         <id property="orderno" column="orderno" jdbcType="VARCHAR"/>
@@ -806,11 +809,15 @@
         io.vehicle_and_vessel_tax as vehicleAndVesselTax,
         iac.id as subOrderId,
         iac.id as company_id,
-        iac.inscompany as ins_company
+        iac.inscompany as ins_company,
+        agree.agreement_code as agreementCode,
+        agree.agreement_name as agreementName
         from
             ins_area_company iac
         left JOIN
              ins_orders io  on iac.orderno = io.orderno
+        left join
+            ptl_agreement   agree  on  iac.agreement_id= agree.id
         <where>
             <if test="agentUserIds != null and agentUserIds.size>0" >
                 AND (
@@ -845,13 +852,13 @@
                 )
             </if>
             <if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
-                and io.orderno = #{orderQueryVo.orderNo}
+                and iac.id = #{orderQueryVo.orderNo}
             </if>
             <if test="orderQueryVo.deptId != null and orderQueryVo.deptId != ''">
                 and io.deptid like "${orderQueryVo.deptId}%"
             </if>
             <if test="orderQueryVo.orderStatus != null and orderQueryVo.orderStatus != ''">
-                and iac.orderstatus = #{orderQueryVo.orderStatus}
+                and iac.orderstatus= #{orderQueryVo.orderStatus}
             </if>
             <if test="orderQueryVo.frameNo != null and orderQueryVo.frameNo != ''">
                 and io.frameno = #{orderQueryVo.frameNo}
@@ -862,8 +869,8 @@
             <if test="orderQueryVo.insuredName != null and orderQueryVo.insuredName != ''">
                 and io.insuredname = #{orderQueryVo.insuredName}
             </if>
-            <if test="orderQueryVo.startDate != null and orderQueryVo.endDate != null">
-                and io.createtime between #{orderQueryVo.startDate} AND #{orderQueryVo.endDate}
+            <if test="orderQueryVo.quoteStartDateStr != null and orderQueryVo.quoteEndDateStr != null">
+                and  DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{orderQueryVo.quoteStartDateStr} AND #{orderQueryVo.quoteEndDateStr}
             </if>
             <if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
                 and iac.company_id = #{orderQueryVo.companyId}
@@ -874,6 +881,41 @@
             <if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
                 and io.username = #{orderQueryVo.operatorName}
             </if>
+            <if test="orderQueryVo.engineNo != null and orderQueryVo.engineNo != ''">
+                and JSON_EXTRACT( io.carinfo, '$.engineNo' )  = #{orderQueryVo.engineNo}
+            </if>
+            <if test="orderQueryVo.provinceId != null and orderQueryVo.provinceId != ''">
+                and io.deptid like "${orderQueryVo.provinceId}%"
+            </if>
+            <if test="orderQueryVo.cityId != null and orderQueryVo.cityId != ''">
+                and io.deptid like "${orderQueryVo.cityId}%"
+            </if>
+            <if test="orderQueryVo.countyId != null and orderQueryVo.countyId != ''">
+                and io.deptid like "${orderQueryVo.countyId}%"
+            </if>
+            <if test="orderQueryVo.houseId != null and orderQueryVo.houseId != ''">
+                and io.deptid like "${orderQueryVo.houseId}%"
+            </if>
+            <if test="orderQueryVo.agreeId != null and orderQueryVo.agreeId != ''">
+                and iac.agreement_id = #{orderQueryVo.agreeId}
+            </if>
+            <if test="orderQueryVo.taskNo != null and orderQueryVo.taskNo != ''">
+                and io.orderno = #{orderQueryVo.taskNo}
+            </if>
+            <if test="orderQueryVo.riskCode != null and orderQueryVo.riskCode != ''">
+                and io.product = #{orderQueryVo.riskCode}
+            </if>
+            <if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
+                and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
+            </if>
+            <if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
+                and  ((
+                DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
+                AND #{orderQueryVo.attachEndDateStr}
+                )
+                OR ( DATE_FORMAT(io.systartdate, '%Y-%m-%d')  BETWEEN #{orderQueryVo.attachStartDateStr} AND #{orderQueryVo.attachEndDateStr} )
+                )
+            </if>
         </where>
         order by io.createtime desc
     </select>
@@ -922,7 +964,7 @@
                 )
             </if>
             <if test="orderQueryVo.orderNo != null and orderQueryVo.orderNo != ''">
-                and io.orderno = #{orderQueryVo.orderNo}
+                and iac.id = #{orderQueryVo.orderNo}
             </if>
             <if test="orderQueryVo.deptId != null and orderQueryVo.deptId != ''">
                 and io.deptid like "${orderQueryVo.deptId}%"
@@ -939,8 +981,8 @@
             <if test="orderQueryVo.insuredName != null and orderQueryVo.insuredName != ''">
                 and io.insuredname = #{orderQueryVo.insuredName}
             </if>
-            <if test="orderQueryVo.startDate != null and orderQueryVo.endDate != null">
-                and io.createtime between #{orderQueryVo.startDate} AND #{orderQueryVo.endDate}
+            <if test="orderQueryVo.quoteStartDateStr != null and orderQueryVo.quoteEndDateStr != null">
+                and DATE_FORMAT(io.createtime, '%Y-%m-%d') between #{orderQueryVo.quoteStartDateStr} AND #{orderQueryVo.quoteEndDateStr}
             </if>
             <if test="orderQueryVo.companyId != null and orderQueryVo.companyId != ''">
                 and iac.company_id = #{orderQueryVo.companyId}
@@ -951,6 +993,41 @@
             <if test="orderQueryVo.operatorName != null and orderQueryVo.operatorName != ''">
                 and io.username = #{orderQueryVo.operatorName}
             </if>
+            <if test="orderQueryVo.engineNo != null and orderQueryVo.engineNo != ''">
+                and JSON_EXTRACT( io.carinfo, '$.engineNo' )  = #{orderQueryVo.engineNo}
+            </if>
+            <if test="orderQueryVo.provinceId != null and orderQueryVo.provinceId != ''">
+                and io.deptid like "${orderQueryVo.provinceId}%"
+            </if>
+            <if test="orderQueryVo.cityId != null and orderQueryVo.cityId != ''">
+                and io.deptid like "${orderQueryVo.cityId}%"
+            </if>
+            <if test="orderQueryVo.countyId != null and orderQueryVo.countyId != ''">
+                and io.deptid like "${orderQueryVo.countyId}%"
+            </if>
+            <if test="orderQueryVo.houseId != null and orderQueryVo.houseId != ''">
+                and io.deptid like "${orderQueryVo.houseId}%"
+            </if>
+            <if test="orderQueryVo.agreeId != null and orderQueryVo.agreeId != ''">
+                and iac.agreement_id = #{orderQueryVo.agreeId}
+            </if>
+            <if test="orderQueryVo.taskNo != null and orderQueryVo.taskNo != ''">
+                and io.orderno = #{orderQueryVo.taskNo}
+            </if>
+            <if test="orderQueryVo.riskCode != null and orderQueryVo.riskCode != ''">
+                and io.product = #{orderQueryVo.riskCode}
+            </if>
+            <if test="orderQueryVo.auditId != null and orderQueryVo.auditId != ''">
+                and IFNULL( iac.new_operator_id, '' ) = #{orderQueryVo.auditId}
+            </if>
+            <if test="orderQueryVo.attachStartDateStr != null and orderQueryVo.attachEndDateStr != ''">
+                and  ((
+                DATE_FORMAT(io.jqstartdate, '%Y-%m-%d') BETWEEN #{orderQueryVo.attachStartDateStr}
+                AND #{orderQueryVo.attachEndDateStr}
+                )
+                OR ( DATE_FORMAT(io.systartdate, '%Y-%m-%d')  BETWEEN #{orderQueryVo.attachStartDateStr} AND #{orderQueryVo.attachEndDateStr} )
+                )
+            </if>
         </where>
         ) as s
     </select>