Merge remote-tracking branch '惠信/develop' into develop
This commit is contained in:
commit
0da72b8e0c
|
|
@ -79,6 +79,9 @@ public class ComponentOutboundController extends BaseController {
|
|||
@Resource
|
||||
private IWmsQrCodeMasterService qrCodeMasterService;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 零部件的出库单列表
|
||||
* @param request 零部件出库单搜索条件参数对象,包含分页信息和搜索条件
|
||||
|
|
@ -149,6 +152,10 @@ public class ComponentOutboundController extends BaseController {
|
|||
setInventoryInDTO(inventoryDTOS, item.getIdnrk(), outbound.getFactoryNo(), item.getLgort(), code.getBatchNo(), code.getSerialNo(), code.getNum());
|
||||
}
|
||||
}
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(outbound.getVbelv());
|
||||
optRecordService.add(optRecordDTO);
|
||||
// 组装SAP的信息
|
||||
ZWM3A20DTO zwm3a20DTO = new ZWM3A20DTO()
|
||||
.setIType("B")
|
||||
|
|
@ -202,6 +209,10 @@ public class ComponentOutboundController extends BaseController {
|
|||
List<WmsComponentOutboundItem> outboundItems = new ArrayList<>();
|
||||
List<InventoryOutDTO> inventories = new ArrayList<>();
|
||||
//List<String> codeIds = new ArrayList<>();
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(packing.getVbelv());
|
||||
optRecordService.add(optRecordDTO);
|
||||
ZWM3A20DTO zwm3a20DTO = new ZWM3A20DTO()
|
||||
.setItSernrPatch(new ArrayList<>())
|
||||
.setItem(new ArrayList<>())
|
||||
|
|
@ -454,6 +465,10 @@ public class ComponentOutboundController extends BaseController {
|
|||
});
|
||||
buildZwm3a20DTO(zwm3a20DTO, scanCodesGroup, item);
|
||||
});
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getOutboundNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
Pair<String, String> result = sapService.zwm3a20(zwm3a20DTO);
|
||||
wmsComponentOutboundService.lambdaUpdate()
|
||||
.set(WmsComponentOutbound::getMaterialDoc, result.getKey())
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class InCostCenterBackController extends BaseController {
|
|||
private IWmsWarehouseService warehouseService;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
|
|
@ -322,6 +322,10 @@ public class InCostCenterBackController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
Map<String, List<InMaterialScanRecord>> dmaps = records.stream().collect(Collectors.groupingBy(InMaterialScanRecord::getKey7));
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
C_MaterialReturnDTO vo = sapService.zwm00_MB112(new C_MaterialReturnQO()
|
||||
.setResbRsNum(order.getRsnum())
|
||||
.setItems(dmaps.values().stream().map(its -> {
|
||||
|
|
@ -344,10 +348,6 @@ public class InCostCenterBackController extends BaseController {
|
|||
}).toList()
|
||||
)
|
||||
);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
ticket.setDocYear(vo.getEMJahr());
|
||||
ticket.setMatDoc(vo.getEMblnr());
|
||||
inCostcenterBackTicketService.save(ticket);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class InProduceBackController extends BaseController {
|
|||
private IWmsWarehouseService warehouseService;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
|
|
@ -337,6 +337,10 @@ public class InProduceBackController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
Map<String, List<InMaterialScanRecord>> dmaps = records.stream().collect(Collectors.groupingBy(InMaterialScanRecord::getKey7));
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
Zwm3a11VO vo = sapService.zwm3a11(new Zwm3a11QO()
|
||||
.setAufnr(order.getAufnr())
|
||||
.setInput1(dmaps.values().stream().map(its -> {
|
||||
|
|
@ -358,11 +362,6 @@ public class InProduceBackController extends BaseController {
|
|||
.setSernr(it.getValue())).toList()
|
||||
)
|
||||
);
|
||||
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
BigDecimal totalNum = datas.stream().map(WmsInProduceBackItem::getSqsl).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal inNum = datas.stream().map(WmsInProduceBackItem::getNum).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
inProduceBackService.lambdaUpdate()
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public class InProduceOrderController extends BaseController {
|
|||
private IWmsWarehouseService warehouseService;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 从SAP查询生产订单信息
|
||||
|
|
@ -580,12 +580,12 @@ public class InProduceOrderController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
}
|
||||
//同步入库信息到SAP
|
||||
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, sernrs);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
optRecordService.add(optRecordDTO);
|
||||
//同步入库信息到SAP
|
||||
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, sernrs);
|
||||
order.setMblnr(dto.getE_MBLNR());
|
||||
order.setMjahr(dto.getE_MJAHR());
|
||||
order.setState((short) 1);
|
||||
|
|
|
|||
|
|
@ -46,11 +46,6 @@ public class OptRecordController {
|
|||
*/
|
||||
@PostMapping("add")
|
||||
public void add(@Valid @RequestBody OptRecordDTO optRecordDTO){
|
||||
OptRecord optRecord = new OptRecord();
|
||||
BeanUtils.copyProperties(optRecordDTO, optRecord);
|
||||
optRecord.setOperationTime(LocalDateTime.now());
|
||||
optRecord.setOperatorId(UserUtil.getUserId());
|
||||
optRecord.setOperator(UserUtil.getUserName());
|
||||
optRecordService.add(optRecord);
|
||||
optRecordService.add(optRecordDTO);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class OutAssistanceController extends BaseController {
|
|||
private RedissonClient redissonClient;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
|
|
@ -393,10 +393,7 @@ public class OutAssistanceController extends BaseController {
|
|||
});
|
||||
qrCodeMasterService.updateBarCode(qrCodeMasters);
|
||||
submitSap(order, ticket, records, datas, qrCodeMasters);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(request.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
|
||||
} else {
|
||||
inventoryForOutRepository.saveAll(request.getRecommendBatch()
|
||||
.stream()
|
||||
|
|
@ -435,6 +432,10 @@ public class OutAssistanceController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
Map<String, List<OutMaterialScanRecord>> dmaps = records.stream().collect(Collectors.groupingBy(OutMaterialScanRecord::getKey7));
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
SubcontractedOrderConfirmDTO dto = sapService.zwm3a04(new SubcontractedOrderConfirmQO()
|
||||
.setIEbeln(order.getEbeln())
|
||||
.setIItems(dmaps.values().stream().map(its -> {
|
||||
|
|
@ -543,10 +544,6 @@ public class OutAssistanceController extends BaseController {
|
|||
});
|
||||
qrCodeMasterService.updateBarCode(qrCodeMasters);
|
||||
submitSap(order, ticket, records, outAssistanceItemService.getList(order.getId()), qrCodeMasters);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
} else {
|
||||
List<OutAssistanceItemVO> items = outAssistanceTicketItemService.getList(qo.getId());
|
||||
items.forEach(it -> {
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ public class OutCostCenterController extends BaseController {
|
|||
@Resource
|
||||
private RedissonClient redissonClient;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
*/
|
||||
|
|
@ -422,6 +425,10 @@ public class OutCostCenterController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
Map<String, List<OutMaterialScanRecord>> dmaps = records.stream().collect(Collectors.groupingBy(OutMaterialScanRecord::getKey7));
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
C_MaterialOutboundDTO vo = sapService.ZWM00_MB115(new C_MaterialOutboundQO()
|
||||
.setResbRsNum(order.getRsnum())
|
||||
.setItems(dmaps.values().stream().map(its -> {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class OutProduceController extends BaseController {
|
|||
private IWmsQrCodeMasterService qrCodeMasterService;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
|
|
@ -557,6 +557,10 @@ public class OutProduceController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
Map<String, List<OutMaterialScanRecord>> dmaps = records.stream().collect(Collectors.groupingBy(OutMaterialScanRecord::getKey7));
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getAufnr());
|
||||
optRecordService.add(optRecordDTO);
|
||||
Zwm3a10VO vo = sapService.zwm3A10(new Zwm3a10QO()
|
||||
.setAufnr(order.getAufnr())
|
||||
.setType(order.getType() == 0 ? "A" : "B")
|
||||
|
|
@ -576,11 +580,6 @@ public class OutProduceController extends BaseController {
|
|||
)
|
||||
);
|
||||
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getAufnr());
|
||||
optRecordController.add(optRecordDTO);
|
||||
|
||||
outProduceTicketService.lambdaUpdate()
|
||||
.set(WmsOutProduceTicket::getMatDoc, vo.getMat_doc())
|
||||
.set(WmsOutProduceTicket::getDocYear, vo.getDocYear())
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ public class OutPurchaseController extends BaseController {
|
|||
@Resource
|
||||
private IWmsReturnRequestItemService returnRequestItemService;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
// /**
|
||||
// * 获取采购退库信息(PDA使用)
|
||||
// * @return 要退库的物料信息列表
|
||||
|
|
@ -135,6 +138,7 @@ public class OutPurchaseController extends BaseController {
|
|||
@Transactional
|
||||
@PostMapping("save")
|
||||
public ApiResult<Void> save(@Valid @RequestBody ZWM3A05VO request) {
|
||||
String outPurchaseNo = serialNumberControllerService.generateSerialNumber(20);
|
||||
Long orderId = IdUtil.getSnowflakeNextId();
|
||||
List<WmsOutPurchaseItem> items = new ArrayList<>();
|
||||
List<OutMaterialScanRecord> records = new ArrayList<>();
|
||||
|
|
@ -263,7 +267,7 @@ public class OutPurchaseController extends BaseController {
|
|||
qrCodeMasterService.updateBarCode(qrCodeMasters);
|
||||
outPurchaseService.save(
|
||||
new WmsOutPurchase()
|
||||
.setNo(serialNumberControllerService.generateSerialNumber(20))
|
||||
.setNo(outPurchaseNo)
|
||||
.setId(orderId)
|
||||
.setEbeln(request.getEbeln())
|
||||
.setLifnr(request.getLifnr())
|
||||
|
|
@ -313,6 +317,10 @@ public class OutPurchaseController extends BaseController {
|
|||
.eq(WmsReturnRequest::getId, request.getPurchaseOrderId())
|
||||
.update();
|
||||
}
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(outPurchaseNo);
|
||||
optRecordService.add(optRecordDTO);
|
||||
Pair<String, String> result = sapService.zwm3A06(request.getEbeln(), input1, input2);
|
||||
outPurchaseService.lambdaUpdate()
|
||||
.set(WmsOutPurchase::getMatDoc, result.getKey())
|
||||
|
|
|
|||
|
|
@ -29,10 +29,7 @@ import com.nflg.wms.common.exception.NflgException;
|
|||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.document.PackageMaterialScanRecord;
|
||||
import com.nflg.wms.common.pojo.dto.InventoryInDTO;
|
||||
import com.nflg.wms.common.pojo.dto.PackageMaterialDTO;
|
||||
import com.nflg.wms.common.pojo.dto.SAPOrderDTO;
|
||||
import com.nflg.wms.common.pojo.dto.StructuralPackageMaterialQRCodeContentDTO;
|
||||
import com.nflg.wms.common.pojo.dto.*;
|
||||
import com.nflg.wms.common.pojo.qo.*;
|
||||
import com.nflg.wms.common.pojo.vo.*;
|
||||
import com.nflg.wms.common.util.*;
|
||||
|
|
@ -130,6 +127,9 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
@Resource
|
||||
private IWmsInventoryService inventoryService;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 搜索SAP订单
|
||||
* @param request 请求参数
|
||||
|
|
@ -995,6 +995,10 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
VUtil.trueThrowBusinessError(Objects.isNull(dto)).throwMessage("ZIM_004未查询到数据");
|
||||
VUtil.trueThrowBusinessError(StrUtil.isBlank(dto.getWarehouseNo())).throwMessage("ZIM_004接口查询到仓库为空");
|
||||
BigDecimal num = BigDecimal.valueOf(order.getNum());
|
||||
OptRecordDTO optRecordDTO1 = new OptRecordDTO();
|
||||
optRecordDTO1.setOperationType((short)1);
|
||||
optRecordDTO1.setOrderId(order.getOrderNo());
|
||||
optRecordService.add(optRecordDTO1);
|
||||
Pair<Pair<String, String>, Pair<String, String>> pair = sapService.zwm3a17(new ZWM3A17DTO()
|
||||
.setEbeln(order.getExternalOrderNo())
|
||||
.setUsnam(UserUtil.getUserName())
|
||||
|
|
@ -1018,6 +1022,10 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
)
|
||||
);
|
||||
if (StrUtil.equalsIgnoreCase(dto.getKzkri(), "X")) {
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getOrderNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
sapService.zwm3a18(new ZWM3A18DTO()
|
||||
.setEbeln(order.getExternalOrderNo())
|
||||
.setUsnam(UserUtil.getUserName())
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ public class TransferCompanyController extends BaseController {
|
|||
@Resource
|
||||
private RedissonClient redissonClient;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP订单数据
|
||||
*/
|
||||
|
|
@ -460,6 +463,10 @@ public class TransferCompanyController extends BaseController {
|
|||
.setNum(list.stream().map(OutMaterialScanRecord::getNum).reduce(BigDecimal.ZERO, BigDecimal::add))
|
||||
).toList()
|
||||
);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(order.getNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
ZWM00_MB116VO vo = sapService.zwm00_mb116(new ZWM00_MB116QO()
|
||||
.setEbeln(order.getEbeln())
|
||||
.setUsnam(UserUtil.getUserName())
|
||||
|
|
@ -728,6 +735,10 @@ public class TransferCompanyController extends BaseController {
|
|||
).toList()
|
||||
);
|
||||
inMaterialScanRecordRespository.saveAll(records);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getTicketNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
Pair<Pair<String, String>, Pair<String, String>> vos = sapService.zwm3a17(new ZWM3A17DTO()
|
||||
.setEbeln(ticket.getEbeln())
|
||||
.setUsnam(UserUtil.getUserName())
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class TransferFactoryController extends BaseController {
|
|||
private RedissonClient redissonClient;
|
||||
|
||||
@Resource
|
||||
private OptRecordController optRecordController;
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
/**
|
||||
* 查询SAP领料订单数据
|
||||
|
|
@ -727,7 +727,7 @@ public class TransferFactoryController extends BaseController {
|
|||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(ticket.getNo());
|
||||
optRecordController.add(optRecordDTO);
|
||||
optRecordService.add(optRecordDTO);
|
||||
transferFactoryTicketService.lambdaUpdate()
|
||||
.set(WmsTransferFactoryTicket::getMatDoc, vo.getEMblnr())
|
||||
.set(WmsTransferFactoryTicket::getDocYear, vo.getEMjahr())
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.nflg.wms.admin.repository.OutMaterialScanRecordRespository;
|
|||
import com.nflg.wms.common.pojo.document.OutMaterialScanRecord;
|
||||
import com.nflg.wms.common.pojo.dto.InventoryInDTO;
|
||||
import com.nflg.wms.common.pojo.dto.InventoryOutDTO;
|
||||
import com.nflg.wms.common.pojo.dto.OptRecordDTO;
|
||||
import com.nflg.wms.common.pojo.dto.ZWM3A20DTO;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.repository.entity.WmsComponentOutbound;
|
||||
|
|
@ -46,6 +47,9 @@ public class ComponentOutboundControllerService {
|
|||
@Resource
|
||||
private OutMaterialScanRecordRespository outMaterialScanRecordRespository;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
@Transactional
|
||||
public void confirmPda(WmsComponentOutbound outbound, List<WmsComponentOutboundItem> outboundItems, List<OutMaterialScanRecord> records) {
|
||||
confirmPda(outbound, outboundItems, records, null, null);
|
||||
|
|
@ -63,6 +67,10 @@ public class ComponentOutboundControllerService {
|
|||
}
|
||||
|
||||
if (Objects.nonNull(zwm3a20DTO)) {
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(outbound.getOutboundNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
// 处理SAP的信息,并写入物料凭证和物料年度凭证信息到出口单中
|
||||
Pair<String, String> result = sapService.zwm3a20(zwm3a20DTO);
|
||||
wmsComponentOutboundService.lambdaUpdate()
|
||||
|
|
@ -107,6 +115,12 @@ public class ComponentOutboundControllerService {
|
|||
if (CollectionUtil.isNotEmpty(inventories)) {
|
||||
inventoryService.in(inventories);
|
||||
}
|
||||
//加操作记录
|
||||
WmsComponentOutbound outbound = wmsComponentOutboundService.getById(outboundId);
|
||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||
optRecordDTO.setOperationType((short)1);
|
||||
optRecordDTO.setOrderId(outbound.getOutboundNo());
|
||||
optRecordService.add(optRecordDTO);
|
||||
//SAP冲销
|
||||
Pair<String, String> result = sapService.zwm3a20(zwm3a20DTO);
|
||||
wmsComponentOutboundService.lambdaUpdate()
|
||||
|
|
|
|||
|
|
@ -6,15 +6,13 @@ import cn.hutool.core.util.ObjectUtil;
|
|||
import cn.hutool.core.util.StrUtil;
|
||||
import com.nflg.wms.admin.pojo.dto.QCReceiveDTO;
|
||||
import com.nflg.wms.admin.pojo.dto.ZWM3A27ItemDTO;
|
||||
import com.nflg.wms.common.pojo.dto.OptRecordDTO;
|
||||
import com.nflg.wms.common.pojo.vo.QCTaskItemScanCodesVO;
|
||||
import com.nflg.wms.common.pojo.vo.QCTaskItemVO;
|
||||
import com.nflg.wms.repository.entity.WmsQcReceive;
|
||||
import com.nflg.wms.repository.entity.WmsQcReceiveItem;
|
||||
import com.nflg.wms.repository.entity.WmsSrmQualityInspection;
|
||||
import com.nflg.wms.repository.service.IWmsInventoryService;
|
||||
import com.nflg.wms.repository.service.IWmsQcReceiveItemService;
|
||||
import com.nflg.wms.repository.service.IWmsQcReceiveService;
|
||||
import com.nflg.wms.repository.service.IWmsSrmQualityInspectionService;
|
||||
import com.nflg.wms.repository.service.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
|
@ -48,6 +46,9 @@ public class NormalQMControllerService {
|
|||
@Resource
|
||||
private SapService sapService;
|
||||
|
||||
@Resource
|
||||
private IOptRecordService optRecordService;
|
||||
|
||||
public List<QCTaskItemVO> getTaskItem(@Valid @NotNull Long taskId) {
|
||||
List<QCTaskItemVO> tasks = wmsQcReceiveItemService.getTaskItem(taskId);
|
||||
if (CollectionUtil.isNotEmpty(tasks)) {
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ import java.util.List;
|
|||
public interface IOptRecordService extends IService<OptRecord> {
|
||||
List<OptRecordVO> search(OptRecordQO request);
|
||||
|
||||
void add(OptRecord optRecord);
|
||||
void add(OptRecordDTO optRecordDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.nflg.wms.common.pojo.dto.OptRecordDTO;
|
||||
import com.nflg.wms.common.pojo.qo.OptRecordQO;
|
||||
import com.nflg.wms.common.pojo.vo.OptRecordVO;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.repository.entity.OptRecord;
|
||||
import com.nflg.wms.repository.mapper.OptRecordMapper;
|
||||
import com.nflg.wms.repository.service.IOptRecordService;
|
||||
|
|
@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +32,12 @@ public class OptRecordServiceImpl extends ServiceImpl<OptRecordMapper, OptRecord
|
|||
}
|
||||
|
||||
@Override
|
||||
public void add(OptRecord optRecord) {
|
||||
public void add(OptRecordDTO optRecordDTO) {
|
||||
OptRecord optRecord = new OptRecord();
|
||||
BeanUtils.copyProperties(optRecordDTO, optRecord);
|
||||
optRecord.setOperationTime(LocalDateTime.now());
|
||||
optRecord.setOperatorId(UserUtil.getUserId());
|
||||
optRecord.setOperator(UserUtil.getUserName());
|
||||
boolean saveSuccess = this.save(optRecord);
|
||||
if (!saveSuccess) {
|
||||
throw new RuntimeException("新增操作记录失败,请稍后重试");
|
||||
|
|
|
|||
Loading…
Reference in New Issue