forked from BaoKaiWms/202501-Wms-Kate-Wuxi
1. 一整个料盒缺料的情况做了处理。
This commit is contained in:
parent
bc52d61307
commit
2c5e6feee1
|
|
@ -1,7 +1,7 @@
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
const request = axios.create({
|
const request = axios.create({
|
||||||
baseURL: 'http://localhost:12315/wms',
|
baseURL: 'https://s4wwjasrsp01.ap.cat.com/wmsServer/wms',
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -566,13 +566,13 @@ const ifNeedShowBoxSummary = () => {
|
||||||
|| confirmEntity.productId !== storeKittingWork.productId
|
|| confirmEntity.productId !== storeKittingWork.productId
|
||||||
|| confirmEntity.singleProductId !== storeKittingWork.singleProductId
|
|| confirmEntity.singleProductId !== storeKittingWork.singleProductId
|
||||||
|| confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
|| confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
||||||
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo)
|
|
||||||
if (confirmEntity.workOrder === '') {
|
if (confirmEntity.workOrder === '') {
|
||||||
// 打印这个工单剩余缺料标签---整个料盒都缺料的标签
|
// 打印这个工单剩余缺料标签---整个料盒都缺料的标签
|
||||||
|
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo, '2')
|
||||||
// 说明当前工单工作已完成,需要弹框提示工作已完成
|
// 说明当前工单工作已完成,需要弹框提示工作已完成
|
||||||
successBox('当前工单已完成。')
|
successBox('当前工单已完成。')
|
||||||
} else if (confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
} else if (confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
||||||
|
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo, '1')
|
||||||
// 前一个料盒已完成,需要弹框提示料盒已完成
|
// 前一个料盒已完成,需要弹框提示料盒已完成
|
||||||
showBoxSummary()
|
showBoxSummary()
|
||||||
}
|
}
|
||||||
|
|
@ -719,12 +719,14 @@ const handleSortChange = (data) => {
|
||||||
searchKittingGoods()
|
searchKittingGoods()
|
||||||
}
|
}
|
||||||
// 打印上一个料盒的缺料信息
|
// 打印上一个料盒的缺料信息
|
||||||
const printLacks = (workOrder, productId, singleProductId, boxNo) => {
|
// printLackType;1:当前料盒缺料标签,2:未完成料盒的缺料标签
|
||||||
|
const printLacks = (workOrder, productId, singleProductId, boxNo, printLackType) => {
|
||||||
const request = {
|
const request = {
|
||||||
workOrder: workOrder,
|
workOrder: workOrder,
|
||||||
productId: productId,
|
productId: productId,
|
||||||
singleProductId: singleProductId,
|
singleProductId: singleProductId,
|
||||||
boxNo: boxNo,
|
boxNo: boxNo,
|
||||||
|
bk1: printLackType,
|
||||||
standId: standId,
|
standId: standId,
|
||||||
userName: userName
|
userName: userName
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,9 @@ public class KateWorksQuery extends PageQuery{
|
||||||
*/
|
*/
|
||||||
@JsonProperty("planStartDate")
|
@JsonProperty("planStartDate")
|
||||||
private LocalDate planStartDate;
|
private LocalDate planStartDate;
|
||||||
|
/**
|
||||||
|
* 预留字段
|
||||||
|
*/
|
||||||
|
@JsonProperty("bk1")
|
||||||
|
private String bk1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -666,6 +666,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成需求看板
|
* 生成需求看板
|
||||||
|
*
|
||||||
* @param genRequest 请求参数
|
* @param genRequest 请求参数
|
||||||
* @return 生成结果
|
* @return 生成结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -764,6 +765,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取物料需求
|
* 获取物料需求
|
||||||
|
*
|
||||||
* @param goodsRequireRequest 请求参数
|
* @param goodsRequireRequest 请求参数
|
||||||
* @return 响应结果
|
* @return 响应结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -929,6 +931,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询图纸列表(分页)---实现
|
* 查询图纸列表(分页)---实现
|
||||||
|
*
|
||||||
* @param imageQuery 查询参数
|
* @param imageQuery 查询参数
|
||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -1050,18 +1053,55 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
if (kateWorksQuery == null) {
|
if (kateWorksQuery == null) {
|
||||||
return WmsApiResponse.error("查询参数为空。", null);
|
return WmsApiResponse.error("查询参数为空。", null);
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<TAppWork> lambdaQueryWrapper = new LambdaQueryWrapper<TAppWork>()
|
if (StringUtils.isEmpty(kateWorksQuery.getWorkOrder())) {
|
||||||
.eq(TAppWork::getWorkOrder, kateWorksQuery.getWorkOrder())
|
return WmsApiResponse.error("请求参数缺少工单号。", null);
|
||||||
.eq(StringUtils.isNotEmpty(kateWorksQuery.getProductId()), TAppWork::getProductId, kateWorksQuery.getProductId())
|
}
|
||||||
.eq(StringUtils.isNotEmpty(kateWorksQuery.getSingleProductId()), TAppWork::getSingleProductId, kateWorksQuery.getSingleProductId())
|
if (Objects.equals(kateWorksQuery.getBk1(), "2")) {
|
||||||
.eq(TAppWork::getBoxNo, kateWorksQuery.getBoxNo())
|
// 查询当前工单下,特定条件下整个料盒缺料的标签且包含当前料盒
|
||||||
.eq(TAppWork::getLackStatus, 1);
|
LambdaQueryWrapper<TAppWork> lambdaQueryWrapper_sp = new LambdaQueryWrapper<TAppWork>()
|
||||||
List<TAppWork> poList = appWorkService.list(lambdaQueryWrapper);
|
.eq(TAppWork::getWorkOrder, kateWorksQuery.getWorkOrder())
|
||||||
if (poList == null || poList.isEmpty()) {
|
.eq(StringUtils.isNotEmpty(kateWorksQuery.getProductId()), TAppWork::getProductId, kateWorksQuery.getProductId())
|
||||||
return WmsApiResponse.error("没有找到缺料信息。", null);
|
.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())
|
||||||
|
.eq(StringUtils.isNotEmpty(kateWorksQuery.getSingleProductId()), TAppWork::getSingleProductId, kateWorksQuery.getSingleProductId())
|
||||||
|
.eq(TAppWork::getBoxNo, kateWorksQuery.getBoxNo())
|
||||||
|
.eq(TAppWork::getLackStatus, 1);
|
||||||
|
List<TAppWork> poList = appWorkService.list(lambdaQueryWrapper);
|
||||||
|
if (poList == null || poList.isEmpty()) {
|
||||||
|
return WmsApiResponse.error("没有找到缺料信息。", null);
|
||||||
|
}
|
||||||
|
List<KateWorkVo> resultList = poList.stream().map(KateWorkVo::ofWork).toList();
|
||||||
|
return WmsApiResponse.success("查询缺料信息成功。", resultList);
|
||||||
}
|
}
|
||||||
List<KateWorkVo> resultList = poList.stream().map(KateWorkVo::ofWork).toList();
|
|
||||||
return WmsApiResponse.success("查询缺料信息成功。", resultList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1141,6 +1181,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取料盒打印标签数量
|
* 获取料盒打印标签数量
|
||||||
|
*
|
||||||
* @param kateWorksQuery 查询参数
|
* @param kateWorksQuery 查询参数
|
||||||
* @return 标签信息
|
* @return 标签信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -1251,6 +1292,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除dbs计划---实现
|
* 删除dbs计划---实现
|
||||||
|
*
|
||||||
* @param dbsRequest 删除请求
|
* @param dbsRequest 删除请求
|
||||||
* @return 删除结果
|
* @return 删除结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -1820,6 +1862,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有物料需求
|
* 获取所有物料需求
|
||||||
|
*
|
||||||
* @param dbsList dbs计划
|
* @param dbsList dbs计划
|
||||||
* @return getGoodsRequireMap 结果
|
* @return getGoodsRequireMap 结果
|
||||||
* @throws Exception 异常
|
* @throws Exception 异常
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ spring:
|
||||||
# username: developer
|
# username: developer
|
||||||
# password: developer
|
# password: developer
|
||||||
# 本地
|
# 本地
|
||||||
url: jdbc:mysql://localhost:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
# url: jdbc:mysql://localhost:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
username: root
|
# username: root
|
||||||
password: liangzhou
|
# password: liangzhou
|
||||||
# 卡特服务器
|
# 卡特服务器
|
||||||
# url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
# username: developer
|
username: developer
|
||||||
# password: baokai
|
password: baokai
|
||||||
|
|
||||||
profiles:
|
profiles:
|
||||||
active: online
|
active: online
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user