소스 검색

入库结算管理

hanqingsong 5 달 전
부모
커밋
a8fc07766b

+ 2 - 2
src/main/java/com/chinaitop/depot/business/controller/BusinessContractReceiveController.java

@@ -49,7 +49,7 @@ public class BusinessContractReceiveController {
49 49
 		@ApiImplicitParam(name = "htlx", value = "合同类型(0:采购,1:销售)", paramType = "query")
50 50
 	})
51 51
     public PageInfo<BusinessContractReceive> getList(Integer pageNum, Integer pageSize, 
52
-    		String htbh ,Integer orgId, Integer houseId, Integer warehouseId, String htlx) {
52
+    		String htbh ,Integer orgId, Integer houseId, Integer warehouseId, String htlx, String surplus) {
53 53
        
54 54
 		PageInfo<BusinessContractReceive> pageInfo = null;
55 55
 
@@ -58,7 +58,7 @@ public class BusinessContractReceiveController {
58 58
         	if (null != pageNum && null != pageSize) {
59 59
         		PageHelper.startPage(pageNum, pageSize);
60 60
         	}
61
-			list = businessContractReceiveService.queryByExample(htbh, orgId, houseId, warehouseId, htlx);
61
+			list = businessContractReceiveService.queryByExample(htbh, orgId, houseId, warehouseId, htlx, surplus);
62 62
 			pageInfo = new PageInfo<BusinessContractReceive>(list);
63 63
 		} catch (Exception e) {
64 64
 			logger.error(e.getMessage(), e);

+ 6 - 0
src/main/java/com/chinaitop/depot/business/model/BusinessContractReceiveExample.java

@@ -1677,6 +1677,12 @@ public class BusinessContractReceiveExample {
1677 1677
             addCriterion("data_type not between", value1, value2, "dataType");
1678 1678
             return (Criteria) this;
1679 1679
         }
1680
+
1681
+        // 非字段条件-业务特殊需求(剩余数量为“0”的合同不展示在列表中)
1682
+        public Criteria andSurplusNotEqualTo() {
1683
+            addCriterion("(htzsl - yjssl) <> 0");
1684
+            return (Criteria) this;
1685
+        }
1680 1686
     }
1681 1687
 
1682 1688
     /**

+ 1 - 1
src/main/java/com/chinaitop/depot/business/service/BusinessContractReceiveService.java

@@ -24,7 +24,7 @@ public interface BusinessContractReceiveService {
24 24
 	 * @param htlx 合同类型(0:采购,1:销售)
25 25
 	 * @return
26 26
 	 */
27
-	List<BusinessContractReceive> queryByExample(String htbh, Integer orgId, Integer houseId, Integer warehouseId, String htlx) throws Exception;
27
+	List<BusinessContractReceive> queryByExample(String htbh, Integer orgId, Integer houseId, Integer warehouseId, String htlx, String surplus) throws Exception;
28 28
 
29 29
 	/**
30 30
 	 * 主键查询一条数据

+ 5 - 1
src/main/java/com/chinaitop/depot/business/service/impl/BusinessContractReceiveServiceImpl.java

@@ -265,7 +265,7 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
265 265
 	}
266 266
 
267 267
 	@Override
268
-	public List<BusinessContractReceive> queryByExample(String htbh, Integer orgId, Integer houseId, Integer warehouseId, String htlx)
268
+	public List<BusinessContractReceive> queryByExample(String htbh, Integer orgId, Integer houseId, Integer warehouseId, String htlx, String surplus)
269 269
 			throws Exception {
270 270
 		List<BusinessContractReceive> list = null;
271 271
 		BusinessContractReceiveExample example = new BusinessContractReceiveExample();
@@ -285,6 +285,10 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
285 285
 		if (StringUtils.isNotBlank(htlx)) {
286 286
 			criteria.andHtlxEqualTo(htlx);
287 287
 		}
288
+		// 合同类型(0:采购,1:销售)
289
+		if (StringUtils.isNotEmpty(surplus) && "0".equals(surplus)) {
290
+			criteria.andSurplusNotEqualTo();
291
+		}
288 292
 		example.setOrderByClause("input_time desc");
289 293
 		list = businessContractReceiveMapper.selectByExample(example);
290 294
 		return list;

+ 1 - 1
src/main/java/com/chinaitop/depot/business/service/impl/ReceiveNoticeServiceImpl.java

@@ -710,7 +710,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
710 710
 		String path = sysCodeService.getSVal(10, "tshtyyzt");
711 711
 
712 712
 		BusinessNoticeReceive businessNoticeReceive = formatObject(notice);
713
-		List<BusinessContractReceive> list = businessContractReceiveService.queryByExample(businessNoticeReceive.getHtbh(), businessNoticeReceive.getOrgId(), null, null, null);
713
+		List<BusinessContractReceive> list = businessContractReceiveService.queryByExample(businessNoticeReceive.getHtbh(), businessNoticeReceive.getOrgId(), null, null, null, null);
714 714
 		if (null != list && list.size() > 0) {
715 715
 			String htbm = list.get(0).getSptHtid();
716 716