From 1650011c3b469e0685b4013b9dc1fd14bc6550f7 Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期五, 03 十一月 2023 19:04:41 +0800
Subject: [PATCH] 优化通知单和设备,分库区
---
igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/ServerRunner.java | 2 +-
igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java | 22 ++++++----------------
igds-manager/src/main/java/com/ld/igds/oa/service/HDeptDeviceService.java | 3 ++-
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java b/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
index 73a816d..293b6fe 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
+++ b/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
@@ -27,23 +27,18 @@
public void pageQueryIn(Page<InoutNoticeIn> page, Map<String, Object> param) throws Exception {
String hql = " from " + InoutNoticeIn.class.getName()
- + " where companyId =:companyId";
+ + " where companyId =:companyId and deptId =:deptId";
Map<String, Object> args = new HashMap<String, Object>();
args.put("companyId", ContextUtil.getCompanyId());
+ args.put("deptId", ContextUtil.subDeptId(null));
Object year = param.get("year");
if (year == null) {
param.put("year", DateFormatUtils.format(new Date(), "yyyy"));
}
- String str = (String) param.get("deptId");
- if (StringUtils.isNotEmpty(str)) {
- hql += " and deptId =:deptId";
- args.put("deptId", str);
- }
-
- str = (String) param.get("id");
+ String str = (String) param.get("id");
if (StringUtils.isNotEmpty(str)) {
hql += " and id=:id";
args.put("id", str);
@@ -143,23 +138,18 @@
public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) throws Exception {
String hql = " from " + InoutNoticeOut.class.getName()
- + " where companyId =:companyId";
+ + " where companyId =:companyId and deptId =:deptId";
Map<String, Object> args = new HashMap<String, Object>();
args.put("companyId", ContextUtil.getCompanyId());
+ args.put("deptId", ContextUtil.subDeptId(null));
Object year = param.get("year");
if (year == null) {
param.put("year", DateFormatUtils.format(new Date(), "yyyy"));
}
- String str = (String) param.get("deptId");
- if (StringUtils.isNotEmpty(str)) {
- hql += " and deptId =:deptId";
- args.put("deptId", str);
- }
-
- str = (String) param.get("id");
+ String str = (String) param.get("id");
if (StringUtils.isNotEmpty(str)) {
hql += " and id =:id";
args.put("id", str);
diff --git a/igds-manager/src/main/java/com/ld/igds/oa/service/HDeptDeviceService.java b/igds-manager/src/main/java/com/ld/igds/oa/service/HDeptDeviceService.java
index 0e6091b..0fc419d 100644
--- a/igds-manager/src/main/java/com/ld/igds/oa/service/HDeptDeviceService.java
+++ b/igds-manager/src/main/java/com/ld/igds/oa/service/HDeptDeviceService.java
@@ -35,10 +35,11 @@
//=====================================搴撳尯璁惧=======================================//
public void pageData(Page<DeptDevice> page, Map<String, Object> param)
throws Exception {
- String hql = " from " + DeptDevice.class.getName() + " where companyId=:companyId";
+ String hql = " from " + DeptDevice.class.getName() + " where companyId =:companyId and deptId =:deptId";
Map<String, Object> args = new HashMap<>();
args.put("companyId", ContextUtil.getCompanyId());
+ args.put("deptId", ContextUtil.subDeptId(null));
if (null != param) {
hql = buildHql(hql, param, args);
diff --git a/igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/ServerRunner.java b/igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/ServerRunner.java
index 64b0173..af05bdb 100644
--- a/igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/ServerRunner.java
+++ b/igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/ServerRunner.java
@@ -42,7 +42,7 @@
//姹熻タ璧e窞銆佸箍涓滈珮宸炰娇鐢ㄣ�佽タ钘忓北鍗椼�佸畞澶忕煶鍢村北銆佸箍涓滀經灞�
bhznGrainServerEngine2.start(BhznGrainV2ServerEngine.PORT);
//骞夸笢楂樺窞浣跨敤
-// bhznVerbServerEngine.start(BhznVerbServerEngine.PORT);
+ bhznVerbServerEngine.start(BhznVerbServerEngine.PORT);
return;
}
if (configData.getActive().indexOf("dev") >= 0) {
--
Gitblit v1.9.3