Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

albertshaw 8 years ago
parent
commit
1123a021c3

+ 2 - 2
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_tech_product` add `account_url` varchar(255)  NULL  COMMENT '台帐URL';
 
 ALTER TABLE `org_ratepay` 
 add `gross_profit` INT(6) NULL COMMENT '利润总额(万元)',
-add `research_cost` INT(6) NULL COMMENT '研发费用(万元)'
+add `research_cost` INT(6) NULL COMMENT '研发费用(万元)';

+ 4 - 4
schema/2017-03-08.sql

@@ -2,13 +2,13 @@ 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 '股票代码'
+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`
+add `graduate_number` int(6)   NULL   COMMENT '高校应届毕业生人数'  AFTER `new_employment`;
 
-CREATE TABLE IF NOT EXISTS `aft_dev`.`org_annual_report` (
+CREATE TABLE `org_annual_report` (
   `id` VARCHAR(36) NOT NULL,
   `uid` VARCHAR(36) NULL,
   `create_time` DATETIME NULL COMMENT '创建时间',
@@ -20,4 +20,4 @@ CREATE TABLE IF NOT EXISTS `aft_dev`.`org_annual_report` (
   `state` INT(1) NULL DEFAULT 0 COMMENT '年报状态',
   `deleted_sign` INT(1) NOT NULL DEFAULT 0 COMMENT '删除标记',
   PRIMARY KEY (`id`))
-ENGINE = InnoDB
+ENGINE = InnoDB;

+ 7 - 7
schema/2017-03-09.sql

@@ -1,11 +1,11 @@
 ALTER TABLE org_annual_report 
-add `basic_research_cost` DECIMAL(8,2) NULL COMMENT '基础研究投入费用' AFTER `total_export_volume`
+add `basic_research_cost` DECIMAL(8,2) NULL COMMENT '基础研究投入费用' AFTER `total_export_volume`;
 
 ALTER TABLE org_activity 
 MODIFY COLUMN budget DECIMAL(8,2) COMMENT '预算(万元)',
 MODIFY COLUMN first_year_expenditure DECIMAL(8,2) COMMENT '第一年研发经费支出(万元)',
 MODIFY COLUMN second_year_expenditure DECIMAL(8,2) COMMENT '第二年研发经费支出(万元)',
-MODIFY COLUMN third_year_expenditure DECIMAL(8,2) COMMENT '第三年研发经费支出(万元)'
+MODIFY COLUMN third_year_expenditure DECIMAL(8,2) COMMENT '第三年研发经费支出(万元)';
 
 ALTER TABLE org_activity_cost 
 MODIFY COLUMN internal_labor_cost DECIMAL(8,2) COMMENT '内部人员人工费用(万元)',
@@ -16,10 +16,10 @@ MODIFY COLUMN internal_design_cost DECIMAL(8,2) COMMENT '内部设计费用(万
 MODIFY COLUMN internal_equipment_cost DECIMAL(8,2) COMMENT '内部装备调试费用与实验费用(万元)',
 MODIFY COLUMN internal_other_cost DECIMAL(8,2) COMMENT '内部其他费用(万元)',
 MODIFY COLUMN external_total_cost DECIMAL(8,2) COMMENT '委托外部研究开发总费用(万元)',
-MODIFY COLUMN external_abroad_cost DECIMAL(8,2) COMMENT '委托外部境内的外部研发费用(万元)'
+MODIFY COLUMN external_abroad_cost DECIMAL(8,2) COMMENT '委托外部境内的外部研发费用(万元)';
 
 ALTER TABLE org_cognizance 
-MODIFY COLUMN basic_research_cost DECIMAL(8,2) COMMENT '基础研究投入费用总额(万元)'
+MODIFY COLUMN basic_research_cost DECIMAL(8,2) COMMENT '基础研究投入费用总额(万元)';
 
 ALTER TABLE org_finance
 MODIFY COLUMN main_business_income DECIMAL(8,2) COMMENT '主营业务收入(万元)',
@@ -32,7 +32,7 @@ MODIFY COLUMN total_asset DECIMAL(8,2) COMMENT '资产总额(万元)',
 MODIFY COLUMN net_asset DECIMAL(8,2) COMMENT '所有者权益合计(万元)',
 MODIFY COLUMN gross_profit DECIMAL(8,2) COMMENT '利润总额(万元)',
 MODIFY COLUMN net_profit DECIMAL(8,2) COMMENT '净利润(万元)',
-MODIFY COLUMN sales_revenue DECIMAL(8,2) COMMENT '销售收入(万元)'
+MODIFY COLUMN sales_revenue DECIMAL(8,2) COMMENT '销售收入(万元)';
 
 ALTER TABLE org_ratepay
 MODIFY COLUMN operating_income DECIMAL(8,2) COMMENT '营业收入(万元)',
@@ -43,7 +43,7 @@ MODIFY COLUMN non_taxable_income DECIMAL(8,2) COMMENT '不征税收入(万元)',
 MODIFY COLUMN tax_exempt_income DECIMAL(8,2) COMMENT '免税收入(万元)',
 MODIFY COLUMN subsidy_income DECIMAL(8,2) COMMENT '政府补助收入(万元)',
 MODIFY COLUMN gross_profit DECIMAL(8,2) COMMENT '利润总额(万元)',
-MODIFY COLUMN research_cost DECIMAL(8,2) COMMENT '研发费用(万元)'
+MODIFY COLUMN research_cost DECIMAL(8,2) COMMENT '研发费用(万元)';
 
 ALTER TABLE org_tech_product
-MODIFY COLUMN last_year_revenue DECIMAL(8,2) COMMENT '上年度销售收入(万元)'
+MODIFY COLUMN last_year_revenue DECIMAL(8,2) COMMENT '上年度销售收入(万元)';

+ 1 - 1
schema/2017-03-10.sql

@@ -1,3 +1,3 @@
 ALTER TABLE user
-add aid VARCHAR(36) NULL COMMENT '管理员ID' 
+add aid VARCHAR(36) NULL COMMENT '管理员ID';
 

+ 1 - 1
schema/2017-03-11.sql

@@ -1,4 +1,4 @@
-CREATE TABLE IF NOT EXISTS `aft_dev`.`aft_file` (
+CREATE TABLE `aft_file` (
   `id` VARCHAR(36) NOT NULL,
   `uid` VARCHAR(36) NULL COMMENT '用户id',
   `file_name` VARCHAR(32) NULL COMMENT '文件名称',

+ 1 - 1
schema/2017-03-12.sql

@@ -1,3 +1,3 @@
 alter table org_cognizance_log drop foreign key fk_org_cognizance_log_org_cognizance1;
 
-alter table patent_info add deleted_sign INT(1) NULL COMMENT '删除标记' 
+alter table patent_info add deleted_sign INT(1) NULL COMMENT '删除标记';

+ 5 - 5
schema/2017-03-16.sql

@@ -1,5 +1,5 @@
 
-CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_project` (
+CREATE TABLE  `tech_project` (
   `id` VARCHAR(36) NOT NULL,
   `uid` VARCHAR(36) NOT NULL,
   `serial_number` INT(8) NULL COMMENT '编号' AUTO_INCREMENT,
@@ -24,10 +24,10 @@ CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_project` (
   PRIMARY KEY (`id`),
   INDEX `serialNumber` (`serial_number` ASC))
 ENGINE = InnoDB AUTO_INCREMENT= 600000
-COMMENT = '科技项目申请表'
+COMMENT = '科技项目申请表';
 
 
-CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_project_log` (
+CREATE TABLE `tech_project_log` (
   `id` VARCHAR(36) NOT NULL,
   `pid` VARCHAR(36) NOT NULL,
   `record_time` DATETIME NULL COMMENT '状态变更录入时间',
@@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_project_log` (
 ENGINE = InnoDB
 COMMENT = '科技项目申报log';
 
-CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_website` (
+CREATE TABLE `tech_website` (
   `id` VARCHAR(36) NOT NULL,
   `uid` VARCHAR(36) NULL,
   `department` VARCHAR(45) NULL COMMENT '科技部门名称',
@@ -50,4 +50,4 @@ CREATE TABLE IF NOT EXISTS `aft_dev`.`tech_website` (
   `deleted_sign` INT(1) NULL COMMENT '删除标记',
   PRIMARY KEY (`id`))
 ENGINE = InnoDB
-COMMENT = '科技项目申报网址'
+COMMENT = '科技项目申报网址';

+ 1 - 1
schema/2017-03-19.sql

@@ -2,4 +2,4 @@ alter table organization_identity
 add certificate_number VARCHAR(36) NULL COMMENT '高企认定证书编号' ,
 add issuing_date DATETIME NULL COMMENT '高企认定发证日期',
 add cog_contacts INT(1) NULL COMMENT '高企认定联系人及联系方式',
-add consultant VARCHAR(36) COMMENT '高企认定咨询师'
+add consultant VARCHAR(36) COMMENT '高企认定咨询师';

+ 21 - 16
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -329,7 +329,7 @@
   
   <select id ="findTechProjectManageListByPage" parameterType="java.lang.String" 
      resultType="com.goafanti.techproject.bo.TechProjectManageListBo">
-  	 select p.id, p.uid, i.location_province as province, 
+  	 select x.* from (select p.id, p.uid, i.location_province as province, 
 	        i.unit_name as unitName,  
 		    CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 		    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
@@ -337,39 +337,44 @@
 		    p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate, 
 		    p.accept_date as acceptDate, a.name as consultant, p.contacts,
 		    p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state,
-        w.id as wid, w.website, w.account_number as accountNumber, w.department, w.password
+        w.id as wid, w.website, w.account_number as accountNumber, w.department, w.password, p.deleted_sign as pd, w.deleted_sign as wd
 	  FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN admin a on p.consultant = a.id 
-    LEFT JOIN tech_website w on p.department = w.id 
-		and p.deleted_sign = 0 and w.deleted_sign = 0
-		where 1 = 1
+    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 ) x where x.wd = 0 or x.wd is null
 		 <if test="province != null">
-    	and i.location_province = #{province,jdbcType=VARCHAR}
+    	and x.province = #{province,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
+    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
-    order by p.serial_number desc
+    order by x.serialNumber desc
    <if test="page_sql!=null">
 		${page_sql}
 	</if>
   </select>
   
   <select id="findTechProjectManageCount" resultType="java.lang.Integer" parameterType="String">
- 	select count(1)
-    FROM  tech_project p
+ 	select count(1) from ( select x.* from (select p.id, p.uid, i.location_province as province, 
+	        i.unit_name as unitName,  
+		    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, 
+		    p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate, 
+		    p.accept_date as acceptDate, a.name as consultant, p.contacts,
+		    p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state,
+        w.id as wid, w.website, w.account_number as accountNumber, w.department, w.password, p.deleted_sign as pd, w.deleted_sign as wd
+	  FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN admin a on p.consultant = a.id 
-   		 LEFT JOIN tech_website w on p.department = w.id 
-		and p.deleted_sign = 0 and w.deleted_sign = 0
-		where 1 = 1
-	 <if test="province != null">
-    	and i.location_province = #{province,jdbcType=VARCHAR}
+    LEFT JOIN tech_website w on p.department = w.id where p.deleted_sign = 0 ) x where x.wd = 0 or x.wd is null
+		 <if test="province != null">
+    	and x.province = #{province,jdbcType=VARCHAR}
     </if>
     <if test="unitName != null" >
-    	and i.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%') 
+    	and x.unitName like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')  
     </if>
+    ) y 
   </select>
   
   <select id="selectProjectDetail" resultType="com.goafanti.techproject.bo.TechProjectDetailBo" parameterType="java.lang.String">

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

@@ -51,7 +51,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

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

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

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

@@ -51,4 +51,4 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.10
+static.host=//afts.hnzhiming.com/1.0.11

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

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//aftts.hnzhiming.com/1.0.10
+static.host=//aftts.hnzhiming.com/1.0.11
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload