merge: integrate latest main into FT546MWS algorithm test
This commit is contained in:
@@ -217,7 +217,8 @@ public class ToWmsApiController {
|
||||
agvContainerTask.setStatus("0");
|
||||
List<AgvContainerTask> agvContainerTasks = agvContainerTaskService.selectAgvContainerTaskList(agvContainerTask);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(""), "请求未下发的AGV执行队列", AjaxResult.success(agvContainerTasks));
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
// 最新 main 暂不重复落库该轮询请求日志。
|
||||
// requestLogService.insertRequestLog(requestLog);
|
||||
if (agvContainerTasks != null && agvContainerTasks.size() > 0) {
|
||||
for (AgvContainerTask containerTask : agvContainerTasks) {
|
||||
containerTask.setStatus("1");
|
||||
|
||||
@@ -379,10 +379,11 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
}
|
||||
|
||||
// ===================== 入库单 1-4 逻辑完全不变 =====================
|
||||
if (type >= 1 && type <= 4) {
|
||||
if ((type >= 1 && type <= 4) || (type >= 10 && type <= 14)) {
|
||||
InStockin param = new InStockin();
|
||||
param.setErpBill(deliveryNoticeVo.getBillNo());
|
||||
param.setAccountSetNo(deliveryNoticeVo.getAccountSetNo());
|
||||
param.setInType(String.valueOf(type));
|
||||
List<InStockin> existList = inStockinService.selectInStockinListBill(param);
|
||||
// List<InStockin> existList = inStockinService.selectInStockinListApi(param);
|
||||
InStockin exist = (existList != null && !existList.isEmpty()) ? existList.get(0) : null;
|
||||
@@ -482,10 +483,11 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
}
|
||||
|
||||
// ===================== 出库单 5-7 改造:按立库/平库分两组各1主单多明细 =====================
|
||||
else if (type >= 5 && type <= 7) {
|
||||
else if ((type >= 5 && type <= 7) || (type >= 15 && type <= 20)) {
|
||||
OutStockout param = new OutStockout();
|
||||
param.setErpStockoutId(deliveryNoticeVo.getBillNo());
|
||||
param.setAccountSetNo(deliveryNoticeVo.getAccountSetNo());
|
||||
param.setOutType(String.valueOf(type));
|
||||
List<OutStockout> outList = outStockoutService.selectOutStockoutList(param);
|
||||
OutStockout exist = (outList != null && !outList.isEmpty()) ? outList.get(0) : null;
|
||||
String billNo = deliveryNoticeVo.getBillNo();
|
||||
|
||||
@@ -240,7 +240,6 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
outboundWorkflowCoordinator.onJobFinished(ykJob.getJobId());
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
log.error("作业类型错误");
|
||||
return AjaxResult.error("作业类型错误");
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.job.mydojob.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PkDetail implements Serializable {
|
||||
private String stockinDetailId;
|
||||
private String quantity;
|
||||
|
||||
|
||||
public String getStockinDetailId() {
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId) {
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.job.mydojob.mapper;
|
||||
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -94,4 +95,6 @@ public interface MydoJobMapper
|
||||
void updateLed(HashMap<String, Object> map);
|
||||
|
||||
void updateLedError(HashMap<String, Object> map);
|
||||
|
||||
Integer selectBySpare4OrCargo(InStockinDetail inStockinDetail);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.pda.domain;
|
||||
|
||||
import com.ruoyi.job.mydojob.domain.PkDetail;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -30,6 +31,7 @@ public class TrayCodeMakeSure {
|
||||
private List<MydoJobDetail> materials;
|
||||
//异常详情列表
|
||||
private List<MydoJobDetail> materialDetails;
|
||||
private List<PkDetail> pkDetailList;
|
||||
private String quantity;
|
||||
private String stockinDetailId;
|
||||
private String inStockinDetailId;
|
||||
|
||||
@@ -10,12 +10,15 @@ import com.ruoyi.algorithm.wms.OutboundWorkflowCoordinator;
|
||||
import com.ruoyi.check.commit.domain.CheckCommitRecord;
|
||||
import com.ruoyi.check.commit.service.ICheckCommitRecordService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.domain.PkDetail;
|
||||
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
|
||||
@@ -66,6 +69,8 @@ public class PdaServiceImp implements PdaService {
|
||||
private OutStockoutDetailServiceImpl outStockoutDetailService;
|
||||
@Autowired
|
||||
private OutboundWorkflowCoordinator outboundWorkflowCoordinator;
|
||||
@Autowired
|
||||
private MydoJobMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BasStock> selectHasHalfTray(String inStockinDetailId) {
|
||||
@@ -73,6 +78,10 @@ public class PdaServiceImp implements PdaService {
|
||||
// InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
|
||||
// inStockinDetail.setSpare4(inStockinDetail.getSpare4());
|
||||
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
|
||||
Integer count = mapper.selectBySpare4OrCargo(inStockinDetail);
|
||||
if (count > 0) {
|
||||
return null;
|
||||
}
|
||||
return hasHalfTray;
|
||||
}
|
||||
|
||||
@@ -126,7 +135,7 @@ public class PdaServiceImp implements PdaService {
|
||||
pdaMapper.bindTray(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
errorbulider.append(mydoJobDetail.getStockinDetailId() + map.get("v_resultmsg").toString());
|
||||
return AjaxResult.error(errorbulider.toString());
|
||||
throw new RuntimeException(map.get("v_result").toString());
|
||||
}
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
@@ -134,7 +143,7 @@ public class PdaServiceImp implements PdaService {
|
||||
map.put("v_is_full", trayCodeMakeSure.getIsFull());
|
||||
pdaMapper.addInJob(map);
|
||||
if (!"10".equals(map.get("v_result").toString())) {
|
||||
return AjaxResult.error(errorbulider.toString());
|
||||
throw new RuntimeException(map.get("v_result").toString());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -217,6 +226,7 @@ public class PdaServiceImp implements PdaService {
|
||||
mydoJob.setInOrOut("28");
|
||||
mydoJob.setTrayCode(trayCodeMakeSure.getTrayCode());
|
||||
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
|
||||
|
||||
return AjaxResult.success(mydoJobDetails);
|
||||
}
|
||||
|
||||
@@ -321,19 +331,23 @@ public class PdaServiceImp implements PdaService {
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult completeInPk(TrayCodeMakeSure trayCodeMakeSure) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_in_stockin_detail_id", trayCodeMakeSure.getStockinDetailId());
|
||||
map.put("v_quantity", trayCodeMakeSure.getQuantity());
|
||||
map.put("v_cargo_space_id", trayCodeMakeSure.getCargoSpaceId());
|
||||
pdaMapper.completeInPk(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if ("10".equals(result)) {
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||
for (PkDetail pkDetail : trayCodeMakeSure.getPkDetailList()) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
|
||||
map.put("v_in_stockin_detail_id", pkDetail.getStockinDetailId());
|
||||
map.put("v_quantity", pkDetail.getQuantity());
|
||||
map.put("v_cargo_space_id", trayCodeMakeSure.getCargoSpaceId());
|
||||
pdaMapper.completeInPk(map);
|
||||
|
||||
if (!"10".equals(String.valueOf(map.get("v_result")))) {
|
||||
String errorMessage = Objects.toString(map.get("v_result_msg"), "平库入库失败");
|
||||
throw new ServiceException(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-wms;encrypt=false;
|
||||
url: jdbc:sqlserver://192.168.188.236:1433;databaseName=FT546-wms;encrypt=true;trustServerCertificate=true;
|
||||
username: sa
|
||||
password: 123456
|
||||
password: Flrd0914.
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
@@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectInStockinDetailByStockinDetailId" parameterType="String" resultMap="InStockinDetailResult">
|
||||
<include refid="selectInStockinDetailVo"/>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
where stockin_detail_id = #{stockinDetailId} or bar_code=#{stockinDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInStockinDetail" parameterType="InStockinDetail">
|
||||
|
||||
@@ -161,6 +161,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where isd.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="productId !=null and productId!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail isd
|
||||
|
||||
where isd.product_id like concat('%',#{productId},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="spare4 !=null and spare4 !=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail isd
|
||||
|
||||
@@ -304,7 +304,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectBySpare4OrCargo" parameterType="InStockinDetail" resultType="java.lang.Integer">
|
||||
select count(1) from mydo_job where job_id in (select job_id from mydo_job_detail where spare4=#{spare4} or exit_id =#{cargoNo}) and in_or_out='26'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -203,11 +203,10 @@
|
||||
<div v-for="item in printData" :key="item.id" style="page-break-after:always" class="vue-easy-print">
|
||||
<vue-barcode
|
||||
:value=item.trayCode
|
||||
format="CODE128"
|
||||
width="4"
|
||||
height="150"
|
||||
format="CODE39"
|
||||
width="2"
|
||||
height="100"
|
||||
display-value
|
||||
margin="5"
|
||||
/>
|
||||
</div>
|
||||
</vue-easy-print>
|
||||
@@ -464,11 +463,6 @@ export default {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.vue-qr {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
@@ -481,7 +475,7 @@ export default {
|
||||
}
|
||||
|
||||
.vue-easy-print {
|
||||
padding: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.num {
|
||||
@@ -489,8 +483,5 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.vue-qr {
|
||||
margin: 10px auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user