fanxw пре 1 година
родитељ
комит
82d7c2d85f

+ 6 - 4
src/main/java/com/chinaitop/depot/keeperAccount/controller/StorageFcbgzController.java

@@ -108,17 +108,19 @@ public class StorageFcbgzController {
108 108
 	@RequestMapping(value="/selectCrkDetail", method = RequestMethod.GET)
109 109
 	@ApiOperation(value="查询保管明细账", notes = "分仓保管账查询明细")
110 110
 	@ApiImplicitParams({
111
-    	@ApiImplicitParam(name="hwh", value="货位ID", required=true, paramType="query"),
111
+		@ApiImplicitParam(name="ch", value="仓房ID", required=true, paramType="query"),
112
+		@ApiImplicitParam(name="hwh", value="货位ID", required=true, paramType="query"),
112 113
     	@ApiImplicitParam(name="lsxz", value="粮食性质ID", required=true, paramType="query"),
113 114
     	@ApiImplicitParam(name="mxpz", value="明细品种ID", required=true, paramType="query"),
114 115
     	@ApiImplicitParam(name="jzpz", value="记账凭证", required=true, paramType="query"),
115 116
     	@ApiImplicitParam(name="jzzy", value="摘要", required=true, paramType="query"),
116
-    	@ApiImplicitParam(name="jzrq", value="记账日期", required=true, paramType="query")
117
+    	@ApiImplicitParam(name="jzrq", value="记账日期", required=true, paramType="query"),
118
+    	@ApiImplicitParam(name="crklx", value="出入库类型(0:入库,1:出库)", required=true, paramType="query")
117 119
     })
118
-	public List<Map<String, Object>> selectCrkDetail(Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy, String jzrq) {
120
+	public List<Map<String, Object>> selectCrkDetail(Integer ch, Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy, String jzrq, String crklx) {
119 121
 		List<Map<String, Object>> list = null;
120 122
 		try {
121
-			list = storageFcbgzService.selectCrkDetail(hwh, lsxz, mxpz, jzpz, jzzy, jzrq);
123
+			list = storageFcbgzService.selectCrkDetail(ch, hwh, lsxz, mxpz, jzpz, jzzy, jzrq, crklx);
122 124
 		} catch (Exception e) {
123 125
 			logger.error(e.getMessage(), e);
124 126
 		}

+ 7 - 0
src/main/java/com/chinaitop/depot/keeperAccount/mapper/StorageFcbgzMapper.xml

@@ -748,11 +748,18 @@
748 748
 	left join lsreport_ts:data_kcgl_kcbd_default c on c.dataid=a.dataid
749 749
 	left join lsreport_ts:data_kcgl_kcbd_default d on d.dataid=reverse(b.dataid)
750 750
 	where 1=1
751
+	and a.sjcf=#{ch,jdbcType=VARCHAR}
751 752
 	and a.sjhw=#{hwh,jdbcType=VARCHAR}
752 753
 	and a.hwxz=#{lsxz,jdbcType=VARCHAR}
753 754
 	and a.mxpz=#{mxpz,jdbcType=VARCHAR}
754 755
 	and b.rq between #{starttime,jdbcType=VARCHAR} and #{endtime,jdbcType=VARCHAR}
755 756
 	and ${wer}
757
+	<if test="crklx==0">
758
+	and b.srsl > 0
759
+	</if>
760
+	<if test="crklx==1">
761
+	and b.zcsl > 0
762
+	</if>
756 763
 	order by b.rq
757 764
   </select>
758 765
 

+ 4 - 2
src/main/java/com/chinaitop/depot/keeperAccount/service/StorageFcbgzService.java

@@ -51,17 +51,19 @@ public interface StorageFcbgzService {
51 51
 
52 52
 	/**
53 53
 	 * 查询保管账明细数据
54
+	 * @param ch 仓房号
54 55
 	 * @param hwh 货位号
55 56
 	 * @param lsxz 粮食性质
56 57
 	 * @param mxpz 明细品种
57 58
 	 * @param jzpz 记账凭账
58 59
 	 * @param jzzy 记账摘要
59 60
 	 * @param jzrq 记账rq
61
+	 * @param crklx 出入库类型(0:入库,1:出库)
60 62
 	 * @return
61 63
 	 * @throws Exception
62 64
 	 */
63
-	List<Map<String, Object>> selectCrkDetail(Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy,
64
-			String jzrq) throws Exception;
65
+	List<Map<String, Object>> selectCrkDetail(Integer ch, Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy,
66
+			String jzrq, String crklx) throws Exception;
65 67
 
66 68
 	/**
67 69
 	 * 导出一个货位的分仓保管账报表数据

+ 1 - 0
src/main/java/com/chinaitop/depot/keeperAccount/service/impl/FcbgzUtilsServiceImpl.java

@@ -61,6 +61,7 @@ public class FcbgzUtilsServiceImpl {
61 61
 		criteria.andDataTypeEqualTo(dataType);//数据类型
62 62
 		criteria.andLyxzEqualTo(f.getLyxz());//粮食性质
63 63
 		criteria.andYwlxEqualTo(f.getYwlx());//业务类型
64
+		criteria.andJzndEqualTo(f.getJznd());//业务类型
64 65
 		criteria.andYlorcplEqualTo(f.getYlorcpl());
65 66
 
66 67
 		if (StorageFcbgzUtils.DATA_TYPE_1.equals(dataType)) {//月合计

+ 5 - 3
src/main/java/com/chinaitop/depot/keeperAccount/service/impl/StorageFcbgzServiceImpl.java

@@ -233,8 +233,8 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
233 233
 	}
234 234
 
235 235
 	@Override
236
-	public List<Map<String, Object>> selectCrkDetail(Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy,
237
-			String jzrq) throws Exception {
236
+	public List<Map<String, Object>> selectCrkDetail(Integer ch, Integer hwh, Integer lsxz, Integer mxpz, String jzpz, String jzzy,
237
+			String jzrq, String crklx) throws Exception {
238 238
 		Map<String, Object> map = new HashMap<>();
239 239
 		Integer ywlx = null;
240 240
 		if ("轮换入库".equals(jzzy) || "轮换出库".equals(jzzy) || "出库".equals(jzzy) || "入库".equals(jzzy)) {
@@ -252,10 +252,12 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
252 252
 		if ("期初库存".equals(jzzy)) {
253 253
 			ywlx = 5;
254 254
 		}
255
+		map.put("ch", ch);
255 256
 		map.put("hwh", hwh);
256 257
 		map.put("lsxz", lsxz);
257 258
 		map.put("mxpz", mxpz);
258 259
 		map.put("jzpz", jzpz);
260
+		map.put("crklx", crklx);
259 261
 		map.put("starttime", jzrq+" 00:00:00");
260 262
 		map.put("endtime", jzrq+" 23:59:59");
261 263
 		switch(ywlx) {
@@ -480,7 +482,7 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
480 482
 				if ("0".equals(f.getDataType())) {//普通数据
481 483
 					HSSFCell hssfCell0 = hssfRow.createCell(0);
482 484
 					hssfCell0.setCellStyle(titleStyle);
483
-					hssfCell0.setCellValue(f.getJzrq());
485
+					hssfCell0.setCellValue(ParameterUtil.date2string1(f.getJzrq()));
484 486
 					HSSFCell hssfCell1 = hssfRow.createCell(1);
485 487
 					hssfCell1.setCellStyle(titleStyle);
486 488
 					hssfCell1.setCellValue(f.getJzpz());