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