add:pda出库确认页面
This commit is contained in:
@@ -74,6 +74,6 @@ public interface ISectattrService extends IService<Sectattr> {
|
||||
* key:库区类型
|
||||
* value:库区sectCode集合
|
||||
*/
|
||||
Map<String,List<String>> getSectType();
|
||||
Map<String,List<Sectattr>> getSectType();
|
||||
|
||||
}
|
||||
|
||||
@@ -309,16 +309,14 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
);
|
||||
}
|
||||
@Override
|
||||
@Cacheable(value = "baseConfig", key = "'allSectType'")
|
||||
public Map<String, List<String>> getSectType() {
|
||||
public Map<String, List<Sectattr>> getSectType() {
|
||||
final List<Sectattr> list = this.list(new LambdaQueryWrapper<Sectattr>()
|
||||
.eq(Sectattr::getIs_delete, BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(Sectattr::getIs_used, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
.select(Sectattr::getSect_type_attr, Sectattr::getSect_code));
|
||||
.select(Sectattr::getSect_name,Sectattr::getSect_type_attr, Sectattr::getSect_code));
|
||||
return list.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
Sectattr::getSect_type_attr,
|
||||
Collectors.mapping(Sectattr::getSect_code, Collectors.toList())
|
||||
Sectattr::getSect_type_attr
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package org.nl.wms.pda_manage.ios_manage.service;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -15,14 +18,11 @@ import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
public interface PdaIosOutService {
|
||||
|
||||
/**
|
||||
* 获取库存明细
|
||||
* 获取库区出库明细
|
||||
*
|
||||
* @param whereJson {
|
||||
* storagevehicle_code: 载具码
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse getDtl(JSONObject whereJson);
|
||||
PdaResponse<List<IOStorInvDis>> selectSectOutDis(String sectCode);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package org.nl.wms.pda_manage.ios_manage.service.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/5/20
|
||||
*/
|
||||
@Data
|
||||
public class OutBoundDis implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出入单分配标识
|
||||
*/
|
||||
private String iostorinvdisId;
|
||||
|
||||
|
||||
/**
|
||||
* 库区名称
|
||||
*/
|
||||
private String sectName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 数量计量单位名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 执行状态
|
||||
*/
|
||||
private String workStatus;
|
||||
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
private BigDecimal planQty;
|
||||
/**
|
||||
* 分配数量
|
||||
*/
|
||||
private BigDecimal assignQty;
|
||||
|
||||
/**
|
||||
* 仓位编码
|
||||
*/
|
||||
private String structCode;
|
||||
|
||||
/**
|
||||
* 存储载具编码
|
||||
*/
|
||||
private String storagevehicleCode;
|
||||
|
||||
/**
|
||||
* 搬运方式0自动搬运1手工
|
||||
*/
|
||||
private Boolean handType;
|
||||
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.annotation.Mock;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
@@ -26,6 +27,7 @@ import org.nl.wms.basedata_manage.service.dto.StrategyMater;
|
||||
import org.nl.wms.basedata_manage.service.dto.StrategyStructMaterialVO;
|
||||
import org.nl.wms.basedata_manage.service.dto.StrategyStructParam;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.PdaIosOutService;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.dto.OutBoundDis;
|
||||
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.enums.StatusEnum;
|
||||
@@ -140,11 +142,6 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
||||
@Autowired
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
|
||||
/**
|
||||
* 更新库存服务
|
||||
*/
|
||||
@Autowired
|
||||
private UpdateIvtUtils updateIvtUtils;
|
||||
|
||||
/**
|
||||
* 出库任务类
|
||||
@@ -160,8 +157,31 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
||||
|
||||
|
||||
@Override
|
||||
public PdaResponse getDtl(JSONObject whereJson) {
|
||||
return null;
|
||||
@Mock
|
||||
public PdaResponse selectSectOutDis(String sectCode) {
|
||||
if (StringUtils.isEmpty(sectCode)){
|
||||
throw new BadRequestException("查询手工出后配送失败,请求参数sect为空");
|
||||
}
|
||||
final List<IOStorInvDis> invDis = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
||||
.eq(IOStorInvDis::getSect_code, sectCode)
|
||||
.eq(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||
.eq(IOStorInvDis::getHand_type, Boolean.getBoolean(IOSEnum.HAND_TYPE.code("手动搬运"))));
|
||||
final ArrayList<OutBoundDis> result = new ArrayList<>();
|
||||
for (IOStorInvDis source : invDis) {
|
||||
OutBoundDis target = new OutBoundDis();
|
||||
// 字段映射(注意下划线命名转驼峰命名)
|
||||
target.setIostorinvdisId(source.getIostorinvdis_id());
|
||||
target.setSectName(source.getSect_name());
|
||||
target.setStructCode(source.getStruct_code());
|
||||
target.setStoragevehicleCode(source.getStoragevehicle_code());
|
||||
target.setMaterialCode(source.getMaterial_code());
|
||||
target.setUnitName(source.getQty_unit_name());
|
||||
target.setWorkStatus(source.getWork_status());
|
||||
target.setPlanQty(source.getPlan_qty());
|
||||
target.setHandType(source.getHand_type());
|
||||
result.add(target);
|
||||
}
|
||||
return PdaResponse.requestParamOk(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,15 +7,23 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.wms.basedata_manage.service.ISectattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.PdaIosOutService;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.dto.OutBoundDis;
|
||||
import org.nl.wms.pda_manage.outBound.dto.LineSideDto;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.nl.common.utils.ValidationUtil.assertNotBlankJson;
|
||||
|
||||
@@ -28,17 +36,40 @@ import static org.nl.common.utils.ValidationUtil.assertNotBlankJson;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pda/iosOut")
|
||||
@SaIgnore
|
||||
|
||||
@Slf4j
|
||||
public class PdaIosOutController {
|
||||
|
||||
@Autowired
|
||||
private PdaIosOutService pdaIosOutService;
|
||||
|
||||
@PostMapping("/getDtl")
|
||||
@Log("获取库存明细")
|
||||
public ResponseEntity<Object> getDtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaIosOutService.getDtl(whereJson), HttpStatus.OK);
|
||||
@Autowired
|
||||
private ISectattrService iSectattrService;
|
||||
|
||||
@GetMapping("/flatWarehouse")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> flatWarehouse() {
|
||||
final List<HashMap> flatWH = iSectattrService.getSectType()
|
||||
.getOrDefault(IOSEnum.ST_SECT_TYPE.code("平库"), Collections.emptyList())
|
||||
.stream()
|
||||
.map(sectattr -> MapOf.of(
|
||||
"label", sectattr.getSect_name(),
|
||||
"value", sectattr.getSect_code()
|
||||
))
|
||||
.collect(Collectors.toList());
|
||||
return new ResponseEntity<>(PdaResponse.requestParamOk(flatWH), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getOutBoundDtl")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getOutBoundDtl(String sectCode) {
|
||||
return new ResponseEntity<>(pdaIosOutService.selectSectOutDis(sectCode), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/assignOutDis")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> assignOutDis(OutBoundDis outBoundDis) {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ package org.nl.wms.pda_manage.util;
|
||||
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
|
||||
/**
|
||||
@@ -16,6 +18,8 @@ import org.nl.common.base.TableDataInfo;
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PdaResponse<T> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,8 @@ public enum IOSEnum {
|
||||
//入库分配明细状态
|
||||
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
||||
|
||||
HAND_TYPE(MapOf.of("自动搬运", "false", "手动搬运", "true")),
|
||||
|
||||
//组盘记录状态
|
||||
GROUP_PLATE_STATUS(MapOf.of("生成", "00", "组盘", "01", "入库", "02", "出库", "03")),
|
||||
|
||||
|
||||
@@ -127,5 +127,9 @@ public class IOStorInvDis implements Serializable {
|
||||
* 出入点位标识
|
||||
*/
|
||||
private String point_code;
|
||||
/**
|
||||
* 搬运方式0自动搬运1手工
|
||||
*/
|
||||
private Boolean hand_type;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleinfoService;
|
||||
import org.nl.wms.basedata_manage.service.ISectattrService;
|
||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.Sectattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||
import org.nl.wms.basedata_manage.service.dto.*;
|
||||
@@ -740,9 +741,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
if (ObjectUtil.isEmpty(dtls)) {
|
||||
throw new BadRequestException("当前订单无可分配出库明细");
|
||||
}
|
||||
List<String> flatWarehouse = iSectattrService.getSectType()
|
||||
List<Sectattr> collect = iSectattrService.getSectType()
|
||||
.getOrDefault(IOSEnum.ST_SECT_TYPE.code("平库"),Collections.emptyList());
|
||||
|
||||
final List<String> flatWarehouse = collect.stream().map(Sectattr::getSect_code).collect(Collectors.toList());
|
||||
for (IOStorInvDtlDto dtl:dtls){
|
||||
BigDecimal unassign_qty = dtl.getUnassign_qty();
|
||||
if (unassign_qty.intValue() <= 0){
|
||||
|
||||
@@ -49,3 +49,6 @@ CREATE TABLE `sys_mock_config` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_class_method` (`class_name`, `method_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Mock配置表';
|
||||
|
||||
ALTER TABLE `st_ivt_iostorinvdis`
|
||||
ADD COLUMN `hand_type` tinyint(1) NULL DEFAULT 0 COMMENT '出库类型:0自动搬运1手动搬运' AFTER `point_code`;
|
||||
|
||||
Reference in New Issue
Block a user