现场调试更改
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
package com.ruoyi.pda.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
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.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.out.stockoutdetail.domain.OutStockoutDetail;
|
||||
import com.ruoyi.pda.domain.AddInJobRequest;
|
||||
import com.ruoyi.pda.domain.TrayMsgBinding;
|
||||
import com.ruoyi.pda.domain.BindTrayRequest;
|
||||
@@ -13,7 +21,9 @@ 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;
|
||||
|
||||
/**
|
||||
* 手持机 Controller
|
||||
@@ -28,6 +38,8 @@ public class PdaController extends BaseController {
|
||||
@Autowired
|
||||
private IPdaService pdaService;
|
||||
|
||||
@Autowired
|
||||
IMydoJobService mydoJobService;
|
||||
|
||||
/**
|
||||
* 入库待处理任务列表
|
||||
@@ -40,6 +52,40 @@ public class PdaController extends BaseController {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库待处理任务列表
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘(支持一托多料)
|
||||
@@ -88,6 +134,38 @@ public class PdaController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库绑盘
|
||||
*/
|
||||
@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("/cancelTrayMsgs")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:msg:cancel')")
|
||||
public AjaxResult cancelTrays(@RequestBody String rollerNumber) {
|
||||
try {
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -107,9 +185,25 @@ public class PdaController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成空托盘入库绑定信息
|
||||
* @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
|
||||
*/
|
||||
@@ -126,16 +220,94 @@ public class PdaController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 入库绑盘-查询物料信息
|
||||
* 入库绑盘-查询物料信息(辊号查询)
|
||||
* @param rollerNumber 辊号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getProductInfoByRollerNumber")
|
||||
@GetMapping("/getStockinInfoByRollerNumber")
|
||||
@PreAuthorize("@ss.hasPermi('in:bound:task:info')")
|
||||
public AjaxResult getProductInfoByRollerNumber(String rollerNumber) {
|
||||
public AjaxResult getStockinInfoByRollerNumber(String rollerNumber) {
|
||||
try {
|
||||
InStockinDetail info = pdaService.getProductInfoByRollerNumber(rollerNumber);
|
||||
return AjaxResult.success(info);
|
||||
InStockinDetail info = pdaService.getStockinInfoByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(info)){
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查入库单据明细");
|
||||
}else{
|
||||
if (info.getScanNum().equals(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 msg = pdaService.getTrayMsgByRollerNumber(rollerNumber);
|
||||
if(ObjUtil.isNull(msg)){
|
||||
return AjaxResult.error("找不到当前辊号信息,请检查入库单据明细");
|
||||
}else{
|
||||
return pdaService.cancelTrayMsg(rollerNumber);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库确认-查询物料信息(辊号查询)
|
||||
* @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)){
|
||||
return AjaxResult.error("找不到当前托盘出库明细,请检查出库作业");
|
||||
}else{
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
@@ -147,10 +319,35 @@ public class PdaController extends BaseController {
|
||||
* @param palletType 托盘类型
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/callStockOutForEmptyPallet")
|
||||
@PostMapping("/callStockOutForContainer")
|
||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||
public AjaxResult callStockOutForEmptyPallet(int palletType) {
|
||||
return pdaService.callContainerStockOut(palletType);
|
||||
public AjaxResult callStockOutForEmptyPallet(String cargoAreaId, Integer palletType) {
|
||||
return pdaService.callContainerStockOut(cargoAreaId, palletType);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 物料(版辊)出库确认
|
||||
* @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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user