|  | @@ -1,9 +1,14 @@
 | 
	
		
			
				|  |  |  package com.ruoyi.reportManagement.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 | 
	
		
			
				|  |  | +import com.ruoyi.basicData.domain.TCustomerContact;
 | 
	
		
			
				|  |  | +import com.ruoyi.basicData.mapper.TCorpsMapper;
 | 
	
		
			
				|  |  | +import com.ruoyi.basicData.mapper.TCustomerContactMapper;
 | 
	
		
			
				|  |  |  import com.ruoyi.basicData.mapper.TWarehouseMapper;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.core.domain.entity.TWarehouse;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.utils.DateUtils;
 | 
	
		
			
				|  |  | +import com.ruoyi.common.utils.SecurityUtils;
 | 
	
		
			
				|  |  |  import com.ruoyi.common.utils.StringUtils;
 | 
	
		
			
				|  |  |  import com.ruoyi.reportManagement.domain.SingleAnalysisExcel;
 | 
	
		
			
				|  |  |  import com.ruoyi.reportManagement.domain.SingleAnalysisFeesExcel;
 | 
	
	
		
			
				|  | @@ -38,6 +43,8 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private TWarehouseMapper  tWarehouseMapper;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TCustomerContactMapper customerContactMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 查询库存总账
 | 
	
	
		
			
				|  | @@ -417,6 +424,28 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 | 
	
		
			
				|  |  |          return tWhgenlegMapper.getWarehouse(tWhgenleg);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public List<Map<String, Object>> appWhGenLegList(TWhgenleg tWhgenleg) {
 | 
	
		
			
				|  |  | +        List<Map<String,Object>> list = new ArrayList<>();
 | 
	
		
			
				|  |  | +        TCustomerContact customerContact = new TCustomerContact();
 | 
	
		
			
				|  |  | +        customerContact.setfTel(SecurityUtils.getLoginUser().getUser().getPhonenumber());
 | 
	
		
			
				|  |  | +        List<TCustomerContact> tCustomerContacts = customerContactMapper.selectTCustomerContactList(customerContact);
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isNotEmpty(tCustomerContacts)){
 | 
	
		
			
				|  |  | +            tWhgenleg.setfCorpid(tCustomerContacts.get(0).getfPid());
 | 
	
		
			
				|  |  | +            if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
 | 
	
		
			
				|  |  | +                // 获取仓库信息
 | 
	
		
			
				|  |  | +                TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
 | 
	
		
			
				|  |  | +                if(tWarehouse.getfLocation()==1){
 | 
	
		
			
				|  |  | +                    tWhgenleg.setfLocation(1L);
 | 
	
		
			
				|  |  | +                }else {
 | 
	
		
			
				|  |  | +                    tWhgenleg.setfLocation(0L);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            list = tWhgenlegMapper.selectInventoryMapList(tWhgenleg);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return list;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       *
 | 
	
		
			
				|  |  |       * @param fOriginalbilldate 根据该字段进行合并
 |