Explorar o código

企业项目申报书显示BUG修复

anderx %!s(int64=7) %!d(string=hai) anos
pai
achega
4fd5c4762c

+ 5 - 6
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -1962,9 +1962,9 @@ inner join(
 	on x.rid=y.id)b on a.id =b.uid left join department_management c  on a.department_id=c.id
 	on x.rid=y.id)b on a.id =b.uid left join department_management c  on a.department_id=c.id
 	left join (select x.aid,count(1)as count from (select aid,uid from user_lock_release 
 	left join (select x.aid,count(1)as count from (select aid,uid from user_lock_release 
 		where type=1 and status=0 group by aid,uid)x group by aid)d on a.id=d.aid
 		where type=1 and status=0 group by aid,uid)x group by aid)d on a.id=d.aid
-	left join (select aid,count(1) as count from user where integrity=1 group by aid) e on a.id=e.aid
+	left join (select aid,count(1) as count from user where integrity=1 and type=1 and status=0 and share_type=0 group by aid) e on a.id=e.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 
-		from user where integrity=1 and to_days(update_time)=to_days(now()) group by aid) f on a.id=f.aid
+		from user where integrity=1 and type=1 and status=0 and share_type=0 and to_days(update_time)=to_days(now()) group by aid) f on a.id=f.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 
 		from user where type=1 and status=0 and share_type=0 and to_days(create_time)=to_days(now()) group by aid) g on a.id=g.aid
 		from user where type=1 and status=0 and share_type=0 and to_days(create_time)=to_days(now()) group by aid) g on a.id=g.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 
@@ -1978,8 +1978,7 @@ inner join(
 	</select>
 	</select>
 	<select id="userDataStatisticsCount" resultType="com.goafanti.report.bo.userDataListBo">
 	<select id="userDataStatisticsCount" resultType="com.goafanti.report.bo.userDataListBo">
 	select sum(z.signUser) as signUser,sum(z.fullUser) as fullUser,sum(z.dayFullUser) as dayFullUser,
 	select sum(z.signUser) as signUser,sum(z.fullUser) as fullUser,sum(z.dayFullUser) as dayFullUser,
-		sum(z.dayNewUser) as dayNewUser,sum(z.countUser) as countUser,sum(z.signFullUser) as signFullUser  from (
-	select a.name ,c.name as  depName,ifnull(d.count,0) as signUser,ifnull(e.count,0) as fullUser,
+		sum(z.dayNewUser) as dayNewUser,sum(z.countUser) as countUser,sum(z.signFullUser) as signFullUser  from (select a.name ,c.name as  depName,ifnull(d.count,0) as signUser,ifnull(e.count,0) as fullUser,
 	ifnull(f.count,0) as dayFullUser,ifnull(g.count,0) as dayNewUser,ifnull(h.count,0) as countUser,
 	ifnull(f.count,0) as dayFullUser,ifnull(g.count,0) as dayNewUser,ifnull(h.count,0) as countUser,
 	ifnull(i.count,0) as signFullUser
 	ifnull(i.count,0) as signFullUser
 	from admin a inner join (select uid from user_role x 
 	from admin a inner join (select uid from user_role x 
@@ -1987,9 +1986,9 @@ inner join(
 	on x.rid=y.id)b on a.id =b.uid left join department_management c  on a.department_id=c.id
 	on x.rid=y.id)b on a.id =b.uid left join department_management c  on a.department_id=c.id
 	left join (select x.aid,count(1)as count from (select aid,uid from user_lock_release 
 	left join (select x.aid,count(1)as count from (select aid,uid from user_lock_release 
 		where type=1 and status=0 group by aid,uid)x group by aid)d on a.id=d.aid
 		where type=1 and status=0 group by aid,uid)x group by aid)d on a.id=d.aid
-	left join (select aid,count(1) as count from user where integrity=1 group by aid) e on a.id=e.aid
+	left join (select aid,count(1) as count from user where integrity=1 and type=1 and status=0 and share_type=0 group by aid) e on a.id=e.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 
-		from user where integrity=1 and to_days(update_time)=to_days(now()) group by aid) f on a.id=f.aid
+		from user where integrity=1 and type=1 and status=0 and share_type=0 and to_days(update_time)=to_days(now()) group by aid) f on a.id=f.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 
 		from user where type=1 and status=0 and share_type=0 and to_days(create_time)=to_days(now()) group by aid) g on a.id=g.aid
 		from user where type=1 and status=0 and share_type=0 and to_days(create_time)=to_days(now()) group by aid) g on a.id=g.aid
 	left join (select aid,count(1) as count 
 	left join (select aid,count(1) as count 

+ 33 - 1
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -6,6 +6,7 @@ import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Set;
 import java.util.Set;
@@ -37,6 +38,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.utils.BeanUtilsExt;
 import com.goafanti.common.utils.BeanUtilsExt;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExcelUtils;
 import com.goafanti.common.utils.ExcelUtils;
+import com.goafanti.common.utils.SHA256Util;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.BusinessListBo;
 import com.goafanti.customer.bo.BusinessListBo;
@@ -61,6 +63,9 @@ public class AdminCustomerApiController extends BaseApiController{
 	private String	uploadPrivatePath	= null;
 	private String	uploadPrivatePath	= null;
 	@Resource
 	@Resource
 	private AdminService adminService;
 	private AdminService adminService;
+	
+	@Value(value = "${aesSecretKey}")
+	private String							secretKey	= null;
 	/** 私有个人客户列表 **/
 	/** 私有个人客户列表 **/
 	@RequestMapping(value = "/listPrivatePersonalCustomer" , method = RequestMethod.POST)
 	@RequestMapping(value = "/listPrivatePersonalCustomer" , method = RequestMethod.POST)
 	public Result listPrivatePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
 	public Result listPrivatePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
@@ -1027,7 +1032,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	}
 	}
 	
 	
 	/**
 	/**
-	 * 科技项目申报材料上传
+	 * 企业项目申报材料上传
 	 * 
 	 * 
 	 * @param req
 	 * @param req
 	 * @param uid
 	 * @param uid
@@ -1044,4 +1049,31 @@ public class AdminCustomerApiController extends BaseApiController{
 		}
 		}
 		return res;
 		return res;
 	}
 	}
+		/**
+	 *  企业项目申报材料预览授权
+	 * 
+	 * @param id
+	 * @param sign
+	 * @return
+	 */
+	@RequestMapping(value = "/techProject", method = RequestMethod.GET)
+	public Result previewTechProject(String id, String sign) {
+		Result res = new Result();
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "企业项目申报材料ID"));
+			return res;
+		}
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.ORGANIZATION_APPLICATION) {
+			String time = String.valueOf(Calendar.getInstance().getTime().getTime());
+			String auth = SHA256Util.toHash(sign + "|" + id + "|" + secretKey, time);
+			res.setData("sign=" + sign + "&token=" + id + "&auth=" + auth + "&temp=" + time);
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
 }
 }
+
+
+

+ 1 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -355,13 +355,12 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 
 	private Float countIntegrity(CustomerOrganizationDetailBo bo) {
 	private Float countIntegrity(CustomerOrganizationDetailBo bo) {
 		//完整资料总数
 		//完整资料总数
-		int max=13;
+		int max=12;
 		int number=0;
 		int number=0;
 		if(bo.getIndustry()!=null)number+=1;
 		if(bo.getIndustry()!=null)number+=1;
 		if(bo.getLocationProvince()!=null)number+=1;
 		if(bo.getLocationProvince()!=null)number+=1;
 		if(StringUtils.isNotBlank(bo.getBusinessScope()))number+=1;
 		if(StringUtils.isNotBlank(bo.getBusinessScope()))number+=1;
 		if(bo.getRegisteredCapital()!=null)number+=1;
 		if(bo.getRegisteredCapital()!=null)number+=1;
-		if(bo.getLocationProvince()!=null)number+=1;
 		if(StringUtils.isNotBlank(bo.getCooperationSituation()))number+=1; 
 		if(StringUtils.isNotBlank(bo.getCooperationSituation()))number+=1; 
 		if(StringUtils.isNotBlank(bo.getQualification()))number+=1; 
 		if(StringUtils.isNotBlank(bo.getQualification()))number+=1; 
 		if(bo.getAssets()!=null)number+=1;
 		if(bo.getAssets()!=null)number+=1;