1.新增单据添加分仓参数校验

2.委托验收响应结果添加分仓字段显示,添加相关查询方法
fengcang
x_z 3 years ago
parent 94c57d757b
commit bac0685a12

@ -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<EntrustReceRespose> entrustReceEntities = entrustReceService.filterJoinEntrustRec(basicExportStatusRequest);
PageInfo<EntrustReceRespose> pageInfo;
List<EntrustReceResponse> entrustReceEntities = entrustReceService.filterJoinEntrustRec(basicExportStatusRequest);
PageInfo<EntrustReceResponse> pageInfo;
pageInfo = new PageInfo<>(entrustReceEntities);
PageSimpleResponse<EntrustReceRespose> pageSimpleResponse = new PageSimpleResponse<>();
PageSimpleResponse<EntrustReceResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(entrustReceEntities);
return ResultVOUtils.success(pageSimpleResponse);

@ -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("")

@ -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<DlEntrustReceEntity> downloadEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceResponse> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity);

@ -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);
}

@ -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;
}

@ -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<DlEntrustReceEntity> downloadEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceResponse> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity);

@ -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<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest) {
public List<EntrustReceResponse> 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<EntrustReceResponse> 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

@ -65,7 +65,7 @@
<select id="filterJoinEntrustRec" parameterType="com.glxp.api.admin.req.basic.BasicEntrustRecRequest"
resultType="com.glxp.api.admin.res.basic.EntrustReceRespose">
resultType="com.glxp.api.admin.res.basic.EntrustReceResponse">
select basic_entrust_accept.* ,
a.name curName, b.name entrustName,auth_user.employeeName
,c.name entrustInvName,d.name curInvName

@ -126,4 +126,9 @@
select count(*) from inv_warehouse_sub where parentId = #{parentId} and name = #{name}
</select>
<select id="selectNameByCode" resultType="java.lang.String">
select name
from inv_warehouse_sub
where code = #{code}
</select>
</mapper>
Loading…
Cancel
Save