From be175fe739e687cd1d45da58f2cb7dd0c36d001f Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期五, 11 八月 2023 11:48:10 +0800
Subject: [PATCH] 调整Pressure的接口包位置到COre中,然后增加modBus-TCP协议通讯报道

---
 igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 102 insertions(+), 4 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java
index 4704b70..52e039e 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java
@@ -3,7 +3,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import com.bstek.bdf2.core.business.IUser;
 import com.ld.igds.constant.Constant;
+import com.ld.igds.inout.InoutConstant;
 import com.ld.igds.inout.dto.InoutData;
 import com.ld.igds.inout.dto.InoutParam;
 import com.ld.igds.inout.manager.InoutReportManager;
@@ -11,6 +13,7 @@
 import com.ld.igds.models.DicTrigger;
 import com.ld.igds.models.InoutRecord;
 
+import com.ld.igds.util.ContextUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -22,6 +25,8 @@
 import com.ld.igds.inout.service.HInoutSettleService;
 import com.ld.igds.models.InoutSettle;
 
+import javax.annotation.Resource;
+
 /**
  * 缁撶畻绠$悊
  *
@@ -30,13 +35,13 @@
 @Component
 public class InoutSettlePR {
 
-	@Autowired
+	@Resource
 	private HInoutSettleService hSettleService;
 
-	@Autowired
+	@Resource
 	private InoutReportManager inoutReportManager;
 
-	@Autowired
+	@Resource
 	private InoutSettleServiceMapper inoutSettleServiceMapper;
 
 	/**
@@ -52,6 +57,100 @@
 		list.add(new DicTrigger(Constant.YN_Y, "宸茬粨绠�"));
 		return list;
 	}
+	
+	/**
+	 * 缁撶畻鏂瑰紡 0锛氱幇閲戯紝1锛氳浆璐�
+	 * ${dorado.getDataProvider("inoutSettlePR#triggerPayType").getResult()}
+	 *
+	 * @return
+	 */
+	@DataProvider
+	public List<DicTrigger> triggerPayType() {
+		List<DicTrigger> list = new ArrayList<DicTrigger>();
+		list.add(new DicTrigger("0", "鐜伴噾"));
+		list.add(new DicTrigger("1", "杞处"));
+		return list;
+	}
+	
+	
+	
+	/**
+	 * 鍏ュ簱缁撶畻-鍚堝悓缁撶畻
+	 * inoutSettlePR#pageSettleIn1
+	 *
+	 * @param param
+	 * @return
+	 * @throws Exception
+	 */
+	@DataProvider
+	public void pageSettleIn1(Page<InoutSettle> page, InoutParam param)throws Exception {
+		
+		if(null == param)param = new InoutParam();
+
+		IUser u = ContextUtil.getLoginUser();
+
+		param.setCompanyId(u.getCompanyId());
+
+
+		if(null == param.getDeptId()){
+			param.setDeptId(ContextUtil.subDeptId(u));
+		}
+
+		param.setSettleBizType("1");
+		param.setType(InoutConstant.TYPE_IN);
+		
+		hSettleService.pageSettle(page, param);
+	}
+	
+	/**
+	 * 鍏ュ簱缁撶畻-鍗曡溅缁撶畻
+	 * inoutSettlePR#pageSettleIn0
+	 *
+	 * @param param
+	 * @return
+	 * @throws Exception
+	 */
+	@DataProvider
+	public void pageSettleIn0(Page<InoutSettle> page, InoutParam param)throws Exception {
+		if(null == param)param = new InoutParam();
+		IUser u = ContextUtil.getLoginUser();
+
+		param.setCompanyId(u.getCompanyId());
+
+
+		if(null == param.getDeptId()){
+			param.setDeptId(ContextUtil.subDeptId(u));
+		}
+
+		param.setSettleBizType("0");
+		param.setType(InoutConstant.TYPE_IN);
+		hSettleService.pageSettle(page, param);
+	}
+	
+	/**
+	 * 鍑哄簱缁撶畻-鍚堝悓缁撶畻
+	 * inoutSettlePR#pageSettleOut1
+	 *
+	 * @param param
+	 * @return
+	 * @throws Exception
+	 */
+	@DataProvider
+	public void pageSettleOut1(Page<InoutSettle> page, InoutParam param)throws Exception {
+		IUser u = ContextUtil.getLoginUser();
+
+		param.setCompanyId(u.getCompanyId());
+
+
+		if(null == param.getDeptId()){
+			param.setDeptId(ContextUtil.subDeptId(u));
+		}
+
+		param.setSettleBizType("1");
+		param.setType(InoutConstant.TYPE_OUT);
+		hSettleService.pageSettle(page, param);
+	}
+	
 
 	/**
 	 * inoutSettlePR#pageInoutRecord
@@ -63,7 +162,6 @@
 	@DataProvider
 	public void pageInoutRecord(Page<InoutRecord> page, InoutParam param)
 			throws Exception {
-		param.setSettleTag(Constant.YN_N);
 		hSettleService.pageIoutRecord(page, param);
 	}
 

--
Gitblit v1.9.3