ソースを参照

错误提示信息内容调整,页面提示方式改为alert

chengqiang 5 年 前
コミット
202c7b42d2

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/overheadline/util/BashInfo.java

@@ -156,6 +156,8 @@ public class BashInfo {
     public static final String JS_GCJS="工程结算价";
 
     public static final String INVALIDFORMAT = "文件格式错误";
+    public static final String PROJECT_TYPE_ERROR = "-1";
+    public static final String PROJECT_TYPE_ERROR_MSG = "无法判断工程类型,请检查是否缺失工程费用汇总表!!";
     public static final String NUMBERERROR = "结算书数据异常";
 
 

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/project/service/ProjectService.java

@@ -199,7 +199,7 @@ public class ProjectService extends CrudService<ProjectMapper, WbsProject> {
             return BashInfo.PROJECT_JKXL;
         }
 
-        return BashInfo.INVALIDFORMAT;
+        return BashInfo.PROJECT_TYPE_ERROR;
     }
 
 

+ 2 - 2
src/main/java/com/jeeplus/modules/sg/project/web/ProjectController.java

@@ -139,8 +139,8 @@ public class ProjectController extends BaseController {
         try {
            //判断结算数类型并保存数据到数据库
              String str = projectService.save(file,wbsItem);
-             if(str.equals(BashInfo.INVALIDFORMAT)){
-                 throw new RuntimeException(str);
+             if(str.equals(BashInfo.PROJECT_TYPE_ERROR)){
+                 throw new RuntimeException(BashInfo.PROJECT_TYPE_ERROR_MSG);
              }
              addMessage(redirectAttributes, "导入成功");
              return "redirect:/a/jkxl/list?id="+id+"&type="+str;

+ 4 - 4
src/main/java/com/jeeplus/modules/sg/project/web/ProjectTemController.java

@@ -104,8 +104,8 @@ public class ProjectTemController extends BaseController {
                 wbsItem.setId(id);
                 //分析保存
                 String str = projectService.save(file[i],wbsItem);
-                if(str.equals(BashInfo.INVALIDFORMAT)){
-                    throw new RuntimeException(str);
+                if(str.equals(BashInfo.PROJECT_TYPE_ERROR)){
+                    throw new RuntimeException(BashInfo.PROJECT_TYPE_ERROR_MSG);
                 }
             }
         }  catch (Exception e){
@@ -138,8 +138,8 @@ public class ProjectTemController extends BaseController {
         try {
 //            保存数据到数据库
             String str = projectService.save(file,wbsItem);
-            if(str.equals(BashInfo.INVALIDFORMAT)){
-                throw new RuntimeException(str);
+            if(str.equals(BashInfo.PROJECT_TYPE_ERROR)){
+                throw new RuntimeException(BashInfo.PROJECT_TYPE_ERROR_MSG);
             }
             addMessage(redirectAttributes, "导入成功");
             return "redirect:/a/jkxl/list?id="+id+"&type="+str+"&projectId="+projectId;

+ 4 - 3
src/main/resources/j2cache/j2cache.properties

@@ -87,9 +87,10 @@ redis.cluster_name = j2cache
 ## redis cache namespace optional, default[j2cache]
 redis.namespace = 
 
-## connection
-redis.hosts = 192.168.2.4:6379
-#redis.hosts = 127.0.0.1:6379
+## \u6D4B\u8BD5\u5730\u5740
+#redis.hosts = 192.168.2.4:6379
+#\u6B63\u5F0F\u5730\u5740
+redis.hosts = 127.0.0.1:6381
 redis.timeout = 2000
 redis.password =
 redis.database = 0

+ 8 - 3
src/main/resources/properties/jeeplus.properties

@@ -14,10 +14,15 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.jdbc.Driver
-#jdbc.url=jdbc:mysql://localhost:3306/guowang?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
-jdbc.url=jdbc:mysql://192.168.2.4:3306/guowang?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
+#\u6B63\u5F0F\u5E93\u5730\u5740
+jdbc.url=jdbc:mysql://localhost:3306/guowang?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
+#\u6D4B\u8BD5\u5E93\u5730\u5740
+#jdbc.url=jdbc:mysql://192.168.2.4:3306/gw_base?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
 jdbc.username=root
-jdbc.password=root
+#\u6D4B\u8BD5\u5E93\u5BC6\u7801
+#jdbc.password=root
+#\u6B63\u5F0F\u5E93\u5BC6\u7801
+jdbc.password=xg1234
 jdbc.testSql=SELECT 'x'
 jdbc.dual =
 

+ 1 - 1
src/main/webapp/WEB-INF/tags/sys/message.tag

@@ -15,7 +15,7 @@
 	</c:if> 
 	<c:if test="${showType != '1'}">
 		<script type="text/javascript">
-			top.layer.msg("${content}", {icon: "${ctype=='success'? 1:0}"});
+			top.layer.alert("${content}", {icon: "${ctype=='success'? 1:0}"});
 		</script>
 	</c:if>
 </c:if>