|
@@ -230,12 +230,12 @@ public class InServiceImpl implements InService {
|
230
|
230
|
listSameStack.get(m).setAddTime(new Date());
|
231
|
231
|
listSameStack.get(m).setCancelFlag("0");
|
232
|
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
|
234
|
if(Price == null){
|
235
|
235
|
Customer fk_compony = customerMapper.selectByPrimaryKey(listSameStack.get(m).getFkComponyId());
|
236
|
236
|
throw new Exception(fk_compony.getName()+"公司的价格未维护");
|
237
|
237
|
}
|
238
|
|
- listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());
|
|
238
|
+ listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());*/
|
239
|
239
|
InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
|
240
|
240
|
num += inRecordMapper.insert(inRecord);
|
241
|
241
|
|
|
@@ -251,12 +251,12 @@ public class InServiceImpl implements InService {
|
251
|
251
|
private List<Store> objToStore(List<JSONObject> listJO, String userId, String belongId) throws Exception {
|
252
|
252
|
String err = Type.SUCCESS;
|
253
|
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
|
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
|
260
|
Ware ware = wareMapper.selectByWareName(wareName, userId, belongId);
|
261
|
261
|
if (ware == null) {
|
262
|
262
|
err += "未找到名为\"" + wareName + "\"的库房;";
|
|
@@ -279,15 +279,15 @@ public class InServiceImpl implements InService {
|
279
|
279
|
}
|
280
|
280
|
Customer fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
|
281
|
281
|
if (fk_compony == null) {
|
282
|
|
- err += "未找到名为\"" + customerName + "\"的货权单位;";
|
|
282
|
+ err += "未找到名为\"" + customerName + "\"的货主单位;";
|
283
|
283
|
throw new Exception(err);
|
284
|
284
|
}
|
285
|
285
|
for (int i = 0; i < listJO.size(); i++) {
|
286
|
286
|
Store store = new Store();
|
287
|
|
- if (listJO.get(i).get("仓库名称").toString().equals(wareName)) {
|
|
287
|
+ if (listJO.get(i).get("仓库").toString().equals(wareName)) {
|
288
|
288
|
store.setWare(ware);
|
289
|
289
|
} else {
|
290
|
|
- wareName = listJO.get(i).get("仓库名称").toString();
|
|
290
|
+ wareName = listJO.get(i).get("仓库").toString();
|
291
|
291
|
ware = wareMapper.selectByWareName(wareName, userId, belongId);
|
292
|
292
|
if (ware == null) {
|
293
|
293
|
err += "未找到名为\"" + wareName + "\"的仓库名称;";
|
|
@@ -295,21 +295,21 @@ public class InServiceImpl implements InService {
|
295
|
295
|
}
|
296
|
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
|
299
|
store.setStack(stack);
|
300
|
300
|
} else {
|
301
|
|
- stackName = listJO.get(i).get("垛位号").toString();
|
|
301
|
+ stackName = listJO.get(i).get("垛位").toString();
|
302
|
302
|
stack = stackMapper.selectByWareNameStackName(wareName, stackName, userId, belongId);
|
303
|
303
|
if (stack == null) {
|
304
|
|
- err += "未找到名为\"" + stackName + "\"的垛位号;";
|
|
304
|
+ err += "未找到名为\"" + stackName + "\"的垛位;";
|
305
|
305
|
throw new Exception(err);
|
306
|
306
|
}
|
307
|
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
|
310
|
store.setMaterial(material);
|
311
|
311
|
} else {
|
312
|
|
- materialName = listJO.get(i).get("货物品名").toString();
|
|
312
|
+ materialName = listJO.get(i).get("品名").toString();
|
313
|
313
|
standard = listJO.get(i).get("材质").toString();
|
314
|
314
|
material = materialMapper.selectByNameStandard(materialName, standard, belongId);
|
315
|
315
|
if (material == null) {
|
|
@@ -318,10 +318,10 @@ public class InServiceImpl implements InService {
|
318
|
318
|
}
|
319
|
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
|
322
|
store.setCustomer(customer);
|
323
|
323
|
} else {
|
324
|
|
- customerName = listJO.get(i).get("订单客户").toString();
|
|
324
|
+ customerName = listJO.get(i).get("货主").toString();
|
325
|
325
|
customer = customerMapper.selectByName(customerName, belongId);
|
326
|
326
|
if (customer == null) {
|
327
|
327
|
err += "未找到名为\"" + customerName + "\"的订单客户名称;";
|
|
@@ -329,10 +329,10 @@ public class InServiceImpl implements InService {
|
329
|
329
|
}
|
330
|
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
|
333
|
store.setFkComponyId(fk_compony.getId());
|
334
|
334
|
} else {
|
335
|
|
- fk_compony_name = listJO.get(i).get("客户名称").toString();
|
|
335
|
+ fk_compony_name = listJO.get(i).get("货主").toString();
|
336
|
336
|
fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
|
337
|
337
|
if (customer == null) {
|
338
|
338
|
err += "未找到名为\"" + customerName + "\"的客户名称;";
|
|
@@ -340,19 +340,22 @@ public class InServiceImpl implements InService {
|
340
|
340
|
}
|
341
|
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
|
345
|
store.setModel(listJO.get(i).get("规格").toString());
|
346
|
346
|
store.setCount(Double.parseDouble(listJO.get(i).get("数量").toString()));
|
347
|
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
|
349
|
store.setReceiveAddress(customer.getAddress());
|
350
|
350
|
} else {
|
351
|
351
|
store.setReceiveAddress(listJO.get(i).get("目的地").toString());
|
352
|
|
- }
|
|
352
|
+ }*/
|
353
|
353
|
if(listJO.get(i).get("备注") != null){
|
354
|
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
|
360
|
store.setAddId(userId);
|
358
|
361
|
store.setAddTime(new Date());
|
|
@@ -369,12 +372,12 @@ public class InServiceImpl implements InService {
|
369
|
372
|
if(listJO.get(i).get("合约号") != null){
|
370
|
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
|
379
|
store.setTallyPeople(listJO.get(i).get("吊装工").toString());
|
377
|
|
- }
|
|
380
|
+ }*/
|
378
|
381
|
listStore.add(store);
|
379
|
382
|
}
|
380
|
383
|
if (err.equals(Type.SUCCESS)) {
|