LiuCheng 2 days ago
parent
commit
fab67c0ad0

+ 24
- 1
README.md View File

@@ -39,4 +39,27 @@
39 39
 4、 执行 rz
40 40
 5、 选择本地打包好的文件上传zip文件
41 41
 6、 上传至完成之后执行 unzip dist.zip 在选择是否全部替换的时候选择A
42
-7、 执行完成之后回到前台界面刷新界面或者清空浏览器缓存查看更改信息是否已经生效
42
+7、 执行完成之后回到前台界面刷新界面或者清空浏览器缓存查看更改信息是否已经生效
43
+
44
+
45
+
46
+1、idea 数据库链接改到 ↓  路径为 → D:\Code\Code_Ware\BaoShengWave_web\src\main\resource\localhost\db.properties文件
47
+    jdbc.driverClass=com.mysql.jdbc.Driver
48
+    jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware?characterEncoding=utf8
49
+    dbc.user=root
50
+    jdbc.password=root
51
+2、点开Maven 执行 clean 和 install
52
+3、点击构建 → 构建工件 → thware:war → 构建  生成war包
53
+5、前台链接 prod.env.js文件里 网址改为 → BASE_API: '"http://120.224.213.150/thware/"' → 执行npm run build
54
+6、C:\thware目录下 → 删除dist.zip → 右键dist文件 → 压缩到zip 重新生成压缩包
55
+7、打开远程链接软件 下载文件 目录 ↓
56
+   cd /home/apache-tomcat-8.5.51/webapps/thware/
57
+   cd /home/apache-tomcat-8.5.51/webapps/thware/home/sam/thwareUpload/ureportfiles/
58
+8、执行cd /home/apache-tomcat-8.5.51/webapps/  → 执行rz → 选择目录 ↓
59
+    D:\Code\Code_Ware\BaoShengWave_web\target  → 上传thware的war包
60
+9、执行 cd /home/apache-tomcat-8.5.51/webapps/thware/home/sam/thwareUpload/ureportfiles/
61
+   执行rz  上传之前下载的所有XML文件
62
+10、执行  cd /home/apache-tomcat-8.5.51/webapps/thware/
63
+    执行 rz 上传import.xls文件
64
+11、执行 cd /home/apache-tomcat-8.5.51/webapps/ →  执行 rm -f dist.zip → 执行 rz ↓
65
+    选择目录C:\thware  上传dist.zip文件 → 执行 unzip dist.zip → 输入A

+ 1
- 1
src/main/java/com/th/demo/mapping/ware/DistributionMapper.java View File

@@ -11,7 +11,7 @@ public interface DistributionMapper {
11 11
 
12 12
     int insertSelective(Distribution record);
13 13
 
14
-    Distribution selectByPrimaryKey(Integer id);
14
+    Distribution selectByPrimaryKey(String id);
15 15
 
16 16
     int updateByPrimaryKeySelective(Distribution record);
17 17
 

+ 12
- 0
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java View File

@@ -100,6 +100,7 @@ public class OutServiceImpl implements OutService {
100 100
         });
101 101
         int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(stack.getId(), belongId));
102 102
         Store store;
103
+        Distribution distribution;
103 104
         String noUserParam = "a";
104 105
         if (stack.getIsLayer().equals("0")) {
105 106
             for (int i = 0; i < listOutRecord.size(); i++) {
@@ -115,6 +116,12 @@ public class OutServiceImpl implements OutService {
115 116
                 OutRecord outRecord = getOutRecord(store, "", "0", userId);
116 117
                 num += outRecordMapper.insert(outRecord);
117 118
                 num += storeMapper.insert(store);
119
+
120
+                distribution = distributionMapper.selectByPrimaryKey(listOutRecord.get(i).getDistributionId());
121
+                distribution.setSumWeight(distribution.getSumWeight()- store.getWeight());
122
+                distribution.setSumCount(distribution.getSumCount()- store.getCount());
123
+                num += distributionMapper.updateByPrimaryKey(distribution);
124
+
118 125
             }
119 126
             result = Tools.moreThanZeroResultJSON(num);
120 127
         } else {
@@ -131,6 +138,11 @@ public class OutServiceImpl implements OutService {
131 138
                 OutRecord outRecord = getOutRecord(store, "", "0", userId);
132 139
                 num += outRecordMapper.insert(outRecord);
133 140
                 num += storeMapper.insert(store);
141
+
142
+                distribution = distributionMapper.selectByPrimaryKey(listOutRecord.get(i).getDistributionId());
143
+                distribution.setSumWeight(distribution.getSumWeight()- store.getWeight());
144
+                distribution.setSumCount(distribution.getSumCount()- store.getCount());
145
+                num += distributionMapper.updateByPrimaryKey(distribution);
134 146
             }
135 147
             result = Tools.moreThanZeroResultJSON(num);
136 148
         }

+ 10
- 9
src/main/resource/localhost/db.properties View File

@@ -1,16 +1,17 @@
1
-#????????
1
+#BENDI
2 2
 #jdbc.driverClass=com.mysql.jdbc.Driver
3 3
 #jdbc.jdbcUrl=jdbc:mysql://172.18.200.32:3306/ware?useUnicode=true&characterEncoding=utf8
4 4
 #jdbc.user=root
5 5
 #jdbc.password=root
6
-#????????
7
-#jdbc.driverClass=com.mysql.jdbc.Driver
8
-#jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware?characterEncoding=utf8
9
-#jdbc.user=root
10
-#jdbc.password=root
11 6
 
12
-###60?????
7
+#CHUANSONGDAIMA
13 8
 jdbc.driverClass=com.mysql.jdbc.Driver
14
-jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware?useUnicode=true&characterEncoding=utf8
9
+jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ware?characterEncoding=utf8
15 10
 jdbc.user=root
16
-jdbc.password=122403
11
+jdbc.password=root
12
+
13
+#60?????
14
+#jdbc.driverClass=com.mysql.jdbc.Driver
15
+#jdbc.jdbcUrl=jdbc:mysql://60.205.9.174:3309/ware?useUnicode=true&characterEncoding=utf8
16
+#jdbc.user=root
17
+#jdbc.password=122403

+ 1
- 1
src/main/resource/mapper/ware/DistributionMapper.xml View File

@@ -37,7 +37,7 @@
37 37
     select 
38 38
     <include refid="Base_Column_List" />
39 39
     from t_ware_distribution
40
-    where id = #{id,jdbcType=INTEGER}
40
+    where id = #{id,jdbcType=VARCHAR}
41 41
   </select>
42 42
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
43 43
     delete from t_ware_distribution

Loading…
Cancel
Save