gaodd hai 1 ano
pai
achega
f9b22d6351

+ 43 - 0
src/main/java/com/chinaitop/depot/business/controller/BusinessDeliveryStorageNoticeController.java

@@ -822,4 +822,47 @@ public class BusinessDeliveryStorageNoticeController {
822 822
         }
823 823
         return modelMap;
824 824
     }
825
+    
826
+    /**
827
+     * 新--通知单选择计划
828
+     */
829
+    @RequestMapping(value="/getJhList", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
830
+	@ApiOperation(value="*计划列表", notes = "查询数据列表,支持分页")
831
+	@ApiImplicitParams({
832
+		@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
833
+		@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
834
+		@ApiImplicitParam(name = "planType", value = "计划类型/1: 粮食2: 油料", paramType = "query"),
835
+		@ApiImplicitParam(name = "orgId", value = "单位id", paramType = "query"),
836
+		@ApiImplicitParam(name = "inOurOut", value = "出库1/入库2", paramType = "query")
837
+	})
838
+    public PageInfo<Map<String,Object>> getJhList(Integer pageNum, Integer pageSize,Integer inOurOut,Integer planType,
839
+            Integer orgId) {
840
+    	
841
+    	List<Map<String,Object>> list = deliveryStorageNoticeService.getJhList(pageNum,pageSize,inOurOut,planType,orgId);
842
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(list);
843
+        
844
+        return pageInfo;
845
+    }
846
+    
847
+    /**
848
+     * 
849
+     * @param pageNum
850
+     * @param pageSize
851
+     * @param inOurOut
852
+     * @param planType
853
+     * @param orgId
854
+     * @return
855
+     */
856
+    @RequestMapping(value="/getJhMxList", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
857
+	@ApiOperation(value="*计划明细列表", notes = "查询数据列表,支持分页")
858
+	@ApiImplicitParams({
859
+		@ApiImplicitParam(name = "jhId", value = "计划id", paramType = "query"),
860
+		@ApiImplicitParam(name = "orgId", value = "单位id", paramType = "query"),
861
+		@ApiImplicitParam(name = "inOurOut", value = "出库1/入库2", paramType = "query")
862
+	})
863
+    public List<Map<String,Object>> getJhMxList(Integer jhId, Integer inOurOut,Integer orgId) {
864
+            
865
+        return deliveryStorageNoticeService.getJhMxList(jhId,inOurOut,orgId);
866
+    }
867
+    
825 868
 }

+ 4 - 0
src/main/java/com/chinaitop/depot/business/mapper/BusinessDeliveryStorageNoticeMapper.java

@@ -124,4 +124,8 @@ public interface BusinessDeliveryStorageNoticeMapper {
124 124
     List<Map<String,Object>> uploadNoticeData(Map<String,Object> map);
125 125
 
126 126
 	List<Map<String, Object>> getNoticeData(Map<String, Object> mapCondition);
127
+
128
+	List<Map<String, Object>> getJhList(Map<String, Object> map);
129
+
130
+	List<Map<String, Object>> getJhMxList(Map<String, Object> map);
127 131
 }

+ 36 - 0
src/main/java/com/chinaitop/depot/business/mapper/BusinessDeliveryStorageNoticeMapper.xml

@@ -1243,4 +1243,40 @@
1243 1243
   	select id from business_customer where name = #{deliveryCustomer} and 
1244 1244
   	identification = #{identification} and org_id = #{orgId}
1245 1245
   </select>
1246
+  
1247
+  <select id="getJhList" parameterType="java.util.Map" resultType="java.util.Map">
1248
+  		SELECT
1249
+			b.id,
1250
+			b.unit_info_id,
1251
+			b.plan_name,
1252
+			b.rotation_year,
1253
+			b.plan_type,
1254
+			b.plan_year,
1255
+			a.plan_number,
1256
+			a.start_date,
1257
+			a.end_date,
1258
+			a.create_time
1259
+		FROM
1260
+				province_all.biz_rp_issuance a 
1261
+		LEFT JOIN depot_qh.business_rp_report b on a.rp_report_id  = b.id
1262
+		left join depot_qh.org_info c on  b.unit_info_id = c.unit_info_id
1263
+		where c.org_id= #{orgId} and b.plan_type = #{planType}
1264
+  </select>
1265
+  
1266
+  <select id="getJhMxList" parameterType="java.util.Map" resultType="java.util.Map">
1267
+  		SELECT
1268
+			*
1269
+		FROM
1270
+			<if test="inOurOut != null">
1271
+				<if test="inOurOut == 1">
1272
+					business_rp_outbound
1273
+			    </if>
1274
+			    <if test="inOurOut == 2">
1275
+					business_rp_inbound
1276
+			    </if>
1277
+			</if>
1278
+		WHERE
1279
+			org_id = #{orgId}
1280
+		AND rp_report_id = #{jhId} 
1281
+  </select>
1246 1282
 </mapper>

+ 5 - 18
src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.xml

@@ -29,7 +29,7 @@
29 29
     <result column="out_detail_total_price" property="outDetailTotalPrice" jdbcType="VARCHAR" />
30 30
     <result column="out_remaining_number" property="outRemainingNumber" jdbcType="VARCHAR" />
31 31
     <result column="jstzd_id" property="jstzdId" jdbcType="VARCHAR" />
32
-    <result column="agreement_number" property="agreementNumber" jdbcType="VARCHAR" />
32
+    <!-- <result column="agreement_number" property="agreementNumber" jdbcType="VARCHAR" /> -->
33 33
     <result column="incoming_type" property="incomingType" jdbcType="INTEGER" />
34 34
     <result column="htbh" property="htbh" jdbcType="VARCHAR" />
35 35
   </resultMap>
@@ -95,7 +95,7 @@
95 95
     id, zid, type, house_id, house_name, warehouse_id, warehouse_name, create_time, org_id, 
96 96
     grain_kind, grain_detail_kind, grain_grade, grain_attribute, grain_annual, grain_producing_area, 
97 97
     in_price, in_count, in_detail_total_price, input_time, state, productive_year, remaining_number, 
98
-    out_price, out_count, out_detail_total_price, out_remaining_number,jstzd_id,agreement_number,incoming_type,htbh
98
+    out_price, out_count, out_detail_total_price, out_remaining_number,jstzd_id,incoming_type,htbh
99 99
   </sql>
100 100
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
101 101
     select
@@ -136,7 +136,7 @@
136 136
       in_price, in_count, in_detail_total_price, 
137 137
       input_time, state, productive_year, 
138 138
       remaining_number, out_price, out_count, 
139
-      out_detail_total_price, out_remaining_number,jstzd_id,agreement_number,incoming_type,htbh
139
+      out_detail_total_price, out_remaining_number,jstzd_id,incoming_type,htbh
140 140
       )
141 141
     values (#{id,jdbcType=INTEGER}, #{zid,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
142 142
       #{houseId,jdbcType=INTEGER}, #{houseName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=INTEGER}, 
@@ -147,7 +147,7 @@
147 147
       #{inputTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{productiveYear,jdbcType=INTEGER}, 
148 148
       #{remainingNumber,jdbcType=VARCHAR}, #{outPrice,jdbcType=VARCHAR}, #{outCount,jdbcType=VARCHAR}, 
149 149
       #{outDetailTotalPrice,jdbcType=VARCHAR}, #{outRemainingNumber,jdbcType=VARCHAR},#{jstzdId,jdbcType=VARCHAR}
150
-      ,#{agreementNumber,jdbcType=VARCHAR},#{incomingType,jdbcType=INTEGER},#{htbh,jdbcType=VARCHAR})
150
+      ,#{incomingType,jdbcType=INTEGER},#{htbh,jdbcType=VARCHAR})
151 151
   </insert>
152 152
   <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
153 153
     insert into business_store_ware_detail
@@ -233,9 +233,6 @@
233 233
       <if test="jstzdId != null" >
234 234
         jstzd_id,
235 235
       </if>
236
-      <if test="agreementNumber != null" >
237
-        agreement_number,
238
-      </if>
239 236
       <if test="incomingType != null" >
240 237
         incoming_type,
241 238
       </if>
@@ -325,9 +322,6 @@
325 322
       <if test="jstzdId != null" >
326 323
         #{jstzdId,jdbcType=VARCHAR},
327 324
       </if>
328
-      <if test="agreementNumber  != null" >
329
-        #{agreementNumber,jdbcType=VARCHAR},
330
-      </if>
331 325
       <if test="incomingType != null" >
332 326
         #{incomingType,jdbcType=INTEGER},
333 327
       </if>
@@ -426,9 +420,6 @@
426 420
       <if test="record.jstzdId != null" >
427 421
         jstzd_id = #{record.jstzdId,jdbcType=VARCHAR},
428 422
       </if>
429
-      <if test="record.agreementNumber!= null" >
430
-        agreement_number = #{record.agreementNumber ,jdbcType=VARCHAR},
431
-      </if>
432 423
       <if test="record.incomingType != null" >
433 424
         incoming_type = #{record.incomingType,jdbcType=INTEGER},
434 425
       </if>
@@ -468,7 +459,7 @@
468 459
       out_count = #{record.outCount,jdbcType=VARCHAR},
469 460
       out_detail_total_price = #{record.outDetailTotalPrice,jdbcType=VARCHAR},
470 461
       out_remaining_number = #{record.outRemainingNumber,jdbcType=VARCHAR},
471
-      jstzd_id = #{record.jstzdId,jdbcType=VARCHAR},agreement_number = #{record.agreementNumber,jdbcType=VARCHAR},
462
+      jstzd_id = #{record.jstzdId,jdbcType=VARCHAR},
472 463
       incoming_type = #{record.incomingType,jdbcType=INTEGER},
473 464
       htbh = #{record.htbh,jdbcType=VARCHAR}
474 465
     <if test="_parameter != null" >
@@ -556,9 +547,6 @@
556 547
       <if test="jstzdId != null" >
557 548
         jstzd_id = #{jstzdId,jdbcType=VARCHAR},
558 549
       </if>
559
-      <if test="agreementNumber  != null" >
560
-        agreement_number = #{agreementNumber,jdbcType=VARCHAR},
561
-      </if>
562 550
       <if test="incomingType != null" >
563 551
         incoming_type = #{incomingType,jdbcType=INTEGER},
564 552
       </if>
@@ -596,7 +584,6 @@
596 584
       out_detail_total_price = #{outDetailTotalPrice,jdbcType=VARCHAR},
597 585
       out_remaining_number = #{outRemainingNumber,jdbcType=VARCHAR},
598 586
       jstzd_id = #{jstzdId,jdbcType=VARCHAR},
599
-      agreement_number = #{agreementNumber,jdbcType=VARCHAR},
600 587
       incoming_type = #{incomingType,jdbcType=INTEGER},
601 588
       htbh = #{htbh,jdbcType=VARCHAR}
602 589
     where id = #{id,jdbcType=INTEGER}

+ 3 - 3
src/main/java/com/chinaitop/depot/business/model/BusinessStoreWareDetail.java

@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
6 6
 
7 7
 public class BusinessStoreWareDetail {
8 8
 	
9
-	private String agreementNumber;//协议编号
9
+	//private String agreementNumber;//协议编号
10 10
 	private Integer incomingType;//入库类型
11 11
 	private String htbh;//合同编号
12 12
 
@@ -18,13 +18,13 @@ public class BusinessStoreWareDetail {
18 18
 		this.incomingType = incomingType;
19 19
 	}
20 20
 
21
-	public String getAgreementNumber() {
21
+	/*public String getAgreementNumber() {
22 22
 	    return agreementNumber;
23 23
 	}
24 24
 
25 25
 	public void setAgreementNumber(String agreementNumber) {
26 26
 		this.agreementNumber = agreementNumber;
27
-	}
27
+	}*/
28 28
 
29 29
     private Integer id;
30 30
 

+ 5 - 0
src/main/java/com/chinaitop/depot/business/service/BusinessDeliveryStorageNoticeService.java

@@ -125,4 +125,9 @@ public interface BusinessDeliveryStorageNoticeService {
125 125
 	List<BusinessDeliveryStorageNotice> queryNoticeChangeList(Integer userId, Integer pageNum, Integer pageSize);
126 126
 
127 127
 	List<BusinessDeliveryStorageNotice> getChangeDetailList(Integer id, String type);
128
+
129
+	List<Map<String, Object>> getJhList(Integer pageNum, Integer pageSize, Integer inOurOut, Integer planType,
130
+			Integer orgId);
131
+
132
+	List<Map<String, Object>> getJhMxList(Integer jhId, Integer inOurOut,Integer orgId);
128 133
 }

+ 30 - 0
src/main/java/com/chinaitop/depot/business/service/impl/BusinessDeliveryStorageNoticeServiceImpl.java

@@ -1472,5 +1472,35 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
1472 1472
         return null;
1473 1473
 	}
1474 1474
 
1475
+
1476
+	@Override
1477
+	public List<Map<String, Object>> getJhList(Integer pageNum, Integer pageSize, Integer inOurOut, Integer planType,
1478
+			Integer orgId) {
1479
+		// TODO Auto-generated method stub
1480
+		
1481
+		if(pageNum!=null && pageSize!=null){
1482
+            PageHelper.startPage(pageNum, pageSize);
1483
+        }
1484
+		
1485
+		Map<String,Object> map = new HashMap<String,Object>();
1486
+		map.put("inOurOut", inOurOut);
1487
+		map.put("planType", planType);
1488
+		map.put("orgId", orgId);
1489
+
1490
+		return businessDeliveryStorageNoticeMapper.getJhList(map);
1491
+	}
1492
+
1493
+
1494
+	@Override
1495
+	public List<Map<String, Object>> getJhMxList(Integer jhId, Integer inOurOut,Integer orgId) {
1496
+		// TODO Auto-generated method stub
1497
+		Map<String,Object> map = new HashMap<String,Object>();
1498
+		map.put("jhId", jhId);
1499
+		map.put("inOurOut", inOurOut);
1500
+		map.put("orgId", orgId);
1501
+
1502
+		return businessDeliveryStorageNoticeMapper.getJhMxList(map);
1503
+	}
1504
+
1475 1505
     
1476 1506
 }