fanxw hai 11 meses
pai
achega
2e82bea958

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

@@ -75,12 +75,13 @@ public class StorageFcbgzController {
75 75
     	@ApiImplicitParam(name="ch", value="仓房ID", paramType="query"),
76 76
     	@ApiImplicitParam(name="hwh", value="货位ID", paramType="query"),
77 77
     	@ApiImplicitParam(name="lsxz", value="粮食性质ID", paramType="query"),
78
-    	@ApiImplicitParam(name="jznd", value="记账年度", paramType="query")
78
+    	@ApiImplicitParam(name="jznd", value="记账年度", paramType="query"),
79
+    	@ApiImplicitParam(name="ylorcpl", value="原粮或者成品粮(0:原粮,1:成品粮)", paramType="query")
79 80
     })
80
-	public Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd) {
81
+	public Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd, String ylorcpl) {
81 82
 		Map<String, Object> map = new HashMap<>();
82 83
 		try {
83
-			map = storageFcbgzService.queryJzList(ch, hwh, lsxz, jznd);
84
+			map = storageFcbgzService.queryJzList(ch, hwh, lsxz, jznd, ylorcpl);
84 85
 		} catch (Exception e) {
85 86
 			logger.error(e.getMessage(), e);
86 87
 		}
@@ -136,12 +137,13 @@ public class StorageFcbgzController {
136 137
 			@ApiImplicitParam(name = "lsxz", value = "粮食性质", required=true, paramType = "query"),
137 138
 			@ApiImplicitParam(name = "jznd", value = "记账年度", required=true, paramType = "query"),
138 139
 			@ApiImplicitParam(name = "orgName", value = "粮库名称", required=true, paramType = "query"),
139
-			@ApiImplicitParam(name = "cfhwmc", value = "仓房货位名称", required=true, paramType = "query")
140
+			@ApiImplicitParam(name = "cfhwmc", value = "仓房货位名称", required=true, paramType = "query"),
141
+			@ApiImplicitParam(name="ylorcpl", value="原粮或者成品粮(0:原粮,1:成品粮)", paramType="query")
140 142
 	})
141 143
 	public void  exportFcbgz(HttpServletResponse response,HttpServletRequest request,
142
-										 Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc){
144
+										 Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc, String ylorcpl){
143 145
 		try {
144
-			HSSFWorkbook workbook = storageFcbgzService.exportFcbgz(ch, hwh, lsxz, jznd, orgName, cfhwmc);
146
+			HSSFWorkbook workbook = storageFcbgzService.exportFcbgz(ch, hwh, lsxz, jznd, orgName, cfhwmc, ylorcpl);
145 147
 			String fileName = "分仓保管账报表";
146 148
 			// 获取输出流
147 149
 			OutputStream os = response.getOutputStream();

+ 24 - 5
src/main/java/com/chinaitop/depot/keeperAccount/mapper/StorageBgzzMapper.xml

@@ -27,6 +27,7 @@
27 27
     <result column="ywlx" jdbcType="VARCHAR" property="ywlx" />
28 28
     <result column="cjsj" jdbcType="TIMESTAMP" property="cjsj" />
29 29
     <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
30
+    <result column="ylorcpl" jdbcType="VARCHAR" property="ylorcpl" />
30 31
   </resultMap>
31 32
   <sql id="Example_Where_Clause">
32 33
     <where>
@@ -89,7 +90,7 @@
89 90
   <sql id="Base_Column_List">
90 91
     id, org_id, jznd, jzyf, jzzy, lyxz, xm_zcsl, xm_srsl, xm_kcsl, dg_zcsl, dg_srsl, 
91 92
     dg_kcsl, ddyy_zcsl, ddyy_srsl, ddyy_kcsl, xj, jzr, jzsj, shr, shsj, data_status, 
92
-    data_type, ywlx, cjsj, updatetime
93
+    data_type, ywlx, cjsj, updatetime, ylorcpl
93 94
   </sql>
94 95
   <select id="selectByExample" parameterType="com.chinaitop.depot.keeperAccount.model.StorageBgzzExample" resultMap="BaseResultMap">
95 96
     select
@@ -129,7 +130,7 @@
129 130
       ddyy_srsl, ddyy_kcsl, xj, 
130 131
       jzr, jzsj, shr, shsj, 
131 132
       data_status, data_type, ywlx, 
132
-      cjsj, updatetime)
133
+      cjsj, updatetime, ylorcpl)
133 134
     values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{jznd,jdbcType=VARCHAR}, 
134 135
       #{jzyf,jdbcType=VARCHAR}, #{jzzy,jdbcType=VARCHAR}, #{lyxz,jdbcType=INTEGER}, #{xmZcsl,jdbcType=DECIMAL}, 
135 136
       #{xmSrsl,jdbcType=DECIMAL}, #{xmKcsl,jdbcType=DECIMAL}, #{dgZcsl,jdbcType=DECIMAL}, 
@@ -137,7 +138,7 @@
137 138
       #{ddyySrsl,jdbcType=DECIMAL}, #{ddyyKcsl,jdbcType=DECIMAL}, #{xj,jdbcType=DECIMAL}, 
138 139
       #{jzr,jdbcType=VARCHAR}, #{jzsj,jdbcType=TIMESTAMP}, #{shr,jdbcType=VARCHAR}, #{shsj,jdbcType=TIMESTAMP}, 
139 140
       #{dataStatus,jdbcType=VARCHAR}, #{dataType,jdbcType=VARCHAR}, #{ywlx,jdbcType=VARCHAR}, 
140
-      #{cjsj,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP})
141
+      #{cjsj,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, #{ylorcpl,jdbcType=VARCHAR})
141 142
   </insert>
142 143
   <insert id="insertSelective" parameterType="com.chinaitop.depot.keeperAccount.model.StorageBgzz">
143 144
     insert into storage_bgzz
@@ -217,6 +218,9 @@
217 218
       <if test="updatetime != null">
218 219
         updatetime,
219 220
       </if>
221
+      <if test="ylorcpl != null">
222
+        ylorcpl,
223
+      </if>
220 224
     </trim>
221 225
     <trim prefix="values (" suffix=")" suffixOverrides=",">
222 226
       <if test="id != null">
@@ -294,6 +298,9 @@
294 298
       <if test="updatetime != null">
295 299
         #{updatetime,jdbcType=TIMESTAMP},
296 300
       </if>
301
+      <if test="ylorcpl != null">
302
+        #{ylorcpl,jdbcType=VARCHAR},
303
+      </if>
297 304
     </trim>
298 305
   </insert>
299 306
   <select id="countByExample" parameterType="com.chinaitop.depot.keeperAccount.model.StorageBgzzExample" resultType="java.lang.Integer">
@@ -380,6 +387,9 @@
380 387
       <if test="record.updatetime != null">
381 388
         updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
382 389
       </if>
390
+      <if test="record.ylorcpl != null">
391
+        ylorcpl = #{record.ylorcpl,jdbcType=VARCHAR},
392
+      </if>
383 393
     </set>
384 394
     <if test="_parameter != null">
385 395
       <include refid="Update_By_Example_Where_Clause" />
@@ -411,7 +421,8 @@
411 421
       data_type = #{record.dataType,jdbcType=VARCHAR},
412 422
       ywlx = #{record.ywlx,jdbcType=VARCHAR},
413 423
       cjsj = #{record.cjsj,jdbcType=TIMESTAMP},
414
-      updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
424
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
425
+      ylorcpl = #{record.ylorcpl,jdbcType=VARCHAR}
415 426
     <if test="_parameter != null">
416 427
       <include refid="Update_By_Example_Where_Clause" />
417 428
     </if>
@@ -491,6 +502,9 @@
491 502
       <if test="updatetime != null">
492 503
         updatetime = #{updatetime,jdbcType=TIMESTAMP},
493 504
       </if>
505
+      <if test="ylorcpl != null">
506
+        ylorcpl = #{ylorcpl,jdbcType=VARCHAR},
507
+      </if>
494 508
     </set>
495 509
     where id = #{id,jdbcType=VARCHAR}
496 510
   </update>
@@ -519,7 +533,8 @@
519 533
       data_type = #{dataType,jdbcType=VARCHAR},
520 534
       ywlx = #{ywlx,jdbcType=VARCHAR},
521 535
       cjsj = #{cjsj,jdbcType=TIMESTAMP},
522
-      updatetime = #{updatetime,jdbcType=TIMESTAMP}
536
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
537
+      ylorcpl = #{ylorcpl,jdbcType=VARCHAR}
523 538
     where id = #{id,jdbcType=VARCHAR}
524 539
   </update>
525 540
   <!-- 查询一种摘要在某个月的库存数量 -->
@@ -586,6 +601,7 @@
586 601
 	    and org_id=#{orgId,jdbcType=INTEGER}
587 602
 	    and lyxz=#{lyxz,jdbcType=INTEGER}
588 603
 	    and jznd=#{jznd,jdbcType=VARCHAR}
604
+	    and ylorcpl=#{ylorcpl,jdbcType=VARCHAR}
589 605
 	    group by org_id,jznd,lyxz
590 606
 	) a 
591 607
 	left join (
@@ -597,6 +613,7 @@
597 613
 	    and org_id=#{orgId,jdbcType=INTEGER}
598 614
 	    and lyxz=#{lyxz,jdbcType=INTEGER}
599 615
 	    and jznd=#{jznd,jdbcType=VARCHAR}
616
+	    and ylorcpl=#{ylorcpl,jdbcType=VARCHAR}
600 617
 	) b on b.jznd=a.jznd and b.org_id=a.org_id
601 618
 	left join (
602 619
 	    select 
@@ -606,6 +623,7 @@
606 623
 	    and org_id=#{orgId,jdbcType=INTEGER}
607 624
 	    and lyxz=#{lyxz,jdbcType=INTEGER}
608 625
 	    and jznd=#{jznd,jdbcType=VARCHAR}
626
+	    and ylorcpl=#{ylorcpl,jdbcType=VARCHAR}
609 627
 	) c on c.org_id=a.org_id and c.jznd=a.jznd
610 628
 	left join (
611 629
 	    select 
@@ -616,6 +634,7 @@
616 634
 	    and org_id=#{orgId,jdbcType=INTEGER}
617 635
 	    and lyxz=#{lyxz,jdbcType=INTEGER}
618 636
 	    and jznd=#{jznd,jdbcType=VARCHAR}
637
+	    and ylorcpl=#{ylorcpl,jdbcType=VARCHAR}
619 638
 	    group by org_id,jznd,lyxz
620 639
 	) d on d.org_id=a.org_id and d.jznd=a.jznd
621 640
   </select>

+ 3 - 0
src/main/java/com/chinaitop/depot/keeperAccount/model/StorageBgzz.java

@@ -93,4 +93,7 @@ public class StorageBgzz {
93 93
 	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
94 94
     private Date updatetime;
95 95
 
96
+	@ApiModelProperty(value = "原粮或成品粮(0:原粮,1:成品粮)")
97
+	private String ylorcpl;
98
+
96 99
 }

+ 5 - 0
src/main/java/com/chinaitop/depot/keeperAccount/model/StorageBgzzExample.java

@@ -1707,6 +1707,11 @@ public class StorageBgzzExample {
1707 1707
             addCriterion("updatetime not between", value1, value2, "updatetime");
1708 1708
             return (Criteria) this;
1709 1709
         }
1710
+
1711
+        public Criteria andYlorcplEqualTo(String value) {
1712
+        	addCriterion("ylorcpl =", value, "ylorcpl");
1713
+            return (Criteria) this;
1714
+        }
1710 1715
     }
1711 1716
 
1712 1717
     /**

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

@@ -48,10 +48,10 @@ public interface StorageFcbgzService {
48 48
 	 * @param hwh 货位ID
49 49
 	 * @param lsxz 粮食性质
50 50
 	 * @param jznd 记账年度
51
-	 * @param dataType 数据类型(0:普通账,1:合计账,2:结转账)
51
+	 * @param ylorcpl 原粮或成品粮(0:原粮,1:成品粮)
52 52
 	 * @return
53 53
 	 */
54
-	Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd) throws Exception;
54
+	Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd, String ylorcpl) throws Exception;
55 55
 
56 56
 	/**
57 57
 	 * 分仓保管账记账保存
@@ -84,10 +84,11 @@ public interface StorageFcbgzService {
84 84
 	 * @param jznd 记账年度
85 85
 	 * @param orgName 粮库名称
86 86
 	 * @param cfhwmc 仓房货位名称
87
+	 * @param ylorcpl 原粮或成品粮(0:原粮,1:成品粮)
87 88
 	 * @return
88 89
 	 * @throws Exception
89 90
 	 */
90
-	HSSFWorkbook exportFcbgz(Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc) throws Exception;
91
+	HSSFWorkbook exportFcbgz(Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc, String ylorcpl) throws Exception;
91 92
 
92 93
 	/**
93 94
 	 * 保管总账查询明细

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

@@ -24,6 +24,7 @@ public class BgzzUtilsServiceImpl {
24 24
 		criteria.andOrgIdEqualTo(Integer.parseInt(fcbgz.getOrgId()));
25 25
 		criteria.andDataTypeEqualTo(dataType);
26 26
 		criteria.andJzndEqualTo(fcbgz.getJznd());
27
+		criteria.andYlorcplEqualTo(fcbgz.getYlorcpl());
27 28
 		if ("0".equals(fcbgz.getJznd())) {
28 29
 			criteria.andJzyfEqualTo(fcbgz.getSjfm());
29 30
 		}

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

@@ -183,10 +183,11 @@ public class FcbgzUtilsServiceImpl {
183 183
 	 * @param jznd 记账年度
184 184
 	 * @param sjfm 数据说明
185 185
 	 * @param dataType
186
+	 * @param ylorcpl 原粮或成品粮(0:原粮,1:成品粮)
186 187
 	 * @return
187 188
 	 * @throws Exception
188 189
 	 */
189
-	public List<StorageFcbgz> getList(String order, Integer ch, Integer hwh, Integer lspz, Integer lsxz, String jznd, String sjfm, String dataType)  throws Exception {
190
+	public List<StorageFcbgz> getList(String order, Integer ch, Integer hwh, Integer lspz, Integer lsxz, String jznd, String sjfm, String dataType, String ylorcpl)  throws Exception {
190 191
 
191 192
 		StorageFcbgzExample example = new StorageFcbgzExample();
192 193
 		StorageFcbgzExample.Criteria criteria = example.createCriteria();
@@ -214,6 +215,9 @@ public class FcbgzUtilsServiceImpl {
214 215
 		if (StringUtils.isNotBlank(dataType)) {
215 216
 			criteria.andDataTypeEqualTo(dataType);
216 217
 		}
218
+		if (StringUtils.isNotBlank(ylorcpl)) {
219
+			criteria.andYlorcplEqualTo(ylorcpl);
220
+		}
217 221
 		List<StorageFcbgz> list = storageFcbgzMapper.selectByExample(example);
218 222
 
219 223
 		return list;

+ 7 - 3
src/main/java/com/chinaitop/depot/keeperAccount/service/impl/StorageBgzzServiceImpl.java

@@ -51,6 +51,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
51 51
 		criteria.andJzyfEqualTo(fcbgz.getSjfm());
52 52
 		criteria.andLyxzEqualTo(fcbgz.getLyxz());
53 53
 		criteria.andYwlxEqualTo(fcbgz.getYwlx());
54
+		criteria.andYlorcplEqualTo(fcbgz.getYlorcpl());
54 55
 		List<StorageBgzz> list = storageBgzzMapper.selectByExample(example);
55 56
 		StorageBgzz storageBgzz = null;
56 57
 		if (null != list && list.size() > 0) {//修改
@@ -70,6 +71,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
70 71
 		criteria.andYwlxEqualTo(fcbgz.getYwlx());
71 72
 		criteria.andJzzyEqualTo(fcbgz.getJzzy());
72 73
 		criteria.andOrgIdEqualTo(Integer.parseInt(fcbgz.getOrgId()));
74
+		criteria.andYlorcplEqualTo(fcbgz.getYlorcpl());
73 75
 		List<StorageBgzz> list = storageBgzzMapper.selectByExample(example);
74 76
 		StorageBgzz storageBgzz = null;
75 77
 		String lspz = fcbgz.getPz().toString();
@@ -77,7 +79,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
77 79
 			storageBgzz = list.get(0);
78 80
 			StorageBgzz hzz_storageBgzz = queryBgzzDataType1(fcbgz);//查询合计行的库存数量
79 81
 			//收入差=收入数量-支出数量
80
-			BigDecimal src = fcbgz.getSrsl().subtract(fcbgz.getZcsl()).setScale(3, BigDecimal.ROUND_DOWN);
82
+			//BigDecimal src = fcbgz.getSrsl().subtract(fcbgz.getZcsl()).setScale(3, BigDecimal.ROUND_DOWN);
81 83
 			if ("3164".equals(lspz)) {//小麦
82 84
 				BigDecimal srsl = fcbgz.getSrsl().add(storageBgzz.getXmSrsl()).setScale(3, BigDecimal.ROUND_DOWN);
83 85
 				storageBgzz.setXmSrsl(srsl);
@@ -171,7 +173,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
171 173
 				storageBgzz.setDdyyZcsl(val);
172 174
 				storageBgzz.setDdyyKcsl(val);
173 175
 			}
174
-			
176
+
175 177
 			BigDecimal xj = storageBgzz.getXmKcsl().add(storageBgzz.getDgKcsl()).add(storageBgzz.getDdyyKcsl()).setScale(3, BigDecimal.ROUND_DOWN);
176 178
 			storageBgzz.setXj(xj);
177 179
 			storageBgzz.setCjsj(new Date());
@@ -196,6 +198,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
196 198
 		criteria.andJzyfEqualTo(fcbgz.getSjfm());
197 199
 		criteria.andLyxzEqualTo(fcbgz.getLyxz());
198 200
 		criteria.andYwlxEqualTo(fcbgz.getYwlx());
201
+		criteria.andYlorcplEqualTo(fcbgz.getYlorcpl());
199 202
 		List<StorageBgzz> list = storageBgzzMapper.selectByExample(example);
200 203
 		StorageBgzz storageBgzz = null;
201 204
 		String lspz = fcbgz.getPz().toString();
@@ -203,7 +206,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
203 206
 			storageBgzz = list.get(0);
204 207
 
205 208
 			//查询这一年这个月的普通账数据
206
-			List<StorageBgzz> ydlist = bgzzUtilsServiceImpl.findConditionJzyf(fcbgz, StorageFcbgzUtils.DATA_TYPE_0);
209
+			//List<StorageBgzz> ydlist = bgzzUtilsServiceImpl.findConditionJzyf(fcbgz, StorageFcbgzUtils.DATA_TYPE_0);
207 210
 			if ("3164".equals(lspz)) {//小麦
208 211
 				storageBgzz.setXmSrsl(storageBgzz.getXmSrsl().add(fcbgz.getSrsl()).setScale(3, BigDecimal.ROUND_DOWN));
209 212
 				storageBgzz.setXmZcsl(storageBgzz.getXmZcsl().add(fcbgz.getZcsl()).setScale(3, BigDecimal.ROUND_DOWN));
@@ -292,6 +295,7 @@ public class StorageBgzzServiceImpl implements StorageBgzzService {
292 295
 		criteria.andJzndEqualTo(fcbgz.getJznd());
293 296
 		criteria.andLyxzEqualTo(fcbgz.getLyxz());
294 297
 		criteria.andYwlxEqualTo(fcbgz.getYwlx());
298
+		criteria.andYlorcplEqualTo(fcbgz.getYlorcpl());
295 299
 		List<StorageBgzz> list = storageBgzzMapper.selectByExample(example);
296 300
 		StorageBgzz storageBgzz = null;
297 301
 		String lspz = fcbgz.getPz().toString();

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

@@ -150,7 +150,7 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
150 150
 	}
151 151
 
152 152
 	@Override
153
-	public Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd) throws Exception {
153
+	public Map<String, Object> queryJzList(Integer ch, Integer hwh, Integer lsxz, String jznd, String ylorcpl) throws Exception {
154 154
 
155 155
 		Map<String, Object> map = new HashMap<>();
156 156
 
@@ -162,7 +162,7 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
162 162
 		
163 163
 		/** 先查上一年的结转数据  start  **/
164 164
 		Integer top_year = Integer.parseInt(jznd)-1;
165
-		List<StorageFcbgz> top_year_jz_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, null, top_year.toString(), null, StorageFcbgzUtils.DATA_TYPE_2);
165
+		List<StorageFcbgz> top_year_jz_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, null, top_year.toString(), null, StorageFcbgzUtils.DATA_TYPE_2, ylorcpl);
166 166
 		StorageFcbgz top_year_jz = null;
167 167
 		if (null != top_year_jz_list && top_year_jz_list.size() > 0) {
168 168
 			top_year_jz = top_year_jz_list.get(0);
@@ -187,13 +187,13 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
187 187
 		for (int i = 0; i < 12; i++) {
188 188
 			//从1-12月依次查, 先查每月的明细
189 189
 			String jzrq = jznd+"-"+String.format("%02d", i+1).trim();
190
-			jznd_month_jz_list = fcbgzUtilsServiceImpl.getList("last_business_date", ch, hwh, null, lsxz, jznd, jzrq, StorageFcbgzUtils.DATA_TYPE_0);
190
+			jznd_month_jz_list = fcbgzUtilsServiceImpl.getList("last_business_date", ch, hwh, null, lsxz, jznd, jzrq, StorageFcbgzUtils.DATA_TYPE_0, ylorcpl);
191 191
 			if (null != jznd_month_jz_list && jznd_month_jz_list.size() > 0) {
192 192
 				for (StorageFcbgz f_day : jznd_month_jz_list) {
193 193
 					list.add(f_day);
194 194
 				}
195 195
 				//查询这个月的合计数据
196
-				jznd_month_jz_sum_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, lsxz, jznd, jzrq, StorageFcbgzUtils.DATA_TYPE_1);
196
+				jznd_month_jz_sum_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, lsxz, jznd, jzrq, StorageFcbgzUtils.DATA_TYPE_1, ylorcpl);
197 197
 				if (null != jznd_month_jz_sum_list && jznd_month_jz_sum_list.size() > 0) {
198 198
 					list.add(jznd_month_jz_sum_list.get(0));
199 199
 				}
@@ -206,7 +206,7 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
206 206
 
207 207
 
208 208
 		/** 查[jznd]年的年合计数据  start  **/
209
-		List<StorageFcbgz> jznd_year_jz_sum_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, lsxz, jznd, null, StorageFcbgzUtils.DATA_TYPE_2); //[jznd]年的合计
209
+		List<StorageFcbgz> jznd_year_jz_sum_list = fcbgzUtilsServiceImpl.getList(null, ch, hwh, null, lsxz, jznd, null, StorageFcbgzUtils.DATA_TYPE_2, ylorcpl); //[jznd]年的合计
210 210
 		if (null != jznd_year_jz_sum_list && jznd_year_jz_sum_list.size() > 0) {
211 211
 			year_jz_obj = jznd_year_jz_sum_list.get(0);
212 212
 			list.add(year_jz_obj);
@@ -302,9 +302,9 @@ public class StorageFcbgzServiceImpl implements StorageFcbgzService {
302 302
 
303 303
 	@SuppressWarnings("unchecked")
304 304
 	@Override
305
-	public HSSFWorkbook exportFcbgz(Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc) throws Exception {
305
+	public HSSFWorkbook exportFcbgz(Integer ch, Integer hwh, Integer lsxz, String jznd, String orgName, String cfhwmc, String ylorcpl) throws Exception {
306 306
 
307
-		Map<String,Object> map = queryJzList(ch, hwh, lsxz, jznd);
307
+		Map<String,Object> map = queryJzList(ch, hwh, lsxz, jznd, ylorcpl);
308 308
 		List<StorageFcbgz> list = (List<StorageFcbgz>) map.get("list");
309 309
 		
310 310
 		HSSFWorkbook wb = new HSSFWorkbook();

+ 4 - 0
src/main/java/com/chinaitop/depot/profitlossStatement/service/impl/StorageProfitlossStatementServiceImpl.java

@@ -522,6 +522,10 @@ public class StorageProfitlossStatementServiceImpl implements StorageProfitlossS
522 522
             			 if (StringUtils.isNotBlank(profitlossStatemnt.getCksj().toString())) {
523 523
             				 profitlossStatemnt.setCksj_str(ParameterUtil.datetime2string(profitlossStatemnt.getCksj()));
524 524
             			 }
525
+            			 //货位为空,说明是油罐
526
+            			 if (null == profitlossStatemnt.getHwid()) {
527
+            				 profitlossStatemnt.setHwid(Integer.parseInt(profitlossStatemnt.getCforyg()));
528
+            			 }
525 529
 
526 530
             			 //获取保管员
527 531
             			 String keepName = storageProfitlossStatementMapper.getkeepName(storageProfitlossStatement.getCforyg());