diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/index/IndexController.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/index/IndexController.java index 273eabc9..1aa974bf 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/index/IndexController.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/index/IndexController.java @@ -3,20 +3,32 @@ package com.win.module.wms.controller.index; import com.win.framework.common.pojo.CommonResult; import com.win.module.wms.service.balance.BalanceService; import com.win.module.wms.service.deliverPlan.DeliverPlanMainService; +import com.win.module.wms.service.inspectJob.InspectJobMainService; +import com.win.module.wms.service.issueJob.IssueJobMainService; import com.win.module.wms.service.issueRequest.IssueRequestMainService; import com.win.module.wms.service.location.LocationService; import com.win.module.wms.service.preparetoissue.PreparetoissueMainService; import com.win.module.wms.service.production.ProductionMainService; +import com.win.module.wms.service.productionreceiptJob.ProductionreceiptJobMainService; +import com.win.module.wms.service.productionreturnJob.ProductionreturnJobMainService; import com.win.module.wms.service.productputawayJob.ProductputawayJobDetailService; +import com.win.module.wms.service.productputawayJob.ProductputawayJobMainService; +import com.win.module.wms.service.productreceiptJob.ProductreceiptJobMainService; +import com.win.module.wms.service.productscrapJob.ProductscrapJobMainService; import com.win.module.wms.service.purchase.PurchaseMainService; import com.win.module.wms.service.purchasePlan.PurchasePlanMainService; import com.win.module.wms.service.purchaseclaimRecord.PurchaseclaimRecordDetailService; +import com.win.module.wms.service.purchasereceiptJob.PurchasereceiptJobMainService; import com.win.module.wms.service.purchasereceiptRequest.PurchasereceiptRequestMainService; +import com.win.module.wms.service.purchasereturnJob.PurchasereturnJobMainService; import com.win.module.wms.service.purchasereturnRecord.PurchasereturnRecordDetailService; +import com.win.module.wms.service.putawayJob.PutawayJobMainService; +import com.win.module.wms.service.repleinshJob.RepleinshJobMainService; import com.win.module.wms.service.supplierdeliverRecord.SupplierdeliverRecordDetailService; import com.win.module.wms.service.supplierdeliverRecord.SupplierdeliverRecordMainService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import org.jetbrains.annotations.NotNull; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -62,6 +74,28 @@ public class IndexController { private DeliverPlanMainService deliverPlanMainService; @Resource private BalanceService balanceService; + @Resource + private PurchasereceiptJobMainService purchasereceiptJobMainService; + @Resource + private PurchasereturnJobMainService purchasereturnJobMainService; + @Resource + private PutawayJobMainService putawayJobMainService; + @Resource + private InspectJobMainService inspectJobMainService; + @Resource + private IssueJobMainService issueJobMainService; + @Resource + private ProductionreceiptJobMainService productionreceiptJobMainService; + @Resource + private ProductionreturnJobMainService productionreturnJobMainService; + @Resource + private ProductputawayJobMainService productputawayJobMainService; + @Resource + private ProductreceiptJobMainService productreceiptJobMainService; + @Resource + private ProductscrapJobMainService productscrapJobMainService; + @Resource + private RepleinshJobMainService repleinshJobMainService; @GetMapping("/indexSupplier") @Operation(summary = "供应商首页") @@ -91,9 +125,24 @@ public class IndexController { dataMap.put("totalLocationCount", locationService.getTotalLocationCount());//总库位数 dataMap.put("stagnantBalanceList", balanceService.getStagnantBalanceList());//呆滞库存预警 dataMap.put("overdueBalanceList", balanceService.getOverdueBalanceList());//超期库存预警 + dataMap.put("jobCount", getMaterialJobCountMap()); return success(dataMap); } + @NotNull + private Map getMaterialJobCountMap() { + Long purchasereceiptJobCount = purchasereceiptJobMainService.getPurchasereceiptJobCount();//采购收货未处理任务数 + Long purchasereturnJobCount = purchasereturnJobMainService.getPurchasereturnJobCount();//采购退货未处理任务数 + Long putawayJobCount = putawayJobMainService.getPutawayJobCount();//采购上架未处理任务数 + Long inspectJobCount = inspectJobMainService.getInspectJobCount();//检验未处理任务数 + Map jobCountMap = new HashMap<>(); + jobCountMap.put("purchasereceiptJobCount", purchasereceiptJobCount); + jobCountMap.put("purchasereturnJobCount", purchasereturnJobCount); + jobCountMap.put("putawayJobCount", putawayJobCount); + jobCountMap.put("inspectJobCount", inspectJobCount); + return jobCountMap; + } + @GetMapping("/indexProduct") @Operation(summary = "成品管理员首页") public CommonResult> indexProduct() { @@ -101,9 +150,30 @@ public class IndexController { dataMap.put("deliverPlanTodayCount", deliverPlanMainService.getDeliverPlanToday());//今日发货计划(未发货) dataMap.put("stagnantBalanceList", balanceService.getStagnantBalanceList());//呆滞库存预警 dataMap.put("overdueBalanceList", balanceService.getOverdueBalanceList());//超期库存预警 + dataMap.put("jobCount", getProductJobCountMap()); return success(dataMap); } + @NotNull + private Map getProductJobCountMap() { + Long issueJobCount = issueJobMainService.getIssueJobCount();//发料任务未处理任务数 + Long productionreceiptJobCount = productionreceiptJobMainService.getProductionreceiptJobCount();//生产收料任务未处理任务数 + Long productionreturnJobCount = productionreturnJobMainService.getProductionreturnJobCount();//生产退料任务未处理任务数 + Long productputawayJobCount = productputawayJobMainService.getProductputawayJobCount();//制品上架任务未处理任务数 + Long productreceiptJobCount = productreceiptJobMainService.getProductreceiptJobCount();//制品收货任务未处理任务数 + Long productscrapJobCount = productscrapJobMainService.getProductscrapJobCount();//制品报废任务未处理任务数 + Long repleinshJobCount = repleinshJobMainService.getRepleinshJobCount();//补料任务未处理任务数 + Map jobCountMap = new HashMap<>(); + jobCountMap.put("issueJobCount", issueJobCount); + jobCountMap.put("productionreceiptJobCount", productionreceiptJobCount); + jobCountMap.put("productionreturnJobCount", productionreturnJobCount); + jobCountMap.put("productputawayJobCount", productputawayJobCount); + jobCountMap.put("productreceiptJobCount", productreceiptJobCount); + jobCountMap.put("productscrapJobCount", productscrapJobCount); + jobCountMap.put("repleinshJobCount", repleinshJobCount); + return jobCountMap; + } + @GetMapping("/indexProduce") @Operation(summary = "生产管理员首页") public CommonResult> indexProduce() { @@ -111,6 +181,7 @@ public class IndexController { dataMap.put("productionTodayList", productionMainService.getProductionToday());//今日生产计划 dataMap.put("safeLocationList", locationService.getSafeLocationList());//线边安全库存 dataMap.put("productputawayJobDetailList", productputawayJobDetailService.getProductputawayJobDetailList());//待上架成品库存 + dataMap.put("jobCount", getProductJobCountMap()); return success(dataMap); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainService.java index dadae0ad..c211cf15 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainService.java @@ -112,4 +112,9 @@ public interface InspectJobMainService { */ String executeInspectJobMain(InspectJobMainUpdateReqVO inspectJobMainUpdateReqVO); + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getInspectJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainServiceImpl.java index c0685273..95735b30 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/inspectJob/InspectJobMainServiceImpl.java @@ -404,6 +404,16 @@ public class InspectJobMainServiceImpl implements InspectJobMainService { return number; } + @Override + public Long getInspectJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return inspectJobMainMapper.selectCount(queryWrapper); + } + private InspectJobMainDO validateInspectJobMainExists(Long id) { InspectJobMainDO inspectJobMainDO = inspectJobMainMapper.selectById(id); if (inspectJobMainDO == null) { diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainService.java index 7ca9d8b3..f701742b 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainService.java @@ -1,19 +1,17 @@ package com.win.module.wms.service.issueJob; -import java.util.*; -import javax.validation.*; - import com.win.framework.common.pojo.CustomConditions; -import com.win.module.wms.controller.issueJob.vo.IssueJobMainCreateReqVO; +import com.win.framework.common.pojo.PageResult; import com.win.module.wms.controller.issueJob.vo.IssueJobMainExportReqVO; import com.win.module.wms.controller.issueJob.vo.IssueJobMainPageReqVO; import com.win.module.wms.controller.issueJob.vo.IssueJobMainUpdateReqVO; -import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainUpdateReqVO; import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; -import com.win.framework.common.pojo.PageResult; -import com.win.module.wms.dal.dataobject.purchasereceiptRequest.PurchasereceiptRequestMainDO; import org.springframework.lang.Nullable; +import java.util.Collection; +import java.util.List; +import java.util.Map; + /** * 发料任务主 Service 接口 * @@ -105,4 +103,10 @@ public interface IssueJobMainService { * @return */ String executeIssueJobMain(IssueJobMainUpdateReqVO issueJobMainUpdateReqVO); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getIssueJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainServiceImpl.java index 6d8d2151..291304d5 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/issueJob/IssueJobMainServiceImpl.java @@ -3,6 +3,7 @@ package com.win.module.wms.service.issueJob; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.win.framework.common.exception.ServiceException; import com.win.framework.common.pojo.CustomConditions; +import com.win.framework.common.pojo.PageResult; import com.win.module.infra.api.trends.TrendsApi; import com.win.module.infra.enums.TrendsTypeEnum; import com.win.module.system.api.serialnumber.SerialNumberApi; @@ -10,11 +11,14 @@ import com.win.module.system.api.user.AdminUserApi; import com.win.module.system.api.user.dto.AdminUserRespDTO; import com.win.module.system.enums.serialNumber.RuleCodeEnum; import com.win.module.wms.controller.expectin.vo.ExpectinCreateReqVO; -import com.win.module.wms.controller.issueJob.vo.*; -import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobDetailUpdateReqVO; +import com.win.module.wms.controller.issueJob.vo.IssueJobDetailUpdateReqVO; +import com.win.module.wms.controller.issueJob.vo.IssueJobMainExportReqVO; +import com.win.module.wms.controller.issueJob.vo.IssueJobMainPageReqVO; +import com.win.module.wms.controller.issueJob.vo.IssueJobMainUpdateReqVO; import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; import com.win.module.wms.dal.dataobject.issueJob.IssueJobDetailDO; +import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordDetailDO; import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordMainDO; import com.win.module.wms.dal.dataobject.jobsetting.JobsettingDO; @@ -23,12 +27,8 @@ import com.win.module.wms.dal.dataobject.onlinesettlementRecord.Onlinesettlement import com.win.module.wms.dal.dataobject.onlinesettlementRecord.OnlinesettlementRecordMainDO; import com.win.module.wms.dal.dataobject.productionreceiptJob.ProductionreceiptJobDetailDO; import com.win.module.wms.dal.dataobject.productionreceiptJob.ProductionreceiptJobMainDO; -import com.win.module.wms.dal.dataobject.purchasereceiptJob.PurchasereceiptJobDetailDO; -import com.win.module.wms.dal.dataobject.purchasereceiptJob.PurchasereceiptJobMainDO; -import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchasereceiptRecordDetailDO; -import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchasereceiptRecordMainDO; -import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; +import com.win.module.wms.dal.mysql.issueJob.IssueJobMainMapper; import com.win.module.wms.dal.mysql.issueRecord.IssueRecordDetailMapper; import com.win.module.wms.dal.mysql.issueRecord.IssueRecordMainMapper; import com.win.module.wms.dal.mysql.onlinesettlementRecord.OnlinesettlementRecordDetailMapper; @@ -48,24 +48,18 @@ import com.win.module.wms.service.transaction.TransactionService; import com.win.module.wms.util.JobUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; - import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; -import com.win.framework.common.pojo.PageResult; - -import com.win.module.wms.convert.issueJob.IssueJobMainConvert; -import com.win.module.wms.dal.mysql.issueJob.IssueJobMainMapper; - import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static com.win.module.wms.enums.ErrorCodeConstants.*; +import static com.win.module.wms.enums.ErrorCodeConstants.ISSUE_JOB_MAIN_NOT_EXISTS; +import static com.win.module.wms.enums.ErrorCodeConstants.ISSUE_JOB_MAIN_STATUS_ERROR; /** * 发料任务主 Service 实现类 @@ -373,6 +367,16 @@ public class IssueJobMainServiceImpl implements IssueJobMainService { return number; } + @Override + public Long getIssueJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return issueJobMainMapper.selectCount(queryWrapper); + } + /** * 创建 生产收料任务 * @param issueRecordMainDO diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainService.java index 36d0c34f..db35ee99 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainService.java @@ -6,7 +6,6 @@ import com.win.module.wms.controller.productionreceiptJob.vo.ProductionreceiptJo import com.win.module.wms.controller.productionreceiptJob.vo.ProductionreceiptJobMainExportReqVO; import com.win.module.wms.controller.productionreceiptJob.vo.ProductionreceiptJobMainPageReqVO; import com.win.module.wms.controller.productionreceiptJob.vo.ProductionreceiptJobMainUpdateReqVO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; import com.win.module.wms.dal.dataobject.productionreceiptJob.ProductionreceiptJobMainDO; import org.springframework.lang.Nullable; @@ -108,4 +107,10 @@ public interface ProductionreceiptJobMainService { Integer closeProductionreceiptJobMain(Long id); String executeProductionreceiptJobMain(ProductionreceiptJobMainUpdateReqVO updateReqVO); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getProductionreceiptJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainServiceImpl.java index f728ce77..ae0a0421 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreceiptJob/ProductionreceiptJobMainServiceImpl.java @@ -10,13 +10,10 @@ import com.win.module.system.api.serialnumber.SerialNumberApi; import com.win.module.system.api.user.AdminUserApi; import com.win.module.system.api.user.dto.AdminUserRespDTO; import com.win.module.system.enums.serialNumber.RuleCodeEnum; -import com.win.module.wms.controller.issueJob.vo.IssueJobDetailUpdateReqVO; import com.win.module.wms.controller.productionreceiptJob.vo.*; import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; import com.win.module.wms.convert.productionreceiptJob.ProductionreceiptJobMainConvert; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; -import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordDetailDO; -import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordMainDO; import com.win.module.wms.dal.dataobject.location.LocationDO; import com.win.module.wms.dal.dataobject.onlinesettlementRecord.OnlinesettlementRecordDetailDO; import com.win.module.wms.dal.dataobject.onlinesettlementRecord.OnlinesettlementRecordMainDO; @@ -25,13 +22,13 @@ import com.win.module.wms.dal.dataobject.productionreceiptJob.ProductionreceiptJ import com.win.module.wms.dal.dataobject.productionreceiptJob.ProductionreceiptJobMainDO; import com.win.module.wms.dal.dataobject.productionreceiptRecord.ProductionreceiptRecordDetailDO; import com.win.module.wms.dal.dataobject.productionreceiptRecord.ProductionreceiptRecordMainDO; -import com.win.module.wms.dal.dataobject.supplieritem.SupplieritemDO; import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; import com.win.module.wms.dal.mysql.onlinesettlementRecord.OnlinesettlementRecordDetailMapper; import com.win.module.wms.dal.mysql.onlinesettlementRecord.OnlinesettlementRecordMainMapper; import com.win.module.wms.dal.mysql.productionreceiptJob.ProductionreceiptJobMainMapper; import com.win.module.wms.dal.mysql.productionreceiptRecord.ProductionreceiptRecordDetailMapper; import com.win.module.wms.dal.mysql.productionreceiptRecord.ProductionreceiptRecordMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; import com.win.module.wms.service.expectin.ExpectinService; import com.win.module.wms.service.itembasic.ItembasicService; @@ -381,6 +378,16 @@ public class ProductionreceiptJobMainServiceImpl implements ProductionreceiptJob return number; } + @Override + public Long getProductionreceiptJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return productionreceiptJobMainMapper.selectCount(queryWrapper); + } + /** * 创建 上线结算记录 * @param productionreceiptRecordMainDO diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainService.java index de53a2f9..f812430c 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainService.java @@ -6,7 +6,6 @@ import com.win.module.wms.controller.productionreturnJob.vo.ProductionreturnJobM import com.win.module.wms.controller.productionreturnJob.vo.ProductionreturnJobMainExportReqVO; import com.win.module.wms.controller.productionreturnJob.vo.ProductionreturnJobMainPageReqVO; import com.win.module.wms.controller.productionreturnJob.vo.ProductionreturnJobMainUpdateReqVO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; import com.win.module.wms.dal.dataobject.productionreturnJob.ProductionreturnJobMainDO; import org.springframework.lang.Nullable; @@ -108,4 +107,10 @@ public interface ProductionreturnJobMainService { Integer closeProductionreturnJobMain(Long id); String executeProductionreturnJobMain(ProductionreturnJobMainUpdateReqVO updateReqVO); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getProductionreturnJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainServiceImpl.java index b5706127..cf66994a 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnJob/ProductionreturnJobMainServiceImpl.java @@ -10,16 +10,10 @@ import com.win.module.system.api.serialnumber.SerialNumberApi; import com.win.module.system.api.user.AdminUserApi; import com.win.module.system.api.user.dto.AdminUserRespDTO; import com.win.module.system.enums.serialNumber.RuleCodeEnum; -import com.win.module.wms.controller.expectin.vo.ExpectinCreateReqVO; -import com.win.module.wms.controller.issueJob.vo.IssueJobDetailUpdateReqVO; import com.win.module.wms.controller.productionreturnJob.vo.*; -import com.win.module.wms.controller.rule.vo.RuleRespVO; import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; import com.win.module.wms.convert.productionreturnJob.ProductionreturnJobMainConvert; -import com.win.module.wms.dal.dataobject.accountcalendar.AccountcalendarDO; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobDetailDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; import com.win.module.wms.dal.dataobject.location.LocationDO; import com.win.module.wms.dal.dataobject.productionreturnJob.ProductionreturnJobDetailDO; import com.win.module.wms.dal.dataobject.productionreturnJob.ProductionreturnJobMainDO; @@ -30,6 +24,7 @@ import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; import com.win.module.wms.dal.mysql.productionreturnJob.ProductionreturnJobMainMapper; import com.win.module.wms.dal.mysql.productionreturnRecord.ProductionreturnRecordDetailMapper; import com.win.module.wms.dal.mysql.productionreturnRecord.ProductionreturnRecordMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; import com.win.module.wms.service.expectin.ExpectinService; import com.win.module.wms.service.expectout.ExpectoutService; @@ -49,7 +44,8 @@ import java.util.*; import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static com.win.module.wms.enums.ErrorCodeConstants.*; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTIONRETURN_JOB_MAIN_NOT_EXISTS; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTIONRETURN_JOB_MAIN_STATUS_ERROR; /** * 生产退料任务主 Service 实现类 @@ -360,4 +356,14 @@ public class ProductionreturnJobMainServiceImpl implements ProductionreturnJobMa trendsApi.createTrends(productionreturnRecordMainDO.getId(), "productionreturnRecord", "生产退料任务生成记录", TrendsTypeEnum.CREATE); return number; } + + @Override + public Long getProductionreturnJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return productionreturnJobMainMapper.selectCount(queryWrapper); + } } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainService.java index 870e7540..579cdae1 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainService.java @@ -108,4 +108,10 @@ public interface ProductputawayJobMainService { Integer closeProductputawayJobMain(Long id); String executeProductputawayJobMain(ProductputawayJobMainUpdateReqVO updateReqVO); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getProductputawayJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainServiceImpl.java index a63d717b..91a3e289 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productputawayJob/ProductputawayJobMainServiceImpl.java @@ -17,10 +17,6 @@ import com.win.module.wms.controller.productputawayJob.vo.ProductputawayJobMainU import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; import com.win.module.wms.convert.productputawayJob.ProductputawayJobMainConvert; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobDetailDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; -import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordDetailDO; -import com.win.module.wms.dal.dataobject.jobsetting.JobsettingDO; import com.win.module.wms.dal.dataobject.location.LocationDO; import com.win.module.wms.dal.dataobject.productputawayJob.ProductputawayJobDetailDO; import com.win.module.wms.dal.dataobject.productputawayJob.ProductputawayJobMainDO; @@ -30,6 +26,7 @@ import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; import com.win.module.wms.dal.mysql.productputawayJob.ProductputawayJobMainMapper; import com.win.module.wms.dal.mysql.productputawayRecord.ProductputawayRecordDetailMapper; import com.win.module.wms.dal.mysql.productputawayRecord.ProductputawayRecordMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; import com.win.module.wms.service.expectin.ExpectinService; import com.win.module.wms.service.expectout.ExpectoutService; @@ -49,7 +46,8 @@ import java.util.*; import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static com.win.module.wms.enums.ErrorCodeConstants.*; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTPUTAWAY_JOB_MAIN_NOT_EXISTS; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTPUTAWAY_JOB_MAIN_STATUS_ERROR; /** * 制品上架任务主 Service 实现类 @@ -346,4 +344,14 @@ public class ProductputawayJobMainServiceImpl implements ProductputawayJobMainSe trendsApi.createTrends(productputawayJobMainDO.getId(), "productputawayJob", "执行了制品上架任务", TrendsTypeEnum.UPDATE); return number; } + + @Override + public Long getProductputawayJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return productputawayJobMainMapper.selectCount(queryWrapper); + } } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainService.java index fd52a92e..aee43eff 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainService.java @@ -120,4 +120,10 @@ public interface ProductreceiptJobMainService { String executeProductreceiptJobMain(ProductreceiptJobMainUpdateReqVO updateReqVO); void generateBackflushRecord(ProductreceiptRecordMainDO productreceiptRecordMainDO, List productreceiptRecordDetailDOList); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getProductreceiptJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainServiceImpl.java index ca8f182a..7df9b1ca 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productreceiptJob/ProductreceiptJobMainServiceImpl.java @@ -11,8 +11,6 @@ import com.win.module.system.api.serialnumber.SerialNumberApi; import com.win.module.system.api.user.AdminUserApi; import com.win.module.system.api.user.dto.AdminUserRespDTO; import com.win.module.system.enums.serialNumber.RuleCodeEnum; -import com.win.module.wms.controller.issueJob.vo.IssueJobDetailUpdateReqVO; -import com.win.module.wms.controller.issueRequest.vo.IssueRequestDetailCreateReqVO; import com.win.module.wms.controller.productputawayRequest.vo.ProductputawayRequestDetailCreateReqVO; import com.win.module.wms.controller.productputawayRequest.vo.ProductputawayRequestMainCreateReqVO; import com.win.module.wms.controller.productreceiptJob.vo.*; @@ -22,15 +20,9 @@ import com.win.module.wms.dal.dataobject.backflushRequest.BackflushRequestDetail import com.win.module.wms.dal.dataobject.balance.BalanceDO; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; import com.win.module.wms.dal.dataobject.documentSwitch.SwitchDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobDetailDO; -import com.win.module.wms.dal.dataobject.issueJob.IssueJobMainDO; -import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordDetailDO; -import com.win.module.wms.dal.dataobject.issueRecord.IssueRecordMainDO; -import com.win.module.wms.dal.dataobject.itembasic.ItembasicDO; import com.win.module.wms.dal.dataobject.location.LocationDO; import com.win.module.wms.dal.dataobject.offlinesettlementRecord.OfflinesettlementRecordDetailDO; import com.win.module.wms.dal.dataobject.offlinesettlementRecord.OfflinesettlementRecordMainDO; -import com.win.module.wms.dal.dataobject.onlinesettlementRecord.OnlinesettlementRecordDetailDO; import com.win.module.wms.dal.dataobject.production.ProductionDetailDO; import com.win.module.wms.dal.dataobject.productreceiptJob.ProductreceiptJobDetailDO; import com.win.module.wms.dal.dataobject.productreceiptJob.ProductreceiptJobMainDO; @@ -38,8 +30,6 @@ import com.win.module.wms.dal.dataobject.productreceiptRecord.BackflushRecordDet import com.win.module.wms.dal.dataobject.productreceiptRecord.ProductreceiptRecordDetailDO; import com.win.module.wms.dal.dataobject.productreceiptRecord.ProductreceiptRecordMainDO; import com.win.module.wms.dal.dataobject.productreceiptRequest.ProductreceiptRequestDetailDO; -import com.win.module.wms.dal.dataobject.productreceiptRequest.ProductreceiptRequestMainDO; -import com.win.module.wms.dal.dataobject.supplieritem.SupplieritemDO; import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; import com.win.module.wms.dal.dataobject.workstation.WorkstationDO; import com.win.module.wms.dal.mysql.backflushRequest.BackflushRequestDetailbMapper; @@ -50,16 +40,15 @@ import com.win.module.wms.dal.mysql.productreceiptJob.ProductreceiptJobMainMappe import com.win.module.wms.dal.mysql.productreceiptRecord.BackflushRecordDetailbMapper; import com.win.module.wms.dal.mysql.productreceiptRecord.ProductreceiptRecordDetailMapper; import com.win.module.wms.dal.mysql.productreceiptRecord.ProductreceiptRecordMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; import com.win.module.wms.enums.request.RequestStatusEnum; -import com.win.module.wms.service.backflushRequest.BackflushRequestDetailbService; import com.win.module.wms.service.balance.BalanceService; import com.win.module.wms.service.businesstype.BusinesstypeService; import com.win.module.wms.service.documentSwitch.SwitchService; import com.win.module.wms.service.expectin.ExpectinService; import com.win.module.wms.service.itembasic.ItembasicService; import com.win.module.wms.service.location.LocationService; -import com.win.module.wms.service.offlinesettlementRecord.OfflinesettlementRecordMainService; import com.win.module.wms.service.production.ProductionMainService; import com.win.module.wms.service.productputawayRequest.ProductputawayRequestMainService; import com.win.module.wms.service.productreceiptRequest.ProductreceiptRequestDetailService; @@ -531,6 +520,16 @@ public class ProductreceiptJobMainServiceImpl implements ProductreceiptJobMainSe } } + @Override + public Long getProductreceiptJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return productreceiptJobMainMapper.selectCount(queryWrapper); + } + /** * 创建 下线结算 记录 * @param productreceiptRecordMainDO diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainService.java index f192c020..745db739 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainService.java @@ -1,15 +1,16 @@ package com.win.module.wms.service.productscrapJob; -import java.util.*; -import javax.validation.*; - import com.win.framework.common.pojo.CustomConditions; +import com.win.framework.common.pojo.PageResult; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainCreateReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainExportReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainPageReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainUpdateReqVO; import com.win.module.wms.dal.dataobject.productscrapJob.ProductscrapJobMainDO; -import com.win.framework.common.pojo.PageResult; + +import javax.validation.Valid; +import java.util.Collection; +import java.util.List; /** * 制品报废任务主 Service 接口 @@ -86,5 +87,11 @@ public interface ProductscrapJobMainService { * @param pstatus 状态 * @return 采购订单主列表 */ - public ProductscrapJobMainDO productscrapJobMainDoStatusRight(String pnumber, String pstatus); + ProductscrapJobMainDO productscrapJobMainDoStatusRight(String pnumber, String pstatus); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getProductscrapJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainServiceImpl.java index d103b80a..95cdddc0 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productscrapJob/ProductscrapJobMainServiceImpl.java @@ -2,24 +2,26 @@ package com.win.module.wms.service.productscrapJob; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.win.framework.common.pojo.CustomConditions; +import com.win.framework.common.pojo.PageResult; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainCreateReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainExportReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainPageReqVO; import com.win.module.wms.controller.productscrapJob.vo.ProductscrapJobMainUpdateReqVO; +import com.win.module.wms.convert.productscrapJob.ProductscrapJobMainConvert; +import com.win.module.wms.dal.dataobject.productscrapJob.ProductscrapJobMainDO; +import com.win.module.wms.dal.mysql.productscrapJob.ProductscrapJobMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import org.springframework.stereotype.Service; -import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; -import java.util.*; - -import com.win.module.wms.dal.dataobject.productscrapJob.ProductscrapJobMainDO; -import com.win.framework.common.pojo.PageResult; - -import com.win.module.wms.convert.productscrapJob.ProductscrapJobMainConvert; -import com.win.module.wms.dal.mysql.productscrapJob.ProductscrapJobMainMapper; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; -import static com.win.module.wms.enums.ErrorCodeConstants.*; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTSCRAP_JOB_MAIN_NOT_EXISTS; +import static com.win.module.wms.enums.ErrorCodeConstants.PRODUCTSCRAP_JOB_MAIN_STATUS_ERROR; /** * 制品报废任务主 Service 实现类 @@ -50,10 +52,12 @@ public class ProductscrapJobMainServiceImpl implements ProductscrapJobMainServic ProductscrapJobMainDO updateObj = ProductscrapJobMainConvert.INSTANCE.convert(updateReqVO); productscrapJobMainMapper.updateById(updateObj); } + @Override public PageResult getProductscrapJobMainSenior(CustomConditions conditions) { return productscrapJobMainMapper.selectSenior(conditions); } + @Override public void deleteProductscrapJobMain(Long id) { // 校验存在 @@ -87,16 +91,27 @@ public class ProductscrapJobMainServiceImpl implements ProductscrapJobMainServic public List getProductscrapJobMainList(ProductscrapJobMainExportReqVO exportReqVO) { return productscrapJobMainMapper.selectList(exportReqVO); } + @Override public ProductscrapJobMainDO productscrapJobMainDoStatusRight(String pnumber, String pstatus) { - QueryWrapper queryWrapper = new QueryWrapper(); - queryWrapper.eq("number",pnumber); - queryWrapper.eq("status",pstatus); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("number", pnumber); + queryWrapper.eq("status", pstatus); ProductscrapJobMainDO productscrapJobMainDO = productscrapJobMainMapper.selectOne(queryWrapper); - if(productscrapJobMainDO != null){ + if (productscrapJobMainDO != null) { return productscrapJobMainDO; - }else { + } else { throw exception(PRODUCTSCRAP_JOB_MAIN_STATUS_ERROR); } } + + @Override + public Long getProductscrapJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return productscrapJobMainMapper.selectCount(queryWrapper); + } } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java index 7a78d84d..95469a79 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java @@ -115,4 +115,9 @@ public interface PurchasereceiptJobMainService { */ String executePurchasereceiptJobMain(PurchasereceiptJobMainUpdateReqVO purchasereceiptJobMainUpdateReqVO); + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getPurchasereceiptJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java index f3ad54dd..f2889a86 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java @@ -481,6 +481,16 @@ public class PurchasereceiptJobMainServiceImpl implements PurchasereceiptJobMain return number; } + @Override + public Long getPurchasereceiptJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return purchasereceiptJobMainMapper.selectCount(queryWrapper); + } + private PurchasereceiptJobMainDO validatePurchasereceiptJobMainExists(Long id) { PurchasereceiptJobMainDO purchasereceiptJobMainDO = purchasereceiptJobMainMapper.selectById(id); if (purchasereceiptJobMainDO == null) { diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainService.java index 0dca1f42..594e9fec 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainService.java @@ -103,4 +103,9 @@ public interface PurchasereturnJobMainService { */ String executePurchasereturnJobMain(PurchasereturnJobMainUpdateReqVO purchasereturnJobMainUpdateReqVO); + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getPurchasereturnJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainServiceImpl.java index 4e41bed2..e017fd3e 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereturnJob/PurchasereturnJobMainServiceImpl.java @@ -334,6 +334,16 @@ public class PurchasereturnJobMainServiceImpl implements PurchasereturnJobMainSe return number; } + @Override + public Long getPurchasereturnJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return purchasereturnJobMainMapper.selectCount(queryWrapper); + } + private PurchasereturnJobMainDO validatePurchasereturnJobMainExists(Long id) { PurchasereturnJobMainDO purchasereturnJobMainDO = purchasereturnJobMainMapper.selectById(id); if (purchasereturnJobMainDO == null) { diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainService.java index 645586d4..51926b9a 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainService.java @@ -103,4 +103,9 @@ public interface PutawayJobMainService { */ String executePutawayJobMain(PutawayJobMainUpdateReqVO putawayJobMainUpdateReqVO); + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getPutawayJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainServiceImpl.java index de92567d..b9682a82 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/putawayJob/PutawayJobMainServiceImpl.java @@ -288,6 +288,16 @@ public class PutawayJobMainServiceImpl implements PutawayJobMainService { return number; } + @Override + public Long getPutawayJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return putawayJobMainMapper.selectCount(queryWrapper); + } + private PutawayJobMainDO validatePutawayJobMainExists(Long id) { PutawayJobMainDO putawayJobMainDO = putawayJobMainMapper.selectById(id); if (putawayJobMainDO == null) { diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainService.java index 99b86567..dd610af9 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainService.java @@ -1,17 +1,19 @@ package com.win.module.wms.service.repleinshJob; -import java.util.*; -import javax.validation.*; - import com.win.framework.common.pojo.CustomConditions; +import com.win.framework.common.pojo.PageResult; import com.win.module.wms.controller.repleinshJob.vo.RepleinshJobMainCreateReqVO; import com.win.module.wms.controller.repleinshJob.vo.RepleinshJobMainExportReqVO; import com.win.module.wms.controller.repleinshJob.vo.RepleinshJobMainPageReqVO; import com.win.module.wms.controller.repleinshJob.vo.RepleinshJobMainUpdateReqVO; import com.win.module.wms.dal.dataobject.repleinshJob.RepleinshJobMainDO; -import com.win.framework.common.pojo.PageResult; import org.springframework.lang.Nullable; +import javax.validation.Valid; +import java.util.Collection; +import java.util.List; +import java.util.Map; + /** * 补料任务主 Service 接口 * @@ -106,4 +108,10 @@ public interface RepleinshJobMainService { String executeRepleinshJobMain(RepleinshJobMainUpdateReqVO updateReqVO); Integer closeRepleinshJobMain(Long id); + + /** + * 未处理的任务数 + * @return 未处理的任务数 + */ + Long getRepleinshJobCount(); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainServiceImpl.java index c74f07e9..59c33222 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/repleinshJob/RepleinshJobMainServiceImpl.java @@ -3,6 +3,7 @@ package com.win.module.wms.service.repleinshJob; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.win.framework.common.exception.ServiceException; import com.win.framework.common.pojo.CustomConditions; +import com.win.framework.common.pojo.PageResult; import com.win.module.infra.api.trends.TrendsApi; import com.win.module.infra.enums.TrendsTypeEnum; import com.win.module.system.api.serialnumber.SerialNumberApi; @@ -11,15 +12,18 @@ import com.win.module.system.api.user.dto.AdminUserRespDTO; import com.win.module.system.enums.serialNumber.RuleCodeEnum; import com.win.module.wms.controller.repleinshJob.vo.*; import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; +import com.win.module.wms.convert.repleinshJob.RepleinshJobMainConvert; import com.win.module.wms.dal.dataobject.businesstype.BusinesstypeDO; import com.win.module.wms.dal.dataobject.location.LocationDO; import com.win.module.wms.dal.dataobject.repleinshJob.RepleinshJobDetailDO; +import com.win.module.wms.dal.dataobject.repleinshJob.RepleinshJobMainDO; import com.win.module.wms.dal.dataobject.repleinshRecord.RepleinshRecordDetailDO; import com.win.module.wms.dal.dataobject.repleinshRecord.RepleinshRecordMainDO; import com.win.module.wms.dal.dataobject.transactiontype.TransactiontypeDO; +import com.win.module.wms.dal.mysql.repleinshJob.RepleinshJobMainMapper; import com.win.module.wms.dal.mysql.repleinshRecord.RepleinshRecordDetailMapper; import com.win.module.wms.dal.mysql.repleinshRecord.RepleinshRecordMainMapper; -import com.win.module.wms.enums.DictTypeConstants; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; import com.win.module.wms.service.expectin.ExpectinService; import com.win.module.wms.service.expectout.ExpectoutService; @@ -29,24 +33,18 @@ import com.win.module.wms.service.transaction.TransactionService; import com.win.module.wms.util.JobUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; - import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; -import com.win.module.wms.dal.dataobject.repleinshJob.RepleinshJobMainDO; -import com.win.framework.common.pojo.PageResult; - -import com.win.module.wms.convert.repleinshJob.RepleinshJobMainConvert; -import com.win.module.wms.dal.mysql.repleinshJob.RepleinshJobMainMapper; - import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static com.win.module.wms.enums.ErrorCodeConstants.*; +import static com.win.module.wms.enums.ErrorCodeConstants.REPLEINSH_JOB_MAIN_NOT_EXISTS; +import static com.win.module.wms.enums.ErrorCodeConstants.REPLEINSH_JOB_MAIN_STATUS_ERROR; /** * 补料任务主 Service 实现类 @@ -215,6 +213,16 @@ public class RepleinshJobMainServiceImpl implements RepleinshJobMainService { return repleinshJobMainMapper.updateById(repleinshJobMainDO); } + @Override + public Long getRepleinshJobCount() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List statusList = new ArrayList<>(); + statusList.add(JobStatusEnum.PENDING.getCode()); + statusList.add(JobStatusEnum.PROCESSING.getCode()); + queryWrapper.in("`status`", statusList); + return repleinshJobMainMapper.selectCount(queryWrapper); + } + @Override @Transactional public String executeRepleinshJobMain(RepleinshJobMainUpdateReqVO repleinshJobMainUpdateReqVO) {