Просмотр исходного кода

1.控制台 人员数据 财务中心 任务统计 报价次数 利润分析 业务数据 钱包管理 去掉关闭状态

wuhp 1 год назад
Родитель
Сommit
8fe2bbd720

+ 1 - 0
src/main/resources/mapper/modules/admin/DeptBalanceMapper.xml

@@ -223,6 +223,7 @@
         his.property !=1
         and his.property !=2
         AND his.documentary = '2'
+        and  (ins.del_flag = '1' or o.del_flag IS NULL or o.del_flag = 1)
         <if test="beginDate !=null and beginDate != '' and endDate !=null and endDate != '' ">
             AND date(his.create_time) BETWEEN #{beginDate} AND #{endDate}
         </if>

+ 5 - 0
src/main/resources/mapper/modules/admin/TaskStatisticsMapper.xml

@@ -50,6 +50,7 @@
         LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
         <where>
             iac.orderstatus = '3'
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.signingTimeStart != null and vo.signingTimeStart!='' and vo.signingTimeEnd != null and vo.signingTimeEnd != ''">
                 AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d') BETWEEN DATE_FORMAT(#{vo.signingTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{vo.signingTimeEnd}, '%Y-%m-%d')
             </if>
@@ -180,6 +181,7 @@
                  LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
         <where>
         iac.orderstatus = '3'
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.signingTimeStart != null and vo.signingTimeStart!='' and vo.signingTimeEnd != null and vo.signingTimeEnd != ''">
                 AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d') BETWEEN DATE_FORMAT(#{vo.signingTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{vo.signingTimeEnd}, '%Y-%m-%d')
             </if>
@@ -233,6 +235,7 @@
         <where>
              1=1
            and  iac.orderstatus ='3'
+            and iac.del_flag = '1'
             <if test="vo.signingTimeStart != null and vo.signingTimeStart!='' and vo.signingTimeEnd != null and vo.signingTimeEnd != ''">
                 AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d') BETWEEN DATE_FORMAT(#{vo.signingTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{vo.signingTimeEnd}, '%Y-%m-%d')
             </if>
@@ -305,6 +308,7 @@
         LEFT JOIN esm_ins_company eic on eic.id = pa.partner_companies_id
         <where>
             iac.orderstatus = '3'
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
 
             <if test="vo.userId !=null  and vo.userId!=''">
                 and su.id=#{vo.userId}
@@ -345,6 +349,7 @@
                        left join sys_user su on io.userid =su.id
               <where>
                   iac.orderstatus = '3'
+                  and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
 
                   <if test="vo.userId !=null  and vo.userId!=''">
                       and su.id=#{vo.userId}

+ 2 - 1
src/main/resources/mapper/modules/console/userReportMapper.xml

@@ -158,7 +158,8 @@
         left join sys_dept sd on io.deptid = sd.id
         LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
         <where>
-            and iac.orderstatus = '3'
+            iac.orderstatus = '3'
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.managementSource  != null  and  vo.managementSource!=''">
                 AND  sd.management_source  =#{vo.managementSource}
             </if>

+ 1 - 0
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -2906,6 +2906,7 @@
                         LEFT JOIN ins_area_company iac ON iac.id = ifa.ins_order_no
                 <where>
                     ifa.auditstatus = '1'
+                    and  iac.del_flag = '1'
                     AND iac.signing_time IS NOT NULL
                     <if test="vo.year !=null  and  vo.year !=''">
                        and DATE_FORMAT( iac.signing_time, '%Y') =#{vo.year}

+ 20 - 1
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -896,7 +896,7 @@
         LEFT JOIN ins_fee_audit ifa  on ifa.ins_order_no =iac.id
         WHERE
         agree.id IS NOT NULL
-        and  ( io.del_flag is null   or   io.del_flag ='1')
+        and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
             AND agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -1058,6 +1058,7 @@
         LEFT JOIN sys_dept sd ON sd.id = io.deptid
         WHERE
         agree.id IS NOT NULL
+        and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
             AND  agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -1264,6 +1265,7 @@
         LEFT JOIN sys_dept sd ON sd.id = io.deptid
         <where>
             sd.management_source = '3'
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like "${taskStatisticsVo.provinceId}%"
             </if>
@@ -1405,6 +1407,7 @@
         left join  sys_user su  on su.id = io.userid
         <where>
             sd.management_source = '1'
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like "${taskStatisticsVo.provinceId}%"
             </if>
@@ -1488,6 +1491,8 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         <where>
             pa.insurance_company_id IS NOT NULL
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
+
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like concat('%', #{taskStatisticsVo.provinceId}, '%')
 
@@ -1549,6 +1554,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         <where>
             pa.insurance_company_id IS NOT NULL
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like concat('%', #{taskStatisticsVo.provinceId}, '%')
 
@@ -1625,6 +1631,7 @@
         left join sys_user suLeader on suLeader.id =su.leader_id
         <where>
             sd.management_source = '2'
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like "${taskStatisticsVo.provinceId}%"
             </if>
@@ -1696,6 +1703,7 @@
         left  join   sys_user su  on su.id=io.userid
         <where>
             sd.management_source = '2'
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like "${taskStatisticsVo.provinceId}%"
             </if>
@@ -1765,6 +1773,7 @@
             1=1
             and iac.id = ifa.ins_order_no
             AND iac.orderstatus = 3
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.reviewer !=null  and  taskStatisticsVo.reviewer !=''">
                 and su.name =#{taskStatisticsVo.reviewer}
             </if>
@@ -2154,6 +2163,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         <where>
             iac.orderstatus = '3'
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.ids  != null  and  vo.ids.size()>0 ">
                 AND io.userid IN
                 <foreach item="item"  collection="vo.ids" open="(" separator="," close=")">
@@ -2211,6 +2221,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         left join sys_user su  on su.id=io.userid
         <where>
+             (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.ids  != null  and  vo.ids.size()>0 ">
                 AND io.userid IN
                 <foreach item="item"  collection="vo.ids" open="(" separator="," close=")">
@@ -2368,6 +2379,7 @@
         agree.id IS NOT NULL
         and  iac.orderstatus = '3'
         and  ifa.auditstatus != '2'
+        and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
             and  agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -2469,6 +2481,7 @@
         agree.id IS NOT NULL
         and  iac.orderstatus = '3'
         and  ifa.auditstatus != '2'
+        and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
             and  agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -2544,6 +2557,7 @@
         agree.id IS NOT NULL
         and  iac.orderstatus = '3'
         and  ifa.auditstatus != '2'
+        and  iac.del_flag = '1'
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
             and  agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -2617,6 +2631,7 @@
         WHERE
         agree.id IS NOT NULL
         and  ifa.auditstatus != '2'
+        and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
         <if test="vo.companyId  != null  and  vo.companyId!='' ">
           and  agree.insurance_company_id = #{vo.companyId}
         </if>
@@ -2684,6 +2699,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         <where>
             iac.orderstatus = '3'
+            and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="vo.ids  != null  and  vo.ids.size()>0 ">
                 AND io.userid IN
                 <foreach item="item"  collection="vo.ids" open="(" separator="," close=")">
@@ -2912,6 +2928,7 @@
         ins_area_company iac
         left  join   ins_orders  io  on  io.orderno  = iac.orderno
         <where>
+             (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="ids  != null  and  ids.size()>0 ">
                 AND io.userid IN
                 <foreach item="item"  collection="ids" open="(" separator="," close=")">
@@ -2967,6 +2984,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         LEFT JOIN sys_dept sd ON sd.id = io.deptid
         <where>
+             (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.managementSource  != null  and  taskStatisticsVo.managementSource!=''">
                 AND  sd.management_source  =#{taskStatisticsVo.managementSource}
             </if>
@@ -3062,6 +3080,7 @@
         LEFT JOIN ins_orders io ON io.orderno = iac.orderno
         <where>
             pa.insurance_company_id IS NOT NULL
+            and  (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
             <if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
                 and io.deptid like concat('%', #{taskStatisticsVo.provinceId}, '%')