|  | @@ -45,6 +45,8 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 45 | 45 |      public MaterialMapper materialMapper;
 | 
		
	
		
			
			| 46 | 46 |      @Autowired
 | 
		
	
		
			
			| 47 | 47 |      public ProdPriceMapper prodPriceMapper;
 | 
		
	
		
			
			|  | 48 | +    @Autowired
 | 
		
	
		
			
			|  | 49 | +    public PriceMapper priceMapper;
 | 
		
	
		
			
			| 48 | 50 |      String result = Type.FAIL;
 | 
		
	
		
			
			| 49 | 51 |      int num = 0;
 | 
		
	
		
			
			| 50 | 52 |  
 | 
		
	
	
		
			
			|  | @@ -216,7 +218,7 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 216 | 218 |          } else {
 | 
		
	
		
			
			| 217 | 219 |              currentLayer = -1;
 | 
		
	
		
			
			| 218 | 220 |          }
 | 
		
	
		
			
			| 219 |  | -        ProdPrice prodPrice = new ProdPrice();
 | 
		
	
		
			
			|  | 221 | +        Price Price = new Price();
 | 
		
	
		
			
			| 220 | 222 |          for (int m = 0; m < listSameStack.size(); m++) {
 | 
		
	
		
			
			| 221 | 223 |  
 | 
		
	
		
			
			| 222 | 224 |              if (stack.getIsLayer().equals("1")) {
 | 
		
	
	
		
			
			|  | @@ -228,11 +230,12 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 228 | 230 |              listSameStack.get(m).setAddTime(new Date());
 | 
		
	
		
			
			| 229 | 231 |              listSameStack.get(m).setCancelFlag("0");
 | 
		
	
		
			
			| 230 | 232 |              listSameStack.get(m).setBelongId(belongId);
 | 
		
	
		
			
			| 231 |  | -            /*prodPrice = prodPriceMapper.selectByProdNm(listSameStack.get(m).getMaterial().getName());
 | 
		
	
		
			
			| 232 |  | -            if(prodPrice == null){
 | 
		
	
		
			
			| 233 |  | -                throw new Exception(listSameStack.get(m).getMaterial().getName()+"价格未维护");
 | 
		
	
		
			
			|  | 233 | +            Price = priceMapper.selectByMaterialChangeTime(listSameStack.get(m).getFkComponyId().toString(),belongId);
 | 
		
	
		
			
			|  | 234 | +            if(Price == null){
 | 
		
	
		
			
			|  | 235 | +                Customer fk_compony = customerMapper.selectByPrimaryKey(listSameStack.get(m).getFkComponyId());
 | 
		
	
		
			
			|  | 236 | +                throw new Exception(fk_compony.getName()+"公司的价格未维护");
 | 
		
	
		
			
			| 234 | 237 |              }
 | 
		
	
		
			
			| 235 |  | -            listSameStack.get(m).setInvoicePrice(prodPrice.getInvoicePrice());*/
 | 
		
	
		
			
			|  | 238 | +            listSameStack.get(m).setInvoicePrice(Price.getOrdPrice());
 | 
		
	
		
			
			| 236 | 239 |              InRecord inRecord = getInRecord(listSameStack.get(m), "1", userId);
 | 
		
	
		
			
			| 237 | 240 |              num += inRecordMapper.insert(inRecord);
 | 
		
	
		
			
			| 238 | 241 |  
 | 
		
	
	
		
			
			|  | @@ -250,10 +253,10 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 250 | 253 |          List<Store> listStore = new ArrayList<>();
 | 
		
	
		
			
			| 251 | 254 |          String wareName = listJO.get(0).get("仓库名称").toString();
 | 
		
	
		
			
			| 252 | 255 |          String stackName = listJO.get(0).get("垛位号").toString();
 | 
		
	
		
			
			| 253 |  | -        String materialName = listJO.get(0).get("物料类型").toString();
 | 
		
	
		
			
			| 254 |  | -        String standard = listJO.get(0).get("钢种").toString();
 | 
		
	
		
			
			|  | 256 | +        String materialName = listJO.get(0).get("货物品名").toString();
 | 
		
	
		
			
			|  | 257 | +        String standard = listJO.get(0).get("材质").toString();
 | 
		
	
		
			
			| 255 | 258 |          String customerName = listJO.get(0).get("客户名称").toString();
 | 
		
	
		
			
			| 256 |  | -        String fk_compony_name = listJO.get(0).get("货权单位").toString();
 | 
		
	
		
			
			|  | 259 | +        String fk_compony_name = listJO.get(0).get("客户名称").toString();
 | 
		
	
		
			
			| 257 | 260 |          Ware ware = wareMapper.selectByWareName(wareName, userId, belongId);
 | 
		
	
		
			
			| 258 | 261 |          if (ware == null) {
 | 
		
	
		
			
			| 259 | 262 |              err += "未找到名为\"" + wareName + "\"的库房;";
 | 
		
	
	
		
			
			|  | @@ -303,33 +306,33 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 303 | 306 |                  }
 | 
		
	
		
			
			| 304 | 307 |                  store.setStack(stack);
 | 
		
	
		
			
			| 305 | 308 |              }
 | 
		
	
		
			
			| 306 |  | -            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)) {
 | 
		
	
		
			
			| 307 | 310 |                  store.setMaterial(material);
 | 
		
	
		
			
			| 308 | 311 |              } else {
 | 
		
	
		
			
			| 309 |  | -                materialName = listJO.get(i).get("物料类型").toString();
 | 
		
	
		
			
			| 310 |  | -                standard = listJO.get(i).get("钢种").toString();
 | 
		
	
		
			
			|  | 312 | +                materialName = listJO.get(i).get("货物品名").toString();
 | 
		
	
		
			
			|  | 313 | +                standard = listJO.get(i).get("材质").toString();
 | 
		
	
		
			
			| 311 | 314 |                  material = materialMapper.selectByNameStandard(materialName, standard, belongId);
 | 
		
	
		
			
			| 312 | 315 |                  if (material == null) {
 | 
		
	
		
			
			| 313 |  | -                    err += "未找到名为\"" + materialName + "," + standard + "\"的物料类型;";
 | 
		
	
		
			
			|  | 316 | +                    err += "未找到名为\"" + materialName + "," + standard + "\"的货物品名;";
 | 
		
	
		
			
			| 314 | 317 |                      throw new Exception(err);
 | 
		
	
		
			
			| 315 | 318 |                  }
 | 
		
	
		
			
			| 316 | 319 |                  store.setMaterial(material);
 | 
		
	
		
			
			| 317 | 320 |              }
 | 
		
	
		
			
			| 318 |  | -            if (listJO.get(i).get("客户名称").toString().equals(customerName)) {
 | 
		
	
		
			
			|  | 321 | +            if (listJO.get(i).get("订单客户").toString().equals(customerName)) {
 | 
		
	
		
			
			| 319 | 322 |                  store.setCustomer(customer);
 | 
		
	
		
			
			| 320 | 323 |              } else {
 | 
		
	
		
			
			| 321 |  | -                customerName = listJO.get(i).get("客户名称").toString();
 | 
		
	
		
			
			|  | 324 | +                customerName = listJO.get(i).get("订单客户").toString();
 | 
		
	
		
			
			| 322 | 325 |                  customer = customerMapper.selectByName(customerName, belongId);
 | 
		
	
		
			
			| 323 | 326 |                  if (customer == null) {
 | 
		
	
		
			
			| 324 |  | -                    err += "未找到名为\"" + customerName + "\"的客户名称;";
 | 
		
	
		
			
			|  | 327 | +                    err += "未找到名为\"" + customerName + "\"的订单客户名称;";
 | 
		
	
		
			
			| 325 | 328 |                      throw new Exception(err);
 | 
		
	
		
			
			| 326 | 329 |                  }
 | 
		
	
		
			
			| 327 | 330 |                  store.setCustomer(customer);
 | 
		
	
		
			
			| 328 | 331 |              }
 | 
		
	
		
			
			| 329 |  | -            if (listJO.get(i).get("货权单位").toString().equals(fk_compony_name)) {
 | 
		
	
		
			
			|  | 332 | +            if (listJO.get(i).get("客户名称").toString().equals(fk_compony_name)) {
 | 
		
	
		
			
			| 330 | 333 |                  store.setFkComponyId(fk_compony.getId());
 | 
		
	
		
			
			| 331 | 334 |              } else {
 | 
		
	
		
			
			| 332 |  | -                fk_compony_name = listJO.get(i).get("货权单位").toString();
 | 
		
	
		
			
			|  | 335 | +                fk_compony_name = listJO.get(i).get("客户名称").toString();
 | 
		
	
		
			
			| 333 | 336 |                  fk_compony = customerMapper.selectByName(fk_compony_name, belongId);
 | 
		
	
		
			
			| 334 | 337 |                  if (customer == null) {
 | 
		
	
		
			
			| 335 | 338 |                      err += "未找到名为\"" + customerName + "\"的客户名称;";
 | 
		
	
	
		
			
			|  | @@ -338,14 +341,14 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 338 | 341 |                  store.setFkComponyId(fk_compony.getId());
 | 
		
	
		
			
			| 339 | 342 |              }
 | 
		
	
		
			
			| 340 | 343 |              store.setLayer(Integer.parseInt(listJO.get(i).get("层号").toString()));
 | 
		
	
		
			
			| 341 |  | -            store.setPlateNo(listJO.get(i).get("产品编号").toString());
 | 
		
	
		
			
			| 342 |  | -            store.setModel(listJO.get(i).get("产品规格").toString());
 | 
		
	
		
			
			|  | 344 | +            store.setPlateNo(listJO.get(i).get("顺序号").toString());
 | 
		
	
		
			
			|  | 345 | +            store.setModel(listJO.get(i).get("规格").toString());
 | 
		
	
		
			
			| 343 | 346 |              store.setCount(Double.parseDouble(listJO.get(i).get("数量").toString()));
 | 
		
	
		
			
			| 344 | 347 |              store.setWeight(Double.parseDouble(listJO.get(i).get("重量").toString()));
 | 
		
	
		
			
			| 345 |  | -            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("")) {
 | 
		
	
		
			
			| 346 | 349 |                  store.setReceiveAddress(customer.getAddress());
 | 
		
	
		
			
			| 347 | 350 |              } else {
 | 
		
	
		
			
			| 348 |  | -                store.setReceiveAddress(listJO.get(i).get("收货地址").toString());
 | 
		
	
		
			
			|  | 351 | +                store.setReceiveAddress(listJO.get(i).get("目的地").toString());
 | 
		
	
		
			
			| 349 | 352 |              }
 | 
		
	
		
			
			| 350 | 353 |              if(listJO.get(i).get("备注") != null){
 | 
		
	
		
			
			| 351 | 354 |                  store.setRemark(listJO.get(i).get("备注").toString());
 | 
		
	
	
		
			
			|  | @@ -356,12 +359,6 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 356 | 359 |              store.setCancelFlag("0");
 | 
		
	
		
			
			| 357 | 360 |              store.setOutFlag("0");
 | 
		
	
		
			
			| 358 | 361 |              store.setBelongId(belongId);
 | 
		
	
		
			
			| 359 |  | -            if(listJO.get(i).get("计量方式") != null){
 | 
		
	
		
			
			| 360 |  | -                store.setWgtDcnMtcCd(listJO.get(i).get("计量方式").toString());
 | 
		
	
		
			
			| 361 |  | -            }
 | 
		
	
		
			
			| 362 |  | -            if(listJO.get(i).get("切边类型") != null){
 | 
		
	
		
			
			| 363 |  | -                store.setEdgeTy(listJO.get(i).get("切边类型").toString());
 | 
		
	
		
			
			| 364 |  | -            }
 | 
		
	
		
			
			| 365 | 362 |              if(listJO.get(i).get("产地") != null){
 | 
		
	
		
			
			| 366 | 363 |                  store.setProductionPlace(listJO.get(i).get("产地").toString());
 | 
		
	
		
			
			| 367 | 364 |              }
 | 
		
	
	
		
			
			|  | @@ -369,11 +366,14 @@ public class InServiceImpl implements InService {
 | 
		
	
		
			
			| 369 | 366 |              if(listJO.get(i).get("订单号") != null){
 | 
		
	
		
			
			| 370 | 367 |                  store.setOrdNo(listJO.get(i).get("订单号").toString());
 | 
		
	
		
			
			| 371 | 368 |              }
 | 
		
	
		
			
			|  | 369 | +            if(listJO.get(i).get("合约号") != null){
 | 
		
	
		
			
			|  | 370 | +                store.setContractNo(listJO.get(i).get("合约号").toString());
 | 
		
	
		
			
			|  | 371 | +            }
 | 
		
	
		
			
			| 372 | 372 |              if(listJO.get(i).get("车号") != null){
 | 
		
	
		
			
			| 373 | 373 |                  store.setCarNo(listJO.get(i).get("车号").toString());
 | 
		
	
		
			
			| 374 | 374 |              }
 | 
		
	
		
			
			| 375 |  | -            if(listJO.get(i).get("入库理货人员") != null){
 | 
		
	
		
			
			| 376 |  | -                store.setTallyPeople(listJO.get(i).get("入库理货人员").toString());
 | 
		
	
		
			
			|  | 375 | +            if(listJO.get(i).get("吊装工") != null){
 | 
		
	
		
			
			|  | 376 | +                store.setTallyPeople(listJO.get(i).get("吊装工").toString());
 | 
		
	
		
			
			| 377 | 377 |              }
 | 
		
	
		
			
			| 378 | 378 |              listStore.add(store);
 | 
		
	
		
			
			| 379 | 379 |          }
 |