From b7951bdbb8925131cbc76be4902fcef0e88d0506 Mon Sep 17 00:00:00 2001 From: ytfl <ytfl@qq.com> Date: 星期二, 19 八月 2025 18:22:03 +0800 Subject: [PATCH] #自动获取电视机配置信息 --- src/main/java/com/zy/common/service/CommonService.java | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index a7643a0..f8bed52 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -13,6 +13,7 @@ import com.zy.common.model.LocTypeDto; import com.zy.common.model.Shelves; import com.zy.common.model.StartupDto; +import com.zy.common.utils.News; import com.zy.core.properties.SlaveProperties; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -240,7 +241,7 @@ .eq("crn_no", crnNo); StaDesc staDesc = staDescService.selectOne(wrapper); if (Cools.isEmpty(staDesc)) { - log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); + News.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�"); } BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn()); @@ -269,6 +270,20 @@ if (!locMastService.checkEmptyCount(locMast)) { locMast = null; } + // 鐩爣搴撲綅 ===>> 娴呭簱浣嶏紝 鍒欐牎楠屽叾娣卞簱浣嶆槸鍚︿负 F D X + if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { + LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); + if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { + locMast = null; + } + } + // 鐩爣搴撲綅 ===>> 娣卞簱浣嶏紝 鍒欐牎楠屽叾娴呭簱浣嶆槸鍚︿负 O + if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { + LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); + if (!shallowLoc.getLocSts().equals("O")) { + locMast = null; + } + } } } @@ -287,7 +302,7 @@ locTypeDto.setLocType1((short) 2); return getLocNo(null, staDescId, sourceStaNo, matNos, locTypeDto, times); } - log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times); + News.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times); throw new CoolException("娌℃湁绌哄簱浣�"); } String locNo = locMast.getLocNo(); @@ -301,6 +316,19 @@ return startupDto; } + public Integer queryDevpWorkingCount() { + List<WrkMast> wrkMastsIn = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .in("wrk_sts", 2, 3, 4, 5)); + + List<WrkMast> wrkMastsOut = wrkMastService.selectList(new EntityWrapper<WrkMast>() + .in("wrk_sts", 12, 14, 15)); + + int count = 0; + count += wrkMastsIn.size(); + count += wrkMastsOut.size(); + return count; + } + public static void main(String[] args) { System.out.println(Arith.remainder(1, 4)); System.out.println("0200201".substring(0, 2)); -- Gitblit v1.9.1