1. 一整个料盒缺料的情况做了处理。

This commit is contained in:
梁州 2025-05-22 17:14:16 +08:00
parent bc52d61307
commit 2c5e6feee1
6 changed files with 71 additions and 25950 deletions

View File

@ -1,7 +1,7 @@
import axios from 'axios'
const request = axios.create({
baseURL: 'http://localhost:12315/wms',
baseURL: 'https://s4wwjasrsp01.ap.cat.com/wmsServer/wms',
timeout: 5000
})

View File

@ -566,13 +566,13 @@ const ifNeedShowBoxSummary = () => {
|| confirmEntity.productId !== storeKittingWork.productId
|| confirmEntity.singleProductId !== storeKittingWork.singleProductId
|| confirmEntity.boxNo !== storeKittingWork.boxNo) {
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo)
if (confirmEntity.workOrder === '') {
// ---
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo, '2')
//
successBox('当前工单已完成。')
} else if (confirmEntity.boxNo !== storeKittingWork.boxNo) {
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo, '1')
//
showBoxSummary()
}
@ -719,12 +719,14 @@ const handleSortChange = (data) => {
searchKittingGoods()
}
//
const printLacks = (workOrder, productId, singleProductId, boxNo) => {
// printLackType;1:2:
const printLacks = (workOrder, productId, singleProductId, boxNo, printLackType) => {
const request = {
workOrder: workOrder,
productId: productId,
singleProductId: singleProductId,
boxNo: boxNo,
bk1: printLackType,
standId: standId,
userName: userName
}

View File

@ -46,4 +46,9 @@ public class KateWorksQuery extends PageQuery{
*/
@JsonProperty("planStartDate")
private LocalDate planStartDate;
/**
* 预留字段
*/
@JsonProperty("bk1")
private String bk1;
}

View File

@ -666,6 +666,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 生成需求看板
*
* @param genRequest 请求参数
* @return 生成结果
*/
@ -764,6 +765,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 获取物料需求
*
* @param goodsRequireRequest 请求参数
* @return 响应结果
*/
@ -929,6 +931,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 查询图纸列表分页---实现
*
* @param imageQuery 查询参数
* @return 查询结果
*/
@ -1050,6 +1053,42 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
if (kateWorksQuery == null) {
return WmsApiResponse.error("查询参数为空。", null);
}
if (StringUtils.isEmpty(kateWorksQuery.getWorkOrder())) {
return WmsApiResponse.error("请求参数缺少工单号。", null);
}
if (Objects.equals(kateWorksQuery.getBk1(), "2")) {
// 查询当前工单下特定条件下整个料盒缺料的标签且包含当前料盒
LambdaQueryWrapper<TAppWork> lambdaQueryWrapper_sp = new LambdaQueryWrapper<TAppWork>()
.eq(TAppWork::getWorkOrder, kateWorksQuery.getWorkOrder())
.eq(StringUtils.isNotEmpty(kateWorksQuery.getProductId()), TAppWork::getProductId, kateWorksQuery.getProductId())
.eq(StringUtils.isNotEmpty(kateWorksQuery.getSingleProductId()), TAppWork::getSingleProductId, kateWorksQuery.getSingleProductId())
.ne(TAppWork::getLackStatus, -1);// 非暂存任务
List<TAppWork> poListForCompletelyLack = appWorkService.list(lambdaQueryWrapper_sp);
Map<String, Integer> completelyLackBoxMap = new HashMap<>();
// 添加当前料盒
completelyLackBoxMap.put(kateWorksQuery.getBoxNo(), 1);
for (TAppWork po : poListForCompletelyLack) {
if (Objects.equals(po.getBoxNo(), kateWorksQuery.getBoxNo())) {
// 当前料盒不做处理
continue;
}
// 处理缺料事宜
if (po.getLackStatus() == 1) {
completelyLackBoxMap.put(po.getBoxNo(), 1);
} else {
completelyLackBoxMap.remove(po.getBoxNo());
}
}
// 处理缺料返回
List<TAppWork> poListOfCompletelyLack = new ArrayList<>();
for (String boxNo : completelyLackBoxMap.keySet()) {
List<TAppWork> filterAppWorks = poListForCompletelyLack.stream().filter(appWork -> appWork.getBoxNo().equals(boxNo)).toList();
poListOfCompletelyLack.addAll(filterAppWorks);
}
List<KateWorkVo> resultList = poListOfCompletelyLack.stream().map(KateWorkVo::ofWork).toList();
return WmsApiResponse.success("查询缺料信息成功。", resultList);
} else {
// 普通查询
LambdaQueryWrapper<TAppWork> lambdaQueryWrapper = new LambdaQueryWrapper<TAppWork>()
.eq(TAppWork::getWorkOrder, kateWorksQuery.getWorkOrder())
.eq(StringUtils.isNotEmpty(kateWorksQuery.getProductId()), TAppWork::getProductId, kateWorksQuery.getProductId())
@ -1063,6 +1102,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
List<KateWorkVo> resultList = poList.stream().map(KateWorkVo::ofWork).toList();
return WmsApiResponse.success("查询缺料信息成功。", resultList);
}
}
/**
* 更新工作信息---实现
@ -1141,6 +1181,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 获取料盒打印标签数量
*
* @param kateWorksQuery 查询参数
* @return 标签信息
*/
@ -1251,6 +1292,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 删除dbs计划---实现
*
* @param dbsRequest 删除请求
* @return 删除结果
*/
@ -1820,6 +1862,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
/**
* 获取所有物料需求
*
* @param dbsList dbs计划
* @return getGoodsRequireMap 结果
* @throws Exception 异常

View File

@ -9,13 +9,13 @@ spring:
# username: developer
# password: developer
# 本地
url: jdbc:mysql://localhost:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
username: root
password: liangzhou
# url: jdbc:mysql://localhost:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
# username: root
# password: liangzhou
# 卡特服务器
# url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
# username: developer
# password: baokai
url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
username: developer
password: baokai
profiles:
active: online

File diff suppressed because it is too large Load Diff