anderx hace 4 años
padre
commit
8af7bd142b

+ 4 - 6
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -49,12 +49,10 @@ public class EmailBo {
 		this.sender = sender;
 		Integer days=0;
 		if (status==1) days=90;
-		else if (status==2) days=30;
-		else if (status==3) days=20;
-		else if (status==4) days=10;
-		else if (status==5) days=3;
-		else if (status==6) days=2;
-		else if (status==7) days=1;
+		else if (status==2) days=60;
+		else if (status==3) days=30;
+		else if (status==4) days=15;
+		else if (status==5) days=7;
 		this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, date,days);
 	}
 	

+ 9 - 7
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -422,25 +422,27 @@
 		select a.id,a.patent_no as patentNo,a.name,a.type,a.status,a.holders,a.inventor,
 		a.annual_fee_status annualFeeStatus,date_format(a.apply_date,'%Y-%m-%d') applyDates,
 		a.uid,a.salesman_remind salesmanRemind,a.email,a.province,a.years ,a.certificate_url as certificateUrl,
-		date_format(a.authorization_date ,'%Y-%m-%d ')authorizationDates,
+		date_format(a.authorization_date ,'%Y-%m-%d ')authorizationDates,a.aid ,
 		a.applicant,a.contact_mobile as contactMobile,date_format(a.end_date,'%Y-%m-%d') as endDates,
 		date_format(a.create_time,'%Y-%m-%d %H:%I:%S') as createTimeS,a.apply_date as applyDate,
 		date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname,tm.buyer_name userName,
 		a.patent_amount as patentAmount,a.delaying_amount delayingAmount ,a.recovery_amount
 		recoveryAmount, c.commodity_name projectName , c.id tid,tm.salesman_name salesmanName ,
 		c.receiver_name techName, tm.dep_name depName,ia.name inputName
-		from patent_new a left join admin b on a.aid=b.id
-		left join t_order_task c
-		on a.tid =c.id left join t_order_mid tm on
-		c.order_no =tm.order_no
-		left
-		join admin ia on a.input_id =ia.id
+		from patent_new a left join admin b on a.aid=b.id 
+		left join t_order_task c on a.tid =c.id left join t_order_mid tm on c.order_no =tm.order_no
+		left join admin ia on a.input_id =ia.id
 		<if test="shiro ==1">
 			left join admin e on e.department_id=c.id
 		</if>
 		where 1=1
 		<if test="shiro ==0">
+			<if test="isFollow ==0">
 			and a.aid = #{aid,jdbcType=VARCHAR}
+			</if>
+			<if test="isFollow ==1">
+			and a.input_id = #{aid,jdbcType=VARCHAR}
+			</if>
 		</if>
 		<if test="shiro ==1">
 			and e.id = #{aid,jdbcType=VARCHAR}

+ 0 - 3
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -783,9 +783,6 @@ public class ExcelUtils {
         //获取excel文件的io流
         InputStream is = file.getInputStream();
         //如果是xls,使用HSSFWorkbook;如果是xlsx,使用XSSFWorkbook
-        System.out.println(file.getOriginalFilename());
-        System.out.println(file.getOriginalFilename().matches("^.+\\.(?i)(xls)$"));
-        System.out.println(file.getOriginalFilename().matches("^.+\\.(?i)(xlsx)$"));
         if(file.getOriginalFilename().matches("^.+\\.(?i)(xls)$"))workbook = new HSSFWorkbook(is);
         if(file.getOriginalFilename().matches("^.+\\.(?i)(xlsx)$"))workbook = new XSSFWorkbook(is);
         } catch (IOException e) {

+ 2 - 1
src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java

@@ -12,6 +12,7 @@ import javax.annotation.Resource;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -361,7 +362,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
     			}
     			boolean flag = false;
     			for(Cell c:r){
-    				if(c.getCellType() != Cell.CELL_TYPE_BLANK){
+    				if(c.getCellTypeEnum() != CellType.BLANK){
     					flag = true;
     					break;
     				}

+ 7 - 0
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -65,6 +65,7 @@ public class PatentNewBo extends PatentNew{
 	private String departmentId;
 	private String createStart;
 	private String createEnd;
+	private Integer isFollow;
 	
 	
 	public BigDecimal getPatentAmount() {
@@ -236,4 +237,10 @@ public class PatentNewBo extends PatentNew{
 	public void setTechName(String techName) {
 		this.techName = techName;
 	}
+	public Integer getIsFollow() {
+		return isFollow;
+	}
+	public void setIsFollow(Integer isFollow) {
+		this.isFollow = isFollow;
+	}
 }

+ 19 - 2
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -103,8 +103,18 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		if (pageNo == null || pageNo < 0) pageNo = 1;
 		if (pageSize == null || pageSize < 0)	pageSize = 10;
 		pushParams(p, params);
-		return (Pagination<PatentNewBo>) findPage("selectPatentNewList", "selectPatentNewCount", params, pageNo,
+		Pagination<PatentNewBo> pa=(Pagination<PatentNewBo>) findPage("selectPatentNewList", "selectPatentNewCount", params, pageNo,
 				pageSize);
+		List<PatentNewBo> list=(List<PatentNewBo>) pa.getList();
+		 String aid=TokenManager.getAdminId();
+		for (PatentNewBo pn : list) {
+			if (aid.equals(pn.getAid())) {
+				pn.setIsFollow(1);
+			}else {
+				pn.setIsFollow(0);
+			}
+		}
+		return pa;
 	}
 
 	private void pushParams(PatentNewBo p, Map<String, Object> params) {
@@ -122,6 +132,11 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		if(p.getAnnualFeeStatus()!=null)params.put("annualFeeStatus", p.getAnnualFeeStatus());
 		if(p.getUserName()!=null)params.put("userName", p.getUserName());
 		if(p.getSalesmanRemind()!=null)params.put("salesmanRemind", p.getSalesmanRemind());
+		if(p.getIsFollow()!=null) {
+			params.put("isFollow", p.getIsFollow());
+		}else {
+			params.put("isFollow", 0);
+		}
 		params.put("aid", TokenManager.getAdminId());
 		if (TokenManager.hasRole(AFTConstants.SUPERADMIN) || TokenManager.hasRole(AFTConstants.PATENT_AUDITOR)) {
 			params.put("shiro", 2);
@@ -168,7 +183,6 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
     		if(sheet == null){
     			return;
     		}
-    		
     		//获得当前sheet的开始行
     		int firstRowNum = sheet.getFirstRowNum();
     		//获得当前sheet的结束行
@@ -400,6 +414,9 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 			List<EmailBo>list =new ArrayList<EmailBo>();
 			List<PatentNew> lp=patentNewMapper.selectByids(ls);
 			for (PatentNew patentNew : lp) {
+				if (patentNew.getStatus()==0) {
+					throw new  BusinessException("专利号["+patentNew.getPatentNo()+"]未达到距离截止时间90天,不允许发送邮件");
+				}
 				Admin a = adminMapper.selectByPrimaryKey(patentNew.getAid());
 				String userName=patentNewMapper.selectUserNameByTid(patentNew.getTid());
 				BigDecimal amout= patentNew.getPatentAmount().multiply(new BigDecimal(1000));

+ 4 - 4
src/main/resources/props/config_local.properties

@@ -65,12 +65,12 @@ user_remind_days=15
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-static.host=//172.16.0.253/1.1.83
-avatar.host=//172.16.0.253
+#static.host=//172.16.0.253/1.1.83
+#avatar.host=//172.16.0.253
 
 
-#avatar.host=//static.jishutao.com
-#static.host=//static.jishutao.com/1.1.83
+avatar.host=//static.jishutao.com
+static.host=//static.jishutao.com/1.1.83
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7