fanxw 1 年之前
父节点
当前提交
8cb5cfcfda

+ 16 - 0
src/main/java/com/chinaitop/depot/basic/controller/BasicWarehouseController.java

@@ -451,4 +451,20 @@ public class BasicWarehouseController {
451 451
 		return map;
452 452
 	}
453 453
 
454
+	@RequestMapping(value="/getCrkStatusList", method=RequestMethod.GET)
455
+	@ApiOperation(value="按条件查询某种货位状态的数据", notes = "")
456
+	@ApiImplicitParams({
457
+		@ApiImplicitParam(name = "lylx", value = "粮油类型(0:原粮,1:成品粮)", required=true, paramType = "query"),
458
+		@ApiImplicitParam(name = "crkStatus", value = "货位状态值1空仓,2入库中,3封仓,4出库中", required=true, paramType = "query"),
459
+		@ApiImplicitParam(name = "orgId", value = "库ID", required=true, paramType = "query")
460
+	})
461
+	public List<BasicWarehouse> getCrkStatusList(String lylx, String crkStatus, Integer orgId) {
462
+		List<BasicWarehouse> list = null;
463
+		try {
464
+			list = basicWarehouseService.getCrkStatusList(lylx, crkStatus, orgId);
465
+		} catch (Exception e) {
466
+			e.printStackTrace();
467
+		}
468
+		return list;
469
+	}
454 470
 }

+ 7 - 0
src/main/java/com/chinaitop/depot/basic/mapper/BasicWarehouseMapper.java

@@ -76,4 +76,11 @@ public interface BasicWarehouseMapper {
76 76
 	 * @return
77 77
 	 */
78 78
 	List<Map<String, Object>> selectWareAndTank(Map<String, Object> param);
79
+
80
+	/**
81
+	 * 按条件查询某种货位状态的数据
82
+	 * @param ware
83
+	 * @return
84
+	 */
85
+	List<BasicWarehouse> getCrkStatusList(BasicWarehouse ware);
79 86
 }

+ 22 - 0
src/main/java/com/chinaitop/depot/basic/mapper/BasicWarehouseMapper.xml

@@ -726,4 +726,26 @@
726 726
       and #{zhywsj} > check_time
727 727
     </if>
728 728
   </update>
729
+  <select id="getCrkStatusList" parameterType="com.chinaitop.depot.basic.model.BasicWarehouseExample" resultMap="BaseResultMap">
730
+    select 
731
+		b.storehouse_name depot_name,
732
+		a.warehouse_name,
733
+		a.crk_status
734
+	from basic_warehouse a 
735
+	left join basic_storehouse b on b.storehouse_id=a.storehouse_id
736
+	where 1=1 and a.del_flag=1
737
+	and a.org_id=#{orgId,jdbcType=INTEGER}
738
+	and a.lylx=#{lylx,jdbcType=VARCHAR}
739
+	and a.crk_status=#{crkStatus,jdbcType=VARCHAR}
740
+	union all 
741
+	select 
742
+		a.storagetank_Name depot_name,
743
+		a.storagetank_Name warehouse_name,
744
+		a.crk_status
745
+	from basic_tank a 
746
+	where 1=1 and a.del_flag=1
747
+	and a.org_id=#{orgId,jdbcType=INTEGER}
748
+	and a.lylx=#{lylx,jdbcType=VARCHAR}
749
+	and a.crk_status=#{crkStatus,jdbcType=VARCHAR}
750
+  </select>
729 751
 </mapper>

+ 9 - 0
src/main/java/com/chinaitop/depot/basic/service/BasicWarehouseService.java

@@ -105,4 +105,13 @@ public interface BasicWarehouseService {
105 105
 	 * @return
106 106
 	 */
107 107
 	Map<String, Object> getWareOrTank(String sptDataId) throws Exception;
108
+
109
+	/**
110
+	 * 按条件查询某种货位状态的数据
111
+	 * @param lylx 粮油类型(0:原粮,1:成品粮)
112
+	 * @param crkStatus 货位状态值1空仓,2入库中,3封仓,4出库中
113
+	 * @param orgId 库ID
114
+	 * @return
115
+	 */
116
+	List<BasicWarehouse> getCrkStatusList(String lylx, String crkStatus, Integer orgId);
108 117
 }

+ 10 - 0
src/main/java/com/chinaitop/depot/basic/service/impl/BasicWarehouseServiceImpl.java

@@ -368,4 +368,14 @@ public class BasicWarehouseServiceImpl implements BasicWarehouseService {
368 368
 		return map;
369 369
 	}
370 370
 
371
+	@Override
372
+	public List<BasicWarehouse> getCrkStatusList(String lylx, String crkStatus, Integer orgId) {
373
+		BasicWarehouse ware = new BasicWarehouse();
374
+		ware.setLylx(lylx);
375
+		ware.setCrkStatus(crkStatus);
376
+		ware.setOrgId(orgId);
377
+		List<BasicWarehouse> list = warehouseMapper.getCrkStatusList(ware);
378
+		return list;
379
+	}
380
+
371 381
 }