出库通知单完成后,移入历史表
This commit is contained in:
parent
b4ee7885ca
commit
60636bb1ca
|
|
@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
|
|
@ -61,14 +62,23 @@ public class AppPmsController extends BaseController {
|
|||
public AjaxResult manualOrderIn(@RequestBody List<PmsOrderInRequest> orderInRequestList) {
|
||||
logger.info("手动入库单请求:{}", JSONObject.toJSONString(orderInRequestList));
|
||||
// TODO
|
||||
// 数组中物料编号不能重复
|
||||
Map<String, List<PmsOrderInRequest>> groupedByGoodsCode = orderInRequestList.stream()
|
||||
.collect(Collectors.groupingBy(PmsOrderInRequest::getGoodsCode));
|
||||
// 检查是否有分组的元素数量大于 1
|
||||
if (groupedByGoodsCode.values().stream().anyMatch(list -> list.size() > 1)) {
|
||||
return error("物料编号不能重复");
|
||||
}
|
||||
|
||||
// 判断数据是否缺失
|
||||
String orderId= OrderCodeFactory.getOrderCode("RK", "");
|
||||
for(PmsOrderInRequest orderInRequest : orderInRequestList) {
|
||||
if (StringUtils.isEmpty(orderInRequest.getGoodsId())
|
||||
|| StringUtils.isEmpty(orderInRequest.getGoodsDesc())
|
||||
|| orderInRequest.getGoodsNum() == null || orderInRequest.getGoodsNum() <=0) {
|
||||
return error("缺少请求数据。");
|
||||
}
|
||||
String orderId= OrderCodeFactory.getOrderCode("RK", "");
|
||||
|
||||
AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn();
|
||||
BeanUtils.copyProperties(orderInRequest, appPmsOrderIn);
|
||||
appPmsOrderIn.setId(OrderCodeFactory.getOrderCode("",""));
|
||||
|
|
@ -201,10 +211,11 @@ public class AppPmsController extends BaseController {
|
|||
}else {
|
||||
appPmsOrderOut.setListId(orderOutRequest.getListId());
|
||||
}
|
||||
appPmsOrderOut.setOrderType(Long.valueOf(orderOutRequest.getOrderType()));
|
||||
appPmsOrderOut.setOrderType(orderOutRequest.getOrderType());
|
||||
appPmsOrderOut.setCustomerId(orderOutRequest.getCustomerId());
|
||||
appPmsOrderOut.setGoodsId(orderOutRequest.getGoodsId());
|
||||
appPmsOrderOut.setGoodsNum(BigDecimal.valueOf(orderOutRequest.getGoodsNum()));
|
||||
appPmsOrderOut.setStockNum(BigDecimal.valueOf(orderOutRequest.getRemainNum()));
|
||||
appPmsOrderOut.setGoodsDesc(orderOutRequest.getGoodsDesc());
|
||||
appPmsOrderOut.setOrderStatus(0);
|
||||
appPmsOrderOut.setCreateTime(new Date());
|
||||
|
|
@ -228,6 +239,56 @@ public class AppPmsController extends BaseController {
|
|||
|
||||
return success("success");
|
||||
}
|
||||
/**
|
||||
* 更新Pms出库单请求
|
||||
*/
|
||||
@ApiOperation("更新Pms出库单请求")
|
||||
@Log(title = "更新Pms出库单请求", skipAuth = true)
|
||||
@PostMapping("/updateOrderOut")
|
||||
@Anonymous
|
||||
public AjaxResult updateOrderOut(@RequestBody AppPmsOrderOut appPmsOrderOut) {
|
||||
logger.info("更新Pms出库单请求:{}", appPmsOrderOut);
|
||||
if (appPmsOrderOut.getOrderType() == null || StringUtils.isEmpty(appPmsOrderOut.getGoodsId())
|
||||
|| appPmsOrderOut.getGoodsNum() == null || StringUtils.isEmpty(appPmsOrderOut.getGoodsDesc())) {
|
||||
return error("请求数据不完整。");
|
||||
}
|
||||
|
||||
// 校验同一个订单号中的物料
|
||||
AppPmsOrderOut query = new AppPmsOrderOut();
|
||||
query.setOrderId(appPmsOrderOut.getOrderId());
|
||||
List<AppPmsOrderOut> oldAppPmsOrderOutList = appPmsOrderOutService.selectAppPmsOrderOutList(query);
|
||||
for (AppPmsOrderOut oldAppPmsOrderOut : oldAppPmsOrderOutList) {
|
||||
if (oldAppPmsOrderOut.getGoodsId().equals(appPmsOrderOut.getGoodsId()) &&
|
||||
!oldAppPmsOrderOut.getRecordId().equals(appPmsOrderOut.getRecordId())) {
|
||||
return error("同一个订单中不允许物料重复。");
|
||||
}
|
||||
}
|
||||
|
||||
//查询库存是否足够
|
||||
AppStock appStock = new AppStock();
|
||||
appStock.setGoodsId(appPmsOrderOut.getGoodsId());
|
||||
appStock.setStockStatus(0);
|
||||
List<AppStock> appStocks = appStockService.selectStockByGoodsId(appStock);
|
||||
if(CollectionUtils.isEmpty(appStocks)){
|
||||
return error("库存不足。");
|
||||
}
|
||||
//统计库存 累计appStocks下面的每条的剩余数量 用高级用法
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (AppStock appStock1 : appStocks) {
|
||||
total = total.add(appStock1.getRemainNum());
|
||||
}
|
||||
if(total.compareTo(appPmsOrderOut.getGoodsNum()) < 0){
|
||||
return error("库存不足。");
|
||||
}
|
||||
appPmsOrderOut.setUpdateTime(new Date());
|
||||
try {
|
||||
appPmsOrderOutService.updateAppPmsOrderOut(appPmsOrderOut);
|
||||
}catch (Exception e){
|
||||
logger.error("Pms出库单请求失败:{}", e.getMessage());
|
||||
return error("接收失败");
|
||||
}
|
||||
return success("success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 模糊查询,查询入库单表
|
||||
|
|
@ -249,7 +310,6 @@ public class AppPmsController extends BaseController {
|
|||
@Anonymous
|
||||
@PostMapping("/pmsStockInComplete")
|
||||
public AjaxResult pmsStockInComplete(@RequestBody PmsStockInCompleteReq request) {
|
||||
logger.info("请求码盘:请求体为{}", JSON.toJSONString(request));
|
||||
return toAjax(appPmsOrderInService.pmsStockInComplete(request));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,104 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.app.domain.AppPmsOrderInBak;
|
||||
import com.ruoyi.app.service.IAppPmsOrderInBakService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* PMS入库订单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/appPmsOrderInbak")
|
||||
public class AppPmsOrderInBakController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppPmsOrderInBakService appPmsOrderInBakService;
|
||||
|
||||
/**
|
||||
* 查询PMS入库订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
startPage();
|
||||
List<AppPmsOrderInBak> list = appPmsOrderInBakService.selectAppPmsOrderInBakList(appPmsOrderInBak);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出PMS入库订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:export')")
|
||||
@Log(title = "PMS入库订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
List<AppPmsOrderInBak> list = appPmsOrderInBakService.selectAppPmsOrderInBakList(appPmsOrderInBak);
|
||||
ExcelUtil<AppPmsOrderInBak> util = new ExcelUtil<AppPmsOrderInBak>(AppPmsOrderInBak.class);
|
||||
util.exportExcel(response, list, "PMS入库订单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取PMS入库订单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(appPmsOrderInBakService.selectAppPmsOrderInBakById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增PMS入库订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:add')")
|
||||
@Log(title = "PMS入库订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
return toAjax(appPmsOrderInBakService.insertAppPmsOrderInBak(appPmsOrderInBak));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改PMS入库订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:edit')")
|
||||
@Log(title = "PMS入库订单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
return toAjax(appPmsOrderInBakService.updateAppPmsOrderInBak(appPmsOrderInBak));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除PMS入库订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderInbak:remove')")
|
||||
@Log(title = "PMS入库订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(appPmsOrderInBakService.deleteAppPmsOrderInBakByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOutBak;
|
||||
import com.ruoyi.app.service.IAppPmsOrderOutBakService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库单历史Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/appPmsOrderOutbak")
|
||||
public class AppPmsOrderOutBakController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppPmsOrderOutBakService appPmsOrderOutBakService;
|
||||
|
||||
/**
|
||||
* 查询出库单历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
startPage();
|
||||
List<AppPmsOrderOutBak> list = appPmsOrderOutBakService.selectAppPmsOrderOutBakList(appPmsOrderOutBak);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库单历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:export')")
|
||||
@Log(title = "出库单历史", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
List<AppPmsOrderOutBak> list = appPmsOrderOutBakService.selectAppPmsOrderOutBakList(appPmsOrderOutBak);
|
||||
ExcelUtil<AppPmsOrderOutBak> util = new ExcelUtil<AppPmsOrderOutBak>(AppPmsOrderOutBak.class);
|
||||
util.exportExcel(response, list, "出库单历史数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单历史详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:query')")
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") String recordId)
|
||||
{
|
||||
return success(appPmsOrderOutBakService.selectAppPmsOrderOutBakByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:add')")
|
||||
@Log(title = "出库单历史", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
return toAjax(appPmsOrderOutBakService.insertAppPmsOrderOutBak(appPmsOrderOutBak));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:edit')")
|
||||
@Log(title = "出库单历史", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
return toAjax(appPmsOrderOutBakService.updateAppPmsOrderOutBak(appPmsOrderOutBak));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appPmsOrderOutbak:remove')")
|
||||
@Log(title = "出库单历史", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable String[] recordIds)
|
||||
{
|
||||
return toAjax(appPmsOrderOutBakService.deleteAppPmsOrderOutBakByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,19 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.domain.AppPmsOrderIn;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOut;
|
||||
import com.ruoyi.app.domain.AppStock;
|
||||
import com.ruoyi.app.service.IAppPmsOrderOutService;
|
||||
import com.ruoyi.app.service.IAppStockService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.utils.OrderCodeFactory;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -24,6 +30,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
|
|
@ -37,6 +44,8 @@ public class AppPmsOrderOutController extends BaseController
|
|||
{
|
||||
@Autowired
|
||||
private IAppPmsOrderOutService appPmsOrderOutService;
|
||||
@Autowired
|
||||
private IAppStockService appStockService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
|
|
@ -64,6 +73,45 @@ public class AppPmsOrderOutController extends BaseController
|
|||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
}
|
||||
|
||||
@Log(title = "出库单导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:out:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelUtil<AppPmsOrderOut> util = new ExcelUtil<AppPmsOrderOut>(AppPmsOrderOut.class);
|
||||
List<AppPmsOrderOut> appPmsOrderOutList = util.importExcel(file.getInputStream());
|
||||
|
||||
for (AppPmsOrderOut appPmsOrderOut : appPmsOrderOutList) {
|
||||
//查询库存是否足够
|
||||
AppStock appStock = new AppStock();
|
||||
appStock.setGoodsId(appPmsOrderOut.getGoodsId());
|
||||
appStock.setStockStatus(0);
|
||||
List<AppStock> appStocks = appStockService.selectStockByGoodsId(appStock);
|
||||
if(CollectionUtils.isEmpty(appStocks)){
|
||||
return error("库存不足或者物料不存在,物料id为:"+ appPmsOrderOut.getGoodsId());
|
||||
}
|
||||
//统计库存 累计appStocks下面的每条的剩余数量 用高级用法
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (AppStock appStock1 : appStocks) {
|
||||
total = total.add(appStock1.getRemainNum());
|
||||
}
|
||||
if(total.compareTo(appPmsOrderOut.getGoodsNum()) < 0){
|
||||
return error("库存不足。");
|
||||
}
|
||||
}
|
||||
|
||||
//生成wms统一订单号
|
||||
String id= OrderCodeFactory.getOrderCode("", "");
|
||||
String orderId= OrderCodeFactory.getOrderCode("CK", "");
|
||||
String message = appPmsOrderOutService.importPmsOrderOut(id,orderId,appPmsOrderOutList, updateSupport);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<AppPmsOrderOut> util = new ExcelUtil<AppPmsOrderOut>(AppPmsOrderOut.class);
|
||||
util.importTemplateExcel(response, "出库订单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
|
|
@ -71,7 +119,7 @@ public class AppPmsOrderOutController extends BaseController
|
|||
@GetMapping(value = "/{listId}")
|
||||
public AjaxResult getInfo(@PathVariable("listId") String listId)
|
||||
{
|
||||
return success(appPmsOrderOutService.selectAppPmsOrderOutByListId(listId));
|
||||
return success(appPmsOrderOutService.selectAppPmsOrderOutByRecordId(listId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -185,24 +185,29 @@ public class AppTaskController extends BaseController
|
|||
@Anonymous
|
||||
public AjaxResult receiveTaskResult(@RequestBody TaskResultFeedRequest feedBackRequest)
|
||||
{
|
||||
logger.info("反馈任务状态:{}", JSON.toJSONString(feedBackRequest));
|
||||
// 判断请求参数是否齐全
|
||||
if (feedBackRequest == null
|
||||
|| StringUtils.isEmpty(feedBackRequest.getTaskId())
|
||||
|| feedBackRequest.getTaskStatus() == null
|
||||
|| StringUtils.isEmpty(feedBackRequest.getVehicleNo())) {
|
||||
logger.info("缺少请求数据。");
|
||||
return error("缺少请求数据。");
|
||||
}
|
||||
// 判断任务状态是否正确
|
||||
if (!wcsTaskStatusList.contains(feedBackRequest.getTaskStatus())) {
|
||||
logger.info("任务状态码反馈不正确。");
|
||||
return error("任务状态码反馈不正确。");
|
||||
}
|
||||
// 查询任务号
|
||||
AppWcsTask thisFbWcsTask = appWcsTaskService.selectAppWcsTaskByWcsTaskId(feedBackRequest.getTaskId());
|
||||
if (thisFbWcsTask == null) {
|
||||
logger.info("反馈的任务号不存在。");
|
||||
return error("反馈的任务号不存在。");
|
||||
}
|
||||
// 判断反馈的任务号与数据库中是否一致
|
||||
if (Objects.equals(thisFbWcsTask.getWcsTaskStatus(), feedBackRequest.getTaskStatus())) {
|
||||
logger.info("请勿重复反馈相同任务状态。");
|
||||
return error("请勿重复反馈相同任务状态。");
|
||||
}
|
||||
AppTask wmsTaskQuery = new AppTask();
|
||||
|
|
@ -233,6 +238,7 @@ public class AppTaskController extends BaseController
|
|||
// appTaskService.batchUpdateAppTask(thisWmsTaskList);
|
||||
updateAppTask(thisWmsTaskList);
|
||||
}
|
||||
logger.info("反馈任务完成成功。");
|
||||
return success("反馈任务完成成功。");
|
||||
}
|
||||
if (998 == feedBackRequest.getTaskStatus()) {
|
||||
|
|
@ -248,6 +254,7 @@ public class AppTaskController extends BaseController
|
|||
// appTaskService.batchUpdateAppTask(thisWmsTaskList);
|
||||
updateAppTask(thisWmsTaskList);
|
||||
}
|
||||
logger.info("反馈任务取消成功。");
|
||||
return success("反馈任务取消成功。");
|
||||
}
|
||||
if (999 == feedBackRequest.getTaskStatus()) {
|
||||
|
|
@ -262,6 +269,7 @@ public class AppTaskController extends BaseController
|
|||
// appTaskService.batchUpdateAppTask(thisWmsTaskList);
|
||||
updateAppTask(thisWmsTaskList);
|
||||
}
|
||||
logger.info("反馈任务异常成功。");
|
||||
return success("反馈任务异常成功。");
|
||||
}
|
||||
|
||||
|
|
@ -280,6 +288,7 @@ public class AppTaskController extends BaseController
|
|||
@Anonymous
|
||||
public AjaxResult sendLocation(@RequestBody WcsLocationRequest wcsStackerTask)
|
||||
{
|
||||
logger.info("接受wcs请求的入库请求,请求参数,{}",JSON.toJSONString(wcsStackerTask));
|
||||
if(ObjectUtil.isEmpty(wcsStackerTask.getPoint())||
|
||||
ObjectUtil.isEmpty(wcsStackerTask.getVehicleNo())){
|
||||
return error("缺少请求数据");
|
||||
|
|
@ -297,14 +306,14 @@ public class AppTaskController extends BaseController
|
|||
appTask.setVehicleId(wcsStackerTask.getVehicleNo());
|
||||
AppTask appTask2 = new AppTask();
|
||||
BeanUtils.copyProperties(wcsStackerTask, appTask2);
|
||||
appTask2.setTaskId("RK"+System.currentTimeMillis());
|
||||
appTask2.setWcsTaskId("RK"+System.currentTimeMillis());
|
||||
appTask2.setTaskId(OrderCodeFactory.getOrderCode("",""));
|
||||
appTask2.setWcsTaskId(OrderCodeFactory.getOrderCode("",""));
|
||||
appTask2.setTaskStatus(1);
|
||||
appTask2.setTaskType(1);
|
||||
appTask2.setOrigin(wcsStackerTask.getPoint());
|
||||
appTask2.setTaskPriority(1);
|
||||
String location = appLocationService.sendLocation();
|
||||
appTask2.setDestination(location);
|
||||
AppLocation location = appLocationService.requestLocation(1);
|
||||
appTask2.setDestination(location.getLocationId());
|
||||
appTask2.setVehicleId(wcsStackerTask.getVehicleNo());
|
||||
int i1 = appTaskService.insertAppTask(appTask2);
|
||||
if(i1 == 0 ){
|
||||
|
|
@ -317,7 +326,7 @@ public class AppTaskController extends BaseController
|
|||
appTask1.setWcsTaskType(appTask2.getTaskType());
|
||||
appTask1.setOrigin("101");
|
||||
appTask1.setTaskPriority(appTask2.getTaskPriority());
|
||||
appTask1.setDestination(location);
|
||||
appTask1.setDestination(location.getLocationId());
|
||||
appTask1.setSendTime(new Date());
|
||||
appTask1.setVehicleId(appTask2.getVehicleId());
|
||||
int i = appWcsTaskService.insertAppWcsTask(appTask1);
|
||||
|
|
@ -329,7 +338,7 @@ public class AppTaskController extends BaseController
|
|||
wcsDate.setTaskId(appTask2.getTaskId());
|
||||
wcsDate.setUser("WMS");
|
||||
wcsDate.setVehicleNo(wcsStackerTask.getVehicleNo());
|
||||
wcsDate.setDestination(location);
|
||||
wcsDate.setDestination(location.getLocationId());
|
||||
return success(wcsDate);
|
||||
}
|
||||
// 没有库存,表示可能是新入库的
|
||||
|
|
@ -354,8 +363,8 @@ public class AppTaskController extends BaseController
|
|||
appTask2.setTaskType(1);
|
||||
appTask2.setOrigin(wcsStackerTask.getPoint());
|
||||
appTask2.setTaskPriority(1);
|
||||
String location = appLocationService.sendLocation();
|
||||
appTask2.setDestination(location);
|
||||
AppLocation location = appLocationService.requestLocation(1);
|
||||
appTask2.setDestination(location.getLocationId());
|
||||
appTask2.setVehicleId(wcsStackerTask.getVehicleNo());
|
||||
int i1 = appTaskService.insertAppTask(appTask2);
|
||||
if(i1 == 0 ){
|
||||
|
|
@ -368,7 +377,7 @@ public class AppTaskController extends BaseController
|
|||
appTask1.setWcsTaskType(appTask2.getTaskType());
|
||||
appTask1.setOrigin("101");
|
||||
appTask1.setTaskPriority(appTask2.getTaskPriority());
|
||||
appTask1.setDestination(location);
|
||||
appTask1.setDestination(location.getLocationId());
|
||||
appTask1.setSendTime(new Date());
|
||||
appTask1.setVehicleId(appTask2.getVehicleId());
|
||||
int i = appWcsTaskService.insertAppWcsTask(appTask1);
|
||||
|
|
@ -380,7 +389,7 @@ public class AppTaskController extends BaseController
|
|||
wcsDate.setTaskId(appTask2.getTaskId());
|
||||
wcsDate.setUser("WMS");
|
||||
wcsDate.setVehicleNo(wcsStackerTask.getVehicleNo());
|
||||
wcsDate.setDestination(location);
|
||||
wcsDate.setDestination(location.getLocationId());
|
||||
return success(wcsDate);
|
||||
}
|
||||
|
||||
|
|
@ -1142,8 +1151,8 @@ public class AppTaskController extends BaseController
|
|||
}
|
||||
for (AppPendingStorageRequest appPendingStorageRequest : appPendingStorageRequestList) {
|
||||
AppTask appTask = new AppTask();
|
||||
appTask.setTaskId("RK"+System.currentTimeMillis());
|
||||
appTask.setWcsTaskId("RK"+System.currentTimeMillis());
|
||||
appTask.setTaskId(OrderCodeFactory.getOrderCode("",""));
|
||||
appTask.setWcsTaskId(OrderCodeFactory.getOrderCode("C",""));
|
||||
appTask.setTaskType(1);
|
||||
appTask.setTaskStatus(0);
|
||||
appTask.setOrigin("-");
|
||||
|
|
@ -1152,13 +1161,13 @@ public class AppTaskController extends BaseController
|
|||
appTask.setGoodsId(appPendingStorageRequest.getGoodsId());
|
||||
appTask.setOpNum(BigDecimal.valueOf(1));
|
||||
appTask.setOpUser("user");
|
||||
String destination = appLocationService.sendLocation();
|
||||
appTask.setDestination(destination);
|
||||
AppLocation destination = appLocationService.requestLocation(1);
|
||||
appTask.setDestination(destination.getLocationId());
|
||||
appTaskService.insertAppTask(appTask);
|
||||
|
||||
AppLocation location_update = new AppLocation();
|
||||
location_update.setLocationStatus(1);
|
||||
location_update.setLocationId(destination);
|
||||
location_update.setLocationId(destination.getLocationId());
|
||||
location_update.setUpdateTime(new Date());
|
||||
appLocationService.updateAppLocation(location_update);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ public class PmsOrderOutRequest {
|
|||
* 物料描述
|
||||
*/
|
||||
private String goodsDesc;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer remainNum;
|
||||
/**
|
||||
* 备用1
|
||||
*/
|
||||
|
|
@ -109,4 +113,12 @@ public class PmsOrderOutRequest {
|
|||
public void setSpare2(String spare2) {
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public Integer getRemainNum() {
|
||||
return remainNum;
|
||||
}
|
||||
|
||||
public void setRemainNum(Integer remainNum) {
|
||||
this.remainNum = remainNum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import org.springframework.util.CollectionUtils;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -53,6 +54,8 @@ public class TaskExecutor {
|
|||
private AppLocationMapper appLocationMapper;
|
||||
@Autowired
|
||||
private AppPmsOrderOutMapper appPmsOrderOutMapper;
|
||||
@Autowired
|
||||
private IAppPmsOrderOutBakService appPmsOrderOutBakService;
|
||||
|
||||
/**
|
||||
* 解析wms任务
|
||||
|
|
@ -369,6 +372,36 @@ public class TaskExecutor {
|
|||
|
||||
}
|
||||
|
||||
public void orderComplete() {
|
||||
//查询出库通知单列表,并根据orderId进行分组
|
||||
AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut();
|
||||
List<AppPmsOrderOut> appPmsOrderOuts = appPmsOrderOutMapper.selectAppPmsOrderOutList(appPmsOrderOut);
|
||||
//查询出来的列表,利用lamda表达式 根据orderId进行分组
|
||||
Map<String, List<AppPmsOrderOut>> map = appPmsOrderOuts.stream().collect(Collectors.groupingBy(AppPmsOrderOut::getOrderId));
|
||||
AtomicBoolean flag = new AtomicBoolean(true);
|
||||
map.forEach((k, v) -> {
|
||||
// v中的数据进行遍历,查询orderStatus是否有为0和1的
|
||||
for (AppPmsOrderOut appPmsOrderOut1 : v) {
|
||||
if (appPmsOrderOut1.getOrderStatus() == 0 || appPmsOrderOut1.getOrderStatus() == 1) {
|
||||
flag.set(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag.get()) {
|
||||
//删除订单
|
||||
AppPmsOrderOut appPmsOrderOut1 = new AppPmsOrderOut();
|
||||
appPmsOrderOut1.setOrderId(k);
|
||||
appPmsOrderOutMapper.deleteAppPmsOrderOutByOrderId(appPmsOrderOut1);
|
||||
//并存入bak表
|
||||
for (AppPmsOrderOut appPmsOrderOut2 : v) {
|
||||
AppPmsOrderOutBak appPmsOrderOutBak = new AppPmsOrderOutBak();
|
||||
BeanUtils.copyProperties(appPmsOrderOut2, appPmsOrderOutBak);
|
||||
appPmsOrderOutBakService.insertAppPmsOrderOutBak(appPmsOrderOutBak);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void completePickOutTask() {
|
||||
|
|
@ -392,6 +425,22 @@ public class TaskExecutor {
|
|||
continue;
|
||||
}
|
||||
AppPmsOrderOut appPmsOrderOut1 = appPmsOrderOuts.get(0);
|
||||
//更新确认出库数量
|
||||
if(appPmsOrderOut1.getTrNum() == null)
|
||||
appPmsOrderOut1.setTrNum(BigDecimal.ZERO);
|
||||
appPmsOrderOut1.setTrNum(appPmsOrderOut1.getTrNum().add(task.getOpNum()));
|
||||
//如果确认出库数量等于了出库数量,则本通知单完成出库
|
||||
if (appPmsOrderOut1.getTrNum().compareTo(appPmsOrderOut1.getGoodsNum()) == 0) {
|
||||
appPmsOrderOut1.setOrderStatus(2);
|
||||
}else{
|
||||
appPmsOrderOut1.setOrderStatus(1);
|
||||
}
|
||||
appPmsOrderOut1.setIsLock("0");
|
||||
|
||||
//更新订单状态
|
||||
appPmsOrderOutMapper.updateAppPmsOrderOut(appPmsOrderOut1);
|
||||
|
||||
|
||||
if (appPmsOrderOut1.getOrderType() == 9) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,238 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* PMS入库订单对象 app_pms_order_in_bak
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public class AppPmsOrderInBak extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 入库单号 */
|
||||
@Excel(name = "入库单号")
|
||||
private String listId;
|
||||
|
||||
/** 订单类型 */
|
||||
@Excel(name = "订单类型")
|
||||
private Long orderType;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
private String customerId;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderId;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String goodsId;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal goodsNum;
|
||||
|
||||
/** 使用数量(已入库数量) */
|
||||
@Excel(name = "使用数量", readConverterExp = "已=入库数量")
|
||||
private BigDecimal usedNum;
|
||||
|
||||
/** 剩余数量 */
|
||||
@Excel(name = "剩余数量")
|
||||
private BigDecimal remainingNum;
|
||||
|
||||
/** 物料条码 */
|
||||
@Excel(name = "物料条码")
|
||||
private String goodsCode;
|
||||
|
||||
/** 物料描述 */
|
||||
@Excel(name = "物料描述")
|
||||
private String goodsDesc;
|
||||
|
||||
/** 物料单位 */
|
||||
@Excel(name = "物料单位")
|
||||
private String unit;
|
||||
|
||||
/** 预留1 */
|
||||
@Excel(name = "预留1")
|
||||
private String spare1;
|
||||
|
||||
/** 预留2 */
|
||||
@Excel(name = "预留2")
|
||||
private String spare2;
|
||||
|
||||
/** 订单状态 */
|
||||
@Excel(name = "订单状态")
|
||||
private Long orderStatus;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setListId(String listId)
|
||||
{
|
||||
this.listId = listId;
|
||||
}
|
||||
|
||||
public String getListId()
|
||||
{
|
||||
return listId;
|
||||
}
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setGoodsId(String goodsId)
|
||||
{
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsId()
|
||||
{
|
||||
return goodsId;
|
||||
}
|
||||
public void setGoodsNum(BigDecimal goodsNum)
|
||||
{
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodsNum()
|
||||
{
|
||||
return goodsNum;
|
||||
}
|
||||
public void setUsedNum(BigDecimal usedNum)
|
||||
{
|
||||
this.usedNum = usedNum;
|
||||
}
|
||||
|
||||
public BigDecimal getUsedNum()
|
||||
{
|
||||
return usedNum;
|
||||
}
|
||||
public void setRemainingNum(BigDecimal remainingNum)
|
||||
{
|
||||
this.remainingNum = remainingNum;
|
||||
}
|
||||
|
||||
public BigDecimal getRemainingNum()
|
||||
{
|
||||
return remainingNum;
|
||||
}
|
||||
public void setGoodsCode(String goodsCode)
|
||||
{
|
||||
this.goodsCode = goodsCode;
|
||||
}
|
||||
|
||||
public String getGoodsCode()
|
||||
{
|
||||
return goodsCode;
|
||||
}
|
||||
public void setGoodsDesc(String goodsDesc)
|
||||
{
|
||||
this.goodsDesc = goodsDesc;
|
||||
}
|
||||
|
||||
public String getGoodsDesc()
|
||||
{
|
||||
return goodsDesc;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
public void setOrderStatus(Long orderStatus)
|
||||
{
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public Long getOrderStatus()
|
||||
{
|
||||
return orderStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("listId", getListId())
|
||||
.append("orderType", getOrderType())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("goodsId", getGoodsId())
|
||||
.append("goodsNum", getGoodsNum())
|
||||
.append("usedNum", getUsedNum())
|
||||
.append("remainingNum", getRemainingNum())
|
||||
.append("goodsCode", getGoodsCode())
|
||||
.append("goodsDesc", getGoodsDesc())
|
||||
.append("unit", getUnit())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -29,18 +29,18 @@ public class AppPmsOrderOut extends BaseEntity
|
|||
/** 出库单号 */
|
||||
private String listId;
|
||||
/** wms订单号 */
|
||||
@Excel(name = "wms订单号")
|
||||
@Excel(name = "wms订单号",type = Excel.Type.EXPORT)
|
||||
private String orderId;
|
||||
/** 出库单类型 */
|
||||
@Excel(name = "出库单类型")
|
||||
private Long orderType;
|
||||
@Excel(name = "出库单类型",type = Excel.Type.EXPORT)
|
||||
private Integer orderType;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
@Excel(name = "客户名称",type = Excel.Type.EXPORT)
|
||||
private String customerId;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String goodsId;
|
||||
|
||||
/** 出库数量 */
|
||||
|
|
@ -52,30 +52,30 @@ public class AppPmsOrderOut extends BaseEntity
|
|||
private String goodsDesc;
|
||||
|
||||
/** 预留1 */
|
||||
@Excel(name = "预留1")
|
||||
//@Excel(name = "预留1",type = Excel.Type.EXPORT)
|
||||
private String spare1;
|
||||
|
||||
/** 预留2 */
|
||||
@Excel(name = "预留2")
|
||||
//@Excel(name = "预留2",type = Excel.Type.EXPORT)
|
||||
private String spare2;
|
||||
|
||||
@Excel(name = "订单状态")
|
||||
@Excel(name = "订单状态",type = Excel.Type.EXPORT)
|
||||
private Integer orderStatus;
|
||||
/** 总出库数量 */
|
||||
@Excel(name = "总出库数量")
|
||||
@Excel(name = "总出库数量",type = Excel.Type.EXPORT)
|
||||
private BigDecimal pickNum;
|
||||
|
||||
/** 确认出库数量 */
|
||||
@Excel(name = "确认出库数量")
|
||||
@Excel(name = "确认出库数量",type = Excel.Type.EXPORT)
|
||||
private BigDecimal trNum;
|
||||
/** 本次出库数量 */
|
||||
@Excel(name = "本次出库数量")
|
||||
@Excel(name = "本次出库数量",type = Excel.Type.EXPORT)
|
||||
private BigDecimal shelvesNum;
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
// @Excel(name = "库存数量",type = Excel.Type.EXPORT)
|
||||
private BigDecimal stockNum;
|
||||
/** 是否锁定 */
|
||||
@Excel(name = "是否锁定")
|
||||
@Excel(name = "是否锁定",type = Excel.Type.EXPORT)
|
||||
private String isLock;
|
||||
|
||||
public String getIsLock() {
|
||||
|
|
@ -135,15 +135,15 @@ public class AppPmsOrderOut extends BaseEntity
|
|||
{
|
||||
return listId;
|
||||
}
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
|
||||
public Integer getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,251 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 出库单历史对象 app_pms_order_out_bak
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public class AppPmsOrderOutBak extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录号 */
|
||||
private String recordId;
|
||||
|
||||
/** wms订单号 */
|
||||
@Excel(name = "wms订单号")
|
||||
private String orderId;
|
||||
|
||||
/** 出库单号 */
|
||||
@Excel(name = "出库单号")
|
||||
private String listId;
|
||||
|
||||
/** 出库单类型 */
|
||||
@Excel(name = "出库单类型")
|
||||
private Long orderType;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customerId;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String goodsId;
|
||||
|
||||
/** 订单出库数量 */
|
||||
@Excel(name = "订单出库数量")
|
||||
private BigDecimal goodsNum;
|
||||
|
||||
/** 总出库数量 */
|
||||
@Excel(name = "总出库数量")
|
||||
private BigDecimal pickNum;
|
||||
|
||||
/** 确认出库数量 */
|
||||
@Excel(name = "确认出库数量")
|
||||
private BigDecimal trNum;
|
||||
|
||||
/** 本次出库数量 */
|
||||
@Excel(name = "本次出库数量")
|
||||
private BigDecimal shelvesNum;
|
||||
|
||||
/** 库存数量 */
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal stockNum;
|
||||
|
||||
/** 物料描述 */
|
||||
@Excel(name = "物料描述")
|
||||
private String goodsDesc;
|
||||
|
||||
/** 预留1 */
|
||||
@Excel(name = "预留1")
|
||||
private String spare1;
|
||||
|
||||
/** 预留2 */
|
||||
@Excel(name = "预留2")
|
||||
private String spare2;
|
||||
|
||||
/** 订单状态 0:未出库 1:部分出库 2:全部出库 */
|
||||
@Excel(name = "订单状态 0:未出库 1:部分出库 2:全部出库")
|
||||
private Long orderStatus;
|
||||
|
||||
/** 是否锁定 */
|
||||
@Excel(name = "是否锁定")
|
||||
private String isLock;
|
||||
|
||||
public void setRecordId(String recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setListId(String listId)
|
||||
{
|
||||
this.listId = listId;
|
||||
}
|
||||
|
||||
public String getListId()
|
||||
{
|
||||
return listId;
|
||||
}
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
public void setGoodsId(String goodsId)
|
||||
{
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsId()
|
||||
{
|
||||
return goodsId;
|
||||
}
|
||||
public void setGoodsNum(BigDecimal goodsNum)
|
||||
{
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodsNum()
|
||||
{
|
||||
return goodsNum;
|
||||
}
|
||||
public void setPickNum(BigDecimal pickNum)
|
||||
{
|
||||
this.pickNum = pickNum;
|
||||
}
|
||||
|
||||
public BigDecimal getPickNum()
|
||||
{
|
||||
return pickNum;
|
||||
}
|
||||
public void setTrNum(BigDecimal trNum)
|
||||
{
|
||||
this.trNum = trNum;
|
||||
}
|
||||
|
||||
public BigDecimal getTrNum()
|
||||
{
|
||||
return trNum;
|
||||
}
|
||||
public void setShelvesNum(BigDecimal shelvesNum)
|
||||
{
|
||||
this.shelvesNum = shelvesNum;
|
||||
}
|
||||
|
||||
public BigDecimal getShelvesNum()
|
||||
{
|
||||
return shelvesNum;
|
||||
}
|
||||
public void setStockNum(BigDecimal stockNum)
|
||||
{
|
||||
this.stockNum = stockNum;
|
||||
}
|
||||
|
||||
public BigDecimal getStockNum()
|
||||
{
|
||||
return stockNum;
|
||||
}
|
||||
public void setGoodsDesc(String goodsDesc)
|
||||
{
|
||||
this.goodsDesc = goodsDesc;
|
||||
}
|
||||
|
||||
public String getGoodsDesc()
|
||||
{
|
||||
return goodsDesc;
|
||||
}
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
public void setOrderStatus(Long orderStatus)
|
||||
{
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public Long getOrderStatus()
|
||||
{
|
||||
return orderStatus;
|
||||
}
|
||||
public void setIsLock(String isLock)
|
||||
{
|
||||
this.isLock = isLock;
|
||||
}
|
||||
|
||||
public String getIsLock()
|
||||
{
|
||||
return isLock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("listId", getListId())
|
||||
.append("orderType", getOrderType())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("goodsId", getGoodsId())
|
||||
.append("goodsNum", getGoodsNum())
|
||||
.append("pickNum", getPickNum())
|
||||
.append("trNum", getTrNum())
|
||||
.append("shelvesNum", getShelvesNum())
|
||||
.append("stockNum", getStockNum())
|
||||
.append("goodsDesc", getGoodsDesc())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("isLock", getIsLock())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppPmsOrderInBak;
|
||||
|
||||
/**
|
||||
* PMS入库订单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface AppPmsOrderInBakMapper
|
||||
{
|
||||
/**
|
||||
* 查询PMS入库订单
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return PMS入库订单
|
||||
*/
|
||||
public AppPmsOrderInBak selectAppPmsOrderInBakById(String id);
|
||||
|
||||
/**
|
||||
* 查询PMS入库订单列表
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return PMS入库订单集合
|
||||
*/
|
||||
public List<AppPmsOrderInBak> selectAppPmsOrderInBakList(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 新增PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 修改PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 删除PMS入库订单
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInBakById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除PMS入库订单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInBakByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOutBak;
|
||||
|
||||
/**
|
||||
* 出库单历史Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface AppPmsOrderOutBakMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库单历史
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 出库单历史
|
||||
*/
|
||||
public AppPmsOrderOutBak selectAppPmsOrderOutBakByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 查询出库单历史列表
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 出库单历史集合
|
||||
*/
|
||||
public List<AppPmsOrderOutBak> selectAppPmsOrderOutBakList(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 新增出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 修改出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 删除出库单历史
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderOutBakByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 批量删除出库单历史
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderOutBakByRecordIds(String[] recordIds);
|
||||
}
|
||||
|
|
@ -61,4 +61,11 @@ public interface AppPmsOrderOutMapper
|
|||
*/
|
||||
public int deleteAppPmsOrderOutByRecordIds(String[] recordIds);
|
||||
int updatePickNum(AppPmsOrderOut appPmsOrderOut);
|
||||
|
||||
/**
|
||||
* 根据主键查询数据
|
||||
* @param recordId
|
||||
* @return
|
||||
*/
|
||||
AppPmsOrderOut selectAppPmsOrderOutByRecordId(String recordId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public interface IAppLocationService {
|
|||
*/
|
||||
AppLocation requestLocation(int equipmentId);
|
||||
|
||||
String sendLocation();
|
||||
// String sendLocation();
|
||||
|
||||
Map<String, Integer> countAvailable();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppPmsOrderInBak;
|
||||
|
||||
/**
|
||||
* PMS入库订单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface IAppPmsOrderInBakService
|
||||
{
|
||||
/**
|
||||
* 查询PMS入库订单
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return PMS入库订单
|
||||
*/
|
||||
public AppPmsOrderInBak selectAppPmsOrderInBakById(String id);
|
||||
|
||||
/**
|
||||
* 查询PMS入库订单列表
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return PMS入库订单集合
|
||||
*/
|
||||
public List<AppPmsOrderInBak> selectAppPmsOrderInBakList(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 新增PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 修改PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak);
|
||||
|
||||
/**
|
||||
* 批量删除PMS入库订单
|
||||
*
|
||||
* @param ids 需要删除的PMS入库订单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInBakByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除PMS入库订单信息
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInBakById(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOutBak;
|
||||
|
||||
/**
|
||||
* 出库单历史Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface IAppPmsOrderOutBakService
|
||||
{
|
||||
/**
|
||||
* 查询出库单历史
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 出库单历史
|
||||
*/
|
||||
public AppPmsOrderOutBak selectAppPmsOrderOutBakByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 查询出库单历史列表
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 出库单历史集合
|
||||
*/
|
||||
public List<AppPmsOrderOutBak> selectAppPmsOrderOutBakList(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 新增出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 修改出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak);
|
||||
|
||||
/**
|
||||
* 批量删除出库单历史
|
||||
*
|
||||
* @param recordIds 需要删除的出库单历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderOutBakByRecordIds(String[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除出库单历史信息
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderOutBakByRecordId(String recordId);
|
||||
}
|
||||
|
|
@ -61,4 +61,21 @@ public interface IAppPmsOrderOutService
|
|||
public int deleteAppPmsOrderOutByRecordId(String recordId);
|
||||
|
||||
int updatePickNum(AppPmsOrderOut appPmsOrderOut);
|
||||
|
||||
/**
|
||||
* 导入出库订单
|
||||
* @param id
|
||||
* @param orderId
|
||||
* @param appPmsOrderOutList
|
||||
* @param updateSupport
|
||||
* @return
|
||||
*/
|
||||
String importPmsOrderOut(String id,String orderId,List<AppPmsOrderOut> appPmsOrderOutList, boolean updateSupport);
|
||||
|
||||
/**
|
||||
* 根据主键查询数据
|
||||
* @param recordId
|
||||
* @return
|
||||
*/
|
||||
AppPmsOrderOut selectAppPmsOrderOutByRecordId(String recordId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,38 +150,39 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
return appLocationList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String sendLocation() {
|
||||
AppLocation appLocation = new AppLocation();
|
||||
appLocation.setLocationStatus(0);
|
||||
appLocation.setIsLock(0);
|
||||
//查询可用库位
|
||||
List<AppLocation> appLocations = appLocationMapper.selectAppLocationList(appLocation);
|
||||
if (appLocations == null || appLocations.isEmpty()) {
|
||||
throw new RuntimeException("库位已满");
|
||||
}
|
||||
//筛选深度
|
||||
List<AppLocation> collect = appLocations.stream().filter(l -> l.getwDepth().equals(2)).collect(Collectors.toList());
|
||||
List<AppLocation> collect1 = appLocations.stream().filter(l -> l.getwDepth().equals(1)).collect(Collectors.toList());
|
||||
//定义库位
|
||||
String locationId = null;
|
||||
if (ObjectUtil.isNotEmpty(collect)) {
|
||||
locationId = collect.get(0).getLocationId();
|
||||
} else {
|
||||
locationId = collect1.get(0).getLocationId();
|
||||
}
|
||||
AppLocation location = new AppLocation();
|
||||
location.setLocationId(locationId);
|
||||
location.setLocationStatus(1);
|
||||
//更新库位为任务中
|
||||
int i = appLocationMapper.updateLocationByLocationId(location);
|
||||
if (i == 0) {
|
||||
throw new RuntimeException("库位更新失败");
|
||||
}
|
||||
return locationId;
|
||||
|
||||
}
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public String sendLocation() {
|
||||
// AppLocation appLocation = new AppLocation();
|
||||
// appLocation.setLocationStatus(0);
|
||||
// appLocation.setIsLock(0);
|
||||
// appLocation.setIsWorking(0);
|
||||
// //查询可用库位
|
||||
// List<AppLocation> appLocations = appLocationMapper.selectAppLocationList(appLocation);
|
||||
// if (appLocations == null || appLocations.isEmpty()) {
|
||||
// throw new RuntimeException("库位已满");
|
||||
// }
|
||||
// //筛选深度
|
||||
// List<AppLocation> collect = appLocations.stream().filter(l -> l.getwDepth().equals(2)).collect(Collectors.toList());
|
||||
// List<AppLocation> collect1 = appLocations.stream().filter(l -> l.getwDepth().equals(1)).collect(Collectors.toList());
|
||||
// //定义库位
|
||||
// String locationId = null;
|
||||
// if (ObjectUtil.isNotEmpty(collect)) {
|
||||
// locationId = collect.get(0).getLocationId();
|
||||
// } else {
|
||||
// locationId = collect1.get(0).getLocationId();
|
||||
// }
|
||||
// AppLocation location = new AppLocation();
|
||||
// location.setLocationId(locationId);
|
||||
// location.setLocationStatus(1);
|
||||
// //更新库位为任务中
|
||||
// int i = appLocationMapper.updateLocationByLocationId(location);
|
||||
// if (i == 0) {
|
||||
// throw new RuntimeException("库位更新失败");
|
||||
// }
|
||||
// return locationId;
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 是否是最内层可用库位
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppPmsOrderInBakMapper;
|
||||
import com.ruoyi.app.domain.AppPmsOrderInBak;
|
||||
import com.ruoyi.app.service.IAppPmsOrderInBakService;
|
||||
|
||||
/**
|
||||
* PMS入库订单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Service
|
||||
public class AppPmsOrderInBakServiceImpl implements IAppPmsOrderInBakService
|
||||
{
|
||||
@Autowired
|
||||
private AppPmsOrderInBakMapper appPmsOrderInBakMapper;
|
||||
|
||||
/**
|
||||
* 查询PMS入库订单
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return PMS入库订单
|
||||
*/
|
||||
@Override
|
||||
public AppPmsOrderInBak selectAppPmsOrderInBakById(String id)
|
||||
{
|
||||
return appPmsOrderInBakMapper.selectAppPmsOrderInBakById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询PMS入库订单列表
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return PMS入库订单
|
||||
*/
|
||||
@Override
|
||||
public List<AppPmsOrderInBak> selectAppPmsOrderInBakList(AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
return appPmsOrderInBakMapper.selectAppPmsOrderInBakList(appPmsOrderInBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
appPmsOrderInBak.setCreateTime(DateUtils.getNowDate());
|
||||
return appPmsOrderInBakMapper.insertAppPmsOrderInBak(appPmsOrderInBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改PMS入库订单
|
||||
*
|
||||
* @param appPmsOrderInBak PMS入库订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppPmsOrderInBak(AppPmsOrderInBak appPmsOrderInBak)
|
||||
{
|
||||
appPmsOrderInBak.setUpdateTime(DateUtils.getNowDate());
|
||||
return appPmsOrderInBakMapper.updateAppPmsOrderInBak(appPmsOrderInBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除PMS入库订单
|
||||
*
|
||||
* @param ids 需要删除的PMS入库订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderInBakByIds(String[] ids)
|
||||
{
|
||||
return appPmsOrderInBakMapper.deleteAppPmsOrderInBakByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除PMS入库订单信息
|
||||
*
|
||||
* @param id PMS入库订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderInBakById(String id)
|
||||
{
|
||||
return appPmsOrderInBakMapper.deleteAppPmsOrderInBakById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppPmsOrderOutBakMapper;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOutBak;
|
||||
import com.ruoyi.app.service.IAppPmsOrderOutBakService;
|
||||
|
||||
/**
|
||||
* 出库单历史Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Service
|
||||
public class AppPmsOrderOutBakServiceImpl implements IAppPmsOrderOutBakService
|
||||
{
|
||||
@Autowired
|
||||
private AppPmsOrderOutBakMapper appPmsOrderOutBakMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单历史
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 出库单历史
|
||||
*/
|
||||
@Override
|
||||
public AppPmsOrderOutBak selectAppPmsOrderOutBakByRecordId(String recordId)
|
||||
{
|
||||
return appPmsOrderOutBakMapper.selectAppPmsOrderOutBakByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库单历史列表
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 出库单历史
|
||||
*/
|
||||
@Override
|
||||
public List<AppPmsOrderOutBak> selectAppPmsOrderOutBakList(AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
return appPmsOrderOutBakMapper.selectAppPmsOrderOutBakList(appPmsOrderOutBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
appPmsOrderOutBak.setCreateTime(DateUtils.getNowDate());
|
||||
return appPmsOrderOutBakMapper.insertAppPmsOrderOutBak(appPmsOrderOutBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单历史
|
||||
*
|
||||
* @param appPmsOrderOutBak 出库单历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppPmsOrderOutBak(AppPmsOrderOutBak appPmsOrderOutBak)
|
||||
{
|
||||
appPmsOrderOutBak.setUpdateTime(DateUtils.getNowDate());
|
||||
return appPmsOrderOutBakMapper.updateAppPmsOrderOutBak(appPmsOrderOutBak);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单历史
|
||||
*
|
||||
* @param recordIds 需要删除的出库单历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderOutBakByRecordIds(String[] recordIds)
|
||||
{
|
||||
return appPmsOrderOutBakMapper.deleteAppPmsOrderOutBakByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单历史信息
|
||||
*
|
||||
* @param recordId 出库单历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderOutBakByRecordId(String recordId)
|
||||
{
|
||||
return appPmsOrderOutBakMapper.deleteAppPmsOrderOutBakByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,27 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.app.domain.AppGoods;
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.domain.AppPmsOrderOut;
|
||||
import com.ruoyi.app.mapper.AppGoodsMapper;
|
||||
import com.ruoyi.app.mapper.AppPmsOrderOutMapper;
|
||||
import com.ruoyi.app.service.IAppPmsOrderOutService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
|
|
@ -17,8 +31,12 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
public class AppPmsOrderOutServiceImpl implements IAppPmsOrderOutService
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(AppPmsOrderOutServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private AppPmsOrderOutMapper appPmsOrderOutMapper;
|
||||
@Autowired
|
||||
private AppGoodsMapper appGoodsMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
|
|
@ -98,4 +116,61 @@ public class AppPmsOrderOutServiceImpl implements IAppPmsOrderOutService
|
|||
public int updatePickNum(AppPmsOrderOut appPmsOrderOut) {
|
||||
return appPmsOrderOutMapper.updatePickNum(appPmsOrderOut);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importPmsOrderOut(String id,String orderId,List<AppPmsOrderOut> appPmsOrderOutList, boolean isUpdateSupport) {
|
||||
if (CollectionUtil.isEmpty(appPmsOrderOutList)) {
|
||||
throw new ServiceException("导入库位数据不能为空!");
|
||||
}
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (AppPmsOrderOut appPmsOrderOut : appPmsOrderOutList) {
|
||||
try {
|
||||
appPmsOrderOut.setRecordId(UUID.randomUUID().toString());
|
||||
appPmsOrderOut.setOrderId(id);
|
||||
appPmsOrderOut.setListId(orderId);
|
||||
appPmsOrderOut.setOrderType(6);
|
||||
appPmsOrderOut.setOrderStatus(0);
|
||||
appPmsOrderOut.setCreateTime(new Date());
|
||||
appPmsOrderOut.setUpdateTime(new Date());
|
||||
appPmsOrderOut.setPickNum(BigDecimal.ZERO);
|
||||
appPmsOrderOut.setTrNum(BigDecimal.ZERO);
|
||||
appPmsOrderOut.setCreateBy(getUsername());
|
||||
|
||||
// 校验同一个订单号中的物料
|
||||
AppPmsOrderOut query = new AppPmsOrderOut();
|
||||
query.setOrderId(appPmsOrderOut.getOrderId());
|
||||
AppGoods oldAppGoods = appGoodsMapper.selectAppGoodsById(appPmsOrderOut.getGoodsId());
|
||||
if (ObjectUtils.isEmpty(oldAppGoods)) {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>" + failureNum + "、物料 " + appPmsOrderOut.getGoodsId() + " 不存在");
|
||||
}
|
||||
|
||||
|
||||
appPmsOrderOutMapper.insertAppPmsOrderOut(appPmsOrderOut);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、库位 " + appPmsOrderOut.getGoodsId() + " 导入成功");
|
||||
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、库位 " + appPmsOrderOut.getGoodsId() + " 导入失败:";
|
||||
failureMsg.append(msg + e.getMessage());
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppPmsOrderOut selectAppPmsOrderOutByRecordId(String recordId) {
|
||||
return appPmsOrderOutMapper.selectAppPmsOrderOutByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.app.mapper.AppPmsOrderInBakMapper">
|
||||
|
||||
<resultMap type="AppPmsOrderInBak" id="AppPmsOrderInBakResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="listId" column="list_id" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsNum" column="goods_num" />
|
||||
<result property="usedNum" column="used_num" />
|
||||
<result property="remainingNum" column="remaining_num" />
|
||||
<result property="goodsCode" column="goods_code" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppPmsOrderInBakVo">
|
||||
select id, list_id, order_type, customer_id, order_id, goods_id, goods_num, used_num, remaining_num, goods_code, goods_desc, unit, spare1, spare2, order_status, create_time, update_time, remark, create_by from app_pms_order_in_bak
|
||||
</sql>
|
||||
|
||||
<select id="selectAppPmsOrderInBakList" parameterType="AppPmsOrderInBak" resultMap="AppPmsOrderInBakResult">
|
||||
<include refid="selectAppPmsOrderInBakVo"/>
|
||||
<where>
|
||||
<if test="listId != null and listId != ''"> and list_id = #{listId}</if>
|
||||
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="goodsId != null and goodsId != ''"> and goods_id = #{goodsId}</if>
|
||||
<if test="goodsCode != null and goodsCode != ''"> and goods_code = #{goodsCode}</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''"> and goods_desc = #{goodsDesc}</if>
|
||||
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppPmsOrderInBakById" parameterType="String" resultMap="AppPmsOrderInBakResult">
|
||||
<include refid="selectAppPmsOrderInBakVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppPmsOrderInBak" parameterType="AppPmsOrderInBak">
|
||||
insert into app_pms_order_in_bak
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="listId != null and listId != ''">list_id,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="goodsId != null">goods_id,</if>
|
||||
<if test="goodsNum != null">goods_num,</if>
|
||||
<if test="usedNum != null">used_num,</if>
|
||||
<if test="remainingNum != null">remaining_num,</if>
|
||||
<if test="goodsCode != null">goods_code,</if>
|
||||
<if test="goodsDesc != null">goods_desc,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="listId != null and listId != ''">#{listId},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="goodsId != null">#{goodsId},</if>
|
||||
<if test="goodsNum != null">#{goodsNum},</if>
|
||||
<if test="usedNum != null">#{usedNum},</if>
|
||||
<if test="remainingNum != null">#{remainingNum},</if>
|
||||
<if test="goodsCode != null">#{goodsCode},</if>
|
||||
<if test="goodsDesc != null">#{goodsDesc},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppPmsOrderInBak" parameterType="AppPmsOrderInBak">
|
||||
update app_pms_order_in_bak
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="listId != null and listId != ''">list_id = #{listId},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
||||
<if test="goodsNum != null">goods_num = #{goodsNum},</if>
|
||||
<if test="usedNum != null">used_num = #{usedNum},</if>
|
||||
<if test="remainingNum != null">remaining_num = #{remainingNum},</if>
|
||||
<if test="goodsCode != null">goods_code = #{goodsCode},</if>
|
||||
<if test="goodsDesc != null">goods_desc = #{goodsDesc},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppPmsOrderInBakById" parameterType="String">
|
||||
delete from app_pms_order_in_bak where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppPmsOrderInBakByIds" parameterType="String">
|
||||
delete from app_pms_order_in_bak where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.app.mapper.AppPmsOrderOutBakMapper">
|
||||
|
||||
<resultMap type="AppPmsOrderOutBak" id="AppPmsOrderOutBakResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="listId" column="list_id" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsNum" column="goods_num" />
|
||||
<result property="pickNum" column="pick_num" />
|
||||
<result property="trNum" column="tr_num" />
|
||||
<result property="shelvesNum" column="shelves_num" />
|
||||
<result property="stockNum" column="stock_num" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="isLock" column="is_lock" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppPmsOrderOutBakVo">
|
||||
select record_id, order_id, list_id, order_type, customer_id, goods_id, goods_num, pick_num, tr_num, shelves_num, stock_num, goods_desc, spare1, spare2, order_status, is_lock, create_time, create_by, update_time from app_pms_order_out_bak
|
||||
</sql>
|
||||
|
||||
<select id="selectAppPmsOrderOutBakList" parameterType="AppPmsOrderOutBak" resultMap="AppPmsOrderOutBakResult">
|
||||
<include refid="selectAppPmsOrderOutBakVo"/>
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="listId != null and listId != ''"> and list_id = #{listId}</if>
|
||||
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''"> and goods_desc = #{goodsDesc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppPmsOrderOutBakByRecordId" parameterType="String" resultMap="AppPmsOrderOutBakResult">
|
||||
<include refid="selectAppPmsOrderOutBakVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppPmsOrderOutBak" parameterType="AppPmsOrderOutBak">
|
||||
insert into app_pms_order_out_bak
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="listId != null and listId != ''">list_id,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="goodsId != null and goodsId != ''">goods_id,</if>
|
||||
<if test="goodsNum != null">goods_num,</if>
|
||||
<if test="pickNum != null">pick_num,</if>
|
||||
<if test="trNum != null">tr_num,</if>
|
||||
<if test="shelvesNum != null">shelves_num,</if>
|
||||
<if test="stockNum != null">stock_num,</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="isLock != null">is_lock,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="listId != null and listId != ''">#{listId},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="goodsId != null and goodsId != ''">#{goodsId},</if>
|
||||
<if test="goodsNum != null">#{goodsNum},</if>
|
||||
<if test="pickNum != null">#{pickNum},</if>
|
||||
<if test="trNum != null">#{trNum},</if>
|
||||
<if test="shelvesNum != null">#{shelvesNum},</if>
|
||||
<if test="stockNum != null">#{stockNum},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="isLock != null">#{isLock},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppPmsOrderOutBak" parameterType="AppPmsOrderOutBak">
|
||||
update app_pms_order_out_bak
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="listId != null and listId != ''">list_id = #{listId},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="goodsId != null and goodsId != ''">goods_id = #{goodsId},</if>
|
||||
<if test="goodsNum != null">goods_num = #{goodsNum},</if>
|
||||
<if test="pickNum != null">pick_num = #{pickNum},</if>
|
||||
<if test="trNum != null">tr_num = #{trNum},</if>
|
||||
<if test="shelvesNum != null">shelves_num = #{shelvesNum},</if>
|
||||
<if test="stockNum != null">stock_num = #{stockNum},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc = #{goodsDesc},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="isLock != null">is_lock = #{isLock},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppPmsOrderOutBakByRecordId" parameterType="String">
|
||||
delete from app_pms_order_out_bak where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppPmsOrderOutBakByRecordIds" parameterType="String">
|
||||
delete from app_pms_order_out_bak where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<select id="selectAppPmsOrderOutByListId" parameterType="String" resultMap="AppPmsOrderOutResult">
|
||||
<include refid="selectAppPmsOrderOutVo"/>
|
||||
where record_id = #{recordId}
|
||||
where list_id = #{listId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppPmsOrderOut" parameterType="AppPmsOrderOut">
|
||||
|
|
@ -146,4 +146,9 @@
|
|||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectAppPmsOrderOutByRecordId" parameterType="String" resultMap="AppPmsOrderOutResult">
|
||||
<include refid="selectAppPmsOrderOutVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user