Parcourir la source

首页三温图仓房下拉优化

lvzhikai il y a 5 ans
Parent
commit
e7c13f8b2f

+ 6 - 6
src/main/java/com/chinaitop/depot/basic/controller/BasicStorehouseController.java

@@ -95,7 +95,7 @@ public class BasicStorehouseController {
95
 			@ApiImplicitParam(name = "delFlag", value = "是否删除", paramType = "query")
95
 			@ApiImplicitParam(name = "delFlag", value = "是否删除", paramType = "query")
96
 	})
96
 	})
97
 	public PageInfo<BasicStorehouse> getList(Integer pageNum, Integer pageSize, Integer storehouseType,
97
 	public PageInfo<BasicStorehouse> getList(Integer pageNum, Integer pageSize, Integer storehouseType,
98
-											 String storeName, Integer houseId, Integer orgId, Integer storehouseState, 
98
+											 String storeName, Integer houseId, Integer orgId, Integer storehouseState,
99
 											 String libraryType, Integer delFlag) {
99
 											 String libraryType, Integer delFlag) {
100
 		Map<String, Object> modelMap = new HashMap<String, Object>();
100
 		Map<String, Object> modelMap = new HashMap<String, Object>();
101
 
101
 
@@ -504,7 +504,7 @@ public class BasicStorehouseController {
504
 		}
504
 		}
505
 		return errormsg;
505
 		return errormsg;
506
 	}
506
 	}
507
-	
507
+
508
 	/**
508
 	/**
509
 	 * 按仓房编码进行查询,去重
509
 	 * 按仓房编码进行查询,去重
510
 	 * @param storehouseCode 仓房编码
510
 	 * @param storehouseCode 仓房编码
@@ -569,17 +569,17 @@ public class BasicStorehouseController {
569
 		}
569
 		}
570
 		return list;
570
 		return list;
571
 	}
571
 	}
572
-	
572
+
573
 	/**
573
 	/**
574
 	 * 查询三温检查列表最新数据所对应的仓房
574
 	 * 查询三温检查列表最新数据所对应的仓房
575
-	 * 
575
+	 *
576
 	 * @param orgId 粮库ID
576
 	 * @param orgId 粮库ID
577
 	 * @return
577
 	 * @return
578
 	 */
578
 	 */
579
 	@RequestMapping(value = "/getThreeTempCheckList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
579
 	@RequestMapping(value = "/getThreeTempCheckList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
580
-	@ApiOperation(value="根据单位查找单位下的所有仓房信息(统一对外接口)", notes = "根据单位查找单位下的所有仓房信息(统一对外接口)")
580
+	@ApiOperation(value="三温检查仓房", notes = "查询三温检查列表最新数据所对应的仓房")
581
 	@ApiImplicitParams({
581
 	@ApiImplicitParams({
582
-		@ApiImplicitParam(name = "orgId", value = "粮库ID", paramType = "query")
582
+			@ApiImplicitParam(name = "orgId", value = "粮库ID", paramType = "query")
583
 	})
583
 	})
584
 	public Map<String, Object> getThreeTempCheckList(Integer orgId) throws Exception {
584
 	public Map<String, Object> getThreeTempCheckList(Integer orgId) throws Exception {
585
 		Map<String, Object> map = null;
585
 		Map<String, Object> map = null;

+ 11 - 8
src/main/java/com/chinaitop/depot/basic/mapper/BasicStorehouseMapper.xml

@@ -1,5 +1,5 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.chinaitop.depot.basic.mapper.BasicStorehouseMapper">
3
 <mapper namespace="com.chinaitop.depot.basic.mapper.BasicStorehouseMapper">
4
   <resultMap id="BaseResultMap" type="com.chinaitop.depot.basic.model.BasicStorehouse">
4
   <resultMap id="BaseResultMap" type="com.chinaitop.depot.basic.model.BasicStorehouse">
5
     <id column="storehouse_id" jdbcType="INTEGER" property="storehouseId" />
5
     <id column="storehouse_id" jdbcType="INTEGER" property="storehouseId" />
@@ -153,7 +153,7 @@
153
     </if>
153
     </if>
154
   </select>
154
   </select>
155
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
155
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
156
-    select 
156
+    select
157
     <include refid="Base_Column_List" />
157
     <include refid="Base_Column_List" />
158
     from basic_storehouse
158
     from basic_storehouse
159
     where storehouse_id = #{storehouseId,jdbcType=INTEGER}
159
     where storehouse_id = #{storehouseId,jdbcType=INTEGER}
@@ -1165,14 +1165,17 @@
1165
       INSERT INTO basic_storehouse (createDate, del_flag, uuid, depot_id, depot_name, storehouse_code, storehouse_name, storehouse_type) VALUES
1165
       INSERT INTO basic_storehouse (createDate, del_flag, uuid, depot_id, depot_name, storehouse_code, storehouse_name, storehouse_type) VALUES
1166
 		${sql}
1166
 		${sql}
1167
   </insert>
1167
   </insert>
1168
-  
1168
+
1169
   <select id="getThreeTempCheckList" parameterType="java.util.Map" resultMap="BaseResultMap">
1169
   <select id="getThreeTempCheckList" parameterType="java.util.Map" resultMap="BaseResultMap">
1170
-    select DISTINCT storehouse_id
1170
+    select DISTINCT storehouse.storehouse_id,storehouse.storehouse_name
1171
     from basic_storehouse storehouse
1171
     from basic_storehouse storehouse
1172
-    inner join t_testdata testdata on testdata.org_id = storehouse.org_id and testdata.storehouse = storehouse.storehouse_code
1172
+    LEFT JOIN basic_warehouse warehouse ON warehouse.storehouse_id = storehouse.storehouse_id
1173
     <where>
1173
     <where>
1174
+      warehouse.crk_status = 1
1175
+      OR warehouse.crk_status = 3
1176
+      OR warehouse.crk_status = 9
1174
       <if test="orgId != null">
1177
       <if test="orgId != null">
1175
-      	storehouse.org_id = #{orgId}
1178
+        AND storehouse.org_id = #{orgId}
1176
       </if>
1179
       </if>
1177
       <if test="libraryType != null">
1180
       <if test="libraryType != null">
1178
         AND storehouse.library_type = #{libraryType}
1181
         AND storehouse.library_type = #{libraryType}
@@ -1180,7 +1183,7 @@
1180
       <if test="delFlag != null">
1183
       <if test="delFlag != null">
1181
         AND storehouse.del_flag = #{delFlag}
1184
         AND storehouse.del_flag = #{delFlag}
1182
       </if>
1185
       </if>
1183
-    </where> 
1186
+    </where>
1184
   </select>
1187
   </select>
1185
   <select id="getAgentDepotId" parameterType="java.util.Map" resultType="java.util.Map">
1188
   <select id="getAgentDepotId" parameterType="java.util.Map" resultType="java.util.Map">
1186
     SELECT id
1189
     SELECT id