|  | @@ -1,6 +1,10 @@
 | 
	
		
			
				|  |  |  package com.aidex.system.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.aidex.common.plush.domain.SysShipExtend;
 | 
	
		
			
				|  |  | +import com.aidex.common.plush.service.SysShipExtendService;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  import org.slf4j.Logger;
 | 
	
		
			
				|  |  |  import org.slf4j.LoggerFactory;
 | 
	
	
		
			
				|  | @@ -24,6 +28,9 @@ public class SysShipServiceImpl extends BaseServiceImpl<SysShipMapper, SysShip>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private static final Logger log = LoggerFactory.getLogger(SysShipServiceImpl.class);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private SysShipExtendService sysShipExtendService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 获取单条数据
 | 
	
		
			
				|  |  |       * @param sysShip 船只管理
 | 
	
	
		
			
				|  | @@ -75,7 +82,21 @@ public class SysShipServiceImpl extends BaseServiceImpl<SysShipMapper, SysShip>
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public boolean save(SysShip sysShip) {
 | 
	
		
			
				|  |  | -        return super.save(sysShip);
 | 
	
		
			
				|  |  | +        if(super.save(sysShip)) {
 | 
	
		
			
				|  |  | +            SysShipExtend shipExtend = new SysShipExtend();
 | 
	
		
			
				|  |  | +            shipExtend.setShipId(sysShip.getId());
 | 
	
		
			
				|  |  | +            shipExtend.setId(sysShip.getId());
 | 
	
		
			
				|  |  | +            shipExtend.setMacId(sysShip.getShipNum());
 | 
	
		
			
				|  |  | +            if (sysShip.getIsNewRecord()) {
 | 
	
		
			
				|  |  | +                sysShipExtendService.save(shipExtend);
 | 
	
		
			
				|  |  | +            }else {
 | 
	
		
			
				|  |  | +                if(sysShipExtendService.findById(sysShip.getId()) == null){
 | 
	
		
			
				|  |  | +                    sysShipExtendService.save(shipExtend);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return Boolean.TRUE;
 | 
	
		
			
				|  |  | +        }else
 | 
	
		
			
				|  |  | +            return Boolean.FALSE;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 |