Antiloveg лет назад: 8
Родитель
Сommit
473b9e87fd

+ 2 - 0
schema/20170707-alter-usrEdu.sql

@@ -0,0 +1,2 @@
+ALTER TABLE `user_edu` MODIFY COLUMN `major_category` VARCHAR (16) NULL COMMENT '专业类别';
+

+ 15 - 12
src/main/java/com/goafanti/admin/controller/AdminSummaryApiController.java

@@ -14,40 +14,43 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.utils.StringUtils;
+
 @RestController
 @RequestMapping(value = "/api/admin/summary")
-public class AdminSummaryApiController extends CertifyApiController{
-	
-	private static final Integer year = Calendar.getInstance().get(Calendar.YEAR)-1;
+public class AdminSummaryApiController extends CertifyApiController {
+
+	private static final Integer			year	= Calendar.getInstance().get(Calendar.YEAR) - 1;
 	@Resource
 	private OrgIntellectualPropertyService	orgIntellectualPropertyService;
 	@Resource
 	private OrgActivityService				orgActivityService;
-	
+
 	/**
 	 * 高企信息汇总导出--获得知识产权数量
+	 * 
 	 * @param uid
 	 * @return
 	 */
 	@RequestMapping(value = "/intellectualProperty", method = RequestMethod.GET)
-	public Result intellectualProperty(String uid){
+	public Result intellectualProperty(String uid) {
 		Result res = new Result();
 		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
 			return res;
 		}
-		
-		res.setData(orgIntellectualPropertyService.selectIntellectualPropertyCount(year, uid));;
+
+		res.setData(orgIntellectualPropertyService.selectIntellectualPropertyCount(year, uid));
 		return res;
 	}
-	
+
 	/**
 	 * 高企信息汇总导出--知识产权列表
+	 * 
 	 * @param uid
 	 * @return
 	 */
 	@RequestMapping(value = "/intellectualPropertyList", method = RequestMethod.GET)
-	public Result intellectualPropertyList(String uid){
+	public Result intellectualPropertyList(String uid) {
 		Result res = new Result();
 		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
@@ -56,14 +59,15 @@ public class AdminSummaryApiController extends CertifyApiController{
 		res.setData(orgIntellectualPropertyService.selectIntellectualPropertyList(year, uid));
 		return res;
 	}
-	
+
 	/**
 	 * 高企信息汇总导出--企业研发活动列表
+	 * 
 	 * @param uid
 	 * @return
 	 */
 	@RequestMapping(value = "/activity", method = RequestMethod.GET)
-	public Result activity(String uid){
+	public Result activity(String uid) {
 		Result res = new Result();
 		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
@@ -72,6 +76,5 @@ public class AdminSummaryApiController extends CertifyApiController{
 		res.setData(orgActivityService.selectAcivityList(year, uid));
 		return res;
 	}
-	
 
 }

+ 80 - 16
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -433,34 +433,91 @@
   </select>
 	
   <select id="selectCognizanceCatagoryBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceCatagoryBo">
-		 select u.id as uid, a.firstCatagory, b.secondCatagory, c.firmTotal, c.techTotal, d.totalRevenue FROM
-				(select id from user where id = #{1}) u 
+		 select 
+		 	u.id as uid, 
+		 	a.firstCatagory, b.secondCatagory, 
+		 	c.firmTotal, 
+		 	c.techTotal, 
+		 	d.totalRevenue FROM
+			(
+				select id from user where id = #{1}
+			) u 
 	  LEFT JOIN
-				(select uid, count(1) as firstCatagory from org_intellectual_property 
-				where uid = #{1} and evaluation_category= 0 and deleted_sign = 0 GROUP BY uid
+				(
+					select 
+						uid, 
+						count(1) as firstCatagory 
+					from org_intellectual_property 
+					where uid = #{1} 
+					and evaluation_category= 0 
+					and deleted_sign = 0 
+					and authorization_date >= 
+						(
+							select  
+								str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H')
+						)
+					and authorization_date  <![CDATA[ < ]]> 
+						(
+							select  
+								str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H')
+						)
+					and deleted_sign = 0
+					GROUP BY uid
 				) a on a.uid = u.id
       LEFT JOIN
 				(
-				select uid, count(1) as secondCatagory from org_intellectual_property 
-				where uid = #{1} and evaluation_category = 1 and deleted_sign = 0 GROUP BY uid
+					select 
+						uid, 
+						count(1) as secondCatagory 
+					from org_intellectual_property 
+					where uid = #{1}
+					and evaluation_category = 1 
+					and deleted_sign = 0 
+					and authorization_date >= 
+						(
+							select  
+								str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H')
+						)
+					and authorization_date  <![CDATA[ < ]]> 
+						(
+							select  
+								str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H')
+						)
+					GROUP BY uid
 				) b on b.uid = u.id
       LEFT JOIN
        			(
-				select uid, firm_total as firmTotal, tech_total as techTotal from org_human_resource where uid = #{1} and year = 
-				#{0}-1   and deleted_sign = 0
+					select 
+						uid, 
+						firm_total as firmTotal, 
+						tech_total as techTotal 
+					from org_human_resource 
+					where 
+						uid = #{1} 
+						and year = #{0}-1   
+						and deleted_sign = 0
 				) c on c.uid = u.id
 	  LEFT JOIN
 				(
-				SELECT uid,(operating_income + non_operating_income - non_taxable_income) as totalRevenue
-				from org_ratepay where uid = #{1} 
-				and year = #{0}-1  and deleted_sign = 0
+					SELECT 
+						uid,
+						(operating_income + non_operating_income - non_taxable_income) as totalRevenue
+					from org_ratepay 
+					where 
+						uid = #{1} 
+						and year = #{0}-1  
+						and deleted_sign = 0
 				) d on d.uid = u.id
   </select>
 	
   <select id="selectLastYearRevenueByUidAndYear"  resultType="java.math.BigDecimal">
-		SELECT sum(last_year_revenue) as lastYearRevenue
-			from org_tech_product where uid = #{1}
-			and year = #{0} and deleted_sign = 0
+		SELECT 
+			sum(last_year_revenue) as lastYearRevenue
+		from org_tech_product 
+		where 
+			uid = #{1}
+			and year = #{0} 
+			and deleted_sign = 0
   </select>
 	
   <select id="selectCognizanceByUidAndYear" resultMap="BaseResultMap"  >
@@ -479,8 +536,15 @@
   </update>
   
   <select id="findCultivationListByPage" parameterType="java.lang.String" resultType="com.goafanti.cognizance.bo.CultivationListBo">
-  	select u.id as uid,  i.licence_province as province, i.unit_name as unitName, i.cog_contacts as cogContacts,
-		i.certificate_number as certificateNumber, i.issuing_date as issuingDate, a.name as consultant, i.tech_principal,
+  	select 
+  		u.id as uid,  
+  		i.licence_province as province, 
+  		i.unit_name as unitName, 
+  		i.cog_contacts as cogContacts,
+		i.certificate_number as certificateNumber, 
+		i.issuing_date as issuingDate, 
+		a.name as consultant, 
+		i.tech_principal,
 		CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 	    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
 	    CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts

+ 34 - 9
src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml

@@ -282,19 +282,44 @@
   </select>
   
    <select id="selectIntellectualPropertyCount" resultType="com.goafanti.cognizance.bo.AnnualReportPropertyRightBo">
-  	select u.id as uid, a.utilityPatent, b.exteriorPatent, c.softwareWorks, d.defensePatent, e.newPlantCariety, f.nationalCrop,
-		g.nationalDrug, h.chineseMedicine, i.circuitDesign, j.inventionPatent from 
+  	select 
+  		u.id as uid, 
+  		a.utilityPatent, 
+  		b.exteriorPatent, 
+  		c.softwareWorks, 
+  		d.defensePatent, 
+  		e.newPlantCariety, 
+  		f.nationalCrop,
+		g.nationalDrug, 
+		h.chineseMedicine, 
+		i.circuitDesign, 
+		j.inventionPatent from 
 		(
-		select id from user where id = #{1}
-		) u LEFT JOIN
+			select 
+				id 
+			from user 
+			where id = #{1}
+		) 
+		u LEFT JOIN
 		
 		(
-			select uid, count(1) as utilityPatent 
+			select 
+				uid, 
+				count(1) as utilityPatent 
 			from org_intellectual_property 
-			where uid = #{1} and catagory = 2 and authorization_date 
-				 >= (select  str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H') )
-						and authorization_date  <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
-			and deleted_sign = 0
+			where uid = #{1} 
+			and catagory = 2 
+			and authorization_date >= 
+				(
+					select  
+						str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H')
+				)
+			and authorization_date  <![CDATA[ < ]]> 
+				(
+					select  
+						str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H')
+				)
+					and deleted_sign = 0
 		) a on a.uid = u.id  
 		LEFT JOIN
 		(

+ 3 - 2
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -1039,7 +1039,8 @@
 	
 	
 	<select id="selectAuditorOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
-		select  u.aid, u.mid,
+		select  
+			 u.aid, u.mid,
 			 oi.id, oi.uid,  oi.aft_username as aftUsername,  oi.unit_name as unitName,  oi.identity_type as identityType,
 			 oi.first_contacts as firstContacts,  oi.first_mobile as firstMobile,  oi.second_contacts as secondContacts,
 			 oi.second_mobile as secondMobile,  oi.third_contacts as thirdContacts,  oi.third_mobile as thirdMobile,
@@ -1049,7 +1050,7 @@
 			 oi.org_code_url as orgCodeUrl,  oi.banks, bank_branch as bankBranch,  oi.bank_card_number as bankCardNumber,
 			 oi.location_province as locationProvince,  oi.location_city as locationCity,  oi.location_area as locationArea,
 			 oi.validation_amount as validationAmount,  oi.payment_date as paymentDate,  oi.audit_status as auditStatus,
-			 oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field
+			 oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field, oi.registered_capital as registeredCapital
 		from user u 
 		LEFT JOIN organization_identity oi on oi.uid = u.id
 		where uid = #{uid,jdbcType=VARCHAR}

+ 1 - 1
src/main/java/com/goafanti/user/bo/InputUserEdu.java

@@ -14,7 +14,7 @@ public class InputUserEdu {
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	education;
 
-	@Size(min = 0, max = 8, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	majorCategory;
 
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

+ 14 - 1
src/main/java/com/goafanti/user/bo/OrgIdentityDetailBo.java

@@ -158,7 +158,20 @@ public class OrgIdentityDetailBo {
 	 */
 	private String		lastYearTaxReportUrl;
 
-	private String		field;
+	/**
+	 * 注册资金
+	 */
+	private BigDecimal	registeredCapital;
+
+	public BigDecimal getRegisteredCapital() {
+		return registeredCapital;
+	}
+
+	public void setRegisteredCapital(BigDecimal registeredCapital) {
+		this.registeredCapital = registeredCapital;
+	}
+
+	private String field;
 
 	public String getField() {
 		return field;