| 
					
				 | 
			
			
				@@ -70,7 +70,7 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Calendar calendar = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int currentYear = calendar.get(Calendar.YEAR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //获取当年到期的证书 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String cert = "select org_dept.name dept ,ex_date,bd_psndoc.name srcbilltype,bd_psndoc.mobile srcbillid " 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String cert = "select a.vdef1,org_dept.name dept ,ex_date,bd_psndoc.name srcbilltype,bd_psndoc.mobile srcbillid " 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		+ "from gy_certificates a " 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		+ "inner join bd_psndoc on a.vdef1=bd_psndoc.pk_psndoc  " 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         		+ "inner join org_dept on a.vdef3=org_dept.pk_dept "	 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -83,7 +83,7 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	   Map<String,List<String>> maplis=new HashMap<String,List<String>>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	   //根据部门查询领导 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	   for(Gy_certificatesVO vo:certListVO){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    	//	   String name=vo.getAttributeValue("vdef1").toString(); //姓名   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    		   String pk_psndoc=vo.getAttributeValue("vdef1").toString(); //姓名   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		   String name=vo.getSrcbilltype(); //姓名   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		   UFDate ex_date=vo.getEx_date(); //失效日期     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		   String mobile=vo.getSrcbillid();//手机号码 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -98,7 +98,7 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			   List<String> lis=new ArrayList<String>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    			   lis.add(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			   lis.add(pk_psndoc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			   maplis.put(dept, lis); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			    
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,12 +106,16 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			  List<String> getlis= maplis.get(dept); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    			  getlis.add(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			  //去重,过滤掉同一人有多个证书的,保证到期人员人数准确 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			  if(!getlis.contains(pk_psndoc)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    				  getlis.add(pk_psndoc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		   String exdate=convertToChineseDate(ex_date.toString().substring(0, 10)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      		   initdataInfo("14a445aa78c14f0bb528b61d39c3e666",mobile ,name ,  exdate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      		   initdataInfo("c8625852832a42e1abec3e698342896f",mobile ,name ,"",  exdate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       		    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	    
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -141,7 +145,7 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       			   mobile=mobilewh; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    			initdataInfo("14a445aa78c14f0bb528b61d39c3e666",mobile ,name ,  String.valueOf(entry.getValue().size())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    			initdataInfo("fabace683ef040de9020fb7b7b084754",mobile ,name , String.valueOf(currentYear), String.valueOf(entry.getValue().size())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     		  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -149,12 +153,12 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	   //发送公司负责人 :党委(纪检)办    袁辉	  /   人力资源部 	费名亮	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	  if(StringUtils.isNotEmpty(mobilewh)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    		  initdataInfo("14a445aa78c14f0bb528b61d39c3e666",mobilewh ,"袁辉" ,  String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        	  initdataInfo("14a445aa78c14f0bb528b61d39c3e666",mobilewh ,"费名亮" , String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    		  initdataInfo("fabace683ef040de9020fb7b7b084754",mobilewh ,"袁辉" ,String.valueOf(currentYear),  String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        	  initdataInfo("fabace683ef040de9020fb7b7b084754",mobilewh ,"费名亮" , String.valueOf(currentYear),String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   			}else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  	    	  initdataInfo("14a445aa78c14f0bb528b61d39c3e666","13485110802" ,"袁辉" ,  String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  	    	  initdataInfo("14a445aa78c14f0bb528b61d39c3e666","15951318363" ,"费名亮" , String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  	    	  initdataInfo("fabace683ef040de9020fb7b7b084754","13485110802" ,"袁辉" , String.valueOf(currentYear), String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  	    	  initdataInfo("fabace683ef040de9020fb7b7b084754","15951318363" ,"费名亮" ,String.valueOf(currentYear), String.valueOf(total)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -192,7 +196,7 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	 public void  initdataInfo(String templateid ,String mobile ,String name ,String param) throws BusinessException{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 public void  initdataInfo(String templateid ,String mobile ,String name ,String year,String param) throws BusinessException{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		   // 准备请求参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        SmsRequest request = new SmsRequest(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -200,17 +204,23 @@ public class CertificatesPlugin implements IBackgroundWorkPlugin{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        request.setApId("yecai");//用户名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        request.setSecretKey("Nt_cw968007");//密码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        request.setTemplateId(templateid);//模版ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	        request.setMobiles(mobile);//手机号码,主管手机号码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        request.setMobiles(mobile);//手机号码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        List<String> params = new ArrayList<String>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	        params.add(name+"的燃气从业资格证"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        params.add(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(!"".equals(year)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            	params.add(year);	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        params.add(param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        request.setParams(params);//["参数一","参数二"] 格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        //用于Mac,MD5加密 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        List<String> macparamslis = new ArrayList<String>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	        macparamslis.add("\"" + name + "的燃气从业资格证\""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        macparamslis.add("\"" + name + "\""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        if(!"".equals(year)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        	macparamslis.add("\"" + year + "\"");	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        macparamslis.add("\"" + param + "\""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	        // 自定义输出,去掉逗号后的空格 
			 |