瀏覽代碼

修改问题

lvzhikai 4 年之前
父節點
當前提交
59e6a8056b

+ 10 - 37
src/main/java/com/chinaitop/depot/grainAnalysis/service/impl/StorageGrainAnalysisServiceImpl.java

@@ -184,7 +184,7 @@ public class StorageGrainAnalysisServiceImpl implements StorageGrainAnalysisServ
184 184
 		 * 4、将每周的三温检查代表数据放入集合中返回
185 185
 		 */
186 186
 
187
-		List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
187
+		List list = new ArrayList<>();
188 188
 
189 189
 		//将当前月的所有周分析数据拿到;
190 190
 		StorageGrainAnalysisExample grainExample = new StorageGrainAnalysisExample();
@@ -207,46 +207,19 @@ public class StorageGrainAnalysisServiceImpl implements StorageGrainAnalysisServ
207 207
 			map.put("weekdata", "1");
208 208
 		}
209 209
 
210
-		Map<String, Object> param_map = new HashMap<String, Object>();
211
-		param_map.put("house_id", houseId);
212
-		Map<String, Object> house_map = null;
213
-		if ("YG".equals(houseId.substring(0, 2))) {//油罐
214
-			house_map = analysisMapper.selecttankObj(param_map);
215
-		} else {//粮仓
216
-			house_map = analysisMapper.selectStoreHouseObj(param_map);
217
-		}
210
+		if (null != grainList && grainList.size() > 0) {
211
+			list = new ArrayList();
212
+			Map<String, Object> monthMap = new HashMap<>();
213
+			for (StorageGrainAnalysis grain : grainList) {
218 214
 
219
-		if (null != house_map && house_map.size() > 0) {
220
-			String houseCode = "";
221
-			if ("YG".equals(houseId.substring(0, 2))) {
222
-				houseCode = house_map.get("storageTank_code")+"";
223
-			} else {
224
-				houseCode = house_map.get("storehouse_code")+"";
215
+				list.add(grain.getMonth());
225 216
 			}
226 217
 
227
-			//然后按照每条周分析数据的检查时间范围来查询每周对应的三温检查数据,每周的取一条数据组成集合返回;
228
-			if (null != grainList && grainList.size() > 0) {
229
-				for (StorageGrainAnalysis grain : grainList) {
230
-					Date startDate = grain.getCheckDateStart();
231
-					String startDate_str = ParameterUtil.date2string(startDate);
232
-
233
-					Date endDate = grain.getCheckDateEnd();
234
-					String endDate_str = ParameterUtil.date2string(endDate);
235
-
236
-					Map<String, Object> dateMap = new HashMap<>();
237
-					dateMap.put("houseId",houseCode);
238
-					dateMap.put("startDate",startDate_str);
239
-					dateMap.put("endDate",endDate_str);
240
-					dateMap.put("orgId",orgId);
241
-					list.add(dateMap);
242
-				}
243
-
244
-				if (null == list || list.size() == 0) {
245
-					list = new ArrayList<Map<String, Object>>();
246
-				}
247
-			} else {
248
-				list = new ArrayList<Map<String, Object>>();
218
+			if (null == list || list.size() == 0) {
219
+				list = new ArrayList();
249 220
 			}
221
+		} else {
222
+			list = new ArrayList();
250 223
 		}
251 224
 
252 225
 		map.put("threeTempCheckList", list);