From d589bf94e8f1863336d23fdd951049622b64db68 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 22 十一月 2024 16:36:43 +0800
Subject: [PATCH] csv文件调整
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 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 32fbe1b..10f3b2b 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
@@ -312,7 +312,7 @@
String contentType = file.getContentType();
InsOrderFile insOrderFile = new InsOrderFile();
insOrderFile.setInsOrderId(orderId);
- insOrderFile.setFileName(filename);
+
if (contentType != null && contentType.startsWith("image/")) {
// 鏄浘鐗�
path = imgUrl;
@@ -331,6 +331,7 @@
urlString = realpath + "/" + pathName;
file.transferTo(new File(urlString));
insOrderFile.setFileUrl(pathName);
+ insOrderFile.setFileName(pathName);
if (ObjectUtils.isNotEmpty(sonLaboratory)) {
insOrderFile.setSonLaboratory(sonLaboratory);
//鍒犻櫎閲嶅鐨勬暟鎹�
@@ -355,7 +356,7 @@
if (ObjectUtils.isNotEmpty(sonLaboratory) && (sonLaboratory.equals("杩戝満") || sonLaboratory.equals("杩滃満")) &&
split[split.length - 1].equals("csv")) {
//鍒ゆ柇鏄摢绉峜sv鏂囦欢,鏄惁鏈夆�斺��
- if (!file.getOriginalFilename().contains("鈥斺��")) {
+ if (sonLaboratory.equals("杩戝満")) {
fuSheUtils.getFuSheWord1(sonLaboratory, insOrderFile);
} else {
fuSheUtils.getFuSheWord2(sonLaboratory, insOrderFile);
@@ -414,9 +415,7 @@
orderState.setInsState(0);
orderState.setNum(orderState.getNum() + 1);//閫掑
insOrderStateMapper.updateById(orderState);
- } /*else {
- throw new ErrorException("璇ヨ鍗曠珯鐐圭殑浠诲姟宸插垱寤�,鏃犳硶鍐嶆鍒涘缓!");
- }*/
+ }
} else {
InsOrderState insOrderState = new InsOrderState();
insOrderState.setInsOrderId(insSample.getInsOrderId());
@@ -751,8 +750,9 @@
//缁撹
int ressult = 1;
String valueStr = insProductResult2.getValue();
+ String regex ="[\u4e00-\u9fa5]";
if (!insProduct.getAsk().contains(",")) {
- if (insProduct.getAsk().equals("/")) {
+ if (insProduct.getAsk().equals("/") || Pattern.compile(regex).matcher(insProduct.getAsk()).find()) {
ressult = 3; //涓嶅垽瀹�
} else if (!isValueValid(valueStr, new String[]{insProduct.getAsk()})) {
ressult = 0; //涓嶅悎鏍�
@@ -886,7 +886,7 @@
if (ObjectUtils.isEmpty(s)) {
continue;
}
- double numericValue = Double.parseDouble(s);
+ double numericValue = Math.abs(Double.parseDouble(s));
boolean valid = Arrays.stream(valuesToCheck)
.allMatch(v -> getResult(numericValue, v));
if (!valid) {
@@ -999,9 +999,9 @@
}
}
- insOrder.setState(4);
- insOrderMapper.updateById(insOrder);
}
+ insOrder.setState(4);
+ insOrderMapper.updateById(insOrder);
break;
}
}
@@ -1117,9 +1117,9 @@
info.setViewStatus(false);
info.setJumpPath("b1-inspect-order-plan");
informationNotificationService.addInformationNotification(info);
- // todo 浼佷笟寰俊娑堟伅鎺ㄩ�丂zss
+ // todo 浼佷笟寰俊娑堟伅鎺ㄩ�丂zss
HashMap<String, Object> map = new HashMap<>();
- String account = userMapper.selectById(userId).getAccount();
+ String account = userMapper.selectById(submitPlanDto.getVerifyUser()).getAccount();
map.put("touser", account);//鎺ユ敹娑堟伅鎴愬憳鐨勮处鍙�'ZT-031292'杩欑绫诲瀷(濡傛灉鏈夊涓敤'|'鍒嗛殧)
map.put("toparty", "");//鎺ユ敹閮ㄩ棬id
map.put("totag", "");//娑堟伅鏍囩id
@@ -1198,7 +1198,7 @@
DateTime parse = DateUtil.parse(localDateTime.format(formatter));
auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//鏄熸湡
auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ
- auxiliaryOutputWorkingHours.setCheck(userId);//妫�娴嬩汉
+ auxiliaryOutputWorkingHours.setCheck(userId);//todo 妫�娴嬩汉(鍚庨潰瑕佸幓鎺夌敱鍓嶇浼犲叆)
auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours);
}
}
--
Gitblit v1.9.3