From 0a4c32ca70dd7543596ac7234b06db343917f65e Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 19 六月 2023 14:53:58 +0800
Subject: [PATCH] 新建接口
---
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java | 61 +++++++++++++++---------------
1 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
index 7f9ade9..23e56bf 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutCommonManager.java
@@ -1,15 +1,14 @@
package com.ld.igds.inout.manager;
+import com.ld.igds.constant.Constant;
import com.ld.igds.inout.InoutConstant;
import com.ld.igds.inout.dto.InoutData;
import com.ld.igds.inout.service.InoutService;
-import com.ld.igds.io.dto.WeightDto;
import com.ld.igds.m.service.InoutCommonService;
import com.ld.igds.models.DicTrigger;
import com.ld.igds.models.InoutConf;
import com.ld.igds.models.InoutSysConf;
import com.ld.igds.sys.service.DicTriggerService;
-import com.ld.igds.util.ContextUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
@@ -94,6 +93,29 @@
return result;
}
+ public List<InoutConf> getInoutConf(List<InoutConf> listInoutConf, String type) {
+ List<InoutConf> result = new ArrayList<>();
+ if (null == listInoutConf) return result;
+ for (InoutConf conf : listInoutConf) {
+ if (type.equals(conf.getType())) {
+ result.add(conf);
+ }
+ }
+ return result;
+ }
+
+ public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type) {
+ if (null == listInoutConf) return new InoutConf(sort);
+ if (StringUtils.isEmpty(sort)) sort = "1";
+
+ for (InoutConf conf : listInoutConf) {
+ if (sort.equals(conf.getSort()) && type.equals(conf.getType())) {
+ return conf;
+ }
+ }
+ return new InoutConf(sort);
+ }
+
/**
* 鏍规嵁绫诲瀷鑾峰彇瀛楀吀琛ㄤ笅鎷夋
@@ -116,34 +138,13 @@
public String getWeightEditTag(String companyId, String deptId) {
// 浠庣紦瀛樹腑鑾峰彇鍑哄叆搴撶郴缁熼厤缃俊鎭�
InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(companyId, deptId);
- String weightEditTag = null;
+ String weightEditTag = Constant.YN_N;
if (inoutSysConf != null) {
weightEditTag = inoutSysConf.getWeightEditTag();
}
+ if (null == weightEditTag) weightEditTag = Constant.YN_N;
+
return weightEditTag;
- }
-
- public List<WeightDto> getInoutWeightAll(List<InoutConf> listInoutConf, String type) {
- List<WeightDto> result = new ArrayList<>();
- if (null == listInoutConf) return result;
-
- for (InoutConf conf : listInoutConf) {
- if (type.equals(conf.getType())) {
- result.add(new WeightDto(conf));
- }
- }
- return result;
- }
-
- public WeightDto getInoutCurWeight(List<WeightDto> listWeight, String sort) {
- if (null == listWeight || listWeight.isEmpty()) return new WeightDto();
-
- if (listWeight.size() == 1) return listWeight.get(0);
-
- for (WeightDto weight : listWeight) {
- if (weight.getSort().equals(sort)) return weight;
- }
- return new WeightDto();
}
@@ -152,10 +153,10 @@
*
* @param deptId
*/
- public void initInoutScreen(String deptId) {
- if (StringUtils.isEmpty(deptId))
- deptId = ContextUtil.subDeptId(null);
- inoutService.initInoutScreen(deptId);
+ public void initInoutScreen(String companyId, String deptId) {
+ if (StringUtils.isEmpty(companyId)) return;
+ if (StringUtils.isEmpty(deptId)) return;
+ inoutService.notifyToScreen(companyId, deptId, null);
}
public List<InoutData> getListInoutCache(String deptId) {
--
Gitblit v1.9.3