501流程测试修改,作废流程添加
This commit is contained in:
@@ -12,12 +12,32 @@ import java.util.HashMap;
|
||||
*/
|
||||
public interface IToWcsService {
|
||||
|
||||
|
||||
/**
|
||||
* 推送CTU出库任务
|
||||
*/
|
||||
void pushOutMydoJob();
|
||||
|
||||
/**
|
||||
* 推送agv搬运作业
|
||||
* @return
|
||||
*/
|
||||
AjaxResult pushAgvMoveJob(GenAgvSchedulingTaskRequest genAgvSchedulingTaskRequest);
|
||||
|
||||
/**
|
||||
* 推送流利架入库任务
|
||||
*/
|
||||
void pushInMydoJob();
|
||||
|
||||
/**
|
||||
* 出库作业确认
|
||||
* @param outMydojobMakeSureParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult outMydojobMakeSure(HashMap<String, String> outMydojobMakeSureParam);
|
||||
|
||||
/**
|
||||
* 取消任务
|
||||
* @param taskNo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult cancelTaskByTaskNo(String taskNo);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 作业统计 Service 实现
|
||||
@@ -45,6 +46,7 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
public static final String PUSH_IN_MYDO_JOB = "http://localhost:8081/agv/wcs2Wms/api/receiveInMydoJob";
|
||||
public static final String PUSH_AGV_MOVE_JOB = "http://localhost:8081/api/receiveAgvMoveJob";
|
||||
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2Wms/api/outMydojobMakesure";
|
||||
public static final String CANCEL_MYDOJOB = "http://localhost:8081/wcs2Wms/api/cancelMydoJob";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -104,4 +106,15 @@ public class ToWcsServiceImpl implements IToWcsService {
|
||||
}
|
||||
return AjaxResult.error(requestLog.getDuration());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult cancelTaskByTaskNo(String taskNo) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("taskNo", taskNo);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(CANCEL_MYDOJOB, JSONUtil.toJsonStr(map), "取消任务");
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,31 +150,34 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
return AjaxResult.error(MessageUtils.message("warn.message"));
|
||||
}
|
||||
MydoJob outJob = outMydoJobs.get(0);
|
||||
//查询拣选工位绑定的电子标签
|
||||
BasTag tagParam = new BasTag();
|
||||
tagParam.setPickAdd(wmsJobRequest.getPickSsj());
|
||||
tagParam.setSpare3("1");
|
||||
List<BasTag> tags = iBasTagService.selectBasTagList(tagParam);
|
||||
if (tags.isEmpty()){
|
||||
return AjaxResult.error(MessageUtils.message("error.message4"));
|
||||
}
|
||||
BasTag basTag = tags.get(0);
|
||||
basTag.setTrayCode(outJob.getTrayCode());
|
||||
iBasTagService.updateBasTag(basTag);
|
||||
//同步电子标签
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(outMydoJobs.get(0).getJobId());
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
TagTask tagTask = new TagTask();
|
||||
tagTask.setTagId(basTag.getId());
|
||||
tagTask.setJobDetailId(mydoJobDetail.getJobDetailId());
|
||||
tagTask.setProductId(mydoJobDetail.getProductId());
|
||||
tagTask.setNum(mydoJobDetail.getOutQuantity());
|
||||
tagTask.setStatus("0");
|
||||
tagTask.setColor("0");
|
||||
tagTask.setFloor("0");
|
||||
tagTaskService.insertTagTask(tagTask);
|
||||
//料箱出库 需同步电子标签
|
||||
if("23".equals(outJob.getInOut())){
|
||||
//查询拣选工位绑定的电子标签
|
||||
BasTag tagParam = new BasTag();
|
||||
tagParam.setPickAdd(wmsJobRequest.getPickSsj());
|
||||
tagParam.setSpare3("1");
|
||||
List<BasTag> tags = iBasTagService.selectBasTagList(tagParam);
|
||||
if (tags.isEmpty()){
|
||||
return AjaxResult.error(MessageUtils.message("error.message4"));
|
||||
}
|
||||
BasTag basTag = tags.get(0);
|
||||
basTag.setTrayCode(outJob.getTrayCode());
|
||||
iBasTagService.updateBasTag(basTag);
|
||||
//同步电子标签
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(outMydoJobs.get(0).getJobId());
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
|
||||
TagTask tagTask = new TagTask();
|
||||
tagTask.setTagId(basTag.getId());
|
||||
tagTask.setJobDetailId(mydoJobDetail.getJobDetailId());
|
||||
tagTask.setProductId(mydoJobDetail.getProductId());
|
||||
tagTask.setNum(mydoJobDetail.getOutQuantity());
|
||||
tagTask.setStatus("0");
|
||||
tagTask.setColor("0");
|
||||
tagTask.setFloor("0");
|
||||
tagTaskService.insertTagTask(tagTask);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.ruoyi.check.DifferenceRecordFinish.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,7 +25,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 盘点差异历史Controller
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@@ -37,12 +39,12 @@ public class CheckDifferenceRecordFinishController extends BaseController
|
||||
/**
|
||||
* 查询盘点差异历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:DifferenceRecordFinish:list')")
|
||||
@PreAuthorize("@ss.hasPermi('check:difference:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CheckDifferenceRecordFinish checkDifferenceRecordFinish)
|
||||
{
|
||||
startPage();
|
||||
List<CheckDifferenceRecordFinish> list = checkDifferenceRecordFinishService.selectCheckDifferenceRecordFinishList(checkDifferenceRecordFinish);
|
||||
List<CheckDifferenceRecord> list = checkDifferenceRecordFinishService.selectCheckDifferenceRecordFinishList(checkDifferenceRecordFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -54,8 +56,8 @@ public class CheckDifferenceRecordFinishController extends BaseController
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CheckDifferenceRecordFinish checkDifferenceRecordFinish)
|
||||
{
|
||||
List<CheckDifferenceRecordFinish> list = checkDifferenceRecordFinishService.selectCheckDifferenceRecordFinishList(checkDifferenceRecordFinish);
|
||||
ExcelUtil<CheckDifferenceRecordFinish> util = new ExcelUtil<CheckDifferenceRecordFinish>(CheckDifferenceRecordFinish.class);
|
||||
List<CheckDifferenceRecord> list = checkDifferenceRecordFinishService.selectCheckDifferenceRecordFinishList(checkDifferenceRecordFinish);
|
||||
ExcelUtil<CheckDifferenceRecord> util = new ExcelUtil<CheckDifferenceRecord>(CheckDifferenceRecord.class);
|
||||
util.exportExcel(response, list, "盘点差异历史数据");
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 盘点差异历史对象 check_difference_record_finish
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@@ -70,142 +70,161 @@ public class CheckDifferenceRecordFinish extends BaseEntity
|
||||
@Excel(name = "审核状态")
|
||||
private String status;
|
||||
|
||||
public void setCheckGuid(String checkGuid)
|
||||
private String warehouseId;
|
||||
private String warehouseName;
|
||||
|
||||
public String getWarehouseId() {
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseName() {
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName) {
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public void setCheckGuid(String checkGuid)
|
||||
{
|
||||
this.checkGuid = checkGuid;
|
||||
}
|
||||
|
||||
public String getCheckGuid()
|
||||
public String getCheckGuid()
|
||||
{
|
||||
return checkGuid;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setSupplier(String supplier)
|
||||
public void setSupplier(String supplier)
|
||||
{
|
||||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
public String getSupplier()
|
||||
public String getSupplier()
|
||||
{
|
||||
return supplier;
|
||||
}
|
||||
|
||||
public void setCustomer(String customer)
|
||||
public void setCustomer(String customer)
|
||||
{
|
||||
this.customer = customer;
|
||||
}
|
||||
|
||||
public String getCustomer()
|
||||
public String getCustomer()
|
||||
{
|
||||
return customer;
|
||||
}
|
||||
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
{
|
||||
this.oldQuantity = oldQuantity;
|
||||
}
|
||||
|
||||
public String getOldQuantity()
|
||||
public String getOldQuantity()
|
||||
{
|
||||
return oldQuantity;
|
||||
}
|
||||
|
||||
public void setNewQuantity(String newQuantity)
|
||||
public void setNewQuantity(String newQuantity)
|
||||
{
|
||||
this.newQuantity = newQuantity;
|
||||
}
|
||||
|
||||
public String getNewQuantity()
|
||||
public String getNewQuantity()
|
||||
{
|
||||
return newQuantity;
|
||||
}
|
||||
|
||||
public void setRecordType(Long recordType)
|
||||
public void setRecordType(Long recordType)
|
||||
{
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public Long getRecordType()
|
||||
public Long getRecordType()
|
||||
{
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setCheckStockDetailId(String checkStockDetailId)
|
||||
public void setCheckStockDetailId(String checkStockDetailId)
|
||||
{
|
||||
this.checkStockDetailId = checkStockDetailId;
|
||||
}
|
||||
|
||||
public String getCheckStockDetailId()
|
||||
public String getCheckStockDetailId()
|
||||
{
|
||||
return checkStockDetailId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -2,34 +2,35 @@ package com.ruoyi.check.DifferenceRecordFinish.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.check.DifferenceRecordFinish.domain.CheckDifferenceRecordFinish;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
|
||||
/**
|
||||
* 盘点差异历史Mapper接口
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface CheckDifferenceRecordFinishMapper
|
||||
public interface CheckDifferenceRecordFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 盘点差异历史
|
||||
*/
|
||||
public CheckDifferenceRecordFinish selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid);
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid);
|
||||
|
||||
/**
|
||||
* 查询盘点差异历史列表
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 盘点差异历史集合
|
||||
*/
|
||||
public List<CheckDifferenceRecordFinish> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish);
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish);
|
||||
|
||||
/**
|
||||
* 新增盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +38,7 @@ public interface CheckDifferenceRecordFinishMapper
|
||||
|
||||
/**
|
||||
* 修改盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ public interface CheckDifferenceRecordFinishMapper
|
||||
|
||||
/**
|
||||
* 删除盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,7 +54,7 @@ public interface CheckDifferenceRecordFinishMapper
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -2,34 +2,35 @@ package com.ruoyi.check.DifferenceRecordFinish.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.check.DifferenceRecordFinish.domain.CheckDifferenceRecordFinish;
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
|
||||
/**
|
||||
* 盘点差异历史Service接口
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface ICheckDifferenceRecordFinishService
|
||||
public interface ICheckDifferenceRecordFinishService
|
||||
{
|
||||
/**
|
||||
* 查询盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 盘点差异历史
|
||||
*/
|
||||
public CheckDifferenceRecordFinish selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid);
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid);
|
||||
|
||||
/**
|
||||
* 查询盘点差异历史列表
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 盘点差异历史集合
|
||||
*/
|
||||
public List<CheckDifferenceRecordFinish> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish);
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish);
|
||||
|
||||
/**
|
||||
* 新增盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +38,7 @@ public interface ICheckDifferenceRecordFinishService
|
||||
|
||||
/**
|
||||
* 修改盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ public interface ICheckDifferenceRecordFinishService
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuids 需要删除的盘点差异历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,7 +54,7 @@ public interface ICheckDifferenceRecordFinishService
|
||||
|
||||
/**
|
||||
* 删除盘点差异历史信息
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.check.DifferenceRecordFinish.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.check.difference.domain.CheckDifferenceRecord;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -10,43 +12,43 @@ import com.ruoyi.check.DifferenceRecordFinish.service.ICheckDifferenceRecordFini
|
||||
|
||||
/**
|
||||
* 盘点差异历史Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Service
|
||||
public class CheckDifferenceRecordFinishServiceImpl implements ICheckDifferenceRecordFinishService
|
||||
public class CheckDifferenceRecordFinishServiceImpl implements ICheckDifferenceRecordFinishService
|
||||
{
|
||||
@Autowired
|
||||
private CheckDifferenceRecordFinishMapper checkDifferenceRecordFinishMapper;
|
||||
|
||||
/**
|
||||
* 查询盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 盘点差异历史
|
||||
*/
|
||||
@Override
|
||||
public CheckDifferenceRecordFinish selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid)
|
||||
public CheckDifferenceRecord selectCheckDifferenceRecordFinishByCheckGuid(String checkGuid)
|
||||
{
|
||||
return checkDifferenceRecordFinishMapper.selectCheckDifferenceRecordFinishByCheckGuid(checkGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点差异历史列表
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 盘点差异历史
|
||||
*/
|
||||
@Override
|
||||
public List<CheckDifferenceRecordFinish> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish)
|
||||
public List<CheckDifferenceRecord> selectCheckDifferenceRecordFinishList(CheckDifferenceRecordFinish checkDifferenceRecordFinish)
|
||||
{
|
||||
return checkDifferenceRecordFinishMapper.selectCheckDifferenceRecordFinishList(checkDifferenceRecordFinish);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -59,7 +61,7 @@ public class CheckDifferenceRecordFinishServiceImpl implements ICheckDifferenceR
|
||||
|
||||
/**
|
||||
* 修改盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkDifferenceRecordFinish 盘点差异历史
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -71,7 +73,7 @@ public class CheckDifferenceRecordFinishServiceImpl implements ICheckDifferenceR
|
||||
|
||||
/**
|
||||
* 批量删除盘点差异历史
|
||||
*
|
||||
*
|
||||
* @param checkGuids 需要删除的盘点差异历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -83,7 +85,7 @@ public class CheckDifferenceRecordFinishServiceImpl implements ICheckDifferenceR
|
||||
|
||||
/**
|
||||
* 删除盘点差异历史信息
|
||||
*
|
||||
*
|
||||
* @param checkGuid 盘点差异历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.api.service.IToWcsService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
@@ -78,6 +79,8 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private IBasWarehouseService basWarehouseService;
|
||||
@Autowired
|
||||
private IToWcsService iToWcsService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -181,7 +184,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
|
||||
return AjaxResult.success();
|
||||
|
||||
} else {
|
||||
MydoJobDetail param = new MydoJobDetail();
|
||||
param.setJobId(jobId);
|
||||
@@ -200,9 +203,14 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
updateMydoJob(mydoJob);
|
||||
//插入历史表
|
||||
insertHistory(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
//通知wcs
|
||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
if (!ajaxResult.isSuccess()){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
throw new RuntimeException(Convert.toStr(ajaxResult.get("msg")));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -418,13 +426,13 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
MydoJob job = selectMydoJobByJobId(jobId);
|
||||
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(job.getWarehouseId());
|
||||
|
||||
if("1".equals(basWarehouse.getWarehouseType()) && Integer.parseInt(job.getStatus())<3){
|
||||
if("2".equals(basWarehouse.getWarehouseType()) && Integer.parseInt(job.getStatus())<3){
|
||||
log.error("只能完成正执行的作业");
|
||||
return AjaxResult.error();
|
||||
}
|
||||
TrayCodeMakeSure trayCodeMakeSure = new TrayCodeMakeSure();
|
||||
trayCodeMakeSure.setTrayCode(job.getTrayCode());
|
||||
pdaService.outMakeSure(trayCodeMakeSure);
|
||||
pdaService.outMakeSure(trayCodeMakeSure);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -470,14 +478,21 @@ public class MydoJobServiceImpl implements IMydoJobService {
|
||||
job.setFinishTime(DateUtil.formatDateTime(DateUtil.date()));
|
||||
updateMydoJob(job);
|
||||
insertHistory(jobId);
|
||||
//通知wcs
|
||||
AjaxResult ajaxResult = iToWcsService.cancelTaskByTaskNo(job.getTaskNo());
|
||||
if (!ajaxResult.isSuccess()){
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
throw new RuntimeException(Convert.toStr(ajaxResult.get("msg")));
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
||||
} catch (Exception e) {
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
log.error("任务处理异常", e);
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -182,7 +182,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stringBuilder.length()>0){
|
||||
if (!stringBuilder.isEmpty()){
|
||||
return AjaxResult.warn(stringBuilder.toString());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
||||
@@ -124,7 +124,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -296,12 +296,17 @@ public class PdaServiceImp implements PdaService {
|
||||
//修改拣选数量
|
||||
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
|
||||
//修改拣选数量
|
||||
//MydoJobDetail mydoJobDetailOld = mydoJobDetailService.selectMydoJobDetailByJobDetailId(mydoJobDetail.getJobDetailId());
|
||||
/*BigDecimal oldPickQuantity = Convert.toBigDecimal(mydoJobDetailOld.getPickQuantity());
|
||||
BigDecimal newPickQuantity = Convert.toBigDecimal(mydoJobDetail.getOutQuantity());*/
|
||||
mydoJobDetail.setPickQuantity(mydoJobDetail.getOutQuantity());
|
||||
mydoJobDetailService.updateMydoJobDetail(mydoJobDetail);
|
||||
updateTagTaskStatus(mydoJobDetail,basWarehouse);
|
||||
|
||||
//修改单据实际数量
|
||||
String inOrOutDId = mydoJobDetail.getInOrOutDId();
|
||||
OutStockoutDetail outStockoutDetail = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(inOrOutDId);
|
||||
outStockoutDetail.setAssignNum(outStockoutDetail.getAssignNum().add(Convert.toBigDecimal(mydoJobDetail.getPickQuantity())));
|
||||
outStockoutDetailService.updateOutStockoutDetail(outStockoutDetail);
|
||||
//修改电子标签
|
||||
updateTagTaskStatus(mydoJobDetail, basWarehouse);
|
||||
}
|
||||
//判断拣选数量是否等于出库数量
|
||||
MydoJobDetail mydoJobDetailParam = new MydoJobDetail();
|
||||
@@ -316,10 +321,10 @@ public class PdaServiceImp implements PdaService {
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
//通知wcs 出库确认
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse);
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse,mydoJob);
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.success();
|
||||
@@ -394,10 +399,10 @@ public class PdaServiceImp implements PdaService {
|
||||
pdaMapper.outMakeSure(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse);
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse,mydoJob);
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.success();
|
||||
@@ -443,10 +448,9 @@ public class PdaServiceImp implements PdaService {
|
||||
pdaMapper.checkMakeSure(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
deleteTagTask(trayCodeMakeSure, basWarehouse);
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
@@ -477,8 +481,8 @@ public class PdaServiceImp implements PdaService {
|
||||
* @param trayCodeMakeSure
|
||||
* @param basWarehouse
|
||||
*/
|
||||
private void deleteTagTask(TrayCodeMakeSure trayCodeMakeSure, BasWarehouse basWarehouse) {
|
||||
if ("2".equals(basWarehouse.getWarehouseType())) {
|
||||
private void deleteTagTask(TrayCodeMakeSure trayCodeMakeSure, BasWarehouse basWarehouse,MydoJob mydoJob) {
|
||||
if ("2".equals(basWarehouse.getWarehouseType())&&"23".equals(mydoJob.getInOrOut())) {
|
||||
BasTag basTag = basTagService.selectBasTagByTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
basTag.setTrayCode("");
|
||||
basTagService.updateBasTag(basTag);
|
||||
@@ -491,17 +495,21 @@ public class PdaServiceImp implements PdaService {
|
||||
.map(TagTask::getId)
|
||||
.toArray(Long[]::new));
|
||||
}
|
||||
//通知wcs出库确认成功
|
||||
HashMap<String, String> outMydojobMakeSureParam = new HashMap<>();
|
||||
outMydojobMakeSureParam.put("trayCode", trayCodeMakeSure.getTrayCode());
|
||||
AjaxResult ajaxResult = iToWcsService.outMydojobMakeSure(outMydojobMakeSureParam);
|
||||
if (!ajaxResult.isSuccess()){
|
||||
throw new RuntimeException(ajaxResult.toString());
|
||||
if (mydoJob.getExitId().startsWith("fluent")){
|
||||
//通知wcs出库确认成功
|
||||
HashMap<String, String> outMydojobMakeSureParam = new HashMap<>();
|
||||
outMydojobMakeSureParam.put("trayCode", trayCodeMakeSure.getTrayCode());
|
||||
AjaxResult ajaxResult = iToWcsService.outMydojobMakeSure(outMydojobMakeSureParam);
|
||||
if (!ajaxResult.isSuccess()){
|
||||
throw new RuntimeException(ajaxResult.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult outException(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
//判断任务是否存在
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
@@ -559,7 +567,8 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
//return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -574,7 +583,7 @@ public class PdaServiceImp implements PdaService {
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
} else {
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
throw new RuntimeException(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user