From 8e9f2f6925530be0e9f63d0a7205a98f8e6dae47 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 24 五月 2022 13:03:47 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java index ac5e058..d5fc975 100644 --- a/src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java @@ -6,12 +6,21 @@ import com.zy.asrs.entity.BasCrnp; import com.zy.asrs.mapper.BasCrnpMapper; import com.zy.asrs.service.BasCrnpService; +import com.zy.asrs.service.WrkMastService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @Slf4j @Service("basCrnpService") public class BasCrnpServiceImpl extends ServiceImpl<BasCrnpMapper, BasCrnp> implements BasCrnpService { + + @Autowired + private WrkMastService wrkMastService; + + @Value("${store.bufferCount}") + private int bufferCount; @Override public BasCrnp checkSiteStatus(Integer crnId) { @@ -36,6 +45,18 @@ return false; } if (pakin) { + //TODO鎺у埗鍏ュ簱鏆傚瓨鏁帮紝闃叉涓诲共閬撳牭濉烇紝2022-5-24 ADD + int storeCount = wrkMastService.getStoreCount(crnNo); + int maxCount = bufferCount; + if(crnNo==1){ + maxCount = 3; + } + + if(storeCount >= maxCount){ + log.error("{}鍙峰爢鍨涙満鏆傚瓨鏁板凡婊�!", crnNo); + return false; + } + if ("N".equals(crnp.getInEnable())) { log.error("{}鍙峰爢鍨涙満涓嶅彲鍏�", crnNo); return false; @@ -46,12 +67,12 @@ return false; } } - if (crnp.getCrnSts() != null) { - if (crnp.getCrnSts() == 10) { - log.error("{}鍙峰爢鍨涙満鐘舵�佷负10.閿欒", crnNo); - return false; - } - } +// if (crnp.getCrnSts() != null) { +// if (crnp.getCrnSts() == 10) { +// log.error("{}鍙峰爢鍨涙満鐘舵�佷负10.閿欒", crnNo); +// return false; +// } +// } if (crnp.getCrnErr() != null) { if (crnp.getCrnErr() != 0) { log.error("{}鍙峰爢鍨涙満寮傚父锛屽紓甯哥爜{}", crnNo, crnp.getCrnErr()); -- Gitblit v1.9.1