diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/EntrustReceController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/EntrustReceController.java index acb9adde..1e69ea85 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/EntrustReceController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/EntrustReceController.java @@ -9,7 +9,7 @@ import com.glxp.api.admin.req.basic.BasicEntrustRecRequest; import com.glxp.api.admin.req.inout.DeleteRequest; import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest; import com.glxp.api.admin.res.PageSimpleResponse; -import com.glxp.api.admin.res.basic.EntrustReceRespose; +import com.glxp.api.admin.res.basic.EntrustReceResponse; import com.glxp.api.admin.service.auth.CustomerService; import com.glxp.api.admin.service.basic.BussinessTypeService; import com.glxp.api.admin.service.basic.EntrustReceService; @@ -37,10 +37,10 @@ public class EntrustReceController { @GetMapping("/spms/entrust/rece/filter") public BaseResponse getEntrustRece(BasicEntrustRecRequest basicExportStatusRequest) { - List entrustReceEntities = entrustReceService.filterJoinEntrustRec(basicExportStatusRequest); - PageInfo pageInfo; + List entrustReceEntities = entrustReceService.filterJoinEntrustRec(basicExportStatusRequest); + PageInfo pageInfo; pageInfo = new PageInfo<>(entrustReceEntities); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setList(entrustReceEntities); return ResultVOUtils.success(pageSimpleResponse); diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java index f9ff807a..7d1f5f97 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/WareHouseController.java @@ -53,8 +53,6 @@ import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; @@ -270,9 +268,13 @@ public class WareHouseController { @AuthRuleAnnotation("") @GetMapping("warehouse/inout/submitOrderWeb") public BaseResponse submitOrderWeb(AddOrderRequest orderEntity) { + if (null != orderEntity) { + if (StrUtil.isBlank(orderEntity.getInvWarehouseCode())) { + return ResultVOUtils.error(500, "分仓未选择"); + } + } orderService.updateOrderStatus(orderEntity.getOrderId(), ConstantStatus.ORDER_STATUS_PROCESS); return saveOrderWeb(orderEntity); -// return ResultVOUtils.success(); } @AuthRuleAnnotation("") diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/EntrustReceDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/EntrustReceDao.java index 247624e1..94123d4f 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/basic/EntrustReceDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/basic/EntrustReceDao.java @@ -3,7 +3,7 @@ package com.glxp.api.admin.dao.basic; import com.glxp.api.admin.entity.basic.DlEntrustReceEntity; import com.glxp.api.admin.entity.basic.EntrustReceEntity; import com.glxp.api.admin.req.basic.BasicEntrustRecRequest; -import com.glxp.api.admin.res.basic.EntrustReceRespose; +import com.glxp.api.admin.res.basic.EntrustReceResponse; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -17,7 +17,7 @@ public interface EntrustReceDao { List downloadEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); - List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); + List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity); diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvSubWarehouseDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvSubWarehouseDao.java index 0bf29465..8049e11a 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvSubWarehouseDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/inventory/InvSubWarehouseDao.java @@ -35,4 +35,12 @@ public interface InvSubWarehouseDao { * @return */ int countByParentIdAndName(@Param("parentId") String parentId, @Param("name") String name); + + /** + * 根据编码查询名称 + * + * @param code + * @return + */ + String selectNameByCode(@Param("code") String code); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceRespose.java b/api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceResponse.java similarity index 57% rename from api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceRespose.java rename to api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceResponse.java index 8170b6b5..ad5ce51d 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceRespose.java +++ b/api-admin/src/main/java/com/glxp/api/admin/res/basic/EntrustReceResponse.java @@ -5,7 +5,7 @@ import lombok.Data; import java.util.Date; @Data -public class EntrustReceRespose { +public class EntrustReceResponse { private Integer id; private String action; private String entrustInv; @@ -16,11 +16,48 @@ public class EntrustReceRespose { private String remark; private boolean finishRece; private String curName; + private String entrustName; + + /** + * 委托验收人 + */ private String employeeName; + + /** + * 分库名称 + */ private String entrustInvName; + + /** + * 当前仓库编码 + */ private String curInv; + + /** + * 当前仓库名称 + */ private String curInvName; + + /** + * 委托分库编码 + */ private String entrustSubInv; + + /** + * 当前分库编码 + */ private String invWarehouseCode; + + /** + * 当前分库名称 + */ + private String invWarehouseName; + + /** + * 委托分库名称 + */ + private String entrustSubInvName; + + } diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/basic/EntrustReceService.java b/api-admin/src/main/java/com/glxp/api/admin/service/basic/EntrustReceService.java index 46bbcdae..8509ae37 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/basic/EntrustReceService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/basic/EntrustReceService.java @@ -4,7 +4,7 @@ package com.glxp.api.admin.service.basic; import com.glxp.api.admin.entity.basic.DlEntrustReceEntity; import com.glxp.api.admin.entity.basic.EntrustReceEntity; import com.glxp.api.admin.req.basic.BasicEntrustRecRequest; -import com.glxp.api.admin.res.basic.EntrustReceRespose; +import com.glxp.api.admin.res.basic.EntrustReceResponse; import java.util.List; @@ -16,7 +16,7 @@ public interface EntrustReceService { List downloadEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); - List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); + List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest); boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity); diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/EntrustReceServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/EntrustReceServiceImpl.java index 90fae389..5c1c31c7 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/EntrustReceServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/basic/impl/EntrustReceServiceImpl.java @@ -3,10 +3,11 @@ package com.glxp.api.admin.service.basic.impl; import cn.hutool.core.collection.CollUtil; import com.github.pagehelper.PageHelper; import com.glxp.api.admin.dao.basic.EntrustReceDao; +import com.glxp.api.admin.dao.inventory.InvSubWarehouseDao; import com.glxp.api.admin.entity.basic.DlEntrustReceEntity; import com.glxp.api.admin.entity.basic.EntrustReceEntity; import com.glxp.api.admin.req.basic.BasicEntrustRecRequest; -import com.glxp.api.admin.res.basic.EntrustReceRespose; +import com.glxp.api.admin.res.basic.EntrustReceResponse; import com.glxp.api.admin.service.basic.EntrustReceService; import org.springframework.stereotype.Service; @@ -19,6 +20,8 @@ public class EntrustReceServiceImpl implements EntrustReceService { @Resource EntrustReceDao entrustReceDao; + @Resource + private InvSubWarehouseDao invSubWarehouseDao; @Override public EntrustReceEntity findById(Integer id) { @@ -57,7 +60,7 @@ public class EntrustReceServiceImpl implements EntrustReceService { } @Override - public List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest) { + public List filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest) { if (basicEntrustRecRequest == null) { return Collections.emptyList(); @@ -66,7 +69,18 @@ public class EntrustReceServiceImpl implements EntrustReceService { int offset = (basicEntrustRecRequest.getPage() - 1) * basicEntrustRecRequest.getLimit(); PageHelper.offsetPage(offset, basicEntrustRecRequest.getLimit()); } - return entrustReceDao.filterJoinEntrustRec(basicEntrustRecRequest); + List entrustReceResponses = entrustReceDao.filterJoinEntrustRec(basicEntrustRecRequest); + if (CollUtil.isNotEmpty(entrustReceResponses)) { + //查询当前分库名称和委托验收分库名称 + entrustReceResponses.forEach(entrustReceResponse -> { + String invWarehouseName = invSubWarehouseDao.selectNameByCode(entrustReceResponse.getInvWarehouseCode());//查询当前分库名称 + entrustReceResponse.setInvWarehouseName(invWarehouseName); + + String entrustSubInvName = invSubWarehouseDao.selectNameByCode(entrustReceResponse.getEntrustSubInv()); + entrustReceResponse.setEntrustSubInvName(entrustSubInvName); + }); + } + return entrustReceResponses; } @Override diff --git a/api-admin/src/main/resources/mybatis/mapper/basic/EntrustReceDao.xml b/api-admin/src/main/resources/mybatis/mapper/basic/EntrustReceDao.xml index 3d058a00..b9dc040a 100644 --- a/api-admin/src/main/resources/mybatis/mapper/basic/EntrustReceDao.xml +++ b/api-admin/src/main/resources/mybatis/mapper/basic/EntrustReceDao.xml @@ -65,7 +65,7 @@ + \ No newline at end of file