1、零部件出库的装车单开发测试完毕,出库单待测
This commit is contained in:
parent
8e0458d944
commit
b2babc691d
|
|
@ -82,18 +82,22 @@ public class ComponentOutboundController {
|
|||
* @return 出库单详情列表
|
||||
*/
|
||||
@GetMapping("getItems")
|
||||
public ApiResult<List<ComponentOutboundItemVO>> getOutboundItem(@RequestParam @NotNull Long outboundId) {
|
||||
public ApiResult<ComponentOutboundEditVO> getOutboundItem(@RequestParam @NotNull Long outboundId) {
|
||||
ComponentOutboundEditVO outboundEditVO = new ComponentOutboundEditVO();
|
||||
WmsComponentOutbound outbound = wmsComponentOutboundService.getById(outboundId);
|
||||
ComponentOutboundVO outboundVO = Convert.convert(ComponentOutboundVO.class, outbound);
|
||||
outboundEditVO.setOutbound(outboundVO);
|
||||
// 查询退库单对应的明细项
|
||||
List<WmsComponentOutboundItem> items = wmsComponentOutboundItemService.lambdaQuery()
|
||||
.eq(WmsComponentOutboundItem::getOutboundId, outboundId)
|
||||
.list();
|
||||
// 如果明细项为空,返回空列表
|
||||
if (CollectionUtil.isEmpty(items)) {
|
||||
return ApiResult.success(Collections.emptyList());
|
||||
if (CollectionUtil.isNotEmpty(items)) {
|
||||
List<ComponentOutboundItemVO> vos = Convert.toList(ComponentOutboundItemVO.class, items);
|
||||
outboundEditVO.setItems(vos);
|
||||
}
|
||||
// 将明细项转换为VO对象
|
||||
List<ComponentOutboundItemVO> vos = Convert.toList(ComponentOutboundItemVO.class, items);
|
||||
return ApiResult.success(vos);
|
||||
return ApiResult.success(outboundEditVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -102,7 +106,7 @@ public class ComponentOutboundController {
|
|||
* @param itemId 出库单详情ID,不能为空
|
||||
* @return 扫码信息
|
||||
*/
|
||||
@GetMapping("getItems")
|
||||
@GetMapping("getscancodes")
|
||||
public ApiResult<List<ScanCodeVO>> getScanCode(Long itemId) {
|
||||
List<WmsComponentOutboundScanCodes> codes = wmsComponentOutboundScanCodesService.findByOutboundItemId(itemId);
|
||||
List<ScanCodeVO> vos = Convert.toList(ScanCodeVO.class, codes);
|
||||
|
|
@ -150,6 +154,10 @@ public class ComponentOutboundController {
|
|||
outboundItems.add(outboundItem);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(item.getScanCodes())) {
|
||||
//判断扫码数量是否等于了出货数量
|
||||
BigDecimal qty = item.getScanCodes().stream().map(ScanCodeQO::getCodeNum).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
VUtil.trueThrowBusinessError(outboundItem.getOutQty().equals(qty)).throwMessage("物料[" + outboundItem.getIdnrk() + "]的出库数量[" + qty + "]不等于装箱数量[" + outboundItem.getOutQty() + "]");
|
||||
|
||||
//判断是否有多个批次号
|
||||
List<String> batchNumbers = item.getScanCodes().stream().map(ScanCodeQO::getBatchNumber).distinct().toList();
|
||||
if (batchNumbers.size() == 1) {
|
||||
|
|
@ -185,7 +193,6 @@ public class ComponentOutboundController {
|
|||
|
||||
|
||||
for (ScanCodeQO code : item.getScanCodes()) {
|
||||
|
||||
VUtil.trueThrowBusinessError(codeIds.contains(code.getCodeId())).throwMessage("物料[" + outboundItem.getIdnrk() + "]的条码[" + code.getCodeId() + "]被重复使用");
|
||||
codeIds.add(code.getCodeId());
|
||||
// 组装条码信息
|
||||
|
|
@ -204,7 +211,7 @@ public class ComponentOutboundController {
|
|||
}
|
||||
|
||||
} else {
|
||||
setInventoryDTO(inventories, outboundItem.getIdnrk(), packing.getFactoryNo(), outboundItem.getLgort(), "", item.getOutQty());
|
||||
setInventoryDTO(inventories, outboundItem.getIdnrk(), packing.getFactoryNo(), outboundItem.getLgort(), "", outboundItem.getOutQty());
|
||||
set3A20Item("", outboundItem, outboundItem.getOutQty(), zwm3a20DTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -275,9 +282,9 @@ public class ComponentOutboundController {
|
|||
.setPotx2(packingItem.getPotx2())
|
||||
.setPmenge(packingItem.getPmenge())
|
||||
.setLgpbe(packingItem.getLgpbe())
|
||||
.setLgort(packingItem.getLgort())
|
||||
.setLgort(item.getLgort())
|
||||
.setLgobe(packingItem.getLgobe())
|
||||
.setOutQty(item.getOutQty())
|
||||
.setOutQty(packingItem.getMenge())
|
||||
.setOutboundId(outbound.getId());
|
||||
return outboundItem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,19 +63,24 @@ public class ComponentPackingController {
|
|||
* @param packingId 装箱单ID,不能为空
|
||||
* @return 装箱单详情列表
|
||||
*/
|
||||
@GetMapping("getItems")
|
||||
public ApiResult<List<ComponentPackingItemVO>> getPackingItem(@RequestParam @NotNull Long packingId) {
|
||||
@GetMapping("getItem")
|
||||
public ApiResult<ComponentPackingEditVO> getPackingItem(@RequestParam @NotNull Long packingId) {
|
||||
ComponentPackingEditVO packingVO = new ComponentPackingEditVO();
|
||||
WmsComponentPacking componentPacking = wmscomponentPackingService.getById(packingId);
|
||||
ComponentPackingVO componentPackingVO = Convert.convert(ComponentPackingVO.class, componentPacking);
|
||||
packingVO.setPackingVO(componentPackingVO);
|
||||
// 查询退库单对应的明细项
|
||||
List<WmsComponentPackingItem> items = wmsComponentPackingItemService.lambdaQuery()
|
||||
.eq(WmsComponentPackingItem::getPackingId, packingId)
|
||||
.list();
|
||||
// 如果明细项为空,返回空列表
|
||||
if (CollectionUtil.isEmpty(items)) {
|
||||
return ApiResult.success(Collections.emptyList());
|
||||
if (CollectionUtil.isNotEmpty(items)) {
|
||||
List<ComponentPackingItemVO> vos = Convert.toList(ComponentPackingItemVO.class, items);
|
||||
packingVO.setPackingItemVO(vos);
|
||||
}
|
||||
// 将明细项转换为VO对象
|
||||
List<ComponentPackingItemVO> vos = Convert.toList(ComponentPackingItemVO.class, items);
|
||||
return ApiResult.success(vos);
|
||||
|
||||
return ApiResult.success(packingVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -86,7 +91,7 @@ public class ComponentPackingController {
|
|||
*/
|
||||
@PostMapping("getorders")
|
||||
public ApiResult<ZWM3A19DTO> getComponentOrders(@Valid @RequestBody ComponentOrderQO request) {
|
||||
ZWM3A19DTO result = sapService.zwm3a19(request.getIVbelv(), request.getIWerks());
|
||||
ZWM3A19DTO result = sapService.zwm3a19(request.getVbelv(), request.getWerks());
|
||||
return ApiResult.success(result);
|
||||
}
|
||||
|
||||
|
|
@ -114,6 +119,24 @@ public class ComponentPackingController {
|
|||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除未出库的装车单
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
public ApiResult<Void> deletePacking(@Valid @RequestBody List<Long> ids) {
|
||||
//首先判断是否存在已完成的单据
|
||||
List<WmsComponentPacking> packingList = wmscomponentPackingService.lambdaQuery()
|
||||
.eq(WmsComponentPacking::getIsCompleted, 2)
|
||||
.in(WmsComponentPacking::getId, ids)
|
||||
.list();
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(packingList)).throwMessage("存在已完成的装车单,请勿删除");
|
||||
componentPackingControllerService.deletePacking(ids);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 装箱单详情列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public class ComponentOutboundControllerService {
|
|||
|
||||
outbound.setOutboundNo(basdeSerialNumberService.generateSerialNumber(5));
|
||||
wmsComponentOutboundService.save(outbound);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(outboundItems)) {
|
||||
wmsComponentOutboundItemService.saveBatch(outboundItems);
|
||||
}
|
||||
|
|
@ -66,25 +67,11 @@ public class ComponentOutboundControllerService {
|
|||
inventoryService.out(inventories);
|
||||
}
|
||||
//处理装箱单的货物详情的出库数量
|
||||
for (WmsComponentOutboundItem item : outboundItems) {
|
||||
wmsComponentPackingItemService.addOutQty(item.getPackingItemId(), item.getOutQty());
|
||||
}
|
||||
|
||||
Integer isCompleted = 1;
|
||||
List<WmsComponentPackingItem> packingItems = wmsComponentPackingItemService.lambdaQuery()
|
||||
.eq(WmsComponentPackingItem::getPackingId, outbound.getPackingId())
|
||||
.apply("menge>out_qty")
|
||||
.select(WmsComponentPackingItem::getId)
|
||||
.list();
|
||||
if (CollectionUtil.isNotEmpty(packingItems)) {
|
||||
isCompleted = 2;
|
||||
}
|
||||
|
||||
wmscomponentPackingService.lambdaUpdate()
|
||||
.set(WmsComponentPacking::getIsCompleted, isCompleted)
|
||||
.set(WmsComponentPacking::getIsCompleted, 2)
|
||||
.eq(WmsComponentPacking::getId, outbound.getPackingId())
|
||||
.update();
|
||||
|
||||
wmsComponentPackingItemService.addOutQty(outbound.getPackingId());
|
||||
// 处理SAP的信息,并写入物料凭证和物料年度凭证信息到出口单中
|
||||
Pair<String, String> result = sapService.zwm3a20(zwm3a20DTO);
|
||||
wmsComponentOutboundService.lambdaUpdate()
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.nflg.wms.admin.service;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.nflg.wms.common.pojo.qo.ComponentPackingEditInputQO;
|
||||
import com.nflg.wms.common.pojo.qo.ComponentPackingInputQO;
|
||||
import com.nflg.wms.common.pojo.qo.ComponentPackingItemEditInputQO;
|
||||
|
|
@ -98,17 +99,12 @@ public class ComponentPackingControllerService {
|
|||
WmsComponentPacking wmsComponentPacking = wmscomponentPackingService.getById(request.getId());
|
||||
VUtil.trueThrowBusinessError(wmsComponentPacking.getIsCompleted() > 0).throwMessage("此单据已开始出库,不可以编辑");
|
||||
wmsComponentPacking.setDatum(request.getDatum());
|
||||
wmsComponentPacking.setXnum(request.getXnum());
|
||||
wmsComponentPacking.setCnum(request.getCnum());
|
||||
wmsComponentPacking.setUname(request.getUname());
|
||||
wmsComponentPacking.setHuodh(request.getHuodh());
|
||||
wmsComponentPacking.setBname(request.getBname());
|
||||
wmsComponentPacking.setZjshz(request.getZjshz());
|
||||
wmsComponentPacking.setZchep(request.getZchep());
|
||||
wmsComponentPacking.setTelNumber(request.getTelNumber());
|
||||
wmsComponentPacking.setPName(request.getPName());
|
||||
wmsComponentPacking.setLBezei(request.getLBezei());
|
||||
wmsComponentPacking.setLName(request.getLName());
|
||||
wmsComponentPacking.setGStreen(request.getGStreen());
|
||||
wmsComponentPacking.setGStrSuppl2(request.getGStrSuppl2());
|
||||
//修改自己集合
|
||||
List<WmsComponentPackingItem> wmsComponentPackingItems = wmsComponentPackingItemService
|
||||
.lambdaQuery()
|
||||
|
|
@ -122,7 +118,6 @@ public class ComponentPackingControllerService {
|
|||
.orElse(null);
|
||||
if (Objects.isNull(item1))
|
||||
continue;
|
||||
item1.setMenge(item.getMenge());
|
||||
item1.setZatwrt(item.getZatwrt());
|
||||
item1.setZxiah(item.getZxiah());
|
||||
item1.setZtext(item.getZtext());
|
||||
|
|
@ -131,4 +126,10 @@ public class ComponentPackingControllerService {
|
|||
}
|
||||
wmscomponentPackingService.updateById(wmsComponentPacking);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void deletePacking(@Valid List<Long> ids) {
|
||||
wmsComponentPackingItemService.remove(new LambdaQueryWrapper<WmsComponentPackingItem>().in(WmsComponentPackingItem::getPackingId, ids));
|
||||
wmscomponentPackingService.removeByIds(ids);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.nflg.wms.admin.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Pair;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
|
@ -1099,17 +1100,17 @@ public class SapService {
|
|||
|
||||
// 获取导出参数,构造返回结果对象
|
||||
JCoParameterList exportParam = function.getExportParameterList();
|
||||
if (StrUtil.isNotBlank(exportParam.getString("E_MJAHR"))) {
|
||||
log.info("SAP返回物料凭证信息: MBLNR={}, MJAHR={}", exportParam.getString("E_MBLNR"), exportParam.getString("E_MJAHR"));
|
||||
return new ZWM00MB113DTO()
|
||||
.setEMjahr(exportParam.getString("E_MJAHR"))
|
||||
.setEMblnr(exportParam.getString("E_MBLNR"));
|
||||
} else {
|
||||
JCoTable returnTable = function.getTableParameterList().getTable("T_RETURN");
|
||||
log.info("SAP返回: {}", returnTable);
|
||||
returnTable.setRow(0);
|
||||
throw new NflgException(STATE.BusinessError, "SAP错误:" + returnTable.getString("MESSAGE"));
|
||||
}
|
||||
if (StrUtil.isNotBlank(exportParam.getString("E_MJAHR"))) {
|
||||
log.info("SAP返回物料凭证信息: MBLNR={}, MJAHR={}", exportParam.getString("E_MBLNR"), exportParam.getString("E_MJAHR"));
|
||||
return new ZWM00MB113DTO()
|
||||
.setEMjahr(exportParam.getString("E_MJAHR"))
|
||||
.setEMblnr(exportParam.getString("E_MBLNR"));
|
||||
} else {
|
||||
JCoTable returnTable = function.getTableParameterList().getTable("T_RETURN");
|
||||
log.info("SAP返回: {}", returnTable);
|
||||
returnTable.setRow(0);
|
||||
throw new NflgException(STATE.BusinessError, "SAP错误:" + returnTable.getString("MESSAGE"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1170,12 +1171,18 @@ public class SapService {
|
|||
parameters.put("I_WERKS", iWerks);
|
||||
ZWM3A19DTO result = new ZWM3A19DTO();
|
||||
JCoFunction function = exec("ZWM3A19", parameters, null);
|
||||
JCoStructure structure = function.getExportParameterList().getStructure("E_RETURN");
|
||||
JCoParameterList structure = function.getExportParameterList();
|
||||
VUtil.trueThrowBusinessError(!StrUtil.equals(structure.getString("E_TYPE"), "S"))
|
||||
.throwMessage("SAP错误:" + structure.getString("E_MSG"));
|
||||
|
||||
JCoTable ot1 = function.getTableParameterList().getTable("HEAD");
|
||||
result.setHeadDTO(JCoUtil.toBean(ot1, ZWM3A19HEADDTO.class));
|
||||
|
||||
|
||||
List<ZWM3A19HEADDTO> headDTOList = JCoUtil.toBeanList(ot1, ZWM3A19HEADDTO.class);
|
||||
VUtil.trueThrowBusinessError(CollUtil.isEmpty(headDTOList))
|
||||
.throwMessage("SAP返回结果为空");
|
||||
|
||||
result.setHeadDTO(headDTOList.get(0));
|
||||
|
||||
JCoTable ot2 = function.getTableParameterList().getTable("ITEM");
|
||||
result.setItemDTOList(JCoUtil.toBeanList(ot2, ZWM3A19ITEMDTO.class));
|
||||
|
|
|
|||
|
|
@ -1,30 +1,104 @@
|
|||
package com.nflg.wms.common.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ZWM3A19HEADDTO {
|
||||
private String datum;
|
||||
private String sernr;
|
||||
private String telNumber;
|
||||
private String uname;
|
||||
private String wbstk;
|
||||
private String lName;
|
||||
private String matnr;
|
||||
private String gStreen;
|
||||
private String cnum;
|
||||
private String zchep;
|
||||
private String vbelv;
|
||||
private String bname;
|
||||
private String maktx;
|
||||
private String xnum;
|
||||
private String huodh;
|
||||
private String pName;
|
||||
private String vbeln;
|
||||
private String lBezei;
|
||||
private String zjshz;
|
||||
private String name1;
|
||||
private String gStrSuppl2;
|
||||
/**
|
||||
* 装车日期
|
||||
*/
|
||||
|
||||
private Long datum;
|
||||
/**
|
||||
* BOM展开号
|
||||
*/
|
||||
private String sernr;
|
||||
/**
|
||||
* 司机电话
|
||||
*/
|
||||
@JsonProperty("TEL_NUMBER")
|
||||
private String telNumber;
|
||||
/**
|
||||
* 装车员
|
||||
*/
|
||||
private String uname;
|
||||
/**
|
||||
* 交货状态 A 没有处理 B部分处理 C 完全地处理
|
||||
*/
|
||||
private String wbstk;
|
||||
/**
|
||||
* 收货单位-T
|
||||
*/
|
||||
@JsonProperty("L_NAME")
|
||||
private String lName;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String matnr;
|
||||
/**
|
||||
* 收货地址-T
|
||||
*/
|
||||
@JsonProperty("G_STREEN")
|
||||
private String gStreen;
|
||||
/**
|
||||
* 装车号
|
||||
*/
|
||||
private String cnum;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String zchep;
|
||||
/**
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbelv;
|
||||
/**
|
||||
* 司机
|
||||
*/
|
||||
private String bname;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String maktx;
|
||||
/**
|
||||
* 箱号
|
||||
*/
|
||||
private String xnum;
|
||||
/**
|
||||
* 货单号
|
||||
*/
|
||||
private String huodh;
|
||||
/**
|
||||
* 办事处代理商
|
||||
*/
|
||||
@JsonProperty("p_name")
|
||||
private String pName;
|
||||
/**
|
||||
* 销售和分销凭证号(订单号)
|
||||
*/
|
||||
private String vbeln;
|
||||
/**
|
||||
* 装运类型的描述
|
||||
*/
|
||||
@JsonProperty("L_BEZEI")
|
||||
private String lBezei;
|
||||
/**
|
||||
* 驾驶证号
|
||||
*/
|
||||
private String zjshz;
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String name1;
|
||||
/**
|
||||
* 收货人电话-
|
||||
*/
|
||||
@JsonProperty("G_STR_SUPPL2")
|
||||
private String gStrSuppl2;
|
||||
|
||||
}
|
||||
|
|
@ -3,21 +3,75 @@ package com.nflg.wms.common.pojo.dto;
|
|||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ZWM3A19ITEMDTO {
|
||||
private String posnr;
|
||||
private String index;
|
||||
/**
|
||||
* 交货单项目
|
||||
*/
|
||||
private Integer posnr;
|
||||
/**
|
||||
* 循环,当前通过的编号
|
||||
*/
|
||||
private Integer index;
|
||||
/**
|
||||
* 包装方式
|
||||
*/
|
||||
private String ztext;
|
||||
private String pmenge;
|
||||
/**
|
||||
* 采购订单数量
|
||||
*/
|
||||
private BigDecimal pmenge;
|
||||
/**
|
||||
* 图号
|
||||
*/
|
||||
private String atwrt;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String ojtxb;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String zatwrt;
|
||||
/**
|
||||
* Bom项目文本
|
||||
*/
|
||||
private String potx2;
|
||||
/**
|
||||
* 销售和分销凭证号
|
||||
*/
|
||||
private String vbeln;
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String meins;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String idnrk;
|
||||
/**
|
||||
* 货位号
|
||||
*/
|
||||
private String lgpbe;
|
||||
private String menge;
|
||||
/**
|
||||
* 装箱数量
|
||||
*/
|
||||
private BigDecimal menge;
|
||||
/**
|
||||
* 箱号
|
||||
*/
|
||||
private String zxiah;
|
||||
|
||||
/**
|
||||
* 仓库
|
||||
*/
|
||||
private String lgort;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String lgobe;
|
||||
}
|
||||
|
|
@ -9,10 +9,10 @@ public class ComponentOrderQO {
|
|||
/* *
|
||||
* 交货单号
|
||||
*/
|
||||
private String iVbelv;
|
||||
private String vbelv;
|
||||
|
||||
/**
|
||||
* 工厂
|
||||
*/
|
||||
private String iWerks;
|
||||
private String werks;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import java.util.List;
|
|||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ComponentOutboundItemInputQO {
|
||||
public class
|
||||
ComponentOutboundItemInputQO {
|
||||
|
||||
/**
|
||||
* 装箱项目ID
|
||||
|
|
@ -16,9 +17,10 @@ public class ComponentOutboundItemInputQO {
|
|||
private Long packingItemId;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
* 库存地点
|
||||
*/
|
||||
private BigDecimal outQty;
|
||||
private String lgort;
|
||||
|
||||
|
||||
/**
|
||||
* 扫描码
|
||||
|
|
|
|||
|
|
@ -10,25 +10,25 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
public class ComponentPackingEditInputQO {
|
||||
|
||||
private Long Id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 发货日期
|
||||
* 装车日期
|
||||
*/
|
||||
private LocalDateTime datum;
|
||||
|
||||
/**
|
||||
* 箱号
|
||||
* 装车人
|
||||
*/
|
||||
private String xnum;
|
||||
private String uname;
|
||||
|
||||
/**
|
||||
* 装车号
|
||||
* 货单号
|
||||
*/
|
||||
private String cnum;
|
||||
private String huodh;
|
||||
|
||||
/**
|
||||
* 司机
|
||||
* 司机姓名
|
||||
*/
|
||||
private String bname;
|
||||
|
||||
|
|
@ -47,30 +47,6 @@ public class ComponentPackingEditInputQO {
|
|||
*/
|
||||
private String telNumber;
|
||||
|
||||
/**
|
||||
* 办事处代理商
|
||||
*/
|
||||
private String pName;
|
||||
|
||||
/**
|
||||
* 装运类型的描述
|
||||
*/
|
||||
private String lBezei;
|
||||
|
||||
/**
|
||||
* 收货单位-T
|
||||
*/
|
||||
private String lName;
|
||||
|
||||
/**
|
||||
* 收货地址-T
|
||||
*/
|
||||
private String gStreen;
|
||||
|
||||
/**
|
||||
* 收货人电话-
|
||||
*/
|
||||
private String gStrSuppl2;
|
||||
|
||||
/**
|
||||
* 装箱单明细
|
||||
|
|
|
|||
|
|
@ -13,12 +13,6 @@ public class ComponentPackingItemEditInputQO {
|
|||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal menge;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class ComponentPackingItemInputQO {
|
|||
/**
|
||||
* 交货单项目
|
||||
*/
|
||||
private String posnr;
|
||||
private Integer posnr;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
|
|
@ -88,8 +88,8 @@ public class ComponentPackingItemInputQO {
|
|||
*/
|
||||
private String lgobe;
|
||||
|
||||
/**
|
||||
* 装箱单ID
|
||||
*/
|
||||
private Long packingId;
|
||||
// /**
|
||||
// * 装箱单ID
|
||||
// */
|
||||
// private Long packingId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ComponentOutboundEditVO {
|
||||
private ComponentOutboundVO outbound;
|
||||
|
||||
private List<ComponentOutboundItemVO> items;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ComponentPackingEditVO {
|
||||
|
||||
private ComponentPackingVO packingVO;
|
||||
|
||||
private List<ComponentPackingItemVO> packingItemVO;
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import java.math.BigDecimal;
|
|||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ComponentPackingItemPdaVO {
|
||||
private Long Id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class ComponentPackingPdaVO {
|
|||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long Id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 装箱号
|
||||
|
|
@ -24,7 +24,12 @@ public class ComponentPackingPdaVO {
|
|||
private String vbeln;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* 装车时间
|
||||
*/
|
||||
private LocalDateTime CreateTime;
|
||||
private LocalDateTime datum;
|
||||
|
||||
/**
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbelv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ public class ComponentPackingVO {
|
|||
*/
|
||||
private String no;
|
||||
|
||||
/**
|
||||
* 销售和分销凭证号(订单号)
|
||||
*/
|
||||
private String vbeln;
|
||||
|
||||
/**
|
||||
* 设备编码(物料编码)
|
||||
*/
|
||||
|
|
@ -30,10 +35,7 @@ public class ComponentPackingVO {
|
|||
*/
|
||||
private String uname;
|
||||
|
||||
/**
|
||||
* 销售和分销凭证号(订单号)
|
||||
*/
|
||||
private String vbeln;
|
||||
|
||||
|
||||
/**
|
||||
* 物料描述(短文本)
|
||||
|
|
@ -86,7 +88,7 @@ public class ComponentPackingVO {
|
|||
private String huodh;
|
||||
|
||||
/**
|
||||
* 起始凭证
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbelv;
|
||||
|
||||
|
|
@ -121,7 +123,7 @@ public class ComponentPackingVO {
|
|||
private String wbstk;
|
||||
|
||||
/**
|
||||
* 0 未出库;1 部分出库;2 出库完成
|
||||
* 0 未出库;1 完成出库
|
||||
*/
|
||||
private Short isCompleted;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class WmsComponentPackingItem implements Serializable {
|
|||
/**
|
||||
* 交货单项目
|
||||
*/
|
||||
private String posnr;
|
||||
private Integer posnr;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ import java.math.BigDecimal;
|
|||
*/
|
||||
public interface WmsComponentPackingItemMapper extends BaseMapper<WmsComponentPackingItem> {
|
||||
|
||||
void addOutQty(Long packingItemId, BigDecimal outQty);
|
||||
void addOutQty(Long packingId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ import java.math.BigDecimal;
|
|||
*/
|
||||
public interface IWmsComponentPackingItemService extends IService<WmsComponentPackingItem> {
|
||||
|
||||
void addOutQty(Long packingItemId, BigDecimal outQty);
|
||||
void addOutQty(Long packingId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import java.math.BigDecimal;
|
|||
public class WmsComponentPackingItemServiceImpl extends ServiceImpl<WmsComponentPackingItemMapper, WmsComponentPackingItem> implements IWmsComponentPackingItemService {
|
||||
|
||||
@Override
|
||||
public void addOutQty(Long packingItemId, BigDecimal outQty) {
|
||||
baseMapper.addOutQty(packingItemId, outQty);
|
||||
public void addOutQty(Long packingId) {
|
||||
baseMapper.addOutQty(packingId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
<mapper namespace="com.nflg.wms.repository.mapper.WmsComponentPackingItemMapper">
|
||||
|
||||
<update id="addOutQty">
|
||||
update wms_component_packing_item set out_qty=out_qty+#{outQty} where id=#{packingItemId}
|
||||
update wms_component_packing_item set out_qty=menge where id=#{packingItemId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@
|
|||
|
||||
<select id="getOutboundTask" resultType="com.nflg.wms.common.pojo.vo.ComponentPackingPdaVO">
|
||||
select
|
||||
id,no,vbeln,create_time
|
||||
id,no,vbeln,create_time,datum,vbelv
|
||||
from wms_component_packing
|
||||
where (is_completed=0 or is_completed=1)
|
||||
<if test="request.no !=null and request.no !=''">
|
||||
and (no like concat('%', #{request.no}, '%') or vbeln like concat('%', #{request.no}, '%'))
|
||||
where is_completed=0
|
||||
<if test="no !=null and no !=''">
|
||||
and (no like concat('%', #{no}, '%') or vbelv like concat('%', #{no}, '%'))
|
||||
</if>
|
||||
order by create_time desc
|
||||
order by datum desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue