pda界面和功能优化,完善mes下发版辊字段
This commit is contained in:
@@ -116,7 +116,7 @@ public class ApiErpService implements IApiErpService {
|
||||
.stockinId((stockinId))
|
||||
.inType("1")
|
||||
.stockSource("ERP")
|
||||
.status(StockStatusEnum.CREATE.getCode())
|
||||
.status(StockStatusEnum.RUNNING.getCode())
|
||||
.createDate(DateUtil.date())
|
||||
.erpBill(docNo)
|
||||
.warehouseId("01")
|
||||
@@ -205,7 +205,7 @@ public class ApiErpService implements IApiErpService {
|
||||
.stockoutId((stockoutId))
|
||||
.outType("1")
|
||||
.stockSource("ERP")
|
||||
.status(StockStatusEnum.CREATE.getCode())
|
||||
.status(StockStatusEnum.RUNNING.getCode())
|
||||
.createDate(DateUtil.date())
|
||||
.erpBill(docNo)
|
||||
.warehouseId("01")
|
||||
|
||||
@@ -136,13 +136,13 @@ public class BasStock extends BaseEntity
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
// /** 托盘类型 */
|
||||
// @Excel(name = "托盘类型")
|
||||
// private int trayType;
|
||||
/** 版长 */
|
||||
@Excel(name = "版长")
|
||||
private BigDecimal length;
|
||||
//
|
||||
// /** 托盘可用位置 */
|
||||
// @Excel(name = "可用位置")
|
||||
// private int availablePlace;
|
||||
/** 版周 */
|
||||
@Excel(name = "版周")
|
||||
private BigDecimal perimeter;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ public class InTrayMsg
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
|
||||
/** 绑定数量 */
|
||||
@Excel(name = "绑定数量")
|
||||
private BigDecimal quantity;
|
||||
@@ -78,6 +82,14 @@ public class InTrayMsg
|
||||
@Excel(name = "色序")
|
||||
private Integer colorSequence;
|
||||
|
||||
/** 版长 */
|
||||
@Excel(name = "版长")
|
||||
private BigDecimal length;
|
||||
|
||||
/** 版周 */
|
||||
@Excel(name = "版周")
|
||||
private BigDecimal perimeter;
|
||||
|
||||
/** 颜色 */
|
||||
@Excel(name = "颜色")
|
||||
private String color;
|
||||
|
||||
@@ -19,6 +19,14 @@ public interface IInTrayMsgService
|
||||
*/
|
||||
public InTrayMsg selectInTrayMsgById(Long id);
|
||||
|
||||
/**
|
||||
* 查询入库信息
|
||||
*
|
||||
* @param rollerNumber 辊号
|
||||
* @return 入库信息
|
||||
*/
|
||||
public InTrayMsg selectInTrayMsgByRollerNumber(String rollerNumber);
|
||||
|
||||
/**
|
||||
* 查询入库信息列表
|
||||
*
|
||||
@@ -59,7 +67,6 @@ public interface IInTrayMsgService
|
||||
*/
|
||||
public int deleteInTrayMsgById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 删除入库信息信息
|
||||
*
|
||||
@@ -68,7 +75,6 @@ public interface IInTrayMsgService
|
||||
*/
|
||||
public int deleteInTrayMsgByTrayCode(String trayCode);
|
||||
|
||||
|
||||
/**
|
||||
* 删除入库信息信息
|
||||
*
|
||||
@@ -77,7 +83,6 @@ public interface IInTrayMsgService
|
||||
*/
|
||||
public int deleteInTrayMsgByRollerNumber(String rollerNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 删除入库信息信息
|
||||
*
|
||||
|
||||
@@ -32,6 +32,18 @@ public class InTrayMsgServiceImpl implements IInTrayMsgService
|
||||
return inTrayMsgMapper.selectInTrayMsgById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库信息
|
||||
*
|
||||
* @param rollerNumber 入库信息主键
|
||||
* @return 入库信息
|
||||
*/
|
||||
@Override
|
||||
public InTrayMsg selectInTrayMsgByRollerNumber(String rollerNumber)
|
||||
{
|
||||
return inTrayMsgMapper.selectInTrayMsgByRollerNumber(rollerNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库信息列表
|
||||
*
|
||||
|
||||
@@ -395,6 +395,7 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
//每条子任务生成一条库存信息
|
||||
for (MydoJobDetail detail : details){
|
||||
BasStock stock = basStockService.selectBasStockByRollerNumber(detail.getRollerNumber());
|
||||
InTrayMsg inTrayMsg = inTrayMsgService.selectInTrayMsgByRollerNumber(detail.getRollerNumber());//获取当前板棍绑定信息 - 用于插入库存和移除绑定
|
||||
//常规入库没有当前板棍库存的情况
|
||||
if (ObjUtil.isNull(stock)){
|
||||
//物料数量固定为1,辊号唯一
|
||||
@@ -407,28 +408,18 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
.trayCode(detail.getTrayCode())
|
||||
.jobId(jobId)
|
||||
.jobDetailId(jobId + "-" + num++)
|
||||
.stockinId(inTrayMsgs.get(0).getStockinId())//获取单据号需要从托盘绑定信息表获取
|
||||
.stockinDetailId(inTrayMsgs.get(0).getStockinDetailId())
|
||||
.stockinId(inTrayMsg.getStockinId())//获取单据号需要从托盘绑定信息表获取
|
||||
.stockinDetailId(inTrayMsg.getStockinDetailId())
|
||||
.rollerNumber(detail.getRollerNumber())
|
||||
.quantity(detail.getInQuantity())
|
||||
.cargoSpaceId(mydoJob.getCargoSpaceId())
|
||||
.productId(detail.getProductId())
|
||||
.productName(detail.getProductName())
|
||||
.length(inTrayMsg.getLength())
|
||||
.perimeter(inTrayMsg.getPerimeter())
|
||||
.inDate(DateUtil.date().now())
|
||||
.build()
|
||||
);
|
||||
|
||||
log.info("【账务处理】新增库存明细,作业号:{},库存编号:{},辊号:{}", jobId, stockId, detail.getRollerNumber());
|
||||
|
||||
//更新实际数量 = 当前入库数量
|
||||
InStockinDetail inStockinDetail = instockinDetailService.selectInStockinDetailByRollerNumber(detail.getRollerNumber());
|
||||
if (ObjUtil.isNotNull(inStockinDetail)){
|
||||
inStockinDetail.setAssignNum(detail.getInQuantity());
|
||||
inStockinDetail.setStatus(1);
|
||||
instockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}else{
|
||||
log.info("【账务处理-异常提示】找不到版辊的子单明细,子单号:{},辊号:{}", inStockinDetail.getStockinDetailId(), detail.getRollerNumber());
|
||||
}
|
||||
}else{
|
||||
//回流入库 - 已经有当前板棍的库存 - 更新货位即可
|
||||
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
@@ -438,13 +429,24 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
basStockService.updateBasStock(stock);
|
||||
}
|
||||
|
||||
inTrayMsgService.deleteInTrayMsgByRollerNumber(inTrayMsg.getRollerNumber());
|
||||
log.info("【账务处理】新增库存明细,移除库存辊号入库绑定信息,作业号:{},库存编号:{},辊号:{}", jobId, stockId, detail.getRollerNumber());
|
||||
|
||||
}
|
||||
//更新实际数量 = 当前入库数量
|
||||
InStockinDetail inStockinDetail = instockinDetailService.selectInStockinDetailByRollerNumber(detail.getRollerNumber());
|
||||
if (ObjUtil.isNotNull(inStockinDetail)){
|
||||
inStockinDetail.setAssignNum(detail.getInQuantity());
|
||||
inStockinDetail.setStatus(1);
|
||||
instockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}else{
|
||||
log.info("【账务处理-异常提示】找不到版辊的子单明细,子单号:{},辊号:{}", inStockinDetail.getStockinDetailId(), detail.getRollerNumber());
|
||||
}
|
||||
|
||||
}//子任务循环处理
|
||||
|
||||
//--------------------更新货位状态--------------------
|
||||
BasCargoSpace cargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
basCargoSpaceService.updateBasCargoSpaceStatus(cargoSpace.getCargoSpaceId(), mydoJob.getTrayCode(), CargoSpaceCode.CARGOSPACE_STATUS_OCCUPIED);
|
||||
log.info("【账务处理】更新货位状态<已占用>,作业号:{},货位:{},托盘号:{}", jobId, cargoSpace.getCargoSpaceId(), mydoJob.getTrayCode());
|
||||
basCargoSpaceService.updateBasCargoSpaceStatus(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), CargoSpaceCode.CARGOSPACE_STATUS_OCCUPIED);
|
||||
log.info("【账务处理】更新货位状态<占用>,作业号:{},货位:{},托盘号:{}", jobId, mydoJob.getCargoSpaceId(), mydoJob.getTrayCode());
|
||||
|
||||
//--------------------处理任务表和子任务表--------------------
|
||||
//1.更新任务主表状态并移除作业
|
||||
@@ -457,9 +459,6 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
mydoJobDetailService.insertMydoJobDetailsForJobFinish(jobId);
|
||||
mydoJobDetailService.deleteMydoJobDetailsByJobId(jobId);
|
||||
|
||||
//3.移除当前托盘的绑定信息
|
||||
inTrayMsgService.deleteInTrayMsgByTrayCode(mydoJob.getTrayCode());
|
||||
|
||||
log.info("【账务处理】移除任务数据和绑定信息,生成历史记录,作业号:{},托盘号:{}", jobId, mydoJob.getTrayCode());
|
||||
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.ruoyi.pda.domain.AddInJobRequest;
|
||||
import com.ruoyi.pda.domain.TrayMsgBinding;
|
||||
import com.ruoyi.pda.domain.BindTrayRequest;
|
||||
import com.ruoyi.pda.service.IPdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -31,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 手持机 Controller
|
||||
@@ -39,7 +41,8 @@ import java.util.Map;
|
||||
* @date 2026-05-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pda")
|
||||
@RequestMapping("/pdaSevice")
|
||||
@Slf4j
|
||||
public class PdaController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
@@ -170,13 +173,29 @@ public class PdaController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 取消入库绑盘
|
||||
* 取消入库绑盘 - 单版辊取消
|
||||
*/
|
||||
@PostMapping("/cancelTrayMsg")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:cancel')")
|
||||
public AjaxResult cancelTray(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
String rollerNumber = (String) params.get("barcode");
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消入库绑盘 - 托盘全部取消
|
||||
*/
|
||||
@PostMapping("/cancelTrayMsgs")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:cancel')")
|
||||
public AjaxResult cancelTrays(@RequestBody String rollerNumber) {
|
||||
public AjaxResult cancelTrays(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
String trayCode = (String) params.get("barcode");
|
||||
return pdaService.cancelTrayMsgAll(trayCode);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
@@ -217,7 +236,7 @@ public class PdaController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询物料信息(子单号查询)
|
||||
* 入库绑盘-查询子单物料信息(子单号查询)
|
||||
* @param detailId 子单号
|
||||
* @return
|
||||
*/
|
||||
@@ -234,7 +253,7 @@ public class PdaController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询物料信息(辊号查询)
|
||||
* 入库绑盘-查询子单物料信息(辊号查询)
|
||||
* @param rollerNumber 辊号
|
||||
* @return
|
||||
*/
|
||||
@@ -268,12 +287,33 @@ public class PdaController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getTrayMsgByRollerNumber(String rollerNumber) {
|
||||
try {
|
||||
InTrayMsg msg = pdaService.getTrayMsgByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(msg)){
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查入库单据明细");
|
||||
}else{
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
InTrayMsg info = pdaService.getTrayMsgByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(info)){
|
||||
log.warn("【获取版辊绑定信息】找不到当前辊号的绑定信息,辊号:{}", rollerNumber);
|
||||
return AjaxResult.error("找不到当前辊号的绑定信息");
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘作废-查询托盘已经绑定的版辊信息
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getTrayBindMsgInfoByTrayCode")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getTrayMsgsByTrayCode(String trayCode) {
|
||||
try {
|
||||
List<InTrayMsg> inTrayMsgs = pdaService.getTrayMsgsByTrayCode(trayCode);
|
||||
if(inTrayMsgs.isEmpty()){
|
||||
log.warn("【获取托盘绑定信息】找不到当前托盘的任何绑定信息,托盘号:{}", trayCode);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success(inTrayMsgs);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
@@ -351,7 +391,7 @@ public class PdaController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑定 - 通过入库单据号获取所有版辊信息集合
|
||||
* 入库绑定 - 通过入库单据号获取所有未扫码的版辊信息集合
|
||||
* @param stockinId 托盘号
|
||||
* @return
|
||||
*/
|
||||
@@ -359,7 +399,9 @@ public class PdaController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult getDetailListByStockinId(String stockinId) {
|
||||
try {
|
||||
List<InStockinDetail> details = inStockinDetailService.selectInStockinDetailByStockinId(stockinId);
|
||||
List<InStockinDetail> details = inStockinDetailService.selectInStockinDetailByStockinId(stockinId)
|
||||
.stream()
|
||||
.filter(s -> DecimalUtil.eq(s.getScanNum(), BigDecimal.ZERO)).collect(Collectors.toList());
|
||||
if(details.isEmpty()){
|
||||
return AjaxResult.error();
|
||||
}else{
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.ruoyi.pda.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.stock.domain.BasStock;
|
||||
import com.ruoyi.bas.stock.service.IBasStockService;
|
||||
import com.ruoyi.common.TaskType;
|
||||
import com.ruoyi.common.Utils.DecimalUtil;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.in.bind.domain.InTrayMsg;
|
||||
import com.ruoyi.in.job.domain.MydoJob;
|
||||
import com.ruoyi.in.job.service.IMydoJobService;
|
||||
import com.ruoyi.in.jobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.out.stockoutdetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.pda.domain.AddInJobRequest;
|
||||
import com.ruoyi.pda.domain.BindTrayRequest;
|
||||
import com.ruoyi.pda.domain.TrayMsgBinding;
|
||||
import com.ruoyi.pda.service.IPdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 手持机 Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pda")
|
||||
@Slf4j
|
||||
public class PdaInventoryController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IPdaService pdaService;
|
||||
@Autowired
|
||||
IMydoJobService mydoJobService;
|
||||
@Autowired
|
||||
IBasStockService basStockService;
|
||||
|
||||
|
||||
//==================================== 盘点 ========================================
|
||||
//==================================== 盘点 ========================================
|
||||
//==================================== 盘点 ========================================
|
||||
|
||||
|
||||
/**
|
||||
* 盘点出库待处理任务列表
|
||||
*/
|
||||
@GetMapping("/inventoryOutTaskList")
|
||||
@PreAuthorize("@ss.hasPermi('inventory:task:list')")
|
||||
public TableDataInfo listInventoryTask(MydoJob mydoJob) {
|
||||
mydoJob.setInOrOut(TaskType.TASKTYPE_STOCKOUT_INVENTORY);
|
||||
startPage();
|
||||
List<MydoJob> list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 盘点-查询物料库存(托盘号查询)
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getInventoryOutInfoByTrayCode")
|
||||
@PreAuthorize("@ss.hasPermi('out:inventory:task:info')")
|
||||
public AjaxResult getInventoryOutInfoByTrayCode(String trayCode) {
|
||||
try {
|
||||
MydoJob job = mydoJobService.selectMydoJobByTrayCode(trayCode);
|
||||
// List<MydoJobDetail> info = pdaService.getStockoutInfoByTrayCode(trayCode);
|
||||
List<BasStock> stocks = basStockService.selectBasStockListByTrayCode(trayCode);
|
||||
if(ObjUtil.isNull(job) || stocks.isEmpty()){
|
||||
return AjaxResult.error("找不到当前托盘出库明细,请检查作业状态");
|
||||
}else{
|
||||
return AjaxResult.success(stocks);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 物料(版辊)库存【产品状态】异常标记
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/inventoryStockExcetion")
|
||||
@PreAuthorize("@ss.hasPermi('out:inventory:task:info')")
|
||||
public AjaxResult inventoryStockExcetion(@RequestBody Map<String, Object> params) {
|
||||
return pdaService.inventoryStockExcetion(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 手动指定出库确认 - 版辊单独确认
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/inventoryTrayCodeComplete")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult inventoryTrayCodeComplete(@RequestBody Map<String, Object> params) {
|
||||
return pdaService.inventoryTrayCodeComplete(params);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
package com.ruoyi.pda.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.stock.domain.BasStock;
|
||||
import com.ruoyi.bas.stock.service.IBasStockService;
|
||||
import com.ruoyi.common.TaskType;
|
||||
import com.ruoyi.common.Utils.DecimalUtil;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.in.bind.domain.InTrayMsg;
|
||||
import com.ruoyi.in.job.domain.MydoJob;
|
||||
import com.ruoyi.in.job.service.IMydoJobService;
|
||||
import com.ruoyi.in.jobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.out.stockoutdetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.pda.domain.AddInJobRequest;
|
||||
import com.ruoyi.pda.domain.BindTrayRequest;
|
||||
import com.ruoyi.pda.domain.TrayMsgBinding;
|
||||
import com.ruoyi.pda.service.IPdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 手持机 Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pda")
|
||||
@Slf4j
|
||||
public class PdaStockinController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IPdaService pdaService;
|
||||
@Autowired
|
||||
IInStockinDetailService inStockinDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 入库待处理任务列表
|
||||
*/
|
||||
@GetMapping("/inboundTaskList")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:list')")
|
||||
public TableDataInfo list(InStockinDetail inStockinDetail) {
|
||||
startPage();
|
||||
List<InStockinDetail> list = pdaService.inboundTaskList(inStockinDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库待处理单据列表
|
||||
*/
|
||||
@GetMapping("/inboundStockList")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:stock:list')")
|
||||
public TableDataInfo list(InStockin inStockin) {
|
||||
startPage();
|
||||
List<InStockin> list = pdaService.inboundStockList(inStockin);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘(支持一托多料)
|
||||
* <p>
|
||||
* 请求体示例:
|
||||
* {
|
||||
* "trayCode": "T001",
|
||||
* "warehouseId": "WH01",
|
||||
* "items": [
|
||||
* { "stockinDetailId": "D001", "productId": "P001", "quantity": 10 },
|
||||
* { "stockinDetailId": "D002", "productId": "P002", "quantity": 20 }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
@PostMapping("/bindTray")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:add')")
|
||||
public AjaxResult bindTray(@RequestBody BindTrayRequest request) {
|
||||
try {
|
||||
String res = pdaService.bindTray(request);
|
||||
if (StringUtils.isEmpty(res)){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
return AjaxResult.error(res);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘
|
||||
*/
|
||||
@PostMapping("/bindTrayMsg")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:add')")
|
||||
public AjaxResult bindTray(@RequestBody TrayMsgBinding bindTray) {
|
||||
try {
|
||||
if (bindTray == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
return pdaService.bindingTrayMsg(bindTray);
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘
|
||||
*/
|
||||
@PostMapping("/bindTrayMsgs")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:add')")
|
||||
public AjaxResult bindTrays(@RequestBody BindTrayRequest bindTray) {
|
||||
try {
|
||||
if (bindTray == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
return pdaService.bindingTrayMsg(bindTray);
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消入库绑盘 - 单版辊取消
|
||||
*/
|
||||
@PostMapping("/cancelTrayMsg")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:cancel')")
|
||||
public AjaxResult cancelTray(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
String rollerNumber = (String) params.get("barcode");
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消入库绑盘 - 托盘全部取消
|
||||
*/
|
||||
@PostMapping("/cancelTrayMsgs")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:cancel')")
|
||||
public AjaxResult cancelTraysAll(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
String trayCode = (String) params.get("barcode");
|
||||
return pdaService.cancelTrayMsgAll(trayCode);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成入库作业
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addInJob")
|
||||
@PreAuthorize("@ss.hasPermi('in:job:add')")
|
||||
public AjaxResult addInJob(@RequestBody AddInJobRequest request){
|
||||
try {
|
||||
String res = pdaService.addInJob(request);
|
||||
return AjaxResult.success(res);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成空托盘入库绑定信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addEmptyTrayJob")
|
||||
@PreAuthorize("@ss.hasPermi('in:job:add')")
|
||||
public AjaxResult addEmptyTrayJob(@RequestBody AddInJobRequest request){
|
||||
try {
|
||||
return pdaService.addEmptyTrayJob(request);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询子单物料信息(子单号查询)
|
||||
* @param detailId 子单号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getProductInfoByInDetailId")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getProductInfoByInDetailId(String detailId) {
|
||||
try {
|
||||
InStockinDetail info = pdaService.getProductInfoByInDetailId(detailId);
|
||||
return AjaxResult.success(info);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询子单物料信息(辊号查询)
|
||||
* @param rollerNumber 辊号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getStockinInfoByRollerNumber")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getStockinInfoByRollerNumber(String rollerNumber) {
|
||||
try {
|
||||
InStockinDetail info = pdaService.getStockinInfoByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(info)){
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查入库单据明细");
|
||||
}else{
|
||||
if (DecimalUtil.eq(info.getScanNum(), BigDecimal.valueOf(0))) {
|
||||
return AjaxResult.success(info);
|
||||
}else{
|
||||
return AjaxResult.warn("该版辊已经执行过绑定操作,请确认绑定信息");
|
||||
}
|
||||
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘作废-查询绑定信息(辊号查询)
|
||||
* @param rollerNumber 辊号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getTrayMsgByRollerNumber")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getTrayMsgByRollerNumber(String rollerNumber) {
|
||||
try {
|
||||
InTrayMsg info = pdaService.getTrayMsgByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(info)){
|
||||
log.warn("【获取版辊绑定信息】找不到当前辊号的绑定信息,辊号:{}", rollerNumber);
|
||||
return AjaxResult.error("找不到当前辊号的绑定信息");
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘作废-查询托盘已经绑定的版辊信息
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getTrayBindMsgInfoByTrayCode")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getTrayMsgsByTrayCode(String trayCode) {
|
||||
try {
|
||||
List<InTrayMsg> inTrayMsgs = pdaService.getTrayMsgsByTrayCode(trayCode);
|
||||
if(inTrayMsgs.isEmpty()){
|
||||
log.warn("【获取托盘绑定信息】找不到当前托盘的任何绑定信息,托盘号:{}", trayCode);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success(inTrayMsgs);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑定 - 通过入库单据号获取子单所有未扫码的明细集合
|
||||
* @param stockinId 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getDetailListByStockinId")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult getDetailListByStockinId(String stockinId) {
|
||||
try {
|
||||
List<InStockinDetail> details = inStockinDetailService.selectInStockinDetailByStockinId(stockinId)
|
||||
.stream()
|
||||
.filter(s -> DecimalUtil.eq(s.getScanNum(), BigDecimal.ZERO)).collect(Collectors.toList());
|
||||
if(details.isEmpty()){
|
||||
return AjaxResult.error();
|
||||
}else{
|
||||
return AjaxResult.success(details);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
package com.ruoyi.pda.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.stock.domain.BasStock;
|
||||
import com.ruoyi.bas.stock.service.IBasStockService;
|
||||
import com.ruoyi.common.TaskType;
|
||||
import com.ruoyi.common.Utils.DecimalUtil;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.in.bind.domain.InTrayMsg;
|
||||
import com.ruoyi.in.job.domain.MydoJob;
|
||||
import com.ruoyi.in.job.service.IMydoJobService;
|
||||
import com.ruoyi.in.jobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.out.stockoutdetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.pda.domain.AddInJobRequest;
|
||||
import com.ruoyi.pda.domain.BindTrayRequest;
|
||||
import com.ruoyi.pda.domain.TrayMsgBinding;
|
||||
import com.ruoyi.pda.service.IPdaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 手持机 Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-05-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pda")
|
||||
@Slf4j
|
||||
public class PdaStockoutController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IPdaService pdaService;
|
||||
@Autowired
|
||||
IMydoJobService mydoJobService;
|
||||
|
||||
|
||||
/**
|
||||
* 出库待处理任务列表
|
||||
*/
|
||||
@GetMapping("/outboundStockList")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:stock:list')")
|
||||
public TableDataInfo list(OutStockoutDetail outStockoutDetail) {
|
||||
startPage();
|
||||
List<OutStockoutDetail> list = pdaService.outboundTaskList(outStockoutDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库待处理任务列表
|
||||
*/
|
||||
@GetMapping("/outboundTaskList")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:list')")
|
||||
public TableDataInfo listTask(MydoJob mydoJob) {
|
||||
startPage();
|
||||
List<MydoJob> list = pdaService.selectMydoJobToDealList(mydoJob);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认-查询出库子单物料信息(辊号查询)
|
||||
* @param rollerNumber 辊号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getStockoutInfoByRollerNumber")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult getStockoutInfoByRollerNumber(String rollerNumber) {
|
||||
try {
|
||||
OutStockoutDetail info = pdaService.getStockoutInfoByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(info)){
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查出库单据明细");
|
||||
}else{
|
||||
if (info.getAssignNum().equals(BigDecimal.valueOf(0))){
|
||||
return AjaxResult.success(info);
|
||||
}else{
|
||||
return AjaxResult.warn("该版辊已经执行过出库确认操作");
|
||||
}
|
||||
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 【常规出库】出库确认 - 托盘号查询 - 仅查询托盘上出库单中包含的版辊信息
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getStockoutInfoByTrayCode")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult getStockoutInfoByTrayCode(String trayCode) {
|
||||
try {
|
||||
MydoJob job = mydoJobService.selectMydoJobByTrayCode(trayCode);
|
||||
List<MydoJobDetail> info = pdaService.getStockoutInfoByTrayCode(trayCode);
|
||||
if(ObjUtil.isNull(job) || info.isEmpty()){
|
||||
return AjaxResult.error("找不到当前托盘出库明细,请检查作业状态");
|
||||
}else{
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 【手动指定出库】出库确认 - 托盘号查询 - 仅查询托盘上出库单中包含的版辊信息
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getManualStockoutInfoByTrayCode")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult getManualStockoutInfoByTrayCode(String trayCode) {
|
||||
try {
|
||||
MydoJob job = mydoJobService.selectMydoJobByTrayCode(trayCode);
|
||||
List<MydoJobDetail> info = pdaService.getStockoutInfoByTrayCode(trayCode);
|
||||
if(ObjUtil.isNull(job) || info.isEmpty() || job.getInOrOut() != TaskType.TASKTYPE_STOCKOUT_MANUAL){
|
||||
return AjaxResult.error("找不到当前<手动>出库作业明细,请检查作业状态");
|
||||
}else{
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 呼叫空托出库
|
||||
* @param params 货位区域,托盘类型
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/callStockOutForContainer")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult callStockOutForContainer(@RequestBody Map<String, Object> params) {
|
||||
return pdaService.callContainerStockOut(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 物料(版辊)手动强制出库
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/rollerNumberComplete")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult rollerNumberComplete(@RequestBody Map<String, Object> params) {
|
||||
return pdaService.rollerNumberComplete(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认 - 更新子任务中的出库数量 - 用于下一步执行托盘确认
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/stockoutDetailComplete")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult stockoutDetailComplete(@RequestBody Map<String, Object> params) {
|
||||
return pdaService.stockoutDetailComplete(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 【常规/拣选出库】托盘出库确认 - 更新版辊出库数量
|
||||
* @param trayCode
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/stockoutTrayCodeComplete")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult stockoutTrayCodeComplete(String trayCode) {
|
||||
return pdaService.stockoutTrayCodeComplete(trayCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 【手动指定出库】托盘出库确认 - 更新版辊出库数量
|
||||
* @param trayCode
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/stockoutTrayCodeCompleteManual")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult stockoutTrayCodeCompleteManual(String trayCode) {
|
||||
return pdaService.stockoutTrayCodeCompleteManual(trayCode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认 - 一键确认 - 托盘统一更新出库数量
|
||||
* @param trayCode
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/stockoutTrayCodeCompleteAll")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult stockoutTrayCodeCompleteAll(String trayCode) {
|
||||
return pdaService.stockoutTrayCodeCompleteAll(trayCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -55,6 +55,10 @@ public class BindTrayRequest {
|
||||
// @NotNull
|
||||
private String productId;
|
||||
|
||||
/** 物料名称 */
|
||||
// @NotNull
|
||||
private String productName;
|
||||
|
||||
/** 绑定数量 */
|
||||
@NotNull
|
||||
private BigDecimal quantity;
|
||||
@@ -71,6 +75,12 @@ public class BindTrayRequest {
|
||||
/** 规格 */
|
||||
private String spec;
|
||||
|
||||
/** 版长 */
|
||||
private BigDecimal length;
|
||||
|
||||
/** 版周 */
|
||||
private BigDecimal perimeter;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,13 +63,21 @@ public interface IPdaService {
|
||||
AjaxResult bindingTrayMsg(BindTrayRequest bindTray);
|
||||
|
||||
/**
|
||||
* 取消入库绑盘(多托)
|
||||
* 取消入库绑盘
|
||||
*
|
||||
* @param rollerNumber 绑盘请求体,包含托盘号和物料明细列表
|
||||
* @param rollerNumber 辊号
|
||||
* @return 成功插入条数
|
||||
*/
|
||||
AjaxResult cancelTrayMsg(String rollerNumber);
|
||||
|
||||
/**
|
||||
* 取消入库绑盘(整托)
|
||||
*
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
AjaxResult cancelTrayMsgAll(String trayCode);
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询物料信息
|
||||
* @param detailId 入库子单号
|
||||
@@ -91,6 +99,12 @@ public interface IPdaService {
|
||||
*/
|
||||
InTrayMsg getTrayMsgByRollerNumber(String rollerNumber);
|
||||
|
||||
/**
|
||||
* 入库绑盘作废-查询托盘绑定版辊信息集合
|
||||
* @param trayCode 托盘号
|
||||
* @return
|
||||
*/
|
||||
List<InTrayMsg> getTrayMsgsByTrayCode(String trayCode);
|
||||
|
||||
/**
|
||||
* 出库确认-查询物料信息
|
||||
@@ -99,7 +113,6 @@ public interface IPdaService {
|
||||
*/
|
||||
OutStockoutDetail getStockoutInfoByRollerNumber(String rollerNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认-查询物料信息
|
||||
* @param trayCode 托盘号
|
||||
|
||||
@@ -197,6 +197,11 @@ public class PdaServiceImpl implements IPdaService {
|
||||
new InTrayMsg().builder()
|
||||
.trayCode(trayCode)
|
||||
.productId(bindTrayMsg.getRollerNumber())
|
||||
.productName(detail.getProductName())
|
||||
.color(detail.getColor())
|
||||
.colorSequence(detail.getColorSequence())
|
||||
.length(detail.getLength())
|
||||
.perimeter(detail.getPerimeter())
|
||||
.quantity(bindTrayMsg.getQuantity())
|
||||
.rollerNumber(bindTrayMsg.getRollerNumber())
|
||||
.stockinId(detail.getStockinId())
|
||||
@@ -313,10 +318,15 @@ public class PdaServiceImpl implements IPdaService {
|
||||
new InTrayMsg().builder()
|
||||
.trayCode(trayCode)
|
||||
.productId(item.getProductId())
|
||||
.productName(item.getProductName())
|
||||
.quantity(item.getQuantity())
|
||||
.rollerNumber(item.getRollerNumber())
|
||||
.stockinId(detail.getStockinId())
|
||||
.stockinDetailId(detail.getStockinDetailId())
|
||||
.color(detail.getColor())
|
||||
.colorSequence(detail.getColorSequence())
|
||||
.length(detail.getLength())
|
||||
.perimeter(detail.getPerimeter())
|
||||
.warehouseId("01")
|
||||
.trayType(type)
|
||||
.status(trayMsgStatus)
|
||||
@@ -349,9 +359,10 @@ public class PdaServiceImpl implements IPdaService {
|
||||
public AjaxResult cancelTrayMsg(String rollerNumber){
|
||||
|
||||
//======================作废版辊绑定信息======================
|
||||
if(StrUtil.isBlank(rollerNumber)){
|
||||
log.warn("【操作失败】找不到当前版辊的绑定信息,版辊号:{}", rollerNumber);
|
||||
return AjaxResult.error("【操作失败】找不到当前版辊的绑定信息");
|
||||
InTrayMsg msg = getTrayMsgByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(msg)){
|
||||
log.warn("【操作失败】找不到当前辊号的绑定信息,请检查是否执行过绑定操作,辊号:{}", rollerNumber);
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查是否执行过绑定操作,辊号:" + rollerNumber);
|
||||
}
|
||||
|
||||
inTrayMsgService.deleteInTrayMsgByRollerNumber(rollerNumber);
|
||||
@@ -360,6 +371,7 @@ public class PdaServiceImpl implements IPdaService {
|
||||
InStockinDetail detail = inStockinDetailService.selectInStockinDetailByRollerNumber(rollerNumber);
|
||||
if (ObjUtil.isNotNull(detail)){
|
||||
detail.setScanNum(BigDecimal.valueOf(0));
|
||||
detail.setStatus(0);
|
||||
inStockinDetailService.updateInStockinDetail(detail);
|
||||
log.info("【操作成功】辊号:<{}>的出库子单明细扫描数量已更新为初始状态", rollerNumber);
|
||||
}
|
||||
@@ -369,6 +381,37 @@ public class PdaServiceImpl implements IPdaService {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult cancelTrayMsgAll(String trayCode){
|
||||
//======================作废版辊绑定信息======================
|
||||
if(StrUtil.isBlank(trayCode)){
|
||||
log.warn("【操作失败】托盘条码空,请输入有效的托盘条码,条码:{}", trayCode);
|
||||
return AjaxResult.error("【操作失败】托盘条码空,请输入有效的托盘条码");
|
||||
}
|
||||
|
||||
List<InTrayMsg> msgs = getTrayMsgsByTrayCode(trayCode);
|
||||
if (msgs.isEmpty()){
|
||||
log.warn("【操作失败】找不到该托盘的任何绑定信息,请确认该托盘是否已经执行过绑定操作,托盘号:{}", trayCode);
|
||||
return AjaxResult.error("【操作失败】找不到该托盘的绑定信息,请确认该托盘是否已经执行过绑定操");
|
||||
}
|
||||
|
||||
inTrayMsgService.deleteInTrayMsgByTrayCode(trayCode);
|
||||
log.info("【操作成功】已经取消托盘号:<{}>的所有版辊绑定信息", trayCode);
|
||||
|
||||
for (InTrayMsg msg : msgs){
|
||||
InStockinDetail detail = inStockinDetailService.selectInStockinDetailByRollerNumber(msg.getRollerNumber());
|
||||
if (ObjUtil.isNotNull(detail)){
|
||||
detail.setScanNum(BigDecimal.valueOf(0));
|
||||
detail.setStatus(0);
|
||||
inStockinDetailService.updateInStockinDetail(detail);
|
||||
log.info("【操作成功】辊号:<{}>的出库子单明细扫描数量已更新为初始状态,子单号:{}", detail.getStockinDetailId(), msg.getRollerNumber());
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InStockinDetail getProductInfoByInDetailId(String detailId) {
|
||||
return inStockinDetailMapper.selectInStockinDetailByStockinDetailId(detailId);
|
||||
@@ -397,6 +440,14 @@ public class PdaServiceImpl implements IPdaService {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<InTrayMsg> getTrayMsgsByTrayCode(String trayCode){
|
||||
return inTrayMsgService.selectInTrayMsgList(
|
||||
new InTrayMsg().builder().trayCode(trayCode).build()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public OutStockoutDetail getStockoutInfoByRollerNumber(String rollerNumber) {
|
||||
return outStockoutDetailService.selectOutStockoutDetailByRollerNumber(rollerNumber);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.scheduleTask;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.api.service.IApiWcsService;
|
||||
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
||||
import com.ruoyi.bas.id.job.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.stock.domain.BasStock;
|
||||
@@ -11,6 +12,7 @@ import com.ruoyi.bas.stock.service.IBasStockInfoService;
|
||||
import com.ruoyi.bas.stock.service.IBasStockService;
|
||||
import com.ruoyi.common.*;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.in.bind.domain.InTrayMsg;
|
||||
import com.ruoyi.in.bind.service.IInTrayMsgService;
|
||||
import com.ruoyi.in.job.domain.MydoJob;
|
||||
import com.ruoyi.in.job.service.IMydoJobService;
|
||||
@@ -61,6 +63,8 @@ public class MydoJobHandler {
|
||||
IPdStockpdService pdStockpdService;
|
||||
@Autowired
|
||||
IPdStockpdDetailService pdStockpdDetailService;
|
||||
@Autowired
|
||||
IInTrayMsgService inTrayMsgService;
|
||||
|
||||
|
||||
private static final int TIMEINTERVAL_DEFAULT = 1000;
|
||||
@@ -659,23 +663,37 @@ public class MydoJobHandler {
|
||||
|
||||
//每条子任务生成一条库存信息
|
||||
for (MydoJobDetail detail : details){
|
||||
|
||||
//物料数量固定为1,辊号唯一
|
||||
//插入库存明细信息
|
||||
BasStock stockInit = new BasStock().builder()
|
||||
.stockId(stockId)
|
||||
.stockDetailId(stockId + "-" + num)
|
||||
.stockStatus(BasStockCode.STOCK_STATUS_AVAILABLE)
|
||||
.jobId(mydoJob.getJobId())
|
||||
.jobDetailId(mydoJob.getJobId() + "-" + num++)
|
||||
.rollerNumber(detail.getRollerNumber())
|
||||
.quantity(detail.getInQuantity())
|
||||
.cargoSpaceId(mydoJob.getCargoSpaceId())
|
||||
.productId(detail.getProductId())
|
||||
.productName(detail.getProductName())
|
||||
.inDate(DateUtil.date().now())
|
||||
.build();
|
||||
basStockService.insertBasStock(stockInit);
|
||||
BasStock stock = basStockService.selectBasStockByRollerNumber(detail.getRollerNumber());
|
||||
InTrayMsg inTrayMsg = inTrayMsgService.selectInTrayMsgByRollerNumber(detail.getRollerNumber());//获取当前板棍绑定信息 - 用于插入库存和移除绑定
|
||||
if (ObjUtil.isNull(inTrayMsg)){
|
||||
//物料数量固定为1,辊号唯一
|
||||
//插入库存明细信息
|
||||
BasStock stockInit = new BasStock().builder()
|
||||
.stockId(stockId)
|
||||
.stockDetailId(stockId + "-" + num)
|
||||
.stockStatus(BasStockCode.STOCK_STATUS_AVAILABLE)
|
||||
.jobId(mydoJob.getJobId())
|
||||
.jobDetailId(mydoJob.getJobId() + "-" + num++)
|
||||
.stockinId(inTrayMsg.getStockinId())//获取单据号需要从托盘绑定信息表获取
|
||||
.stockinDetailId(inTrayMsg.getStockinDetailId())
|
||||
.rollerNumber(detail.getRollerNumber())
|
||||
.quantity(detail.getInQuantity())
|
||||
.cargoSpaceId(mydoJob.getCargoSpaceId())
|
||||
.productId(detail.getProductId())
|
||||
.productName(detail.getProductName())
|
||||
.length(inTrayMsg.getLength())
|
||||
.perimeter(inTrayMsg.getPerimeter())
|
||||
.inDate(DateUtil.date().now())
|
||||
.build();
|
||||
basStockService.insertBasStock(stockInit);
|
||||
}else{
|
||||
//回流入库 - 已经有当前板棍的库存 - 更新货位即可
|
||||
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
stock.setStockStatus(BasStockCode.STOCK_STATUS_AVAILABLE);
|
||||
stock.setJobId(detail.getJobId());
|
||||
stock.setJobDetailId(detail.getJobDetailId());
|
||||
basStockService.updateBasStock(stock);
|
||||
}
|
||||
|
||||
//更新子单数量
|
||||
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByRollerNumber(detail.getRollerNumber());
|
||||
@@ -684,18 +702,20 @@ public class MydoJobHandler {
|
||||
inStockinDetail.setAssignNum(BigDecimal.ONE);
|
||||
inStockinDetail.setStatus(1);
|
||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
|
||||
stockInit.setStockinId(inStockinDetail.getStockinId());
|
||||
stockInit.setStockDetailId(inStockinDetail.getStockinDetailId());
|
||||
}
|
||||
|
||||
intrayMsgService.deleteInTrayMsgByRollerNumber(detail.getRollerNumber());
|
||||
|
||||
mydoJobService.insertMydoJobFinish(mydoJob.getJobId());
|
||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||
}//子任务循环处理
|
||||
|
||||
log.info("【账务处理-入库】任务完成,移除作业和绑定信息,更新货位信息,作业号:{}", mydoJob.getJobId());
|
||||
}
|
||||
//--------------------更新货位状态--------------------
|
||||
basCargoSpaceService.updateBasCargoSpaceStatus(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), CargoSpaceCode.CARGOSPACE_STATUS_OCCUPIED);
|
||||
log.info("【账务处理】更新货位状态<占用>,作业号:{},货位:{},托盘号:{}", mydoJob.getJobId(), mydoJob.getCargoSpaceId(), mydoJob.getTrayCode());
|
||||
|
||||
mydoJobService.insertMydoJobFinish(mydoJob.getJobId());
|
||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||
|
||||
log.info("【账务处理-入库】任务完成,移除作业和绑定信息,更新货位信息,作业号:{}", mydoJob.getJobId());
|
||||
|
||||
}
|
||||
|
||||
@@ -756,7 +776,6 @@ public class MydoJobHandler {
|
||||
}
|
||||
|
||||
basStockInfoService.deleteBasStockInfoByTrayCode(mydoJob.getTrayCode());
|
||||
|
||||
basCargoSpaceService.updateBasCargoSpaceStatus(mydoJob.getCargoSpaceId(), "", CargoSpaceCode.CARGOSPACE_STATUS_AVAILABLE);
|
||||
log.info("【账务处理-出库】任务完成,移除托盘库存,更新货位和库存信息,作业号:{},托盘号:{}", mydoJob.getJobId(), mydoJob.getTrayCode());
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="rollerNumber" column="roller_number" />
|
||||
<result property="length" column="length" />
|
||||
<result property="perimeter" column="perimeter" />
|
||||
<result property="rollerNumber" column="roller_number" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="jobDetailId" column="job_detail_id" />
|
||||
@@ -36,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectBasStockVo">
|
||||
select stock_id, stock_detail_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_id, product_name, roller_number,
|
||||
quantity, job_id, job_detail_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, warehouse_id, warehouse_name,
|
||||
length, perimeter, quantity, job_id, job_detail_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, warehouse_id, warehouse_name,
|
||||
user_id, user_name, dept_id, dept_name, supplier_id, supplier_name
|
||||
from bas_stock_detail
|
||||
</sql>
|
||||
@@ -44,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
select bs.stock_id, bs.stock_detail_id, bs.cargo_space_id, bs.stock_status, bs.product_status,
|
||||
bs.lot_no, bs.in_date, bs.back_date, bs.product_id, bs.product_name,bs.roller_number,
|
||||
bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
|
||||
bs.length, bs.perimeter, bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
|
||||
bs.stockin_detail_id, bs.stockin_id, bs.in_type, bs.warehouse_id, bs.warehouse_name,
|
||||
bs.user_id, bs.user_name, bs.dept_id, bs.dept_name, bs.supplier_id, bs.supplier_name
|
||||
from bas_stock_detail bs
|
||||
@@ -60,6 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="rollerNumber != null and rollerNumber != ''"> and bs.roller_number like concat('%', #{rollerNumber}, '%')</if>
|
||||
<if test="length != null "> and bs.length = #{length}</if>
|
||||
<if test="perimeter != null "> and bs.perimeter = #{quantity}</if>
|
||||
<if test="quantity != null "> and bs.quantity = #{quantity}</if>
|
||||
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
|
||||
<if test="jobDetailId != null and jobDetailId != ''"> and bs.job_detail_id = #{jobDetailId}</if>
|
||||
@@ -78,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectBasStockListForEmptyTray" parameterType="BasStock" resultMap="BasStockResult">
|
||||
select bs.stock_id, bs.stock_detail_id, bs.cargo_space_id, bs.stock_status, bs.product_status,
|
||||
bs.lot_no, bs.in_date, bs.back_date, bs.product_id, bs.product_name,bs.roller_number,
|
||||
bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
|
||||
bs.length, bs.perimeter, bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
|
||||
bs.stockin_detail_id, bs.stockin_id, bs.in_type, bs.warehouse_id, bs.warehouse_name,
|
||||
bs.user_id, bs.user_name, bs.dept_id, bs.dept_name, bs.supplier_id, bs.supplier_name, bcs.iss_double, bcs.cargo_area_id, bcs.the_type
|
||||
from bas_stock_detail bs
|
||||
@@ -94,6 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.beginBackDate != null and params.beginBackDate != '' and params.endBackDate != null and params.endBackDate != ''"> and bs.back_date between #{params.beginBackDate} and #{params.endBackDate}</if>
|
||||
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="rollerNumber != null and rollerNumber != ''"> and bs.roller_number like concat('%', #{rollerNumber}, '%')</if>
|
||||
<if test="length != null "> and bs.length = #{length}</if>
|
||||
<if test="perimeter != null "> and bs.perimeter = #{quantity}</if>
|
||||
<if test="quantity != null "> and bs.quantity = #{quantity}</if>
|
||||
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
|
||||
<if test="jobDetailId != null and jobDetailId != ''"> and bs.job_detail_id = #{jobDetailId}</if>
|
||||
@@ -143,6 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="rollerNumber != null">roller_number,</if>
|
||||
<if test="length != null">length,</if>
|
||||
<if test="perimeter != null">perimeter,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="jobDetailId != null">job_detail_id,</if>
|
||||
@@ -172,6 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="rollerNumber != null">#{rollerNumber},</if>
|
||||
<if test="length != null">#{length},</if>
|
||||
<if test="perimeter != null">#{perimeter},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="jobDetailId != null">#{jobDetailId},</if>
|
||||
@@ -203,6 +214,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="rollerNumber != null">roller_number = #{rollerNumber},</if>
|
||||
<if test="length != null">length = #{length},</if>
|
||||
<if test="perimeter != null">perimeter = #{perimeter},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="jobId != null">job_id = #{jobId},</if>
|
||||
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
|
||||
|
||||
@@ -20,10 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="colorSequence" column="color_sequence" />
|
||||
<result property="color" column="color" />
|
||||
<result property="status" column="status" />
|
||||
<result property="length" column="length" />
|
||||
<result property="perimeter" column="perimeter" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInTrayMsgVo">
|
||||
select id, tray_code, stockin_detail_id, product_id, quantity, warehouse_id, user_id, dept_id, create_time, tray_type, roller_number, color_sequence, color, status from in_tray_msg
|
||||
select id, tray_code, stockin_detail_id, product_id, quantity, warehouse_id, user_id, dept_id, create_time, tray_type, roller_number, color_sequence, color, length, perimeter, status from in_tray_msg
|
||||
</sql>
|
||||
|
||||
<select id="selectInTrayMsgList" parameterType="InTrayMsg" resultMap="InTrayMsgResult">
|
||||
@@ -42,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="colorSequence != null "> and color_sequence = #{colorSequence}</if>
|
||||
<if test="color != null and color != ''"> and color = #{color}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="length != null "> and length = #{length}</if>
|
||||
<if test="perimeter != null "> and perimeter = #{perimeter}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -78,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="colorSequence != null ">color_sequence,</if>
|
||||
<if test="color != null ">color,</if>
|
||||
<if test="status != null ">status,</if>
|
||||
<if test="length != null ">length,</if>
|
||||
<if test="perimeter != null ">perimeter,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
@@ -94,6 +100,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="colorSequence != null ">#{colorSequence},</if>
|
||||
<if test="color != null ">#{color},</if>
|
||||
<if test="status != null ">#{status},</if>
|
||||
<if test="length != null ">#{length},</if>
|
||||
<if test="perimeter != null ">#{perimeter},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -114,6 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="colorSequence != null ">color_sequence = #{colorSequence},</if>
|
||||
<if test="color != null ">color = #{color},</if>
|
||||
<if test="status != null ">status = #{status},</if>
|
||||
<if test="length != null ">length = #{length},</if>
|
||||
<if test="perimeter != null ">perimeter = #{perimeter},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@@ -19,13 +19,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="colorSequence" column="color_sequence" />
|
||||
<result property="color" column="color" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="length" column="length" />
|
||||
<result property="perimeter" column="perimeter" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, roller_number, color_sequence, color, spec, status, remark from out_stockout_detail
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, roller_number, color_sequence, color, spec, length, perimeter, status, remark from out_stockout_detail
|
||||
</sql>
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, roller_number, color_sequence, color, spec, status, remark from out_stockout_detail_finish
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, roller_number, color_sequence, color, spec, length, perimeter, status, remark from out_stockout_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
@@ -42,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="colorSequence != null "> and color_sequence = #{colorSequence}</if>
|
||||
<if test="color != null "> and color = #{color}</if>
|
||||
<if test="spec != null and spec != '' "> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="length != null"> and length = #{length}</if>
|
||||
<if test="perimeter != null"> and perimeter = #{perimeter}</if>
|
||||
<if test="status != null"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
@@ -81,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="color != null "> and color = #{color}</if>
|
||||
<if test="spec != null and spec != '' "> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="status != null"> and status = #{status}</if>
|
||||
<if test="length != null"> and length = #{length}</if>
|
||||
<if test="perimeter != null"> and perimeter = #{perimeter}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -101,6 +107,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spec != null ">spec,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="length != null">length,</if>
|
||||
<if test="perimeter != null">perimeter,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null">#{stockoutDetailId},</if>
|
||||
@@ -117,6 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spec != null ">#{spec},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="length != null">#{length},</if>
|
||||
<if test="perimeter != null">#{perimeter},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -136,6 +146,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spec != null ">spec = #{spec},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="length != null">length = #{length},</if>
|
||||
<if test="perimeter != null">perimeter = #{perimeter},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user