From 4dac4209af94efb1fe5e2f32b74cfca26cb76653 Mon Sep 17 00:00:00 2001 From: yewj Date: Sat, 24 Aug 2024 18:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E7=9B=B8=E5=85=B3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicCollectPointCategoryController.java | 22 ++++++++---- .../inout/IoCodeTempController.java | 10 +++--- .../glxp/api/entity/auth/SysWorkplace.java | 36 +++---------------- .../api/req/collect/CollectOrderRequest.java | 9 +++++ .../mapper/basic/BasicCollectUserMapper.xml | 2 +- .../mapper/collect/IoCollectOrderMapper.xml | 15 ++++++++ 6 files changed, 50 insertions(+), 44 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicCollectPointCategoryController.java b/src/main/java/com/glxp/api/controller/basic/BasicCollectPointCategoryController.java index 2f0344293..ab58bf05d 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicCollectPointCategoryController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicCollectPointCategoryController.java @@ -1,15 +1,18 @@ package com.glxp.api.controller.basic; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.controller.BaseController; +import com.glxp.api.entity.auth.SysWorkplace; import com.glxp.api.entity.basic.BasicCollectPointCategory; import com.glxp.api.req.basic.BasicCollectgoryRequest; import com.glxp.api.req.basic.BasicProductTypeRequest; import com.glxp.api.res.basic.BasicCollectGoryResponse; import com.glxp.api.res.basic.BasicProductCategoryTypeResponse; +import com.glxp.api.service.auth.SysWorkplaceService; import com.glxp.api.service.basic.BasicCollectPointCategoryService; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; @@ -63,7 +66,6 @@ public class BasicCollectPointCategoryController extends BaseController { } - @PostMapping("udiwms/basic/collectPoint/category/updateTree") public BaseResponse updateTree(@RequestBody BasicCollectgoryRequest request) { @@ -93,12 +95,22 @@ public class BasicCollectPointCategoryController extends BaseController { } + @Resource + SysWorkplaceService sysWorkplaceService; + @PostMapping("udiwms/basic/collectPoint/category/deleteTree") - public BaseResponse addTree(@RequestBody BasicCollectPointCategory basicCollectPointCategory) { + public BaseResponse deleteTree(@RequestBody BasicCollectPointCategory basicCollectPointCategory) { + + + SysWorkplace sysWorkplace = sysWorkplaceService.getOne(new LambdaQueryWrapper().eq(SysWorkplace::getConstituencies, basicCollectPointCategory.getCode()).last("limit 1")); + if (sysWorkplace != null) { + return ResultVOUtils.error(500, "删除失败,请先移除该组别下的用户"); + } + QueryWrapper wrapper = new QueryWrapper(); - wrapper.eq("code",basicCollectPointCategory.getCode()); + wrapper.eq("code", basicCollectPointCategory.getCode()); boolean remove = basicCollectPointCategoryService.remove(wrapper); - if (!remove){ + if (!remove) { return ResultVOUtils.error("删除失败"); } return ResultVOUtils.success(); @@ -106,7 +118,5 @@ public class BasicCollectPointCategoryController extends BaseController { } - - } diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index 284468f32..fbdbf2167 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -646,9 +646,9 @@ public class IoCodeTempController extends BaseController { exitLocalEntity.setCount(exitLocalEntity.getMyCount() + 1); if (bussinessTypeEntity.isUse()) { - exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0))); + exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0))); } else { - exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0))); + exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0))); } if (!StringUtils.isBlank(exitLocalEntity.getSerialNo())) { @@ -781,9 +781,9 @@ public class IoCodeTempController extends BaseController { } //计算实际数量 if (bussinessTypeEntity.isUse()) { - codeEnttity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getUseActCount(udiRelevanceResponse)); + codeEnttity.setReCount(IntUtil.value(codeEnttity.getMyReCount()) * udiCalCountUtil.getUseActCount(udiRelevanceResponse)); } else { - codeEnttity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getCirActCount(udiRelevanceResponse)); + codeEnttity.setReCount(IntUtil.value(codeEnttity.getMyReCount()) * udiCalCountUtil.getCirActCount(udiRelevanceResponse)); } } else if (udiRelevanceResponses.size() == 0) { if (unitFk == null) @@ -2146,7 +2146,7 @@ public class IoCodeTempController extends BaseController { return ResultVOUtils.error(500, "当前上货只允许录入拆零产品!"); } //计算实际数量 - codeEnttity.setReCount(codeEnttity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponse)); + codeEnttity.setReCount(IntUtil.value(codeEnttity.getMyReCount()) * udiCalCountUtil.getActCount(udiRelevanceResponse)); } else if (udiRelevanceResponses.size() == 0) { if (unitFk == null) return ResultVOUtils.error(500, "耗材字典不存在此产品!"); diff --git a/src/main/java/com/glxp/api/entity/auth/SysWorkplace.java b/src/main/java/com/glxp/api/entity/auth/SysWorkplace.java index 70be07f50..e13afd6df 100644 --- a/src/main/java/com/glxp/api/entity/auth/SysWorkplace.java +++ b/src/main/java/com/glxp/api/entity/auth/SysWorkplace.java @@ -70,33 +70,11 @@ public class SysWorkplace implements Serializable { @TableField(value = "chargeUser") private String chargeUser; - @TableField(value = "constituencies") - private String constituencies; - - /** - * 1.扫码生成业务单 - * 2.按单校验三期 - * 3.按单不校验三期( + * 所属组别 */ - @TableField(value = "operationType") - private Integer operationType; - - /** - * 1: '插入', - * 2: '不插入', - * 3: '提醒不插入' - */ - @TableField(value = "checkInsert") - private Integer checkInsert; - - /** - * 1: '信息提醒', - * 2: '信息弹框提醒', - * 3: '不提醒' - */ - @TableField(value = "warnType") - private Integer warnType; + @TableField(value = "constituencies") + private String constituencies; @TableField(value = "unitTittle") @@ -109,12 +87,6 @@ public class SysWorkplace implements Serializable { @TableField(value = "orderId") private String orderId; - /** - * 往来单位类型 1:客户,2:供应商,3:内部科室,4:特殊往来 - */ - @TableField(value = "corpType") - private Integer corpType; - /** * 工位状态 0:停用 1:在用 @@ -135,7 +107,7 @@ public class SysWorkplace implements Serializable { private Integer invRemindNumber; /** - * 工位类型 1:拆零;2:取整;3:全部 + * 工位类型 1:拆零;2:取整;3:全部 */ @TableField(value = "workplaceType") private Integer workplaceType; diff --git a/src/main/java/com/glxp/api/req/collect/CollectOrderRequest.java b/src/main/java/com/glxp/api/req/collect/CollectOrderRequest.java index 824395631..b45d35b9d 100644 --- a/src/main/java/com/glxp/api/req/collect/CollectOrderRequest.java +++ b/src/main/java/com/glxp/api/req/collect/CollectOrderRequest.java @@ -99,4 +99,13 @@ public class CollectOrderRequest extends ListPageRequest { private Boolean confirmFinish; + private String backupOrderRemark1; + private String backupOrderRemark2; + private String backupOrderRemark3; + private String backupOrderRemark4; + private String backupOrderRemark5; + private String backupOrderRemark6; + private String unionKey; + + } diff --git a/src/main/resources/mybatis/mapper/basic/BasicCollectUserMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicCollectUserMapper.xml index 8fa2b4e94..34b275738 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicCollectUserMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicCollectUserMapper.xml @@ -2,7 +2,7 @@