收货单增加存储SAP回来的物料凭证
This commit is contained in:
parent
41c44a9578
commit
312a7a56ac
@ -2,12 +2,10 @@ package com.foreverwin.mom.wms.api.feign;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.foreverwin.mom.common.core.util.R;
|
||||
import com.foreverwin.mom.common.security.annotation.Inner;
|
||||
import com.foreverwin.mom.wms.entity.DocumentDetailed;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -24,7 +22,7 @@ public interface RemotePoService {
|
||||
R<JSONObject> dealPoDataLogic(@RequestBody JSONObject messageObj);
|
||||
|
||||
@PostMapping("/po-order/api/saveDocumentData")
|
||||
R<String> saveDocumentData(@RequestBody List<DocumentDetailed> zwDocumentDetailList) throws Exception;
|
||||
R saveDocumentData(@RequestBody List<DocumentDetailed> zwDocumentDetailList);
|
||||
|
||||
@PostMapping("/po-order/api/cancelDocumentNo")
|
||||
R cancelDocumentNo(@RequestBody DocumentDetailed documentDetailed);
|
||||
|
||||
@ -302,6 +302,9 @@ public class DocumentDetailed extends Model<DocumentDetailed> {
|
||||
@TableField(exist = false)
|
||||
private String storagLocation;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String materialDocument;
|
||||
|
||||
|
||||
/**
|
||||
* 目标货格
|
||||
|
||||
@ -1,33 +1,26 @@
|
||||
package com.foreverwin.mom.wms.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.foreverwin.mom.common.core.util.R;
|
||||
import com.foreverwin.mom.common.security.annotation.Inner;
|
||||
import com.foreverwin.mom.wms.entity.DocumentDetailed;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
|
||||
import com.foreverwin.iep.common.base.FrontPage;
|
||||
import com.foreverwin.mom.common.core.util.R;
|
||||
import com.foreverwin.mom.common.data.tenant.TenantContextHolder;
|
||||
import com.foreverwin.mom.common.log.annotation.SysLog;
|
||||
import com.foreverwin.mom.wms.entity.DocumentDetailed;
|
||||
import com.foreverwin.mom.wms.entity.PoOrder;
|
||||
import com.foreverwin.mom.wms.service.PoOrderDetailService;
|
||||
import com.foreverwin.mom.wms.service.PoOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* DN单主表
|
||||
*
|
||||
@ -67,8 +60,9 @@ public class PoOrderController {
|
||||
@ApiOperation(value = "采购登记-获取物料", notes = "采购登记-获取物料")
|
||||
@SysLog("采购登记-获取物料")
|
||||
@PostMapping("/api/saveDocumentData")
|
||||
public R saveDocumentData(@RequestBody List<DocumentDetailed> zwDocumentDetailList) throws Exception{
|
||||
return R.ok(poOrderService.saveDocumentData(zwDocumentDetailList));
|
||||
public R saveDocumentData(@RequestBody List<DocumentDetailed> zwDocumentDetailList) {
|
||||
poOrderService.saveDocumentData(zwDocumentDetailList);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "采购登记-冲销", notes = "采购登记-冲销")
|
||||
@ -88,6 +82,7 @@ public class PoOrderController {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param zwPoOrder 仓库模块采购订单主表
|
||||
* @return
|
||||
|
||||
@ -24,7 +24,7 @@ public interface PoOrderService extends IService<PoOrder> {
|
||||
@Transactional
|
||||
void cancelDocumentNo(DocumentDetailed documentDetailed);
|
||||
|
||||
String saveDocumentData(List<DocumentDetailed> zwDocumentDetailList) throws Exception;
|
||||
void saveDocumentData(List<DocumentDetailed> zwDocumentDetailList);
|
||||
|
||||
JSONObject dealPoDataLogic(JSONObject messageObj);
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ public class PoOrderServiceImpl extends ServiceImpl<PoOrderMapper, PoOrder> impl
|
||||
// NLV 已使用 Snow
|
||||
@Override
|
||||
@Transactional
|
||||
public String saveDocumentData(List<DocumentDetailed> zwDocumentDetailList) throws Exception {
|
||||
public void saveDocumentData(List<DocumentDetailed> zwDocumentDetailList) {
|
||||
String site = TenantContextHolder.getTenantId();
|
||||
// 先创建单据号
|
||||
Map map = new HashMap();
|
||||
@ -161,8 +161,10 @@ public class PoOrderServiceImpl extends ServiceImpl<PoOrderMapper, PoOrder> impl
|
||||
zwDocument.setDocumentNo(documentNo);
|
||||
zwDocument.setHandle(Document.genHandle(zwDocument.getSite(), zwDocument.getDocumentNo()));
|
||||
String po = zwDocumentDetailList.get(0).getExternalNo();
|
||||
String materialDocument = zwDocumentDetailList.get(0).getMaterialDocument();
|
||||
zwDocument.setExternalDocumentNo(po);
|
||||
zwDocument.setState("SUBMIT");
|
||||
zwDocument.setMaterialDocument(materialDocument);
|
||||
zwDocument.setCreateDate(LocalDateTime.now());
|
||||
zwDocument.setCreateUser(SecurityUtils.getUserName());
|
||||
documentMapper.insert(zwDocument);
|
||||
@ -207,7 +209,6 @@ public class PoOrderServiceImpl extends ServiceImpl<PoOrderMapper, PoOrder> impl
|
||||
}
|
||||
// 收入库存
|
||||
saveWmsInventory(site, newDocumentList, documentNo);
|
||||
return documentNo;
|
||||
}
|
||||
|
||||
// NLV 已使用 Snow
|
||||
|
||||
Loading…
Reference in New Issue
Block a user