From 79e81a02076cdd1e828eb06029cd51eb37522f42 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 18 九月 2025 09:11:37 +0800
Subject: [PATCH] 首页下载问题修复
---
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/DNCSendBackService.java | 285 ++++++++++++++++++++++++++------------------------------
1 files changed, 131 insertions(+), 154 deletions(-)
diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/DNCSendBackService.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/DNCSendBackService.java
index c96009d..62af8a0 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/DNCSendBackService.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/DNCSendBackService.java
@@ -1,13 +1,13 @@
package org.springblade.mdm.program.service;
-import com.alibaba.fastjson.JSONObject;
-import io.netty.util.internal.StringUtil;
import lombok.AllArgsConstructor;
+import lombok.Data;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.base.BizEntity;
import org.springblade.core.mp.base.BizServiceImpl;
import org.springblade.core.oss.OssTemplate;
import org.springblade.core.oss.model.BladeFile;
@@ -16,29 +16,35 @@
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.FileUtil;
import org.springblade.core.tool.utils.Func;
+import org.springblade.mdm.basesetting.machine.entity.Machine;
+import org.springblade.mdm.basesetting.machine.service.MachineService;
+import org.springblade.mdm.commons.service.ParamService;
import org.springblade.mdm.flow.entity.FlowProgramFile;
import org.springblade.mdm.flow.service.CureFlowService;
import org.springblade.mdm.flow.service.FlowCommonService;
-import org.springblade.mdm.flow.service.FlowProgramFileService;
import org.springblade.mdm.program.entity.DncBackFile;
import org.springblade.mdm.program.entity.NcNode;
import org.springblade.mdm.program.entity.NcProgramExchange;
import org.springblade.mdm.program.mapper.NcProgramExchangeMapper;
+import org.springblade.mdm.program.service.programannotation.*;
import org.springblade.mdm.program.vo.DncSendBackData;
import org.springblade.mdm.program.vo.DncSendBackFile;
-import org.springblade.mdm.utils.EntityUtil;
+import org.springblade.mdm.program.vo.ProgramAnnotation;
import org.springblade.mdm.utils.FileContentUtil;
-import org.springframework.beans.BeanUtils;
+import org.springblade.mdm.utils.ZipTextFileContentUtil;
+import org.springblade.system.pojo.entity.DictBiz;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
+import java.lang.annotation.Annotation;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.time.Duration;
import java.util.*;
+import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@@ -52,12 +58,21 @@
@AllArgsConstructor
public class DNCSendBackService extends BizServiceImpl<NcProgramExchangeMapper, NcProgramExchange> {
private final CureFlowService cureFlowService;
- private final FlowProgramFileService flowProgramFileService;
+ private final ProgramAnnotationService programAnnotationService;
private final NcNodeService ncNodeService;
private final OssTemplate ossTemplate;
private final BladeRedis bladeRedis;
private final FlowCommonService flowCommonService;
private final DncBackFileService dncBackFileService;
+ private final MachineService machineService;
+ private final ParamService paramService;
+ private final MachineAnnotationConfig machineAnnotationConfig;
+
+ /**
+ * 鍋忕鍗曟枃浠舵湯灏剧殑妯″紡锛歅+鏁板瓧
+ */
+ private static final String P_NUMBER_PATTERN = "(?i)P\\d+";
+
private String getFileKey(){
return "dncimpfile-"+ AuthUtil.getUserId();
}
@@ -81,7 +96,6 @@
bladeRedis.setEx(getFileKey(),bfile.getName(), Duration.ofHours(2));
try(InputStream zipFileInputStream = ossTemplate.statFileStream(bfile.getName());) {
- //InputStream zipFileInputStream = file.getInputStream();//test
list = parseProgramListFromZip(zipFileInputStream);
}
} catch (IOException e) {
@@ -103,7 +117,7 @@
Path tempZipFile = createTempFile(inputStream);
List<String> fileEntryNameList = new ArrayList<>();
- List<String> dirEntryNameList = new ArrayList<>();
+ List<String> dirEntryNameList = new ArrayList<>();//绋嬪簭鍖呭悕+宸ュ簭鐗堟 浣滀负鏂囦欢澶瑰悕
try (ZipFile zipFile = new ZipFile(tempZipFile.toFile())) {
Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
@@ -119,38 +133,74 @@
}
}
+ List<DictBiz> annotionDictList = programAnnotationService.getAnnotionDictList();
NcNode programPackageNode;
//鐩綍鍒楄〃锛屽嵆绋嬪簭鍖呭垪琛�
for(String entryName : dirEntryNameList){
DncSendBackData progData = new DncSendBackData();
- String packageName = StringUtils.removeEnd(entryName,"/");
+ String folderName = StringUtils.removeEnd(entryName,"/");
+
+ //PackageAndProcessEdition pkgAndEdition = parseProgramPackageFromFolderName(folderName);
+ String packageName = folderName;//pkgAndEdition.getProgramPackageName();
+ //String processEdition = pkgAndEdition.getProcessEdition();
+ /*
+ if(StringUtils.isBlank(packageName) || StringUtils.isBlank(processEdition)){
+ throw new ServiceException("鍖呭唴鏂囦欢澶瑰悕鏍煎紡閿欒锛屽簲璇ヤ负[闆剁粍浠跺彿-宸ュ簭鍙�-宸ュ簭鐗堟]:"+folderName);
+ }*/
+
progData.setProgramName(packageName);
- String statusLine = "";
- Optional<String> optFilename = fileEntryNameList.stream().filter(n -> n.startsWith(packageName)).findFirst();
+ Optional<String> optFilename = fileEntryNameList.stream().filter(n -> n.startsWith(entryName)).findFirst();
if(optFilename.isPresent()){
entry = zipFile.getEntry(optFilename.get());
InputStream ins = zipFile.getInputStream(entry);
+ ByteArrayInputStream bais = new ByteArrayInputStream(IOUtils.toByteArray(ins));;
progData.setFileBackTime(DateUtil.fromInstant(entry.getLastModifiedTime().toInstant()));
- statusLine = FileContentUtil.readLineAt(ins,2);
+
+ AnnotationProperties defAnnoProperties =AnnotationProperties.getDefault();
+ String statusLine = FileContentUtil.readLineAt(bais,defAnnoProperties.getStatusLineIndex());//鐘舵�佹敞閲婅
+ bais.reset();
+ String sendPathLine = FileContentUtil.readLineAt(bais,defAnnoProperties.getSendPathLineIndex());//鐘舵�佹敞閲婅
+ bais.reset();
+
+
+ if(statusLine.contains("GH")){
+ //鍥哄寲锛屼笉搴斿洖浼狅紝蹇界暐
+ log.warn("鐘舵�亄},涓嶅簲鍥炰紶锛屽拷鐣�",statusLine);
+ continue;
+ }
+
+ Machine machine = this.machineService.getMachineBySendPathAnnotation(sendPathLine);
+ if(machine == null){
+ throw new ServiceException("鏍规嵁涓嬪彂璺緞鏈壘鍒扮▼搴忓搴旂殑鏈哄簥:"+sendPathLine);
+ }
+
if(statusLine.contains("SQ")){
//璇曞垏
- programPackageNode = ncNodeService.getLastEditionTryingProgramPackage(packageName);
- }else if(statusLine.contains("GH")){
- //鍥哄寲
- programPackageNode = ncNodeService.getLastEditionCuredProgramPackage(packageName);
+ programPackageNode = ncNodeService.getLastEditionTryingProgramPackage(packageName);//TODO 杩橀渶鏍规嵁鏈哄簥缁勶紙濡備綍鑾峰彇锛熸牴鎹笅鍙戣矾寰勮幏鍙栨満搴婏紝杩涜�岃幏鍙栵級锛�,processEdition
}else if(statusLine.contains("PL")){
//鍋忕
programPackageNode =ncNodeService.getLastEditionDeviationProgramPackage(packageName);
}else{
- throw new ServiceException("鏈壘鍒扮▼搴忔枃浠朵腑鐨勭姸鎬佹敞閲�");
+ //鏌ヨ鏄惁杞﹀簥/鐜板満缂栧埗锛屾槸杞﹀簥鍙互鏀捐繃锛屾寜璇曞垏澶勭悊锛�
+ //TODO 鐜板満缂栧埗鐨勭▼搴忥紝鎵撳寘鏃跺繀椤诲湪鏂囦欢涓鍔犱笅鍙戣矾寰勶紙鍔犲叆鍚庯級
+ programPackageNode = ncNodeService.getLastEditionTryingProgramPackage(packageName);
+ if(programPackageNode!=null){
+ String chechuangVal = paramService.turninngValue();
+ if(StringUtils.equals(machine.getMachineSpec(),chechuangVal)){
+ //杞﹀簥
+ ProgramAnnotation pa = AnnotationUtil.getProgramAnnotationFormat(machine.getControlSystem(),annotionDictList);
+ statusLine = pa.addAnnotation(ProgramAnnotationService.SQ);
+ }
+ }
}
+
if(programPackageNode != null) {
progData.setId(programPackageNode.getId());
progData.setProgramNo(programPackageNode.getProgramNo());
- List<String> fileEtriyNames = fileEntryNameList.stream().filter(n -> n.startsWith(packageName)).toList();
+ List<String> fileEntryNames = fileEntryNameList.stream().filter(n -> n.startsWith(packageName)).toList();
List<DncSendBackFile> programFiles = new ArrayList<>();
- fileEtriyNames.forEach( filePath ->{
+ fileEntryNames.forEach( filePath ->{
DncSendBackFile backFile = new DncSendBackFile();
backFile.setEntryName(filePath);
backFile.setName(StringUtils.removeStart(filePath,entryName));
@@ -160,10 +210,10 @@
progData.setFiles(programFiles);
list.add(progData);
}else{
- throw new ServiceException("鎵句笉鍒扮▼搴忓寘鍚�:"+packageName+statusLine);
+ throw new ServiceException("鎵句笉鍒扮▼搴忓寘鍚�:"+packageName);
}
}else{
- throw new ServiceException(entryName+"鍖呬笅鏈壘鍒版枃浠�"+statusLine);
+ throw new ServiceException(entryName+"鍖呬笅鏈壘鍒版枃浠�");
}
}
@@ -172,6 +222,26 @@
return list;
}
+ /**
+ * 浠庢枃浠跺す鍚嶈В鏋愬嚭绋嬪簭鍖呭悕鍜屽拰宸ュ簭鐗堟
+ * @param folderName 鏂囦欢澶瑰悕
+ * @return 缁撴瀯鏁版嵁
+ */
+ /*
+ PackageAndProcessEdition parseProgramPackageFromFolderName(String folderName){
+ int index = StringUtils.lastIndexOf(folderName,'-');
+ String processEditon = "";
+ String packageName = "";
+ if(index != -1){
+ processEditon = folderName.substring(index+1);
+ packageName = folderName.substring(0,index);
+ }
+
+ PackageAndProcessEdition result = new PackageAndProcessEdition();;
+ result.setProgramPackageName(packageName);
+ result.setProcessEdition(processEditon);
+ return result;
+ }*/
/**
* 鍏ュ簱鍥炰紶鏂囦欢,骞跺惎鍔ㄥ浐鍖栨祦绋�
@@ -186,27 +256,8 @@
String zipFileName = bladeRedis.get(filekey);
log.info("filekey={},鏂囦欢鍚�={}",filekey,zipFileName);
- //Map<Long,List<NcNode>> programPackageSubMap = new HashMap<>();
-
Map<Long,List<FlowProgramFile>> pkgIdFileMap = dealWithBackFile(zipFileName,acceptIdList);
- ///List<NcNode> newProgramPackageList = updateNodeDataByDNCBackData(pkgFileName,idList,programPackageSubMap);
- //updateNodeDataByDNCBackData(pkgFileName,idList,programPackageSubMap);
- /*
- log.info("闇�瑕佸惎鍔ㄥ浐鍖栨祦绋嬬殑绋嬪簭鍖呭悕鏁伴噺:{}",newProgramPackageList.size());
- for(NcNode pkgNode :newProgramPackageList){
- exchange = new NcProgramExchange();
- exchange.setName(pkgNode.getName());
- exchange.setExchangeType(2);//鍥炰紶
- exchange.setNcNodeId(pkgNode.getId());
-
- this.save(exchange);
- }*/
- //bladeRedis.del(filekey);
- //this.ossTemplate.removeFile(zipFileName);
- //log.info("鍒犻櫎oss鏂囦欢:{}",zipFileName);
-
- //cureFlowService.startCure(newProgramPackageList,programPackageSubMap);
cureFlowService.startCureNew(pkgIdFileMap);
}
@@ -238,23 +289,28 @@
//鏍规嵁鍐呴儴鏂囦欢锛岃鍙栧拰鍒嗘瀽绋嬪簭鍖呭拰绋嬪簭鏂囦欢鏁版嵁
List<String> dirList = entryNameList.stream().filter(s -> s.endsWith("/")).toList();
for(String dir : dirList){
- String programPackageName = StringUtils.removeEnd(dir,"/");
+ String folderName = StringUtils.removeEnd(dir,"/");
+
+ //PackageAndProcessEdition pkgAndEdition = folderName;//parseProgramPackageFromFolderName(folderName);
+ String programPackageName = folderName; //pkgAndEdition.getProgramPackageName();
+
Optional<NcNode> optPackageNode = allAcceptPackages.stream().filter(node -> StringUtils.equals(node.getName(),programPackageName)).findFirst();
if(optPackageNode.isEmpty()){
throw new ServiceException("鎵句笉鍒扮▼搴�"+programPackageName);
}
-
NcNode packageNode = optPackageNode.get();
if(packageNode.hasCured()) {
throw new ServiceException(programPackageName + "宸茬粡鍥哄寲锛岃鍕块噸澶嶅叆搴撱��");
}
-
+ //鍋忕绋嬪簭鍒ゆ柇鏄惁閲嶅鍥炰紶
+ if(packageNode.isDeviationProgram() && packageNode.hasLocked()) {
+ throw new ServiceException(programPackageName + "宸查攣瀹氱殑绋嬪簭涓嶅彲浠ュ啀娆″洖浼犮��");
+ }
//妫�鏌ユ槸鍚﹀湪瀹℃壒杩囩▼涓�
- //鏍规嵁鑺傜偣淇℃伅鏌ヨ娴佺▼
boolean active = flowCommonService.isProcessInstanceActive(packageNode.getProcessInstanceId());
if(active){
- throw new ServiceException(programPackageName+"姝e湪瀹℃壒涓紝璇峰嬁閲嶅鍏ュ簱銆�");
+ throw new ServiceException(programPackageName+"姝e湪瀹℃壒涓紝璇峰嬁绛夊緟瀹℃壒瀹屾垚銆�");
}
//楠岃瘉閮借繃浜嗭紝淇濆瓨dncbackFile
@@ -271,7 +327,7 @@
if(!entryName.endsWith("/")){
//瀹為檯鐨勬枃浠�
String fileName = StringUtils.removeStart(entryName,dir);//鍘婚櫎鏂囦欢鍚嶈矾寰勯儴鍒�
-
+ fileName = removeDeviationPart(fileName);
try {
FlowProgramFile newFlowFile = new FlowProgramFile();
newFlowFile.setProgramName(packageNode.getName());
@@ -292,121 +348,29 @@
pkgIdFileMap.put(packageNode.getId(),flowFiles);
}
-
}
return pkgIdFileMap;
}
- /**
- * 鏇存柊鑺傜偣锛屼富瑕佹槸鍒涘缓 绋嬪簭鍖呭悕 鐨勬柊鐗堟湰銆�
- * @param pkgFileName zip鏂囦欢鍚�
- * @param programPackageIdList 绋嬪簭鍖呭悕 鑺傜偣鐨刬d鍒楄〃
- * @param programPackageSubMap 鏂扮殑 绋嬪簭鍖呰妭鐐筰d -> =鏂囦欢鍒楄〃 map锛岀敤浜庡洖浼犳暟鎹�
- * @throws IOException 璁块棶鏂囦欢寮傚父
- */
- /*
- List<NcNode> updateNodeDataByDNCBackData(String pkgFileName, List<Long> programPackageIdList,Map<Long,List<NcNode>> programPackageSubMap) throws IOException {
- InputStream inputStream = this.ossTemplate.statFileStream(pkgFileName);
- Path tempZipFile = createTempFile(inputStream);
- List<NcNode> newProgramPackageNodeList = new ArrayList<>();
- List<String> entryNameList = new ArrayList<>();
-
- ZipEntry entry;
- try (java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile(tempZipFile.toFile())) {
- Enumeration<? extends ZipEntry> entries = zipFile.entries();
- while(entries.hasMoreElements()) {
- entry = entries.nextElement();
- entryNameList.add(entry.getName());
+ String removeDeviationPart(String filename){
+ String finalFilename = filename;
+ //鍘绘帀鏂囦欢鍚嶄腑鍙兘甯︽湁鐨勫亸绂诲崟閮ㄥ垎锛�-P[搴忓彿]
+ String ext = FilenameUtils.getExtension(filename);
+ String dotExt = StringUtils.isNotBlank(ext)?"."+ext:ext;//甯︾偣鐨勬墿灞曞悕
+ String notExtName = StringUtils.removeEnd(filename,dotExt);
+ int idx = notExtName.lastIndexOf("-");
+ if(idx != -1){
+ String endPart = notExtName.substring(idx+1);
+ //Pattern.CASE_INSENSITIVE
+ boolean containsPld = endPart.matches(P_NUMBER_PATTERN);
+ if(containsPld){
+ finalFilename = notExtName.substring(0, idx)+dotExt;
}
- log.info("allentrynames:{}",entryNameList);
-
- List<NcNode> allAcceptPackages = this.ncNodeService.lambdaQuery().in(NcNode::getId,programPackageIdList).list();
- //鏍规嵁鍐呴儴鏂囦欢锛岃鍙栧拰鍒嗘瀽绋嬪簭鍖呭拰绋嬪簭鏂囦欢鏁版嵁
- List<String> dirList = entryNameList.stream().filter(s -> s.endsWith("/")).toList();
- for(String dir : dirList){
- String programPackageName = StringUtils.removeEnd(dir,"/");
- Optional<NcNode> optPackageNode = allAcceptPackages.stream().filter(node -> StringUtils.equals(node.getName(),programPackageName)).findFirst();
-
- if(optPackageNode.isEmpty()){
- throw new ServiceException("鎵句笉鍒扮▼搴�"+programPackageName);
- }
-
- NcNode packageNode = optPackageNode.get();
- if(packageNode.hasCured()) {
- throw new ServiceException(programPackageName + "宸茬粡鍥哄寲锛岃鍕块噸澶嶅叆搴撱��");
- }
-
- //妫�鏌ユ槸鍚﹀湪瀹℃壒杩囩▼涓�
- //鏍规嵁鑺傜偣淇℃伅鏌ヨ娴佺▼
- boolean active = flowCommonService.isProcessInstanceActive(packageNode.getProcessInstanceId());
- if(active){
- throw new ServiceException(programPackageName+"姝e湪瀹℃壒涓紝璇峰嬁閲嶅鍏ュ簱銆�");
- }
-
- NcNode newProgramPkg = new NcNode();
- BeanUtils.copyProperties(packageNode, newProgramPkg);
- EntityUtil.clearBaseProperties(newProgramPkg);
- newProgramPkg.setIsLastEdition(1);
- ncNodeService.save(newProgramPkg);
- newProgramPackageNodeList.add(newProgramPkg);
-
- //鏃ф暟鎹洿鏂颁负鑰佺増鏈�
- packageNode.setIsLocked(1);//鏃х増鑷姩閿佸畾
- packageNode.setIsLastEdition(0);;
- ncNodeService.updateById(packageNode);
-
- //List<FlowProgramFile> newFlowFiles = new ArrayList<>();
- List<NcNode> newProgramNodes = new ArrayList<>();
- //鏌ユ壘鍖呬笅鐨勬枃浠舵暟鎹�,
- entryNameList.stream().filter(s -> s.startsWith(dir)).forEach(entryName -> {
- log.info("{}涓嬬殑鏂囦欢锛歿}",dir,entryName);
- if(!entryName.endsWith("/")){
- //瀹為檯鐨勬枃浠�
- String fileName = StringUtils.removeStart(entryName,dir);//鍘婚櫎鏂囦欢鍚嶈矾寰勯儴鍒�
- NcNode oldProgramNode = this.ncNodeService.getLastEditionProgramFile(fileName,packageNode.getId());
- if(oldProgramNode == null){
- log.info("{}鎵句笉鍒扮▼搴忔枃浠�",entryName);
- throw new ServiceException(programPackageName+"涓嬫壘涓嶅埌绋嬪簭鏂囦欢"+fileName);
- }
-
- //鍒涘缓鏂扮増鏈殑绋嬪簭鑺傜偣
- NcNode newProgramNode = new NcNode();
- BeanUtils.copyProperties(oldProgramNode, newProgramNode);
- EntityUtil.clearBaseProperties(newProgramNode);
- newProgramNode.setIsLastEdition(1);
- newProgramNode.setParentId(newProgramPkg.getId());
- newProgramNode.setParentIds(newProgramPkg.getParentIds()+","+newProgramPkg.getId());
-
- FlowProgramFile oldFlowFile = flowProgramFileService.getById(newProgramNode.getFlowProgramFileId());
-
- FlowProgramFile newFlowFile = new FlowProgramFile();
- BeanUtils.copyProperties(oldFlowFile, newFlowFile);
- newFlowFile.setProcessInstanceId(null);//鍏堢疆涓虹┖锛屽惎鍔ㄦ祦绋嬪悗璁剧疆璇ュ��
- EntityUtil.clearBaseProperties(newFlowFile);
-
- try {
- InputStream ins = zipFile.getInputStream(zipFile.getEntry(entryName));
- BladeFile newOssFile = ossTemplate.putFile("mdm",fileName,ins);
- newFlowFile.setOssName(newOssFile.getName());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- newProgramNode.setFlowProgramFile(newFlowFile);
- newProgramNode.setVersionNumber(oldProgramNode.genNewVersionNumber());
- newProgramNodes.add(newProgramNode);
- //鏃ц妭鐐瑰鐞嗭紝鍜嬪姙锛熷鏋滃鍑哄伐鎺х綉 閲嶅瀵煎嚭鍛紵锛宨sLastEdition涓嶇敤璁剧疆浜嗭紝鍥犱负 绋嬪簭鍖呰妭鐐� 鏄柊鐨�
- }
- });
-
- programPackageSubMap.put(newProgramPkg.getId(),newProgramNodes);
- }
-
}
- return newProgramPackageNodeList;
+ return finalFilename;
}
- */
/**
* 鍒涘缓涓�涓复鏃秡ip鏂囦欢
* @param inputStream 鏂囦欢鐨勮緭鍏ユ祦
@@ -430,6 +394,9 @@
public String getEntryFileContent(String entryName) throws IOException {
String result = "";
String zipFileName = bladeRedis.get(getFileKey());
+ return ZipTextFileContentUtil.getTextContent(this.ossTemplate.statFileStream(zipFileName),entryName);
+
+ /*
try(InputStream inputStream = this.ossTemplate.statFileStream(zipFileName);){
Path tempZipFile = createTempFile(inputStream);
@@ -459,7 +426,17 @@
}
}
- return result;
+ return result;*/
}
}
+
+@Data
+class PackageAndProcessEdition{
+ private String programPackageName;
+ private String processEdition;
+
+ public String programName(){
+ return programPackageName+"-"+processEdition;
+ }
+}
--
Gitblit v1.9.3