|  |  |  | @ -902,8 +902,16 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvPreInProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new 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()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -914,10 +922,11 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -945,8 +954,16 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvPreProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new 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()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -957,10 +974,11 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | @ -987,8 +1005,16 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                 invPlaceOrderDao.insert(orderEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (InvProductDetailEntity productDetailEntity : invProductDetailEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     for (int i=0;i<productDetailEntity.getCount();i++){ | 
			
		
	
		
			
				
					|  |  |  |  |                         //插入附表
 | 
			
		
	
		
			
				
					|  |  |  |  |                         InvPlaceOrderDetailEntity invPlaceOrderDetailEntity = new 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()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -999,10 +1025,11 @@ public class InvPlaceServiceImpl implements InvPlaceService { | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSupId(productDetailEntity.getSupId()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvCode(bindInvSpaceRequest.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setInvSpaceCode(bindInvSpaceRequest.getInvSpaceCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                         invPlaceOrderDetailEntity.setCode(bindInvSpaceRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCode(productDetailEntity.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setSerialNo(productDetailEntity.getSerialNo()); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailEntity.setCount(1); | 
			
		
	
		
			
				
					|  |  |  |  |                             invPlaceOrderDetailDao.insert(invPlaceOrderDetailEntity); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                         total++; | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |