lvzhikai 5 anni fa
parent
commit
df7dfedc94

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

@@ -86,7 +86,7 @@ public class AgentStorehouseController {
86 86
             @ApiImplicitParam(name = "orgId", value = "组织id", paramType = "query"),
87 87
             @ApiImplicitParam(name = "depotId", value = "代储库id", paramType = "query"),
88 88
             @ApiImplicitParam(name = "is_three", value = "是否需要第三方的仓房 和油罐信息,1是需要,空值是不需要", paramType = "query"),
89
-            @ApiImplicitParam(name = "is_lq", value = "是否需要油罐信息,1是需要,空值是需要", paramType = "query")
89
+            @ApiImplicitParam(name = "is_lq", value = "是否需要油罐信息,1是需要,空值是需要", paramType = "query")
90 90
     })
91 91
     public List<Map<String,Object>> getDepotToStoreList(String orgId, String depotId, String is_three, String is_lq){
92 92
         Map<String,Object> map = new HashMap<>();
@@ -113,7 +113,7 @@ public class AgentStorehouseController {
113 113
         	}
114 114
         }
115 115
         //如果是粮情数据,那就不要油罐的信息
116
-        if (null == is_lq || "".equals(is_lq)) {
116
+        if (ParameterUtil.isequal(is_lq,"1")) {
117 117
         	if (null != new_list && new_list.size() > 0) {
118 118
         		List<Map<String,Object>> list2 = new ArrayList<Map<String, Object>>();
119 119
         		Iterator<Map<String,Object>> ite = list.iterator();

+ 4 - 5
src/main/java/com/chinaitop/depot/agent/quality/mapper/BusinessAgentQualityMapper.xml

@@ -260,7 +260,7 @@
260 260
       #{totalArsenic,jdbcType=VARCHAR}, #{aflatoxin,jdbcType=VARCHAR}, #{butylPhenol,jdbcType=VARCHAR}, 
261 261
       #{updatetime,jdbcType=TIMESTAMP})
262 262
   </insert>
263
-  <insert id="insertSelective" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
263
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
264 264
     insert into business_agent_quality
265 265
     <trim prefix="(" suffix=")" suffixOverrides="," >
266 266
       <if test="id != null" >
@@ -1661,14 +1661,14 @@
1661 1661
     depot.agent_depot_name agentDepotName,
1662 1662
     '0' AS stateType
1663 1663
     FROM business_agent_quality sqk
1664
-    LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.storehouse_id
1665
-    LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id
1664
+    LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.storehouse_id AND store.library_type = 1
1665
+    LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id AND ware.library_type = 1
1666 1666
     LEFT JOIN basic_tank bb on bb.id = sqk.tank_id
1667 1667
     LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = sqk.storehouse_id and sfo.warehouse_id = sqk.warehouse_id
1668 1668
     LEFT JOIN business_agent agent ON agent.id = sqk.agent_id
1669 1669
     LEFT JOIN business_agent_depot depot ON depot.id = sqk.agent_depot_id
1670 1670
     <where>
1671
-      ware.library_type = 1 AND store.library_type = 1
1671
+      sqk.org_id = #{orgId}
1672 1672
       <if test="agentId !=null">
1673 1673
         and sqk.agent_id = #{agentId}
1674 1674
       </if>
@@ -1702,7 +1702,6 @@
1702 1702
       <if test="checkResult !=null">
1703 1703
         and sqk.check_result = #{checkResult}
1704 1704
       </if>
1705
-      AND sqk.org_id = #{orgId}
1706 1705
     </where>
1707 1706
     GROUP BY sqk.id
1708 1707
     UNION ALL

+ 1 - 0
src/main/java/com/chinaitop/depot/agent/temperature/mapper/BusinessAgentTemperatureMapper.xml

@@ -682,6 +682,7 @@
682 682
     INNER JOIN basic_storehouse store ON store.storehouse_id = agentStore.storehouse_id
683 683
     AND store.del_flag = 1
684 684
     LEFT JOIN t_testdata tt ON depot.depot_id = tt.org_id
685
+    AND tt.storehouse = store.storehouse_code
685 686
     AND tt.org_id != #{orgId,jdbcType=INTEGER}
686 687
     AND tt.updatetime >= depot.updatetime
687 688
     WHERE