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; } /**