From 0e2e829f10a5e5b239d6583d6be3afbcaed0dcc0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 31 七月 2024 17:58:30 +0800
Subject: [PATCH] PK8000处理调试+各种bug调试优化
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index 2121f5b..4d0eb38 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -227,7 +227,7 @@
// 闃叉鍥炵幆鍦板潃鍙樹负IPv6
String ip = ipAddress.equals("0:0:0:0:0:0:0:1") ? "127.0.0.1" : ipAddress;
insProducts.forEach(i -> {
- Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass());
+ Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass(), i.getSampleType());
if (ObjectUtils.isNotEmpty(devices) && ObjectUtils.isNotEmpty(devices.get("file_type")) && ObjectUtils.isNotEmpty(devices.get("collect_url"))) {
InsProductResult insProductResult = i.getInsProductResult();
if (ObjectUtils.isEmpty(insProductResult)) {
@@ -399,7 +399,7 @@
ProductVo productVo = new ProductVo();
productVo.setCode(insFiber.getCode());
productVo.setColor(fiber.getColor());
- productVo.setBushColor(fiber.getBushColor());
+ productVo.setBushColor(insBushing.getColor());
if (ObjectUtils.isNotEmpty(insProductResult)) {
insProduct.setInsProductResult(insProductResult);
}
@@ -432,7 +432,7 @@
for (InsProduct insProduct : insProducts) {
InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
ProductVo productVo = new ProductVo();
- productVo.setCode("/");
+ productVo.setCode("-");
productVo.setColor(fiber.getColor());
productVo.setBushColor(fiber.getBushColor());
insProduct.setInsProductResult(insProductResult);
@@ -650,7 +650,7 @@
auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ
auxiliaryOutputWorkingHours.setCheck(userId);//妫�娴嬩汉
}
- if (ObjectUtils.isEmpty(insProductResult) || (ObjectUtils.isNotEmpty(insProductResult) && !insProductResult.getInsValue().equals(result.getInsValue()))) {
+ if (ObjectUtils.isEmpty(insProductResult) && !result.getInsValue().equals("[]") || (ObjectUtils.isNotEmpty(insProductResult) && !insProductResult.getInsValue().equals(result.getInsValue()) && !insProductResult.getInsValue().equals("[]"))) {
auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours);
}
}
@@ -1756,7 +1756,7 @@
} catch (Exception e) {
throw new ErrorException("鎵句笉鍒版楠屼汉鐨勭鍚�");
}
- if (signatureUrl.equals("")) {
+ if (ObjectUtils.isEmpty(signatureUrl) || signatureUrl.equals("")) {
throw new ErrorException("鎵句笉鍒版楠屼汉鐨勭鍚�");
}
//Custom custom = customMapper.selectById(user.get("company"));
@@ -3447,6 +3447,11 @@
throw new RuntimeException(e);
}
}
+ else {
+ //澶嶆牳涓嶉�氳繃灏嗘妸澶嶆牳鐨勮礋璐d汉鍘绘帀
+ Integer id = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery().eq(InsSampleUser::getInsSampleId, orderId).orderByDesc(InsSampleUser::getId).last("limit 1")).getId();
+ insSampleUserMapper.deleteById(id);
+ }
return 1;
}
@@ -3477,7 +3482,7 @@
}
@Override
- public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, String sampleCode) {
+ public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) {
List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
@@ -3567,8 +3572,8 @@
return null;
});
// 鍒犻櫎鏁伴噰閲囬泦娆℃暟
- String key = "frequency" + ":" + entrustCode + ":" + sampleCode;
- RedisUtil.del(key);
+ String key = "frequency" + ":" + entrustCode + ":*";
+ RedisUtil.delsLike(key);
return 1;
}
--
Gitblit v1.9.3