|
|
@@ -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>
|