From a120995e1c30cf2f1f24ef0178821f6d8bc8c8c2 Mon Sep 17 00:00:00 2001 From: x_z Date: Sun, 9 Oct 2022 20:57:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8D=AE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=80=99=E9=80=89=E7=B1=BB=E5=9E=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/basic/BussinessTypeController.java | 2 +- .../admin/service/basic/BussinessTypeService.java | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java b/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java index 1ee5612..a84b685 100644 --- a/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java +++ b/src/main/java/com/glxp/udi/admin/controller/basic/BussinessTypeController.java @@ -160,7 +160,7 @@ public class BussinessTypeController { return ResultVOUtils.error(ResultEnum.DATA_ERROR); } - List bussinessTypeEntities = bussinessTypeService.candidateBussinessType(cndidateRequest.getMainAction(), cndidateRequest.getCustomerId()); + List bussinessTypeEntities = bussinessTypeService.candidateBussinessType(cndidateRequest.getMainAction(), cndidateRequest.getCustomerId(), cndidateRequest.getCurAction()); //查询补单单据类型 return ResultVOUtils.success(bussinessTypeEntities); } diff --git a/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java b/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java index 8f8d6e8..624071a 100644 --- a/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java +++ b/src/main/java/com/glxp/udi/admin/service/basic/BussinessTypeService.java @@ -18,6 +18,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; @Slf4j @@ -124,13 +125,21 @@ public class BussinessTypeService { * @param id * @return */ - public List candidateBussinessType(String mainAction, String customerId) { + public List candidateBussinessType(String mainAction, String customerId, String curAction) { if (mainAction.equals(TypeConstant.TYPE_OUT)) { mainAction = TypeConstant.TYPE_PUT; } else { mainAction = TypeConstant.TYPE_OUT; } - return bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId); + List bussinessTypeEntities = new ArrayList<>(); + if (StrUtil.isNotBlank(curAction)) { + //当前单据类型已经绑定的平衡补单类型 + BussinessTypeEntity bussinessTypeEntity = bussinessTypeDao.selectByAction(curAction); + bussinessTypeEntities.add(bussinessTypeEntity); + } + List result = bussinessTypeDao.selectCandidateBussinsessTypes(mainAction, customerId); + bussinessTypeEntities.addAll(result); + return bussinessTypeEntities; } /**