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

冲突

Signed-off-by: hjc <1464339613@qq.com>
hjc преди 1 година
родител
ревизия
c5c9a3ecbe

+ 7 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/mobileInfo/modular/qcqualityinspection/mapper/BusinessQcQualityInspectionMapper.java

@@ -29,6 +29,9 @@ import java.util.List;
29 29
  * @date  2024/06/06 11:25
30 30
  **/
31 31
 public interface BusinessQcQualityInspectionMapper extends BaseMapper<BusinessQcQualityInspection> {
32
+    ReserveQualityOrgPageVO selectNo( String orgName);
33
+
34
+    ReserveQualityOrgPageVO selectPass( String orgName);
32 35
 
33 36
     /*  *
34 37
      * 粮食储备-储备质量(仓房)-分页
@@ -54,4 +57,8 @@ public interface BusinessQcQualityInspectionMapper extends BaseMapper<BusinessQc
54 57
     List<ReserveQualityOrgPageVO> selectNoAndPass(@Param("cityName")String orgName);
55 58
 
56 59
     BusinessQcQualityInspection selectByPrimaryKey(@Param("id")Integer id);
60
+
61
+    ReserveQualityCityPageVO selectCityPassByCityName(@Param("cityName") String cityName);
62
+
63
+    ReserveQualityCityPageVO selectCityNoPassByCityName(@Param("cityName") String cityName);
57 64
 }

+ 66 - 9
unis-plugin/unis-plugin-biz/src/main/java/com/unis/mobileInfo/modular/qcqualityinspection/mapper/mapping/BusinessQcQualityInspectionMapper.xml

@@ -48,6 +48,27 @@
48 48
     zbjgpd, qysj, qydbh, qyrxm, qyqy, jdrxm, ypbh, ypsl, dbsl, ypdj, sample_status, sample_package_model,
49 49
     bz
50 50
     </sql>
51
+    <select id="selectNo" resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityOrgPageVO">
52
+        select count(t1.org_id) noPassNum,t1.org_id,t2.org_name from depot_qh.business_qc_quality_inspection t1 left join depot_qh.org_info t2 on
53
+        t1.org_id=t2.org_id
54
+        <where>
55
+            t1.check_result='0'
56
+            <if test="orgName!=null and orgName!=''">
57
+                and t2.org_name like concat("%",#{orgName},"%")
58
+            </if>
59
+        </where>
60
+    </select>
61
+    <select id="selectPass" resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityOrgPageVO">
62
+        select count(t1.org_id) passNum,t1.org_id ,t2.org_name from depot_qh.business_qc_quality_inspection t1 left join depot_qh.org_info t2 on
63
+        t1.org_id=t2.org_id
64
+        <where>
65
+            t1.check_result='1'
66
+            <if test="orgName!=null and orgName!=''">
67
+                and t2.org_name like concat("%",#{orgName},"%")
68
+            </if>
69
+        </where>
70
+    </select>
71
+
51 72
 
52 73
     <select id="selectMyPage"
53 74
             resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityStoreHousePageVO">
@@ -123,6 +144,43 @@
123 144
 
124 145
     </select>
125 146
 
147
+    <select id="selectCityPassByCityName"
148
+            resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityCityPageVO">
149
+
150
+        SELECT
151
+        count(t3.zcdz_city) passNum,t4.id cityId,t4.DICT_LABEL cityName
152
+        FROM
153
+        depot_qh.business_qc_quality_inspection t1
154
+        LEFT JOIN depot_qh.org_info t2 ON t1.org_id = t2.org_id
155
+        LEFT JOIN province_all.biz_unit_info t3 ON t2.unit_info_id = t3.id
156
+        left join province_all.dev_dict t4 on t3.zcdz_city=t4.id
157
+        <where>
158
+            t1.check_result='1'
159
+            <if test="cityName!=null and cityName!=''">
160
+                and t4.DICT_LABEL like concat("%",#{cityName},"%")
161
+            </if>
162
+        </where>
163
+
164
+    </select>
165
+
166
+    <select id="selectCityNoPassByCityName"
167
+            resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityCityPageVO">
168
+
169
+        SELECT
170
+        count(t3.zcdz_city) noPassNum,t4.id cityId,t4.DICT_LABEL cityName
171
+        FROM
172
+        depot_qh.business_qc_quality_inspection t1
173
+        LEFT JOIN depot_qh.org_info t2 ON t1.org_id = t2.org_id
174
+        LEFT JOIN province_all.biz_unit_info t3 ON t2.unit_info_id = t3.id
175
+        left join province_all.dev_dict t4 on t3.zcdz_city=t4.id
176
+        <where>
177
+            t1.check_result='0'
178
+            <if test="cityName!=null and cityName!=''">
179
+                and t4.DICT_LABEL like concat("%",#{cityName},"%")
180
+            </if>
181
+        </where>
182
+
183
+    </select>
126 184
     <select id="selectCitys"
127 185
             resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityCityPageVO">
128 186
 
@@ -149,21 +207,21 @@
149 207
     <select id="selectNoAndPass"
150 208
             resultType="com.unis.mobileInfo.modular.qcqualityinspection.vo.ReserveQualityOrgPageVO">
151 209
         SELECT
152
-            COUNT(CASE WHEN t1.check_result = '1' THEN 1 END) AS passNum,
153
-            COUNT(CASE WHEN t1.check_result = '0' THEN 1 END) AS noPassNum,
154
-            t1.org_id,
155
-            t2.org_name
210
+        COUNT(CASE WHEN t1.check_result = '1' THEN 1 END) AS passNum,
211
+        COUNT(CASE WHEN t1.check_result = '0' THEN 1 END) AS noPassNum,
212
+        t1.org_id,
213
+        t2.org_name
156 214
         FROM
157
-            depot_qh.business_qc_quality_inspection t1
158
-                LEFT JOIN depot_qh.org_info t2 ON t1.org_id = t2.org_id
215
+        depot_qh.business_qc_quality_inspection t1
216
+        LEFT JOIN depot_qh.org_info t2 ON t1.org_id = t2.org_id
159 217
         <where>
160 218
             <if test="orgName!=null and orgName!=''">
161 219
                 and t2.org_name like concat("%",#{orgName},"%")
162 220
             </if>
163 221
         </where>
164 222
         GROUP BY
165
-            t1.org_id,
166
-            t2.org_name;
223
+        t1.org_id,
224
+        t2.org_name;
167 225
     </select>
168 226
 
169 227
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -172,5 +230,4 @@
172 230
         from business_qc_quality_inspection
173 231
         where id = #{id,jdbcType=INTEGER}
174 232
     </select>
175
-
176 233
 </mapper>

+ 6 - 8
unis-plugin/unis-plugin-biz/src/main/java/com/unis/mobileInfo/modular/qcqualityinspection/service/impl/BusinessQcQualityInspectionServiceImpl.java

@@ -198,7 +198,6 @@ public class BusinessQcQualityInspectionServiceImpl extends ServiceImpl<Business
198 198
 
199 199
             if (StringUtils.isNotEmpty(pageParam.getCityName())) {
200 200
                 //进行条件查询
201
-<<<<<<< HEAD
202 201
                 //收集合格总数
203 202
                 ReserveQualityCityPageVO passVo = businessQcQualityInspectionMapper.selectCityPassByCityName(pageParam.getCityName());
204 203
                 //不收集
@@ -211,10 +210,6 @@ public class BusinessQcQualityInspectionServiceImpl extends ServiceImpl<Business
211 210
                     passVo.setNoPassNum(noPassVo.getNoPassNum());
212 211
                     list.add(passVo);
213 212
                 }
214
-=======
215
-                List<ReserveQualityCityPageVO> voList = businessQcQualityInspectionMapper.selectCitys(pageParam.getCityName());
216
-                list.addAll(voList);
217
->>>>>>> dev
218 213
 
219 214
             } else {
220 215
                 //非条件查询
@@ -267,10 +262,13 @@ public class BusinessQcQualityInspectionServiceImpl extends ServiceImpl<Business
267 262
         if (CollectionUtil.isNotEmpty(businessQcQualityInspections)) {
268 263
             //条件查询
269 264
             if (StringUtils.isNotEmpty(pageParam.getOrgName())) {
265
+                //不合格
266
+                ReserveQualityOrgPageVO noPassVo = businessQcQualityInspectionMapper.selectNo(pageParam.getOrgName());
267
+                //合格
268
+                ReserveQualityOrgPageVO passVo = businessQcQualityInspectionMapper.selectPass(pageParam.getOrgName());
269
+                passVo.setNoPassNum(noPassVo.getNoPassNum());
270 270
 
271
-                List<ReserveQualityOrgPageVO> voList = businessQcQualityInspectionMapper.selectNoAndPass(pageParam.getOrgName());
272
-                list.addAll(voList);
273
-
271
+                list.add(passVo);
274 272
             } else {
275 273
 
276 274
                 //不带条件查询