Commit cb2dd0da authored by 赵啸非's avatar 赵啸非

修改热门词汇

parent 2b8b3268
Pipeline #2472 canceled with stages
#! /bin/sh #! /bin/sh
source /etc/profile
PORT="@profiles.server.port@" PORT="@profiles.server.port@"
BASEDIR=`dirname $0` BASEDIR=`dirname $0`
BASEDIR=`(cd "$BASEDIR"; pwd)` BASEDIR=`(cd "$BASEDIR"; pwd)`
...@@ -15,12 +14,12 @@ fi ...@@ -15,12 +14,12 @@ fi
pid=`ps ax | grep -i "$MAIN_CLASS" | grep java | grep -v grep | awk '{print $1}'` pid=`ps ax | grep -i "$MAIN_CLASS" | grep java | grep -v grep | awk '{print $1}'`
if [ -z "$pid" ] ; then if [ -z "$pid" ] ; then
echo "No Server running." echo "No Server running."
exit -1; exit $FAIL;
fi fi
echo "stoping application $PROJECT_NAME......" echo "stoping application $PROJECT_NAME......"
kill -9 ${pid} kill -15 ${pid}
echo "Send shutdown request to Server $PROJECT_NAME OK" echo "Send shutdown request to Server $PROJECT_NAME OK"
......
#!/bin/sh #!/bin/sh
source /etc/profile
PORT="@profiles.server.port@" PORT="@profiles.server.port@"
BASEDIR=`dirname $0`/.. BASEDIR=`dirname $0`/..
BASEDIR=`(cd "$BASEDIR"; pwd)` BASEDIR=`(cd "$BASEDIR"; pwd)`
...@@ -27,7 +26,6 @@ fi ...@@ -27,7 +26,6 @@ fi
if [ -z "$JAVACMD" ] ; then if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD="$JAVA_HOME/jre/sh/java"
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD="$JAVA_HOME/bin/java"
......
...@@ -44,7 +44,7 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device ...@@ -44,7 +44,7 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
DevicePdu devicePdu = new DevicePdu(); DevicePdu devicePdu = new DevicePdu();
BeanUtils.copyProperties(entity, devicePdu, BeanUtil.getNullPropertyNames(entity)); BeanUtils.copyProperties(entity, devicePdu, BeanUtil.getNullPropertyNames(entity));
String productName = GlobalSysInfo.getParamValue(Constant.PARAMS_PRODUCT_NAME, "数字填单机"); String productName = GlobalSysInfo.getParamValue(Constant.PARAMS_PRODUCT_NAME, "填单机");
devicePdu.setProductName(productName); devicePdu.setProductName(productName);
Rest<RespData<List<DevicePdu>>> rest = deviceFeign.list(devicePdu); Rest<RespData<List<DevicePdu>>> rest = deviceFeign.list(devicePdu);
......
...@@ -108,10 +108,6 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -108,10 +108,6 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }
@Override
protected void updateBefore(MatterDatumEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
}
@Override @Override
protected void updateAfter(MatterDatumEntity entity, Context context) throws AppException { protected void updateAfter(MatterDatumEntity entity, Context context) throws AppException {
...@@ -149,6 +145,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -149,6 +145,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
@Override @Override
protected void saveBefore(MatterDatumEntity entity, Context context) throws AppException { protected void saveBefore(MatterDatumEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
if (StringUtils.isEmpty(entity.getFileUrl())) { if (StringUtils.isEmpty(entity.getFileUrl())) {
throw new AppException("填单附件不能为空"); throw new AppException("填单附件不能为空");
} }
...@@ -176,9 +173,41 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -176,9 +173,41 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
parseDocxToJson(entity); parseDocxToJson(entity);
} }
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(MatterDatumEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
//判断下模板是否更新了,如果更新了 则重新生成表单
MatterDatumEntity beforeMatterDatumEntity = this.get(entity.getId());
if (!ObjectUtils.isEmpty(entity.getTemplatePath()) && !entity.getTemplatePath().equals(beforeMatterDatumEntity.getTemplatePath())) {
//删除原始文件
String realFile = uploadService.getFilePath(beforeMatterDatumEntity.getTemplatePath());
if (FileUtil.isFile(realFile)) {
FileUtil.del(realFile);
}
//重新编译更新
parseDocxToJson(entity);
}
//更新预览图片
if (!ObjectUtils.isEmpty(entity.getFileUrl()) && !entity.getTemplatePath().equals(beforeMatterDatumEntity.getTemplatePath())) {
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
String prePath = "file/preview/";
String newName = genPreviewPath(rootPath, prePath, entity.getFileUrl());
entity.setFilePreViewUrl(prePath + newName);
}
if (!ObjectUtils.isEmpty(entity.getSamplePath()) && !entity.getSamplePath().equals(beforeMatterDatumEntity.getSamplePath())) {
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
String prePath = "file/preview/";
String newName = genPreviewPath(rootPath, prePath, entity.getSamplePath());
entity.setPreViewPath(prePath + newName);
}
} }
private String genPreviewPath(String rootPath, String prePath, String tempPath) { private String genPreviewPath(String rootPath, String prePath, String tempPath) {
//生成样表预览图片 //生成样表预览图片
String samplePath = rootPath + tempPath; String samplePath = rootPath + tempPath;
...@@ -193,11 +222,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -193,11 +222,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
String extName = FileUtil.getSuffix(samplePath); String extName = FileUtil.getSuffix(samplePath);
if (this.isExsitArry(extName, word)) { if (this.isExsitArry(extName, word)) {
WordUtil.convertWordToJPEG(samplePath, filePathAll); WordUtil.convertWordToJPEG(samplePath, filePathAll);
}else if(this.isExsitArry(extName, pdf)){ } else if (this.isExsitArry(extName, pdf)) {
WordUtil.pdfToImages(samplePath,filePathAll); WordUtil.pdfToImages(samplePath, filePathAll);
}else if(this.isExsitArry(extName,imgs)){ } else if (this.isExsitArry(extName, imgs)) {
try { try {
com.mortals.framework.util.FileUtil.copyFile(samplePath,filePathAll); com.mortals.framework.util.FileUtil.copyFile(samplePath, filePathAll);
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment