lvzhikai пре 5 година
родитељ
комит
22c3ce0d1e

+ 4 - 3
src/main/java/com/chinaitop/depot/agent/basic/controller/AgentStorehouseController.java

@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiImplicitParams;
16 16
 import io.swagger.annotations.ApiOperation;
17 17
 
18 18
 import org.apache.commons.collections.IteratorUtils;
19
+import org.apache.commons.lang.ObjectUtils;
19 20
 import org.springframework.http.MediaType;
20 21
 import org.springframework.web.bind.annotation.RequestMapping;
21 22
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -106,9 +107,9 @@ public class AgentStorehouseController {
106 107
         	Map<String,Object> list_map = null;
107 108
         	for (int i = 0; i < list.size(); i++) {
108 109
         		list_map = list.get(i);
109
-        		list_map.put("id", list_map.get("id").toString());
110
-        		list_map.put("storehouseId", list_map.get("storehouseId").toString());
111
-        		list_map.put("storehouseName", list_map.get("storehouseName").toString());
110
+        		list_map.put("id", ObjectUtils.toString(list_map.get("id")));
111
+        		list_map.put("storehouseId", ObjectUtils.toString(list_map.get("storehouseId")));
112
+        		list_map.put("storehouseName", ObjectUtils.toString(list_map.get("storehouseName")));
112 113
         		new_list.add(list_map);
113 114
         	}
114 115
         }

+ 1 - 1
src/main/java/com/chinaitop/depot/agent/basic/mapper/BusinessAgentStorehouseMapper.xml

@@ -388,7 +388,7 @@
388 388
     <!-- 拼接第三方的油罐 -->
389 389
     UNION ALL
390 390
     SELECT
391
-        btank.storageTank_code,
391
+        btank.storageTank_code id,
392 392
         btank.id storehouseId,
393 393
         btank.storageTank_name storehouseName
394 394
     FROM basic_tank btank

+ 6 - 63
src/main/java/com/chinaitop/depot/agent/quality/mapper/BusinessAgentQualityMapper.xml

@@ -1676,10 +1676,10 @@
1676 1676
     depot.agent_depot_name agentDepotName,
1677 1677
     '0' AS stateType
1678 1678
     FROM business_agent_quality sqk
1679
-    LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.storehouse_id AND store.library_type = 1
1680
-    LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id AND ware.library_type = 1
1681
-    LEFT JOIN basic_tank bb on bb.id = sqk.tank_id
1682
-    LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = sqk.storehouse_id and sfo.warehouse_id = sqk.warehouse_id
1679
+    LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.storehouse_id
1680
+    LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id
1681
+    LEFT JOIN storage_foodbasicinfo sfo ON sfo.house_id = sqk.storehouse_id AND sfo.warehouse_id = sqk.warehouse_id
1682
+    LEFT JOIN basic_tank bb ON bb.id = sqk.tank_id
1683 1683
     LEFT JOIN business_agent agent ON agent.id = sqk.agent_id
1684 1684
     LEFT JOIN business_agent_depot depot ON depot.id = sqk.agent_depot_id
1685 1685
     <where>
@@ -1722,63 +1722,6 @@
1722 1722
     UNION ALL
1723 1723
     select
1724 1724
     <include refid="ExtBase_Column_List"/>,
1725
-    sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id,
1726
-    bstore.storeHouse_name storehouseName,
1727
-    bware.warehouse_name wareHouseName,
1728
-    bb.storageTank_name tankName,
1729
-    sfo.id foodbasicinfoId,
1730
-    agent.agent_name agentName,
1731
-    depot.agent_depot_name agentDepotName,
1732
-    '0' AS stateType
1733
-    FROM business_agent_quality sqk
1734
-    INNER JOIN business_agent_storehouse aStore ON aStore.storehouse_id = sqk.storehouse_id
1735
-    INNER JOIN business_agent_warehouse aWare ON aWare.warehouse_id = sqk.warehouse_id
1736
-    LEFT JOIN basic_storehouse bstore ON bstore.storehouse_id = aStore.storehouse_id
1737
-    LEFT JOIN basic_warehouse bware ON bware.warehouse_id = aWare.warehouse_id
1738
-    LEFT JOIN basic_tank bb on bb.id = sqk.tank_id
1739
-    LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = aStore.storehouse_id and sfo.warehouse_id = aWare.warehouse_id
1740
-    LEFT JOIN business_agent agent ON agent.id = sqk.agent_id
1741
-    LEFT JOIN business_agent_depot depot ON depot.id = sqk.agent_depot_id
1742
-    <where>
1743
-      <if test="agentId !=null">
1744
-        and sqk.agent_id = #{agentId}
1745
-      </if>
1746
-      <if test="agentDepotId !=null">
1747
-        and sqk.agent_depot_id = #{agentDepotId}
1748
-      </if>
1749
-      <if test="storehouseId !=null">
1750
-        and sqk.storehouse_id = #{storehouseId}
1751
-      </if>
1752
-      <if test="warehouseId !=null">
1753
-        and sqk.warehouse_id = #{warehouseId}
1754
-      </if>
1755
-      <if test="tankId !=null">
1756
-        and sqk.tank_id = #{tankId}
1757
-      </if>
1758
-      <if test="type !=null">
1759
-        and sqk.type = #{type}
1760
-      </if>
1761
-      <if test="subTypeDetailed !=null">
1762
-        and sqk.sub_type_detailed = #{subTypeDetailed}
1763
-      </if>
1764
-      <if test="level !=null">
1765
-        and sqk.level = #{level}
1766
-      </if>
1767
-      <if test="historyStatus !=null">
1768
-        and sqk.history_status = #{historyStatus}
1769
-      </if>
1770
-      <if test="sealStatus !=null">
1771
-        and sqk.seal_status = #{sealStatus}
1772
-      </if>
1773
-      <if test="checkResult !=null">
1774
-        and sqk.check_result = #{checkResult}
1775
-      </if>
1776
-      AND sqk.org_id = #{orgId}
1777
-    </where>
1778
-    GROUP BY sqk.id
1779
-    UNION ALL
1780
-    select
1781
-    <include refid="ExtBase_Column_List"/>,
1782 1725
     depot.agent_id ,depot.id agent_depot_id,sqk.house_id storehouse_id,
1783 1726
     store.storeHouse_name storehouseName,
1784 1727
     ware.warehouse_name wareHouseName,
@@ -1799,10 +1742,10 @@
1799 1742
     LEFT JOIN storage_foodbasicinfo sfo ON sfo.house_id = sqk.house_id AND sfo.warehouse_id = sqk.warehouse_id
1800 1743
     <where>
1801 1744
       <if test="agentId !=null">
1802
-        and agent.agent_id = #{agentId}
1745
+        and agent.id = #{agentId}
1803 1746
       </if>
1804 1747
       <if test="agentDepotId !=null">
1805
-        and depot.agent_depot_id = #{agentDepotId}
1748
+        and depot.id = #{agentDepotId}
1806 1749
       </if>
1807 1750
       <if test="storehouseId !=null">
1808 1751
         and sqk.house_id = #{storehouseId}

+ 1 - 1
src/main/java/com/chinaitop/depot/agent/temperature/controller/AgentTemperatureController.java

@@ -207,7 +207,7 @@ public class AgentTemperatureController {
207 207
     })
208 208
     public Map<String, Object> importFile(MultipartFile file, String fileType, HttpServletRequest request, Integer orgId) {
209 209
 
210
-        String[] titleArr = {"测温线缆列号(X)", "测温线缆行号(Y)", "测温点高度(Z)", "温度值"};//第一行的title
210
+        String[] titleArr = {"测温线缆层数(Y)", "测温点行号(Z)", "测温线缆列号(X)", "温度值"};//第一行的title
211 211
         boolean[] emptyArr = {false, false, false, false};//指定列可为空,不可为空值为false.
212 212
 
213 213
         List<List<String>> list = new ArrayList<List<String>>();//该list为数据返回的list

+ 6 - 6
src/main/java/com/chinaitop/depot/agent/temperature/service/impl/AgentTemperatureServiceImpl.java

@@ -210,17 +210,17 @@ public class AgentTemperatureServiceImpl implements agentTemperatureService {
210 210
             for (int j = 0; j < revList.size(); j++) {
211 211
                 switch(j) {
212 212
                     case 0:
213
-                        //测温线缆列号(X)
213
+                        //测温线缆层数(Y)
214 214
                         pointMap = new HashMap<>();
215
-                        pointMap.put("x",revList.get(j));
215
+                        pointMap.put("y",revList.get(j));
216 216
                         break;
217 217
                     case 1:
218
-                        //测温线缆行号(Y)
219
-                        pointMap.put("y",revList.get(j));
218
+                        //测温点行号(Z)
219
+                        pointMap.put("z",revList.get(j));
220 220
                         break;
221 221
                     case 2:
222
-                        //测温点高度(Z)
223
-                        pointMap.put("z",revList.get(j));
222
+                        //测温线缆列号(X)
223
+                        pointMap.put("x",revList.get(j));
224 224
                         break;
225 225
                     case 3:
226 226
                         //温度值