Browse Source

update sql

Antiloveg 8 years ago
parent
commit
3fa8d2bcb3

+ 3 - 3
schema/2017-03-07.sql

@@ -1,5 +1,5 @@
 ALTER TABLE `org_tech_product` add `account_url` varchar(255)  NULL  COMMENT '台帐URL'
 
-ALTER TABLE `org_ratepay` add `gross_profit` INT(6) NULL COMMENT '利润总额(万元)'
-
-ALTER TABLE `org_ratepay` add `research_cost` INT(6) NULL COMMENT '研发费用(万元)'
+ALTER TABLE `org_ratepay` 
+add `gross_profit` INT(6) NULL COMMENT '利润总额(万元)',
+add `research_cost` INT(6) NULL COMMENT '研发费用(万元)'

+ 9 - 0
schema/2017-03-08.sql

@@ -0,0 +1,9 @@
+ALTER TABLE `organization_identity` 
+add `listed` int(1)  NOT NULL  default 0 COMMENT '是否上市',
+add `listed_date` DATETIME   NULL   COMMENT '上市时间',
+add `listed_type` int(1)   NOT NULL   COMMENT '上市类型',
+add `stock_code` VARCHAR(32)   NULL   COMMENT '股票代码'
+
+ALTER TABLE `org_human_resource` 
+add `new_employment` int(6)   NULL   COMMENT '新增就业人数' AFTER `year`,
+add `graduate_number` int(6)   NULL   COMMENT '高校应届毕业生人数'  AFTER `new_employment`

+ 27 - 3
src/main/java/com/goafanti/common/mapper/OrgHumanResourceMapper.xml

@@ -31,6 +31,8 @@
     <result column="fortyone_to_fifty" property="fortyoneToFifty" jdbcType="INTEGER" />
     <result column="above_fifty" property="aboveFifty" jdbcType="INTEGER" />
     <result column="year" property="year" jdbcType="INTEGER" />
+    <result column="new_employment" property="newEmployment" jdbcType="INTEGER" />
+    <result column="graduate_number" property="graduateNumber" jdbcType="INTEGER" />
     <result column="roster_url" property="rosterUrl" jdbcType="VARCHAR" />
     <result column="social_security_url" property="socialSecurityUrl" jdbcType="VARCHAR" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
@@ -40,7 +42,8 @@
     tech_part_time, firm_temporary, tech_temporary, firm_foreign, tech_foreign, firm_abroad, 
     tech_abroad, firm_core, tech_core, doctor, master, undergraduate, college, 
     senior_title, intermediate_title, junior_title, senior_mechanic, below_thirty, 
-    thirtyone_to_thirtyfour, fortyone_to_fifty, above_fifty, year, roster_url, social_security_url, deleted_sign
+    thirtyone_to_thirtyfour, fortyone_to_fifty, above_fifty, year, new_employment, graduate_number,
+    roster_url, social_security_url, deleted_sign
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -62,7 +65,7 @@
       undergraduate, college, senior_title, 
       intermediate_title, junior_title, senior_mechanic, 
       below_thirty, thirtyone_to_thirtyfour, fortyone_to_fifty, 
-      above_fifty, year, roster_url, social_security_url, deleted_sign)
+      above_fifty, year, new_employment, graduate_number, roster_url, social_security_url, deleted_sign)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{firmTotal,jdbcType=INTEGER}, 
       #{techTotal,jdbcType=INTEGER}, #{firmInService,jdbcType=INTEGER}, #{techInService,jdbcType=INTEGER}, 
       #{firmPartTime,jdbcType=INTEGER}, #{techPartTime,jdbcType=INTEGER}, #{firmTemporary,jdbcType=INTEGER}, 
@@ -72,7 +75,8 @@
       #{undergraduate,jdbcType=INTEGER}, #{college,jdbcType=INTEGER}, #{seniorTitle,jdbcType=INTEGER}, 
       #{intermediateTitle,jdbcType=INTEGER}, #{juniorTitle,jdbcType=INTEGER}, #{seniorMechanic,jdbcType=INTEGER}, 
       #{belowThirty,jdbcType=INTEGER}, #{thirtyoneToThirtyfour,jdbcType=INTEGER}, #{fortyoneToFifty,jdbcType=INTEGER}, 
-      #{aboveFifty,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{rosterUrl,jdbcType=VARCHAR}, #{socialSecurityUrl,jdbcType=VARCHAR},
+      #{aboveFifty,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{newEmployment,jdbcType=INTEGER}, #{graduateNumber,jdbcType=INTEGER},
+      #{rosterUrl,jdbcType=VARCHAR}, #{socialSecurityUrl,jdbcType=VARCHAR},
       #{deletedSign,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgHumanResource" >
@@ -165,6 +169,12 @@
       <if test="year != null" >
         year,
       </if>
+      <if test="newEmployment != null" >
+        new_employment,
+      </if>
+      <if test="graduateNumber != null" >
+        graduate_number,
+      </if>
       <if test="rosterUrl != null" >
         roster_url,
       </if>
@@ -263,6 +273,12 @@
       <if test="year != null" >
         #{year,jdbcType=INTEGER},
       </if>
+       <if test="newEmployment != null" >
+        #{newEmployment,jdbcType=INTEGER},
+      </if>
+       <if test="graduateNumber != null" >
+        #{graduateNumber,jdbcType=INTEGER},
+      </if>
       <if test="rosterUrl != null" >
         #{rosterUrl,jdbcType=VARCHAR},
       </if>
@@ -361,6 +377,12 @@
       <if test="year != null" >
         year = #{year,jdbcType=INTEGER},
       </if>
+      <if test="newEmployment != null" >
+        new_employment = #{newEmployment,jdbcType=INTEGER},
+      </if>
+      <if test="graduateNumber != null" >
+        graduate_number = #{graduateNumber,jdbcType=INTEGER},
+      </if>
       <if test="rosterUrl != null" >
         roster_url = #{rosterUrl,jdbcType=VARCHAR},
       </if>
@@ -403,6 +425,8 @@
       fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
       above_fifty = #{aboveFifty,jdbcType=INTEGER},
       year = #{year,jdbcType=INTEGER},
+      new_employment = #{newEmployment,jdbcType=INTEGER},
+      graduate_number = #{graduateNumber,jdbcType=INTEGER},
       roster_url = #{rosterUrl,jdbcType=VARCHAR},
       social_security_url = #{socialSecurityUrl,jdbcType=VARCHAR},
       deleted_sign = #{deletedSign,jdbcType=INTEGER}

+ 56 - 4
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -43,6 +43,11 @@
     <result column="second_mobile" property="secondMobile" jdbcType="VARCHAR" />
     <result column="third_contacts" property="thirdContacts" jdbcType="VARCHAR" />
     <result column="third_mobile" property="thirdMobile" jdbcType="VARCHAR" />
+    
+    <result column="listed" property="listed" jdbcType="INTEGER" />
+    <result column="listed_date" property="listedDate" jdbcType="TIMESTAMP" />
+    <result column="listed_type" property="listedType" jdbcType="INTEGER" />
+    <result column="stock_code" property="stock_code" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, aft_username, 
@@ -50,7 +55,8 @@
     licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch, bank_card_number, 
     validation_amount, identity_type, location_province, location_city, location_area, 
     legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, process, wrong_count, 
-    payment_date, first_contacts, first_mobile, second_contacts, second_mobile, third_contacts ,third_mobile
+    payment_date, first_contacts, first_mobile, second_contacts, second_mobile, third_contacts ,third_mobile,
+    listed, listed_date, listed_type, stock_code
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -75,7 +81,8 @@
       legal_person, legal_person_id_card, last_year_tax_report_url, 
       audit_status, process, wrong_count, payment_date,
       first_contacts, first_mobile, second_contacts, 
-      second_mobile, third_contacts ,third_mobile
+      second_mobile, third_contacts , third_mobile,
+      listed, listed_date, listed_type, stock_code
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
       #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
@@ -89,7 +96,8 @@
       #{legalPerson,jdbcType=VARCHAR}, #{legalPersonIdCard,jdbcType=VARCHAR}, #{lastYearTaxReportUrl,jdbcType=VARCHAR}, 
       #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
       #{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR}, #{secondContacts,jdbcType=VARCHAR}, 
-      #{secondMobile,jdbcType=VARCHAR}, #{thirdContacts,jdbcType=VARCHAR}, #{thirdMobile,jdbcType=VARCHAR}
+      #{secondMobile,jdbcType=VARCHAR}, #{thirdContacts,jdbcType=VARCHAR}, #{thirdMobile,jdbcType=VARCHAR},
+      #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP}, #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
@@ -216,6 +224,19 @@
       <if test="thirdMobile != null">
       	third_mobile,
       </if>
+      
+      <if test="listed != null">
+      	listed,
+      </if>
+      <if test="listedDate != null">
+      	listed_date,
+      </if>
+      <if test="listedType != null">
+      	listed_type,
+      </if>
+      <if test="stockCode != null">
+      	stock_code,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -339,6 +360,19 @@
       <if test="thirdMobile != null">
       	#{thirdMobile,jdbcType=VARCHAR},
       </if>
+      
+      <if test="listed != null" >
+        #{listed,jdbcType=INTEGER},
+      </if>
+      <if test="listedDate != null" >
+        #{listedDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="listedType != null" >
+        #{listedType,jdbcType=INTEGER},
+      </if>
+      <if test="stockCode != null" >
+        #{stockCode,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity" >
@@ -462,6 +496,19 @@
       <if test="thirdMobile != null">
       	third_mobile = #{thirdMobile,jdbcType=VARCHAR},
       </if>
+      
+      <if test="listed != null" >
+        listed = #{listed,jdbcType=INTEGER},
+      </if>
+      <if test="listedDate != null" >
+        listed_date = #{listedDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="listedType != null" >
+        listed_type = #{listedType,jdbcType=INTEGER},
+      </if>
+      <if test="stockCode != null" >
+        stock_code = #{stockCode,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -505,7 +552,12 @@
       second_contacts = #{secondContacts,jdbcType=VARCHAR},
       second_mobile = #{secondMobile,jdbcType=VARCHAR},
       third_contacts = #{thirdContacts,jdbcType=VARCHAR},
-      third_mobile = #{thirdMobile,jdbcType=VARCHAR}
+      third_mobile = #{thirdMobile,jdbcType=VARCHAR},
+      
+      listed = #{listed,jdbcType=INTEGER},
+      listed_date = #{listedDate,jdbcType=TIMESTAMP},
+      listed_type = #{listedType,jdbcType=INTEGER},
+      stock_code = #{stockCode,jdbcType=VARCHAR}
       }
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 28 - 0
src/main/java/com/goafanti/common/model/OrgHumanResource.java

@@ -146,6 +146,16 @@ public class OrgHumanResource {
     private Integer year;
     
     /**
+     * 新增就业人数
+     */
+    private Integer newEmployment;
+    
+    /**
+     * 高校应届毕业生人数
+     */
+    private Integer graduateNumber;
+    
+    /**
      * 花名册URL
      */
     private String rosterUrl;
@@ -393,6 +403,24 @@ public class OrgHumanResource {
 	public void setYear(Integer year) {
 		this.year = year;
 	}
+	
+	
+
+	public Integer getNewEmployment() {
+		return newEmployment;
+	}
+
+	public void setNewEmployment(Integer newEmployment) {
+		this.newEmployment = newEmployment;
+	}
+
+	public Integer getGraduateNumber() {
+		return graduateNumber;
+	}
+
+	public void setGraduateNumber(Integer graduateNumber) {
+		this.graduateNumber = graduateNumber;
+	}
 
 	public String getRosterUrl() {
 		return rosterUrl;

+ 6 - 5
src/main/java/com/goafanti/common/model/OrgRatepay.java

@@ -57,7 +57,7 @@ public class OrgRatepay {
     /**
      * 研发费用
      */
-    private Integer research_cost;
+    private Integer researchCost;
     
 
     /**
@@ -177,12 +177,13 @@ public class OrgRatepay {
 		this.grossProfit = grossProfit;
 	}
 
-	public Integer getResearch_cost() {
-		return research_cost;
+
+	public Integer getResearchCost() {
+		return researchCost;
 	}
 
-	public void setResearch_cost(Integer research_cost) {
-		this.research_cost = research_cost;
+	public void setResearchCost(Integer researchCost) {
+		this.researchCost = researchCost;
 	}
 
 	//企业纳税申报表

+ 72 - 0
src/main/java/com/goafanti/common/model/OrganizationIdentity.java

@@ -5,6 +5,9 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class OrganizationIdentity {
     private String id;
 
@@ -200,6 +203,26 @@ public class OrganizationIdentity {
      */
     private String thirdMobile;
     
+    /**
+     * 是否上市
+     */
+    private Integer listed;
+    
+    /**
+     * 上市时间
+     */
+    private Date listedDate;
+    
+    /**
+     * 上市类型
+     */
+    private Integer listedType;
+    
+    /**
+     * 股票代码
+     */
+    private String stockCode;
+    
 
     public String getId() {
         return id;
@@ -522,6 +545,40 @@ public class OrganizationIdentity {
 	public void setThirdMobile(String thirdMobile) {
 		this.thirdMobile = thirdMobile;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getListed() {
+		return listed;
+	}
+
+	public void setListed(Integer listed) {
+		this.listed = listed;
+	}
+
+	public Date getListedDate() {
+		return listedDate;
+	}
+
+	public void setListedDate(Date listedDate) {
+		this.listedDate = listedDate;
+	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getListedType() {
+		return listedType;
+	}
+
+	public void setListedType(Integer listedType) {
+		this.listedType = listedType;
+	}
+
+	public String getStockCode() {
+		return stockCode;
+	}
+
+	public void setStockCode(String stockCode) {
+		this.stockCode = stockCode;
+	}
 
 	//打款日期
 	public String getPaymentDateFormattedDate(){
@@ -535,6 +592,21 @@ public class OrganizationIdentity {
 	public void setPaymentDateFormattedDate(String paymentDateFormattedDate){
 			
 	}
+	
+	/**
+	 * 上市时间
+	 */
+	public String getListedDateFormattedDate(){
+		if (this.listedDate == null) {
+			 return null;
+		   } else {
+			 return DateFormatUtils.format(this.getListedDate(), "yyyy-MM-dd");
+		   }
+	}
+		
+	public void setListedDateFormattedDate(String listedDateFormattedDate){
+			
+	}
     
     
 }

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

@@ -2,6 +2,7 @@ package com.goafanti.user.controller;
 
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
@@ -32,6 +33,7 @@ import com.goafanti.common.model.UserCareer;
 import com.goafanti.common.model.UserEdu;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.model.UserInfo;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.FileUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PasswordUtil;
@@ -755,10 +757,14 @@ public class UserApiController extends BaseApiController {
 
 	/**
 	 * 团体实名认证流程下一步
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/orgNextPro", method = RequestMethod.POST)
-	public Result orgNextProcess(OrganizationIdentity orgIdentity, String verificationCode) {
+	public Result orgNextProcess(OrganizationIdentity orgIdentity, String listedDateFormattedDate, String verificationCode) throws ParseException {
 		Result res = new Result();
+		if (!StringUtils.isBlank(listedDateFormattedDate)){
+			orgIdentity.setListedDate(DateUtils.parseDate(listedDateFormattedDate, "yyyy-MM-dd"));
+		}
 		if (1 == orgIdentity.getProcess()) {
 			if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)) {
 				res.getError().add(buildError(ErrorConstants.VCODE_ERROR, "验证码错误"));