|  | @@ -22,10 +22,12 @@ import com.jeeplus.modules.contractclient.service.WorkContractClientService;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.isignature.service.ISignatureDocumentService;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.dao.RoleDao;
 | 
	
		
			
				|  |  | +import com.jeeplus.modules.sys.entity.MainDictDetail;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.entity.Office;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.entity.Role;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.entity.User;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.service.OfficeService;
 | 
	
		
			
				|  |  | +import com.jeeplus.modules.sys.utils.DictUtils;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.utils.RoleActivityEnname;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.sys.utils.UserUtils;
 | 
	
		
			
				|  |  |  import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
 | 
	
	
		
			
				|  | @@ -342,7 +344,9 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 | 
	
		
			
				|  |  |  		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
 | 
	
		
			
				|  |  |  			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +		String companyId = UserUtils.getUser().getComId();
 | 
	
		
			
				|  |  | +//		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +		workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 | 
	
		
			
				|  |  |  		int count = dao.queryCount(workContractInfo);
 | 
	
		
			
				|  |  |  		page.setCount(count);
 | 
	
		
			
				|  |  |  		page.setCountFlag(false);
 | 
	
	
		
			
				|  | @@ -378,7 +382,9 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 | 
	
		
			
				|  |  |  		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
 | 
	
		
			
				|  |  |  			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +        String companyId = UserUtils.getUser().getComId();
 | 
	
		
			
				|  |  | +//		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +        workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 | 
	
		
			
				|  |  |  		workContractInfo.setPage(page);
 | 
	
		
			
				|  |  |  		List<WorkContractInfo> list = Lists.newArrayList();
 | 
	
		
			
				|  |  |  		List<WorkContractInfo> workContractInfos = workContractInfoDao.afindList(workContractInfo);
 | 
	
	
		
			
				|  | @@ -390,7 +396,9 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 | 
	
		
			
				|  |  |  		if (StringUtils.isNotBlank(workContractInfo.getTotalContractIds())){
 | 
	
		
			
				|  |  |  			workContractInfo.setTotalContractIds(","+workContractInfo.getTotalContractIds()+",");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +//		workContractInfo.getSqlMap().put("dsf", dataScopeFilter(workContractInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
 | 
	
		
			
				|  |  | +        String companyId = UserUtils.getUser().getComId();
 | 
	
		
			
				|  |  | +        workContractInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
 | 
	
		
			
				|  |  |  		workContractInfo.setPage(page);
 | 
	
		
			
				|  |  |  		List<WorkContractInfo> list = Lists.newArrayList();
 | 
	
		
			
				|  |  |  		List<WorkContractInfo> workContractInfos = workContractInfoDao.ifindList(workContractInfo);
 | 
	
	
		
			
				|  | @@ -576,8 +584,16 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 | 
	
		
			
				|  |  |  	public String save(WorkContractInfo workContractInfo,Map<String, Object> variables, String contextPath,String urls) {
 | 
	
		
			
				|  |  |  		long begin = System.currentTimeMillis();
 | 
	
		
			
				|  |  |  		String processInstanceId = workContractInfo.getProcessInstanceId();
 | 
	
		
			
				|  |  | +		String contractTypeCode = workContractInfo.getContractTypeDoc();
 | 
	
		
			
				|  |  | +		String contractType = "";
 | 
	
		
			
				|  |  | +		List<MainDictDetail> list1 = DictUtils.getMainDictList("contract_info_type");
 | 
	
		
			
				|  |  | +		for(MainDictDetail mainDictDetail:list1){
 | 
	
		
			
				|  |  | +			if(mainDictDetail.getValue().equals(contractTypeCode)){
 | 
	
		
			
				|  |  | +				  contractType = mainDictDetail.getLabel();
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		if (StringUtils.isBlank(workContractInfo.getContractNum())) {
 | 
	
		
			
				|  |  | -			workContractInfo.setContractNum(serialNumTplService.genSerialNum(UserUtils.get(workContractInfo.getCreateBy().getId()).getCompany(), WorkContractInfo.SERIAL_BIZCODE));
 | 
	
		
			
				|  |  | +			workContractInfo.setContractNum(serialNumTplService.genSerialNum(UserUtils.get(workContractInfo.getCreateBy().getId()).getCompany(), WorkContractInfo.SERIAL_BIZCODE).replace("TYPE",contractType));
 | 
	
		
			
				|  |  |  			long end2 = System.currentTimeMillis();
 | 
	
		
			
				|  |  |  			logger.info("合同送审-项目编码设置任务结束,共耗时:[" + (end2-begin) / 1000 + "]秒");
 | 
	
		
			
				|  |  |  		}
 |