YL2767 3 місяці тому
джерело
коміт
0b019fae32

+ 1
- 1
pom.xml Переглянути файл

549
     </profiles>
549
     </profiles>
550
 
550
 
551
     <build>
551
     <build>
552
-        <finalName>thware</finalName>
552
+        <finalName>thware_mj</finalName>
553
         <resources>
553
         <resources>
554
             <resource>
554
             <resource>
555
                 <directory>src/main/resource</directory>
555
                 <directory>src/main/resource</directory>

+ 30
- 27
src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java Переглянути файл

230
             listSameStack.get(m).setAddTime(new Date());
230
             listSameStack.get(m).setAddTime(new Date());
231
             listSameStack.get(m).setCancelFlag("0");
231
             listSameStack.get(m).setCancelFlag("0");
232
             listSameStack.get(m).setBelongId(belongId);
232
             listSameStack.get(m).setBelongId(belongId);
233
-            Price = priceMapper.selectByMaterialChangeTime(listSameStack.get(m).getFkComponyId().toString(),belongId);
233
+            /*Price = priceMapper.selectByMaterialChangeTime(listSameStack.get(m).getFkComponyId().toString(),belongId);
234
             if(Price == null){
234
             if(Price == null){
235
                 Customer fk_compony = customerMapper.selectByPrimaryKey(listSameStack.get(m).getFkComponyId());
235
                 Customer fk_compony = customerMapper.selectByPrimaryKey(listSameStack.get(m).getFkComponyId());
236
                 throw new Exception(fk_compony.getName()+"公司的价格未维护");
236
                 throw new Exception(fk_compony.getName()+"公司的价格未维护");
237
             }
237
             }
238
-            listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());
238
+            listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());*/
239
             InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
239
             InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
240
             num += inRecordMapper.insert(inRecord);
240
             num += inRecordMapper.insert(inRecord);
241
 
241
 
251
     private List<Store> objToStore(List<JSONObject> listJO, String userId, String belongId) throws Exception {
251
     private List<Store> objToStore(List<JSONObject> listJO, String userId, String belongId) throws Exception {
252
         String err = Type.SUCCESS;
252
         String err = Type.SUCCESS;
253
         List<Store> listStore = new ArrayList<>();
253
         List<Store> listStore = new ArrayList<>();
254
-        String wareName = listJO.get(0).get("仓库名称").toString();
255
-        String stackName = listJO.get(0).get("垛位").toString();
256
-        String materialName = listJO.get(0).get("货物品名").toString();
254
+        String wareName = listJO.get(0).get("仓库").toString();
255
+        String stackName = listJO.get(0).get("垛位").toString();
256
+        String materialName = listJO.get(0).get("品名").toString();
257
         String standard = listJO.get(0).get("材质").toString();
257
         String standard = listJO.get(0).get("材质").toString();
258
-        String customerName = listJO.get(0).get("客户名称").toString();
259
-        String fk_compony_name = listJO.get(0).get("客户名称").toString();
258
+        String customerName = listJO.get(0).get("货主").toString();
259
+        String fk_compony_name = listJO.get(0).get("货主").toString();
260
         Ware ware = wareMapper.selectByWareName(wareName, userId, belongId);
260
         Ware ware = wareMapper.selectByWareName(wareName, userId, belongId);
261
         if (ware == null) {
261
         if (ware == null) {
262
             err += "未找到名为\"" + wareName + "\"的库房;";
262
             err += "未找到名为\"" + wareName + "\"的库房;";
279
         }
279
         }
280
         Customer fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
280
         Customer fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
281
         if (fk_compony == null) {
281
         if (fk_compony == null) {
282
-            err += "未找到名为\"" + customerName + "\"的货单位;";
282
+            err += "未找到名为\"" + customerName + "\"的货单位;";
283
             throw new Exception(err);
283
             throw new Exception(err);
284
         }
284
         }
285
         for (int i = 0; i < listJO.size(); i++) {
285
         for (int i = 0; i < listJO.size(); i++) {
286
             Store store = new Store();
286
             Store store = new Store();
287
-            if (listJO.get(i).get("仓库名称").toString().equals(wareName)) {
287
+            if (listJO.get(i).get("仓库").toString().equals(wareName)) {
288
                 store.setWare(ware);
288
                 store.setWare(ware);
289
             } else {
289
             } else {
290
-                wareName = listJO.get(i).get("仓库名称").toString();
290
+                wareName = listJO.get(i).get("仓库").toString();
291
                 ware = wareMapper.selectByWareName(wareName, userId, belongId);
291
                 ware = wareMapper.selectByWareName(wareName, userId, belongId);
292
                 if (ware == null) {
292
                 if (ware == null) {
293
                     err += "未找到名为\"" + wareName + "\"的仓库名称;";
293
                     err += "未找到名为\"" + wareName + "\"的仓库名称;";
295
                 }
295
                 }
296
                 store.setWare(ware);
296
                 store.setWare(ware);
297
             }
297
             }
298
-            if (listJO.get(i).get("垛位").toString().equals(stackName)) {
298
+            if (listJO.get(i).get("垛位").toString().equals(stackName)) {
299
                 store.setStack(stack);
299
                 store.setStack(stack);
300
             } else {
300
             } else {
301
-                stackName = listJO.get(i).get("垛位").toString();
301
+                stackName = listJO.get(i).get("垛位").toString();
302
                 stack = stackMapper.selectByWareNameStackName(wareName, stackName, userId, belongId);
302
                 stack = stackMapper.selectByWareNameStackName(wareName, stackName, userId, belongId);
303
                 if (stack == null) {
303
                 if (stack == null) {
304
-                    err += "未找到名为\"" + stackName + "\"的垛位;";
304
+                    err += "未找到名为\"" + stackName + "\"的垛位;";
305
                     throw new Exception(err);
305
                     throw new Exception(err);
306
                 }
306
                 }
307
                 store.setStack(stack);
307
                 store.setStack(stack);
308
             }
308
             }
309
-            if (listJO.get(i).get("货物品名").toString().equals(materialName) && listJO.get(i).get("材质").toString().equals(standard)) {
309
+            if (listJO.get(i).get("品名").toString().equals(materialName) && listJO.get(i).get("材质").toString().equals(standard)) {
310
                 store.setMaterial(material);
310
                 store.setMaterial(material);
311
             } else {
311
             } else {
312
-                materialName = listJO.get(i).get("货物品名").toString();
312
+                materialName = listJO.get(i).get("品名").toString();
313
                 standard = listJO.get(i).get("材质").toString();
313
                 standard = listJO.get(i).get("材质").toString();
314
                 material = materialMapper.selectByNameStandard(materialName, standard, belongId);
314
                 material = materialMapper.selectByNameStandard(materialName, standard, belongId);
315
                 if (material == null) {
315
                 if (material == null) {
318
                 }
318
                 }
319
                 store.setMaterial(material);
319
                 store.setMaterial(material);
320
             }
320
             }
321
-            if (listJO.get(i).get("订单客户").toString().equals(customerName)) {
321
+            if (listJO.get(i).get("货主").toString().equals(customerName)) {
322
                 store.setCustomer(customer);
322
                 store.setCustomer(customer);
323
             } else {
323
             } else {
324
-                customerName = listJO.get(i).get("订单客户").toString();
324
+                customerName = listJO.get(i).get("货主").toString();
325
                 customer = customerMapper.selectByName(customerName, belongId);
325
                 customer = customerMapper.selectByName(customerName, belongId);
326
                 if (customer == null) {
326
                 if (customer == null) {
327
                     err += "未找到名为\"" + customerName + "\"的订单客户名称;";
327
                     err += "未找到名为\"" + customerName + "\"的订单客户名称;";
329
                 }
329
                 }
330
                 store.setCustomer(customer);
330
                 store.setCustomer(customer);
331
             }
331
             }
332
-            if (listJO.get(i).get("客户名称").toString().equals(fk_compony_name)) {
332
+            if (listJO.get(i).get("货主").toString().equals(fk_compony_name)) {
333
                 store.setFkComponyId(fk_compony.getId());
333
                 store.setFkComponyId(fk_compony.getId());
334
             } else {
334
             } else {
335
-                fk_compony_name = listJO.get(i).get("客户名称").toString();
335
+                fk_compony_name = listJO.get(i).get("货主").toString();
336
                 fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
336
                 fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
337
                 if (customer == null) {
337
                 if (customer == null) {
338
                     err += "未找到名为\"" + customerName + "\"的客户名称;";
338
                     err += "未找到名为\"" + customerName + "\"的客户名称;";
340
                 }
340
                 }
341
                 store.setFkComponyId(fk_compony.getId());
341
                 store.setFkComponyId(fk_compony.getId());
342
             }
342
             }
343
-            store.setLayer(Integer.parseInt(listJO.get(i).get("层号").toString()));
344
-            store.setPlateNo(listJO.get(i).get("顺序号").toString());
343
+            //store.setLayer(Integer.parseInt(listJO.get(i).get("层号").toString()));
344
+            store.setPlateNo(listJO.get(i).get("产品编号").toString());
345
             store.setModel(listJO.get(i).get("规格").toString());
345
             store.setModel(listJO.get(i).get("规格").toString());
346
             store.setCount(Double.parseDouble(listJO.get(i).get("数量").toString()));
346
             store.setCount(Double.parseDouble(listJO.get(i).get("数量").toString()));
347
             store.setWeight(Double.parseDouble(listJO.get(i).get("重量").toString()));
347
             store.setWeight(Double.parseDouble(listJO.get(i).get("重量").toString()));
348
-            if (listJO.get(i).get("目的地") == null || listJO.get(i).get("目的地").toString().equals("")) {
348
+            /*if (listJO.get(i).get("目的地") == null || listJO.get(i).get("目的地").toString().equals("")) {
349
                 store.setReceiveAddress(customer.getAddress());
349
                 store.setReceiveAddress(customer.getAddress());
350
             } else {
350
             } else {
351
                 store.setReceiveAddress(listJO.get(i).get("目的地").toString());
351
                 store.setReceiveAddress(listJO.get(i).get("目的地").toString());
352
-            }
352
+            }*/
353
             if(listJO.get(i).get("备注") != null){
353
             if(listJO.get(i).get("备注") != null){
354
                 store.setRemark(listJO.get(i).get("备注").toString());
354
                 store.setRemark(listJO.get(i).get("备注").toString());
355
             }
355
             }
356
+            if(listJO.get(i).get("计重方式") != null){
357
+                store.setWgtDcnMtcCd(listJO.get(i).get("计重方式").toString());
358
+            }
356
 
359
 
357
             store.setAddId(userId);
360
             store.setAddId(userId);
358
             store.setAddTime(new Date());
361
             store.setAddTime(new Date());
369
             if(listJO.get(i).get("合约号") != null){
372
             if(listJO.get(i).get("合约号") != null){
370
                 store.setContractNo(listJO.get(i).get("合约号").toString());
373
                 store.setContractNo(listJO.get(i).get("合约号").toString());
371
             }
374
             }
372
-            if(listJO.get(i).get("车号") != null){
373
-                store.setCarNo(listJO.get(i).get("车号").toString());
375
+            if(listJO.get(i).get("入库车号") != null){
376
+                store.setCarNo(listJO.get(i).get("入库车号").toString());
374
             }
377
             }
375
-            if(listJO.get(i).get("吊装工") != null){
378
+            /*if(listJO.get(i).get("吊装工") != null){
376
                 store.setTallyPeople(listJO.get(i).get("吊装工").toString());
379
                 store.setTallyPeople(listJO.get(i).get("吊装工").toString());
377
-            }
380
+            }*/
378
             listStore.add(store);
381
             listStore.add(store);
379
         }
382
         }
380
         if (err.equals(Type.SUCCESS)) {
383
         if (err.equals(Type.SUCCESS)) {

+ 2
- 2
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java Переглянути файл

301
         outRecord.setEdgeTy(store.getEdgeTy());
301
         outRecord.setEdgeTy(store.getEdgeTy());
302
         outRecord.setProductionPlace(store.getProductionPlace());
302
         outRecord.setProductionPlace(store.getProductionPlace());
303
         InRecord inRecord = inRecordMapper.selectByPrimaryKey(store.getInId());
303
         InRecord inRecord = inRecordMapper.selectByPrimaryKey(store.getInId());
304
-        double asd = (outRecord.getAddTime().getDate() - inRecord.getAddTime().getTime())/ (24 * 60 * 60 * 1000);
304
+        /*double asd = (outRecord.getAddTime().getDate() - inRecord.getAddTime().getTime())/ (24 * 60 * 60 * 1000);
305
         Price price = priceMapper.selectByMaterialChangeTime(store.getFkComponyId(),store.getBelongId());
305
         Price price = priceMapper.selectByMaterialChangeTime(store.getFkComponyId(),store.getBelongId());
306
         if (asd > price.getKeepDay()){
306
         if (asd > price.getKeepDay()){
307
             outRecord.setInvoicePrice(price.getOutOrdPrice());
307
             outRecord.setInvoicePrice(price.getOutOrdPrice());
309
         }else {
309
         }else {
310
             outRecord.setInvoicePrice(price.getOrdPrice());
310
             outRecord.setInvoicePrice(price.getOrdPrice());
311
             outRecord.setUnitPrice(price.getOrdPrice());
311
             outRecord.setUnitPrice(price.getOrdPrice());
312
-        }
312
+        }*/
313
 
313
 
314
 
314
 
315
 
315
 

+ 8
- 3
src/main/resource/localhost/db.properties Переглянути файл

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

Завантаження…
Відмінити
Зберегти