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

去除组织机构管理删除按钮;粮库决策-汽车出去库记录日期区间查询无法获取最后一条修复;

zlq лет назад: 3
Родитель
Сommit
66a473e0c1

+ 6 - 4
src/main/java/com/chinaitop/depot/intelligent/statisticalReport/mapper/StatisticalReportMapper.xml

@@ -151,10 +151,8 @@
151 151
 	    	td.avg avgTemp, sq.water,DATE_FORMAT(sq.input_time, '%Y-%m') inputTime,sq.harvest_time harvestTime
152 152
 		FROM basic_storehouse bs
153 153
 		LEFT JOIN storage_qualitycheck sq on bs.storehouse_id = sq.house_id and sq.org_id = bs.org_id
154
-		LEFT JOIN t_testdata td on td.storehouse = bs.storehouse_code and td.iLq_yq = '0' and td.org_id = bs.org_id   
155
-		<if test="startDate != null and startDate != ''">
156
-	          and DATE_FORMAT(td.time, '%Y-%m-%d') = #{startDate}
157
-	    </if>
154
+		LEFT JOIN t_testdata td on td.storehouse = bs.storehouse_code  and td.org_id = bs.org_id
155
+
158 156
 	    <!-- LEFT JOIN t_testdata_layer tdl ON tdl.lHouse = bs.storehouse_code
159 157
 	    <if test="orgId!=null">
160 158
 	    	and tdl.org_id = ${orgId}   
@@ -164,9 +162,13 @@
164 162
 	    </if> -->
165 163
 		<where>
166 164
 			bs.del_flag = 1
165
+			and td.iLq_yq = '0'
167 166
 			<if test="orgId!=null">
168 167
 	            and bs.org_id = ${orgId}   
169 168
 	        </if>
169
+			<if test="startDate != null and startDate != ''">
170
+				and DATE_FORMAT(td.time, '%Y-%m-%d') = #{startDate}
171
+			</if>
170 172
 		</where>
171 173
 		GROUP BY bs.storehouse_code
172 174
 	) bs LEFT JOIN t_testdata_layer tdl ON tdl.lHouse = bs.storeHouse