|  |  |  | @ -902,22 +902,31 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvPreInProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表不存在就新增存在就更新
 | 
			
		
	
		
			
				
					|  |  |  |  |                         QueryWrapper<InvPlaceOrderDetailEntity> ew1 = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("recordId", recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("code", productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = invPlaceOrderDetailDao.selectOne(ew1); | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPlaceOrderDetailEntity != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(invPlaceOrderDetailEntity.getCount() + 1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.updateById(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         }else{ | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -945,22 +954,31 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvPreProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表不存在就新增存在就更新
 | 
			
		
	
		
			
				
					|  |  |  |  |                         QueryWrapper<InvPlaceOrderDetailEntity> ew1 = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("recordId", recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("code", productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = invPlaceOrderDetailDao.selectOne(ew1); | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPlaceOrderDetailEntity != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(invPlaceOrderDetailEntity.getCount() + 1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.updateById(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         }else{ | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -987,22 +1005,31 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表不存在就新增存在就更新
 | 
			
		
	
		
			
				
					|  |  |  |  |                         QueryWrapper<InvPlaceOrderDetailEntity> ew1 = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("recordId", recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                         ew1.eq("code", productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = invPlaceOrderDetailDao.selectOne(ew1); | 
			
		
	
		
			
				
					|  |  |  |  |                         if (invPlaceOrderDetailEntity != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(invPlaceOrderDetailEntity.getCount() + 1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.updateById(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         }else{ | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity = new InvPlaceOrderDetailEntity(); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setId(IdUtil.getSnowflakeNextId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRecordId(recordId); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setBatchNo(productDetailEntity.getBatchNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setRelId(productDetailEntity.getRelId() + ""); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setNameCode(productDetailEntity.getNameCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setExpireDate(productDetailEntity.getExpireDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setProduceDate(productDetailEntity.getProduceDate()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |