Antiloveg пре 8 година
родитељ
комит
9694dbe6e7

+ 11 - 0
schema/2017-03-13.sql

@@ -0,0 +1,11 @@
+
+alter table org_cognizance add 
+`record_time` DATETIME NULL COMMENT '高企申请时间' AFTER `year`;
+
+alter table patent_info add 
+`record_time` DATETIME NULL COMMENT '专利申请时间' AFTER `confirm_state`;
+
+alter table organization_identity 
+MODIFY COLUMN `listed`  INT(1) NULL COMMENT '是否上市' ,
+MODIFY COLUMN `listed_type` INT(1) NULL COMMENT '上市类型';
+

+ 9 - 6
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -138,9 +138,16 @@ public class AdminApiController extends BaseApiController {
 	@RequestMapping(value = "/addNewUser", method = RequestMethod.POST)
 	public Result addNewUser(String mobile, Integer type, String unitName){
 		Result res = new Result();
+		User user = userService.selectByMobieAndType(mobile, type);
+		if (null != user) {
+			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
+			return res;
+		}
+		
 		User u = new User();
 		u.setId(UUID.randomUUID().toString());
 		u.setMobile(mobile);
+		u.setPassword(mobile);
 		u.setType(type);
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
@@ -893,7 +900,7 @@ public class AdminApiController extends BaseApiController {
 		c.setState(state);
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
-		c.setCreateTime(now.getTime());
+		c.setRecordTime(now.getTime());
 		orgCognizanceService.insert(c);
 
 		OrgCognizanceLog log = new OrgCognizanceLog();
@@ -1221,11 +1228,7 @@ public class AdminApiController extends BaseApiController {
 		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
 		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
 		BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
-		if (null != revenue) {
-			cog.setLastYearRevenue(revenue);
-		} else {
-			cog.setLastYearRevenue(new BigDecimal(0));
-		}
+		cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
 		return cog;
 	}
 

+ 23 - 9
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -20,12 +20,13 @@
     <result column="certificate_url" property="certificateUrl" jdbcType="VARCHAR" />
     <result column="state" property="state" jdbcType="INTEGER" />
     <result column="year" property="year" jdbcType="INTEGER" />
+    <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, serial_number, contacts, comment, consultant, technical_field1, technical_field2, 
     technical_field3, basic_research_cost, accident, create_time, accept_date, issuing_date, 
-    certificate_number, certificate_url, state, year, deleted_sign
+    certificate_number, certificate_url, state, year, record_time, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -43,14 +44,15 @@
       technical_field1, technical_field2, technical_field3, 
       basic_research_cost, accident, create_time, 
       accept_date, issuing_date, certificate_number, 
-      certificate_url, state, year, deleted_sign
+      certificate_url, state, year, record_time, deleted_sign
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{contacts,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
       #{technicalField1,jdbcType=INTEGER}, #{technicalField2,jdbcType=INTEGER}, #{technicalField3,jdbcType=INTEGER}, 
       #{basicResearchCost,jdbcType=DECIMAL}, #{accident,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
-      #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}
+      #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{recordTime,jdbcType=TIMESTAMP},
+      #{deletedSign,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -110,6 +112,9 @@
       <if test="year != null" >
         year,
       </if>
+      <if test="recordTime != null" >
+        record_time,
+      </if>
       <if test="deletedSign != null" >
         deleted_sign,
       </if>
@@ -169,6 +174,9 @@
       <if test="year != null" >
         #{year,jdbcType=INTEGER},
       </if>
+      <if test="recordTime != null" >
+        #{recordTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="deletedSign != null" >
         #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -228,6 +236,9 @@
       <if test="year != null" >
         year = #{year,jdbcType=INTEGER},
       </if>
+       <if test="recordTime != null" >
+        record_time = #{recordTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="deletedSign != null" >
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -253,6 +264,7 @@
       certificate_url = #{certificateUrl,jdbcType=VARCHAR},
       state = #{state,jdbcType=INTEGER},
       year = #{year,jdbcType=INTEGER},
+      record_time = #{recordTime,jdbcType=TIMESTAMP},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -266,8 +278,11 @@
 	i.unit_name, c.contacts, c.create_time, 
 	c.comment, c.state, c.certificate_number, 
 	c.issuing_date, c.consultant, c.year
-	from user u INNER JOIN org_cognizance c on u.id = c.uid  and deleted_sign = 0
-	LEFT JOIN organization_identity i on i.uid = u.id) x  
+	from user u 
+	LEFT JOIN organization_identity i on i.uid = u.id
+	INNER JOIN org_cognizance c on u.id = c.uid  and deleted_sign = 0
+    order by c.record_time desc
+	) x  
 	LEFT JOIN  admin a on a.id = x.consultant
 	where 1 = 1
 	<if test="uid != null">
@@ -276,7 +291,7 @@
 	<if test="locationProvince != null">
 		and x.location_province = #{locationProvince, jdbcType=VARCHAR}
 	</if>
-	order by x.issuing_date desc
+
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -293,7 +308,6 @@
 	<if test="locationProvince != null">
 		and i.location_province = #{locationProvince, jdbcType=VARCHAR}
 	</if>
-	order by c.issuing_date desc
 	</select>
 	
 	
@@ -317,7 +331,7 @@
 			or (end_date <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0},'-01-01'), '%Y-%m-%d %H'))   and 
       end_date >= (select  str_to_date(CONCAT(#{0}-3,'-01-01'), '%Y-%m-%d %H')))
       and deleted_sign = 0
-		) m
+		) m GROUP BY m.uid
 
 	</select>
 	
@@ -359,7 +373,7 @@
 				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
+	  LEFT JOIN
 				(
 				SELECT uid,(operating_income + non_operating_income - non_taxable_income) as totalRevenue
 				from org_ratepay where uid = #{1} 

+ 7 - 19
src/main/java/com/goafanti/common/mapper/PatentCostMapper.xml

@@ -164,7 +164,8 @@
      	(select u.id as uid , p.id as pid ,o.id as oid ,
        		p.serial_number as serialNumber ,p.patent_number as patentNumber ,
      	    o.location_province as locationProvince , o.unit_name as unitName , 
-      		p.patent_name as patentName , p.patent_application_date as patentApplicationDate
+      		p.patent_name as patentName , p.patent_application_date as patentApplicationDate,
+      		p.record_time as recordTime
     from user u
 		LEFT JOIN organization_identity o on o.uid = u.id  
 		INNER JOIN patent_info p on u.id =p.uid
@@ -178,28 +179,16 @@
 		<if test="pEnd">
 		 and p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
 		</if>
-		order by p.patent_application_date DESC) m
-   on c.pid = m.pid 
+		) m
+   on c.pid = m.pid order by m.recordTime DESC
    <if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findApplicationFeeCount" resultType="java.lang.Integer" parameterType="String"> 
-	select count(1) from   (
-			select m.uid as uid , m.pid as pid , m.oid ,
-       		m.serialNumber ,m.patentNumber ,
-     	    m.locationProvince , m.unitName , 
-      		m.patentName , m.patentApplicationDate ,
-  	    c.id as cid ,
-    	c.payment_state as paymentState,c.application_fee as applicationFee ,
-    	c.trial_fee as trialFee , c.printing_fee as printingFee , 
-   	    c.funds as funds , c.reimbursement as reimbursement
-   	from patent_cost c RIGHT JOIN 
-     	(select u.id as uid , p.id as pid ,o.id as oid ,
-       		p.serial_number as serialNumber ,p.patent_number as patentNumber ,
-     	    o.location_province as locationProvince , o.unit_name as unitName , 
-      		p.patent_name as patentName , p.patent_application_date as patentApplicationDate
+	select count(1) from   patent_cost c RIGHT JOIN 
+     	(select  p.id as pid 
     from user u
         LEFT JOIN organization_identity o on o.uid = u.id  
 		INNER JOIN patent_info p on u.id =p.uid
@@ -213,8 +202,7 @@
 		<if test="pEnd">
 		 and p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
 		</if>
-		order by p.patent_application_date DESC) m
+		) m
    on c.pid = m.pid 
-		   ) n 
   </select>
 </mapper>

+ 38 - 72
src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml

@@ -32,6 +32,7 @@
     <result column="office" property="office" jdbcType="VARCHAR" />
     <result column="principal" property="principal" jdbcType="VARCHAR" />
     <result column="confirm_state" property="confirmState" jdbcType="INTEGER" />
+    <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
@@ -40,7 +41,7 @@
     patent_certificate_url, patent_application_date, first_inventor_name, first_inventor_nationality, 
     first_inventor_id_number, first_inventor_is_publish, second_inventor_name, second_inventor_nationality, 
     second_inventor_is_publish, third_inventor_name, third_inventor_nationality, third_inventor_is_publish, 
-    create_time, author, authorized_date,office, principal ,confirm_state, deleted_sign
+    create_time, author, authorized_date,office, principal ,confirm_state, record_time, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -64,7 +65,7 @@
       second_inventor_nationality, second_inventor_is_publish, 
       third_inventor_name, third_inventor_nationality, 
       third_inventor_is_publish, create_time, author, authorized_date, 
-      office, principal, confirm_state, deleted_sign)
+      office, principal, confirm_state, record_time, deleted_sign)
      
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{patentNumber,jdbcType=VARCHAR}, #{patentName,jdbcType=VARCHAR}, #{patentCatagory,jdbcType=INTEGER}, 
@@ -78,7 +79,8 @@
       #{thirdInventorName,jdbcType=VARCHAR}, #{thirdInventorNationality,jdbcType=VARCHAR}, 
       #{thirdInventorIsPublish,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{author,jdbcType=VARCHAR}, 
       #{authorizedDate,jdbcType=TIMESTAMP},
-      #{office,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{confirmState,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER})
+      #{office,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{recordTime,jdbcType=TIMESTAMP},
+      #{confirmState,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentInfo" >
     insert into patent_info
@@ -173,6 +175,9 @@
       <if test="confirmState != null">
         confirm_state,
       </if>
+      <if test="recordTime != null">
+        record_time,
+      </if>
       <if test="deletedSign != null">
         deleted_sign,
       </if>
@@ -266,10 +271,13 @@
         #{principal,jdbcType=VARCHAR},
       </if>
       <if test="confirmState != null">
-        #{confirmState,jdbcType=INTEGER}
+        #{confirmState,jdbcType=INTEGER},
+      </if>
+       <if test="recordTime != null" >
+        #{recordTime,jdbcType=TIMESTAMP},
       </if>
       <if test="deletedSign != null">
-        #{deletedSign,jdbcType=INTEGER}
+        #{deletedSign,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -352,7 +360,7 @@
         author = #{author,jdbcType=VARCHAR},
       </if>
       <if test="authorizedDate != null" >
-        authorized_date = #{authorizedDate,jdbcType=VARCHAR},
+        authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
       </if>
       <if test="office != null" >
         office = #{office,jdbcType=VARCHAR},
@@ -363,6 +371,9 @@
       <if test="confirmState != null">
         confirm_state = #{confirmState,jdbcType=INTEGER},
       </if>
+       <if test="recordTime != null" >
+        record_time = #{recordTime,jdbcType=TIMESTAMP},
+      </if>
        <if test="deletedSign != null">
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
@@ -396,10 +407,11 @@
       third_inventor_is_publish = #{thirdInventorIsPublish,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       author = #{author,jdbcType=VARCHAR},
-      authorized_date = #{authorizedDate,jdbcType=VARCHAR},
+      authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
       office = #{office,jdbcType=VARCHAR},
       principal = #{principal,jdbcType=VARCHAR},
       confirm_state = #{confirmState,jdbcType=INTEGER},
+      record_time = #{recordTime,jdbcType=TIMESTAMP},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -431,7 +443,7 @@
      <if test = "patentState != nulll">
     	and patent_state = #{patentState,jdbcType=INTEGER}
     </if>
-    order by  patent_application_date desc
+    order by  record_time desc
     <if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -457,7 +469,6 @@
      <if test = "patentState != nulll">
     	and patent_state = #{patentState,jdbcType=INTEGER}
     </if>
-    order by  patent_application_date desc
   </select>
   
   <select id="findManagePatentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentCompositeBo"  parameterType="String">
@@ -490,7 +501,8 @@
 			p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
 			p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl , 
 			o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
-		    p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
+		    p.authorization_notice_url as authorizationNoticeUrl , 
+		    p.patent_certificate_url as patentCertificateUrl, p.record_time as recordTime
 	from user u 
 	LEFT JOIN organization_identity o
 	on u.id = o.uid
@@ -541,8 +553,8 @@
 	<if test="locationProvince != null">
 	    and  o.location_province = #{locationProvince,jdbcType=VARCHAR}
 	</if>
-	 order by p.create_time desc) x
-	 LEFT JOIN admin a on a.id = x.author
+	 ) x
+	 LEFT JOIN admin a on a.id = x.author  order by x.recordTime desc
 	 <if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -550,45 +562,14 @@
   </select>
   
   <select id="findManagePatentCount" resultType="java.lang.Integer" parameterType="String">
-   	select count(1) from (
-   	
-		select    a.name as author,x.uid  , 
-	          x.oid  ,x.pid ,
-			  x.serialNumber,x.patentNumber,
-			  x.office , x.unitName ,
-			  x.patentCatagory , x.patentName , 
-			  x.patentState , x.createTime ,
-			  x.patentApplicationDate,x.authorizedDate , 
-			  x.orgCode , x.locationProvince , 
-			  x.locationCity , x.locationArea ,
-			  x.contacts , x.patentField , 
-			  x.patentDes ,x.firstInventorName,
-			  x.firstInventorNationality , x.firstInventorIdNumber ,
-			  x.secondInventorName, x.secondInventorNationality ,
-         x.thirdInventorName  , x.thirdInventorNationality , 
-			  x.patentProryStatementUrl, x.lastYearTaxReportUrl , 
-			  x.patentWritingUrl, x.authorizationNoticeUrl,
-			  x.patentCertificateUrl from
-  	   (select  u.id as uid ,o.id as oid , p.id as pid , p.serial_number as serialNumber , p.patent_number as patentNumber , p.office , 
-	  	    o.unit_name as unitName,
-			p.patent_catagory as patentCatagory,p.patent_name as patentName,p.patent_state as patentState,p.create_time as createTime,
-			p.patent_application_date as patentApplicationDate,
-			p.authorized_date as authorizedDate, p.author, o.org_code as orgCode, o.location_province as locationProvince, 
-			o.location_city as locationCity, o.location_area as locationArea,
-			o.contacts, u.number, p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as firstInventorName, 
-			p.first_inventor_nationality as firstInventorNationality,
-			p.first_inventor_id_number as firstInventorIdNumber, p.second_inventor_name as secondInventorName , 
-			p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
-			p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl , 
-			o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
-		    p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
+   	select count(1) from 
+  	   (select p.author
 	from user u 
 	LEFT JOIN organization_identity o
 	on u.id = o.uid
 	INNER  JOIN patent_info p
 	on u.id = p.uid 
-	where deleted_sign = 0
-	 
+	where p.deleted_sign = 0
 	<if test="serialNumber != null">
 	    and p.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
@@ -632,10 +613,9 @@
 	<if test="locationProvince != null">
 	    and  o.location_province=#{locationProvince,jdbcType=VARCHAR}
 	</if>
-	 order by p.create_time desc) x
+	) x
 	 LEFT JOIN admin a on a.id = x.author
-		) 
-	as total
+		
   </select>
   
   <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentPendingBo" parameterType="String">
@@ -643,39 +623,34 @@
   	   from patent_cost c INNER JOIN
        (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
                o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
-               p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
+               p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate,
+               p.record_time as recordTime
         from user u
 		LEFT JOIN organization_identity o on o.uid = u.id 
 		INNER JOIN patent_info p on u.id =p.uid where p.deleted_sign = 0
 		<if test="locationProvince != null">
 		 and o.location_province = #{locationProvince,jdbcType=VARCHAR}
 		</if>
-		order by p.authorized_date DESC
 		) n
 		on n.pid= c.pid where c.annual_fee_state=0
-		
+		order by n.recordTime DESC
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findManagePendingPaymentCount" resultType="java.lang.Integer" parameterType="String">
-  	 select count(1) from (
-  	   select n.*,c.id as cid ,c.annual_fee_state as annualFeeState 
-  	   from patent_cost c INNER JOIN
-       (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
-               o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
-               p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
+  	 select count(1) from 
+  	    patent_cost c INNER JOIN
+       (select p.id as pid 
         from user u
 		LEFT JOIN organization_identity o on o.uid = u.id 
 		INNER JOIN patent_info p on u.id = p.uid   where p.deleted_sign = 0
 		<if test="locationProvince != null">
 		 and o.location_province = #{locationProvince,jdbcType=VARCHAR}
 		</if>
-		order by p.authorized_date DESC
 		) n
 		on n.pid= c.pid where c.annual_fee_state=0
-		) as total
   </select>
   
   <select id="findNoticeOfCorrectionListByPage" parameterType="String"  resultType="com.goafanti.techservice.patent.bo.PatentNoticeOfCorrectionBo">
@@ -717,23 +692,17 @@
 	<if test="locationProvince != null">
 	    and  o.location_province=#{locationProvince,jdbcType=VARCHAR}
 	</if>
-	order by p.authorized_date DESC 
+	order by p.record_time DESC 
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer" parameterType="String">
-  	select count(1) from (
-  	
-  		select u.id as uid ,p.id as pid , o.id as oid , p.serial_number as serialNumber , p.patent_number as patentNumber ,
-		 p.patent_name as patentName , p.office ,
-		 o.location_province as locationProvince ,o.unit_name as unitName , p.patent_catagory as patentCatagory ,
-		 p.patent_state as patentState , p.author , p.authorized_date as authorizedDate 
-		 FROM user u 
+  	select count(1) from  user u 
 		 LEFT JOIN organization_identity o ON u.id = o.uid
 		 INNER JOIN patent_info p on u.id = p.uid 
-   where p.patent_state in (4,6) and p.delete_sign = 0
+   where p.patent_state in (4,6) and p.deleted_sign = 0
 	<if test="serialNumber != null">
 	    and p.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
@@ -764,9 +733,6 @@
 	<if test="locationProvince != null">
 	    and  o.location_province=#{locationProvince,jdbcType=VARCHAR}
 	</if>
-	order by p.authorized_date DESC 
-	
-	) as n
   </select>
   
   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">

+ 7 - 18
src/main/java/com/goafanti/common/mapper/PatentRegistrationMapper.xml

@@ -213,33 +213,22 @@
        m.* from 
       (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
               o.location_province as locationProvince , o.unit_name as unitName ,
-              p.patent_catagory as patentCatagory , p.patent_name as patentName
+              p.patent_catagory as patentCatagory , p.patent_name as patentName, p.record_time as recordTime
        from user u
 	   INNER JOIN patent_info p on u.id =p.uid and p.deleted_sign = 0
-	   LEFT JOIN organization_identity o on o.uid = u.id
+	   LEFT JOIN organization_identity o on o.uid = u.id 
 	   ) m
-  LEFT JOIN patent_registration r on m.pid = r.pid
+  LEFT JOIN patent_registration r on m.pid = r.pid  order by m.recordTime desc
   </select>
   
   <select id="findRecieveSendCount" resultType="java.lang.Integer">
-  	select count(1) from (
-  	
-  	 select r.id as rid, r.acceptance_receive_time as acceptanceReceiveTime , r.acceptance_issue_time as acceptanceIssueTime, 
-  	   r.acceptance_tracking_number as acceptanceTrackingNumber , r.acceptance_express_company as acceptanceExpressCompany,
-       r.authorization_receive_time as authorizationReceiveTime , r.authorization_issue_time as authorizationIssueTime, 
-       r.authorization_tracking_number as authorizationTrackingNumber , r.authorization_express_company as authorizationExpressCompany,
-       r.certificate_recieve_time as certificateRecieveTime, r.certificate_issue_time as certificateIssueTime, 
-       r.certificate_tracking_number as certificateTrackingNumber, r.certificate_express_company as certificateExpressCompany,
-       m.* from 
-      (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
-              o.location_province as locationProvince , o.unit_name as unitName ,
-              p.patent_catagory as patentCatagory , p.patent_name as patentName
+  	select count(1) from 
+      (select p.id as pid 
        from user u
-	   INNER JOIN patent_info p on u.id =p.uid and p.deleted_sign = 0
+	   INNER JOIN patent_info p on u.id = p.uid and p.deleted_sign = 0
 	   LEFT JOIN organization_identity o on o.uid = u.id
 	   ) m
     LEFT JOIN patent_registration r on m.pid = r.pid
-    
-  	) k
+  	
   </select>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -149,7 +149,7 @@
         lvl = #{lvl,jdbcType=INTEGER},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER}
+        type = #{type,jdbcType=INTEGER},
       </if>
       <if test="aid != null">
         aid = #{aid,jdbcType=VARCHAR}

+ 14 - 0
src/main/java/com/goafanti/common/model/OrgCognizance.java

@@ -90,6 +90,11 @@ public class OrgCognizance {
      * 申请年份
      */
     private Integer year;
+    
+    /**
+     * 高企申请时间
+     */
+    private Date recordTime;
 
     /**
     * 删除标记
@@ -241,6 +246,15 @@ public class OrgCognizance {
 	public void setYear(Integer year) {
 		this.year = year;
 	}
+	
+    @JsonIgnore
+	public Date getRecordTime() {
+		return recordTime;
+	}
+
+	public void setRecordTime(Date recordTime) {
+		this.recordTime = recordTime;
+	}
 
 	@JsonIgnore
     public Integer getDeletedSign() {

+ 15 - 2
src/main/java/com/goafanti/common/model/PatentInfo.java

@@ -156,6 +156,11 @@ public class PatentInfo {
     private Integer confirmState;
     
     /**
+     * 专利申请时间
+     */
+    private Date recordTime;
+    
+    /**
      * 删除标记
      */
     private Integer deletedSign;
@@ -402,8 +407,16 @@ public class PatentInfo {
 		this.confirmState = confirmState;
 	}
 	
-	
-    @JsonIgnore
+	@JsonIgnore
+    public Date getRecordTime() {
+		return recordTime;
+	}
+
+	public void setRecordTime(Date recordTime) {
+		this.recordTime = recordTime;
+	}
+
+	@JsonIgnore
 	public Integer getDeletedSign() {
 		return deletedSign;
 	}

+ 2 - 6
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -937,7 +937,7 @@ public class CognizanceApiController extends BaseApiController {
 		c.setState(state);
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
-		c.setCreateTime(now.getTime());
+		c.setRecordTime(now.getTime());
 		orgCognizanceService.insert(c);
 
 		OrgCognizanceLog log = new OrgCognizanceLog();
@@ -1202,11 +1202,7 @@ public class CognizanceApiController extends BaseApiController {
 		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
 		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
 		BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
-		if (null != revenue) {
-			cog.setLastYearRevenue(revenue);
-		} else {
-			cog.setLastYearRevenue(new BigDecimal(0));
-		}
+		cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
 		return cog;
 	}
 

+ 107 - 96
src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java

@@ -90,46 +90,50 @@ public class PatentApiController extends BaseApiController {
 	@RequestMapping(value = "/clientApplyPatent", method = RequestMethod.POST)
 	public Result clientApplyPatent(PatentInfo patentInfo) {
 		Result res = new Result();
-		patentInfo.setId(UUID.randomUUID().toString());
-		patentInfo.setUid(TokenManager.getUserId());
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		patentInfo.setCreateTime(now.getTime());
-		patentInfo.setDeletedSign(0);
-		patentInfo.setConfirmState(0);
-		patentInfo.setPatentState(1);
-		patentInfoService.insert(patentInfo);
-		
-		PatentRegistration patentRegistration = new PatentRegistration();
-		patentRegistration.setId(UUID.randomUUID().toString());
-		patentRegistration.setPid(patentInfo.getId());
-		patentRegistrationService.insert(patentRegistration);
-		
-		PatentCost patentCost = new PatentCost();
-		patentCost.setId(UUID.randomUUID().toString());
-		patentCost.setPid(patentInfo.getId());
-		patentCost.setAnnualFeeState(0);
-		patentCost.setPaymentState(0);
-		patentCostService.insert(patentCost);
-		
-		PatentLog log = new PatentLog();
-		log.setId(UUID.randomUUID().toString());
-		log.setPid(patentInfo.getId());
-		log.setRecordTime(patentInfo.getCreateTime());
-		log.setState(1);
-		log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
-		patentLogService.insert(log);
-		res.setData(patentInfo);
+		res = checkCertify(res, TokenManager.getUserId());
+		if (res.getError().isEmpty()) {
+			patentInfo.setId(UUID.randomUUID().toString());
+			patentInfo.setUid(TokenManager.getUserId());
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			patentInfo.setRecordTime(now.getTime());
+			patentInfo.setDeletedSign(0);
+			patentInfo.setConfirmState(0);
+			patentInfo.setPatentState(1);
+			patentInfoService.insert(patentInfo);
+
+			PatentRegistration patentRegistration = new PatentRegistration();
+			patentRegistration.setId(UUID.randomUUID().toString());
+			patentRegistration.setPid(patentInfo.getId());
+			patentRegistrationService.insert(patentRegistration);
+
+			PatentCost patentCost = new PatentCost();
+			patentCost.setId(UUID.randomUUID().toString());
+			patentCost.setPid(patentInfo.getId());
+			patentCost.setAnnualFeeState(0);
+			patentCost.setPaymentState(0);
+			patentCostService.insert(patentCost);
+
+			PatentLog log = new PatentLog();
+			log.setId(UUID.randomUUID().toString());
+			log.setPid(patentInfo.getId());
+			log.setRecordTime(patentInfo.getCreateTime());
+			log.setState(1);
+			log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
+			patentLogService.insert(log);
+			res.setData(patentInfo);
+		}
 		return res;
 	}
-	
+
 	/**
 	 * 删除专利记录
+	 * 
 	 * @param ids
 	 * @return
 	 */
 	@RequestMapping(value = "/deletePatent", method = RequestMethod.POST)
-	public Result deletePatent(@RequestParam(name = "ids[]", required = true) String[] ids){
+	public Result deletePatent(@RequestParam(name = "ids[]", required = true) String[] ids) {
 		Result res = new Result();
 		List<String> id = new ArrayList<String>();
 		for (String s : ids) {
@@ -157,16 +161,19 @@ public class PatentApiController extends BaseApiController {
 	public Result clientApplyList(String patentNumber, String patentName, Integer patentCatagory, Integer patentState,
 			String pageNo, String pageSize) {
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
+		res = checkCertify(res, TokenManager.getUserId());
+		if (res.getError().isEmpty()) {
+			Integer pNo = 1;
+			Integer pSize = 10;
 
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
+			if (StringUtils.isNumeric(pageSize)) {
+				pSize = Integer.parseInt(pageSize);
+			}
+			if (StringUtils.isNumeric(pageNo)) {
+				pNo = Integer.parseInt(pageNo);
+			}
+			res.setData(getClientApplyList(res, patentNumber, patentName, patentCatagory, patentState, pNo, pSize));
 		}
-		res.setData(getClientApplyList(res, patentNumber, patentName, patentCatagory, patentState, pNo, pSize));
 		return res;
 	}
 
@@ -205,8 +212,6 @@ public class PatentApiController extends BaseApiController {
 				patentName, patentState, createTime, patentApplicationDate, author, pNo, pSize));
 		return res;
 	}
-	
-	
 
 	/**
 	 * 获取公司
@@ -244,39 +249,38 @@ public class PatentApiController extends BaseApiController {
 	@RequestMapping(value = "/manageApplyPatent", method = RequestMethod.POST)
 	public Result manageApplyPatent(PatentInfo patentInfo, String uid) {
 		Result res = new Result();
-		if (null == uid) {
-			res.getError().add(buildError("该公司无法提交申请!"));
-			return res;
+		res = checkCertify(res, uid);
+		if (res.getError().isEmpty()) {
+			patentInfo.setId(UUID.randomUUID().toString());
+			patentInfo.setUid(uid);
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			patentInfo.setRecordTime(now.getTime());
+			patentInfo.setDeletedSign(0);
+			patentInfo.setConfirmState(0);
+			patentInfo.setPatentState(1);
+			patentInfoService.insert(patentInfo);
+			PatentRegistration patentRegistration = new PatentRegistration();
+			patentRegistration.setId(UUID.randomUUID().toString());
+			patentRegistration.setPid(patentInfo.getId());
+			patentRegistrationService.insert(patentRegistration);
+			PatentCost patentCost = new PatentCost();
+			patentCost.setId(UUID.randomUUID().toString());
+			patentCost.setPid(patentInfo.getId());
+			patentCost.setAnnualFeeState(0);
+			patentCost.setPaymentState(0);
+			patentCostService.insert(patentCost);
+
+			PatentLog log = new PatentLog();
+			log.setId(UUID.randomUUID().toString());
+			log.setPid(patentInfo.getId());
+			log.setRecordTime(patentInfo.getCreateTime());
+			log.setState(1);
+			log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
+			log.setOperator(TokenManager.getAdminId());
+			patentLogService.insert(log);
+			res.setData(patentInfo);
 		}
-		patentInfo.setId(UUID.randomUUID().toString());
-		patentInfo.setUid(uid);
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		patentInfo.setCreateTime(now.getTime());
-		patentInfo.setDeletedSign(0);
-		patentInfo.setConfirmState(0);
-		patentInfo.setPatentState(1);
-		patentInfoService.insert(patentInfo);
-		PatentRegistration patentRegistration = new PatentRegistration();
-		patentRegistration.setId(UUID.randomUUID().toString());
-		patentRegistration.setPid(patentInfo.getId());
-		patentRegistrationService.insert(patentRegistration);
-		PatentCost patentCost = new PatentCost();
-		patentCost.setId(UUID.randomUUID().toString());
-		patentCost.setPid(patentInfo.getId());
-		patentCost.setAnnualFeeState(0);
-		patentCost.setPaymentState(0);
-		patentCostService.insert(patentCost);
-		
-		PatentLog log = new PatentLog();
-		log.setId(UUID.randomUUID().toString());
-		log.setPid(patentInfo.getId());
-		log.setRecordTime(patentInfo.getCreateTime());
-		log.setState(1);
-		log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
-		log.setOperator(TokenManager.getAdminId());
-		patentLogService.insert(log);
-		res.setData(patentInfo);
 		return res;
 	}
 
@@ -311,7 +315,7 @@ public class PatentApiController extends BaseApiController {
 
 		if (!StringUtils.isBlank(patentLog.getPrincipal())) {
 			switch (patentLog.getState()) {
-			case 1:
+			case 2:
 				patentInfo.setCreateTime(d);
 				break;
 			case 3:
@@ -345,11 +349,12 @@ public class PatentApiController extends BaseApiController {
 			o.setEvaluationCategory((3 == patentInfo.getPatentCatagory()) ? 0 : 1);
 			orgIntellectualPropertyService.insert(o);
 		}
-		
-		if (10 == patentInfo.getPatentState()){
-			OrgIntellectualProperty o = orgIntellectualPropertyService.selectOrgIntellectualPropertyByPid(patentInfo.getId());
+
+		if (10 == patentInfo.getPatentState()) {
+			OrgIntellectualProperty o = orgIntellectualPropertyService
+					.selectOrgIntellectualPropertyByPid(patentInfo.getId());
 			Integer i = 0;
-			switch (patentInfo.getPatentCatagory()){
+			switch (patentInfo.getPatentCatagory()) {
 			case 0:
 				i = 0;
 				break;
@@ -797,15 +802,16 @@ public class PatentApiController extends BaseApiController {
 	@RequestMapping(value = "/patentFile", method = RequestMethod.POST)
 	public Result patentFile(HttpServletRequest req, String sign, String oid) {
 		Result res = new Result();
-		res.setData(handleFile(res, "/cognizannce/", true, req, sign,  oid));
+		res.setData(handleFile(res, "/cognizannce/", true, req, sign, oid));
 		return res;
 	}
 
-
-	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign, String oid) {
+	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign,
+			String oid) {
 		List<MultipartFile> files = getFiles(req);
 		MultipartFile mf = files.get(0);
-		String fileName = FileUtils.mosaicFileName(mf, isPrivate, sign, path, StringUtils.isBlank(oid) ? TokenManager.getUserId() : oid);
+		String fileName = FileUtils.mosaicFileName(mf, isPrivate, sign, path,
+				StringUtils.isBlank(oid) ? TokenManager.getUserId() : oid);
 		if (!files.isEmpty()) {
 			try {
 				mf.transferTo(toPrivateFile(fileName));
@@ -824,30 +830,27 @@ public class PatentApiController extends BaseApiController {
 
 	// 专利纸件收发登记
 	private Pagination<PatentRecieveSendBo> getRecieveSendList(Integer pNo, Integer pSize) {
-		return  patentRegistrationService.getRecieveSendList(pNo, pSize);
+		return patentRegistrationService.getRecieveSendList(pNo, pSize);
 	}
 
 	// 专利申请费用管理
 	private Pagination<PatentApplicationFeeBo> getApplicationFeeList(String[] patentApplicationDate,
 			String locationProvince, Integer pNo, Integer pSize) throws ParseException {
-		return  patentCostService.getApplicationFeeList(patentApplicationDate,
-				locationProvince, pNo, pSize);
+		return patentCostService.getApplicationFeeList(patentApplicationDate, locationProvince, pNo, pSize);
 	}
 
 	// 补正审查通知列表
 	private Pagination<PatentNoticeOfCorrectionBo> getNoticeOfCorrectionList(Date authorizedDate, Integer serialNumber,
 			String patentNumber, String office, String locationProvince, String unitName, Integer patentCatagory,
 			String patentName, Integer patentState, String author, Integer pNo, Integer pSize) {
-		return  patentInfoService.getNoticeOfCorrectionList(authorizedDate,
-				serialNumber, patentNumber, office, locationProvince, unitName, patentCatagory, patentName, patentState,
-				author, pNo, pSize);
+		return patentInfoService.getNoticeOfCorrectionList(authorizedDate, serialNumber, patentNumber, office,
+				locationProvince, unitName, patentCatagory, patentName, patentState, author, pNo, pSize);
 	}
 
 	// 待缴费专利管理
 	private Pagination<PatentPendingBo> getManagePendingPaymentList(String locationProvince, Integer pNo,
 			Integer pSize) {
-		return  patentInfoService.getManagePendingPaymentList(locationProvince, pNo,
-				pSize);
+		return patentInfoService.getManagePendingPaymentList(locationProvince, pNo, pSize);
 	}
 
 	// 管理端申请专利列表(专利综合管理)
@@ -855,16 +858,15 @@ public class PatentApiController extends BaseApiController {
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
 			String[] createTime, String[] patentApplicationDate, String author, Integer pNo, Integer pSize)
 			throws ParseException {
-		return  patentInfoService.getManagePatentList(serialNumber, patentNumber, office,
-				locationProvince, unitName, patentCatagory, patentName, patentState, createTime, patentApplicationDate,
-				author, pNo, pSize);
+		return patentInfoService.getManagePatentList(serialNumber, patentNumber, office, locationProvince, unitName,
+				patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, pNo, pSize);
 	}
 
 	// 用户端申请专利列表
 	private Pagination<PatentInfo> getClientApplyList(Result res, String patentNumber, String patentName,
 			Integer patentCatagory, Integer patentState, Integer pNo, Integer pSize) {
-		return  patentInfoService.getClientApplyList(TokenManager.getUserId(), patentNumber,
-				patentName, patentCatagory, patentState, pNo, pSize);
+		return patentInfoService.getClientApplyList(TokenManager.getUserId(), patentNumber, patentName, patentCatagory,
+				patentState, pNo, pSize);
 	}
 
 	private PatentRegistration regBo2Reg(String rid, String pid, PatentRegistrationBo patentRegistrationBo)
@@ -977,4 +979,13 @@ public class PatentApiController extends BaseApiController {
 		return state;
 	}
 
+	// 判断用户是否通过认证
+	private Result checkCertify(Result res, String uid) {
+		OrganizationIdentity o = organizationIdentityServivce.selectOrgIdentityByUserId(uid);
+		if (null == o || 5 != o.getAuditStatus()) {
+			res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
+		}
+		return res;
+	}
+
 }

+ 1 - 1
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -428,7 +428,6 @@ public class UserApiController extends BaseApiController {
 		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
 		u.setEmail(orgIdentityBo.getEmail());
 		userService.updateByPrimaryKeySelective(u);
-		TokenManager.getToken().setEmail(orgIdentityBo.getEmail());
 		organizationIdentity.setContacts(orgIdentityBo.getContacts());
 		organizationIdentity.setFixedTel(orgIdentityBo.getFixedTel());
 		organizationIdentity.setQq(orgIdentityBo.getQq());
@@ -894,6 +893,7 @@ public class UserApiController extends BaseApiController {
 		if (null == identity) {
 			userIdentity.setId(UUID.randomUUID().toString());
 			userIdentity.setUid(uid);
+			userIdentity.setWrongCount(0);
 			res.setData(userIdentityService.insert(userIdentity));
 		} else {
 			userIdentity.setId(identity.getId());

+ 8 - 2
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -43,9 +43,15 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 			if (!StringUtils.isBlank(unitName) || !StringUtils.isBlank(contacts)){
 				OrganizationIdentity organizationIdentity = new OrganizationIdentity();
 				organizationIdentity.setUid(user.getId());
-				organizationIdentity.setUnitName(null == unitName ? "" : unitName);
-				organizationIdentity.setContacts(null == contacts ? "" : contacts);
+				organizationIdentity.setUnitName(StringUtils.isBlank(unitName) ? "" : unitName);
+				organizationIdentity.setContacts(StringUtils.isBlank(contacts) ? "" : contacts);
 				organizationIdentity.setId(UUID.randomUUID().toString());
+				organizationIdentity.setIdentityType(0);
+				organizationIdentity.setAuditStatus(0);
+				organizationIdentity.setProcess(0);
+				organizationIdentity.setWrongCount(0);
+				organizationIdentity.setListed(0);
+				organizationIdentity.setListedType(0);
 				organizationIdentityMapper.insert(organizationIdentity);
 			}
 	    }

+ 1 - 1
src/main/resources/props/config_dev.properties

@@ -50,7 +50,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.2
+static.host=//afts.hnzhiming.com/1.0.3
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

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

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.2
+static.host=//afts.hnzhiming.com/1.0.3
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

+ 1 - 1
src/main/resources/props/config_prod.properties

@@ -50,4 +50,4 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.2
+static.host=//afts.hnzhiming.com/1.0.3

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//aftts.hnzhiming.com/1.0.2
+static.host=//aftts.hnzhiming.com/1.0.3
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload