Sfoglia il codice sorgente

企业荣誉及其他证明材料CRUD接口

Antiloveg 8 anni fa
parent
commit
50343537b7

+ 75 - 25
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -18,6 +18,7 @@ import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.OrgActivity;
 import com.goafanti.common.model.OrgActivityCost;
 import com.goafanti.common.model.OrgFinance;
+import com.goafanti.common.model.OrgHonorDatum;
 import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.common.model.OrgRatepay;
@@ -34,6 +35,7 @@ import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgFinanceService;
+import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
 import com.goafanti.techservice.cognizance.service.OrgRatepayService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
@@ -73,6 +75,8 @@ public class AdminApiController extends BaseApiController {
 	private OrgActivityCostService          orgActivityCostService;
 	@Resource
 	private OrgTechAchievementService       orgTechAchievementService;
+	@Resource
+	private OrgHonorDatumService            orgHonorDatumService;
 
 	/**
 	 * 个人用户列表
@@ -282,38 +286,27 @@ public class AdminApiController extends BaseApiController {
 	 * 管理端录入+修改知识产权信息
 	 * 
 	 * @return
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/intellectual", method = RequestMethod.POST)
 	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate,
-			String uid) {
+			String uid) throws ParseException {
 		Result res = new Result();
-		if (null == authorizationDateFormattedDate) {
-			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "授权日期不能为空"));
+		if (!StringUtils.isBlank(authorizationDateFormattedDate)) {
+			orgIntellectualProperty
+			.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
 		}
 		if (null == orgIntellectualProperty.getId()) {
-			try {
+			
 				orgIntellectualProperty.setId(UUID.randomUUID().toString());
 				orgIntellectualProperty.setUid(uid);
 				orgIntellectualProperty.setEvaluationCategory(
 						(orgIntellectualProperty.getCatagory() >= 2 && orgIntellectualProperty.getCatagory() <= 4) ? 1
 								: 0);
-				orgIntellectualProperty
-						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
 				orgIntellectualProperty.setDeletedSign(0);
-			} catch (ParseException e) {
-				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-				return res;
-			}
 			res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
 		} else {
 			orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
-			try {
-				orgIntellectualProperty
-						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
-			} catch (ParseException e) {
-				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-				return res;
-			}
 			res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(orgIntellectualProperty));
 		}
 		return res;
@@ -413,8 +406,13 @@ public class AdminApiController extends BaseApiController {
 			throws ParseException {
 		Result res = new Result();
 		orgActivity.setDeletedSign(0);
-		orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
-		orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
+		if (!StringUtils.isBlank(startDateFormattedDate)){
+			orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
+		}
+		
+		if(StringUtils.isBlank(endDateFormattedDate)){
+			orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
+		}
 		if (StringUtils.isBlank(orgActivity.getId())) {
 			orgActivity.setId(UUID.randomUUID().toString());
 			orgActivity.setUid(TokenManager.getUserId());
@@ -475,16 +473,15 @@ public class AdminApiController extends BaseApiController {
 	 * 企业年度研究开发费用结构明细表(新增+修改)
 	 * 
 	 * @return
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/activityCost", method = RequestMethod.POST)
-	public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate) {
+	public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate) throws ParseException {
 		Result res = new Result();
-		try {
+		if (StringUtils.isBlank(signDateFormattedDate)){
 			orgActivityCost.setSignDate(DateUtils.parseDate(signDateFormattedDate, "yyyy-MM-dd"));
-		} catch (ParseException e) {
-			res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-			return res;
 		}
+		
 		if (null == orgActivityCost.getId()) {
 			OrgActivity ac = orgActivityService.selectOrgActivityByPrimaryKey(orgActivityCost.getAid());
 			orgActivityCost.setStartDate(ac.getStartDate());
@@ -551,6 +548,7 @@ public class AdminApiController extends BaseApiController {
 		Result res = new Result();
 		if (null == orgRatepay.getId()) {
 			orgRatepay.setId(UUID.randomUUID().toString());
+			orgRatepay.setDeletedSign(0);
 			orgRatepayService.insert(orgRatepay);
 		} else {
 			orgRatepayService.updateByPrimaryKeySelective(orgRatepay);
@@ -592,6 +590,7 @@ public class AdminApiController extends BaseApiController {
 		Result res = new Result();
 		if (null == orgFinance.getId()) {
 			orgFinance.setId(UUID.randomUUID().toString());
+			orgFinance.setDeletedSign(0);
 			orgFinanceService.insert(orgFinance);
 		} else {
 			orgFinanceService.updateByPrimaryKeySelective(orgFinance);
@@ -642,10 +641,14 @@ public class AdminApiController extends BaseApiController {
 	 * 科技成果转化情况新增+修改
 	 * @param achievement
 	 * @return
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value= "/disposeAchievement", method = RequestMethod.POST)
-	public Result disposeAchievement(OrgTechAchievement achievement){
+	public Result disposeAchievement(OrgTechAchievement achievement, String acquisitionTimeFormattedDate) throws ParseException{
 		Result res = new Result();
+		if (!StringUtils.isBlank(acquisitionTimeFormattedDate)){
+			achievement.setAcquisitionTime(DateUtils.parseDate(acquisitionTimeFormattedDate, "yyyy-MM-dd"));
+		}
 		if (null == achievement.getId()){
 			achievement.setId(UUID.randomUUID().toString());
 			achievement.setDeletedSign(0);
@@ -655,6 +658,53 @@ public class AdminApiController extends BaseApiController {
 		}
 		return res;
 	}
+	
+	/**
+	 * 企业荣誉及其他证明材料列表入口
+	 * 
+	 * @return
+	 */
+	@RequestMapping(value = "/honorList", method = RequestMethod.POST)
+	public Result honorList(String pageNo, String pageSize, String uid) {
+		Result res = new Result();
+		res = checkCertify(res);
+		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);
+			}
+			res.setData(orgHonorDatumService.listOrgHonorDatum(pNo, pSize, uid));
+		}
+		return res;
+	}
+
+	/**
+	 * 企业荣誉及其他证明材料新增+修改
+	 * 
+	 * @param achievement
+	 * @return
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "/disposeHonor", method = RequestMethod.POST)
+	public Result disposeHonor(OrgHonorDatum honor, String issuingTimeFormattedDate, String uid) throws ParseException {
+		Result res = new Result();
+		if (!StringUtils.isBlank(issuingTimeFormattedDate)){
+			honor.setIssuingTime(DateUtils.parseDate(issuingTimeFormattedDate, "yyyy-MM-dd"));
+		}
+		if (null == honor.getId()) {
+			honor.setId(UUID.randomUUID().toString());
+			honor.setUid(uid);
+			honor.setDeletedSign(0);
+			orgHonorDatumService.inset(honor);
+		} else {
+			orgHonorDatumService.updateByPrimaryKeySelective(honor);
+		}
+		return res;
+	}
 
 	// 判断用户是否通过认证
 	private Result checkCertify(Result res, String uid) {

+ 4 - 0
src/main/java/com/goafanti/common/dao/OrgFinanceMapper.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgFinance;
 
 public interface OrgFinanceMapper {
@@ -16,4 +18,6 @@ public interface OrgFinanceMapper {
     int updateByPrimaryKey(OrgFinance record);
 
 	OrgFinance selectOrgFinanceByUid(String uid);
+
+	int batchDeleteByPrimaryKey(List<String> id);
 }

+ 21 - 0
src/main/java/com/goafanti/common/dao/OrgHonorDatumMapper.java

@@ -0,0 +1,21 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.common.model.OrgHonorDatum;
+
+public interface OrgHonorDatumMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(OrgHonorDatum record);
+
+    int insertSelective(OrgHonorDatum record);
+
+    OrgHonorDatum selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(OrgHonorDatum record);
+
+    int updateByPrimaryKey(OrgHonorDatum record);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+}

+ 4 - 0
src/main/java/com/goafanti/common/dao/OrgRatepayMapper.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgRatepay;
 
 public interface OrgRatepayMapper {
@@ -16,4 +18,6 @@ public interface OrgRatepayMapper {
     int updateByPrimaryKey(OrgRatepay record);
 
 	OrgRatepay selectOrgRatepayByUid(String uid);
+
+	int batchDeleteByPrimaryKey(List<String> id);
 }

+ 8 - 0
src/main/java/com/goafanti/common/mapper/OrgFinanceMapper.xml

@@ -250,4 +250,12 @@
 		and year = #{year,jdbcType=INTEGER}
 	    </if>
     </select>
+    
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_finance set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
 </mapper>

+ 137 - 0
src/main/java/com/goafanti/common/mapper/OrgHonorDatumMapper.xml

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.goafanti.common.dao.OrgHonorDatumMapper" >
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgHonorDatum" >
+    <id column="id" property="id" jdbcType="VARCHAR" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="issuing_time" property="issuingTime" jdbcType="TIMESTAMP" />
+    <result column="enclosure_url" property="enclosureUrl" jdbcType="VARCHAR" />
+    <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    id, uid, name, issuing_time, enclosure_url, deleted_sign
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from org_honor_datum
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+    delete from org_honor_datum
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.OrgHonorDatum" >
+    insert into org_honor_datum (id, uid, name, 
+      issuing_time, enclosure_url, deleted_sign
+      )
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{issuingTime,jdbcType=TIMESTAMP}, #{enclosureUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgHonorDatum" >
+    insert into org_honor_datum
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="uid != null" >
+        uid,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="issuingTime != null" >
+        issuing_time,
+      </if>
+      <if test="enclosureUrl != null" >
+        enclosure_url,
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="uid != null" >
+        #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="issuingTime != null" >
+        #{issuingTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="enclosureUrl != null" >
+        #{enclosureUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="deletedSign != null" >
+        #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgHonorDatum" >
+    update org_honor_datum
+    <set >
+      <if test="uid != null" >
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="issuingTime != null" >
+        issuing_time = #{issuingTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="enclosureUrl != null" >
+        enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="deletedSign != null" >
+        deleted_sign = #{deletedSign,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgHonorDatum" >
+    update org_honor_datum
+    set uid = #{uid,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
+      issuing_time = #{issuingTime,jdbcType=TIMESTAMP},
+      enclosure_url = #{enclosureUrl,jdbcType=VARCHAR},
+      deleted_sign = #{deletedSign,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <select id="findOrgHonorDatumListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
+  	 select 
+    <include refid="Base_Column_List" />
+    from org_honor_datum
+    where deleted_sign = 0
+    <if test="uid != null">
+	    and  uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	order by issuing_time desc
+    <if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  
+  <select id="findOrgHonorDatumCount" resultType="java.lang.Integer" parameterType="String">
+   	select count(1) 
+	    from org_honor_datum
+    where deleted_sign = 0
+	    <if test="uid != null">
+		    and  uid = #{uid,jdbcType=VARCHAR}
+		</if>
+  </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_honor_datum set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
+</mapper>

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

@@ -201,5 +201,13 @@
 		<if test="year != null">
 		and year = #{year,jdbcType=INTEGER}
 	    </if>
-    </select>
+  </select>
+  
+  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+  	update org_ratepay set deleted_sign = 1
+  	where  id in 
+	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </update>
 </mapper>

+ 94 - 0
src/main/java/com/goafanti/common/model/OrgHonorDatum.java

@@ -0,0 +1,94 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class OrgHonorDatum {
+    private String id;
+
+    private String uid;
+
+    /**
+    * 荣誉或证明材料名称
+    */
+    private String name;
+
+    /**
+    * 发证时间
+    */
+    private Date issuingTime;
+
+    /**
+    * 附件材料URL
+    */
+    private String enclosureUrl;
+
+    /**
+    * 删除标记
+    */
+    private Integer deletedSign;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getIssuingTime() {
+        return issuingTime;
+    }
+
+    public void setIssuingTime(Date issuingTime) {
+        this.issuingTime = issuingTime;
+    }
+
+    public String getEnclosureUrl() {
+        return enclosureUrl;
+    }
+
+    public void setEnclosureUrl(String enclosureUrl) {
+        this.enclosureUrl = enclosureUrl;
+    }
+    
+    @JsonIgnore
+    public Integer getDeletedSign() {
+        return deletedSign;
+    }
+
+    public void setDeletedSign(Integer deletedSign) {
+        this.deletedSign = deletedSign;
+    }
+    
+    public String getIssuingTimeFormattedDate(){
+		if (this.issuingTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getIssuingTime(), "yyyy-MM-dd");
+		}
+	}
+	
+	public void setIssuingTimeFormattedDate(String issuingTimeFormattedDate){
+		
+	}
+}

+ 2 - 1
src/main/java/com/goafanti/common/model/OrgTechProduct.java

@@ -212,7 +212,8 @@ public class OrgTechProduct {
     public void setYear(Integer year) {
         this.year = year;
     }
-
+    
+    @JsonIgnore
 	public Date getCreateTime() {
 		return createTime;
 	}

+ 146 - 43
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -22,6 +22,7 @@ import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.OrgActivity;
 import com.goafanti.common.model.OrgActivityCost;
 import com.goafanti.common.model.OrgFinance;
+import com.goafanti.common.model.OrgHonorDatum;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.common.model.OrgStandard;
@@ -35,6 +36,7 @@ import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgFinanceService;
+import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
 import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyService;
 import com.goafanti.techservice.cognizance.service.OrgRatepayService;
 import com.goafanti.techservice.cognizance.service.OrgStandardService;
@@ -65,7 +67,9 @@ public class CognizanceApiController extends BaseApiController {
 	@Resource
 	private OrgFinanceService				orgFinanceService;
 	@Resource
-	private OrgTechAchievementService       orgTechAchievementService;
+	private OrgTechAchievementService		orgTechAchievementService;
+	@Resource
+	private OrgHonorDatumService			orgHonorDatumService;
 
 	/**
 	 * 企业研究开发活动情况表入口
@@ -111,8 +115,13 @@ public class CognizanceApiController extends BaseApiController {
 			throws ParseException {
 		Result res = new Result();
 		orgActivity.setDeletedSign(0);
-		orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
-		orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
+		if (!StringUtils.isBlank(startDateFormattedDate)) {
+			orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
+		}
+
+		if (!StringUtils.isBlank(endDateFormattedDate)) {
+			orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
+		}
 		if (StringUtils.isBlank(orgActivity.getId())) {
 			orgActivity.setId(UUID.randomUUID().toString());
 			orgActivity.setUid(TokenManager.getUserId());
@@ -191,15 +200,13 @@ public class CognizanceApiController extends BaseApiController {
 	 * 企业年度研究开发费用结构明细表(新增+修改)
 	 * 
 	 * @return
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/activityCost", method = RequestMethod.POST)
-	public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate) {
+	public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate) throws ParseException {
 		Result res = new Result();
-		try {
+		if (!StringUtils.isBlank(signDateFormattedDate)){
 			orgActivityCost.setSignDate(DateUtils.parseDate(signDateFormattedDate, "yyyy-MM-dd"));
-		} catch (ParseException e) {
-			res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-			return res;
 		}
 		if (null == orgActivityCost.getId()) {
 			OrgActivity ac = orgActivityService.selectOrgActivityByPrimaryKey(orgActivityCost.getAid());
@@ -302,37 +309,25 @@ public class CognizanceApiController extends BaseApiController {
 	 * 用户端录入+修改知识产权信息(专利+软著)
 	 * 
 	 * @return
+	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/intellectual", method = RequestMethod.POST)
-	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate) {
+	public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate) throws ParseException {
 		Result res = new Result();
-		if (null == authorizationDateFormattedDate) {
-			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "授权日期不能为空"));
+		if (!StringUtils.isBlank(authorizationDateFormattedDate)) {
+			orgIntellectualProperty
+			.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
 		}
 		if (null == orgIntellectualProperty.getId()) {
-			try {
 				orgIntellectualProperty.setId(UUID.randomUUID().toString());
 				orgIntellectualProperty.setUid(TokenManager.getUserId());
 				orgIntellectualProperty.setEvaluationCategory(
 						(orgIntellectualProperty.getCatagory() >= 2 && orgIntellectualProperty.getCatagory() <= 4) ? 1
 								: 0);
-				orgIntellectualProperty
-						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
 				orgIntellectualProperty.setDeletedSign(0);
-			} catch (ParseException e) {
-				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-				return res;
-			}
 			res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
 		} else {
 			orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
-			try {
-				orgIntellectualProperty
-						.setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
-			} catch (ParseException e) {
-				res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "日期格式不正确"));
-				return res;
-			}
 			res.setData(orgIntellectualPropertyService.updateByPrimaryKeySelective(orgIntellectualProperty));
 		}
 		return res;
@@ -419,6 +414,10 @@ public class CognizanceApiController extends BaseApiController {
 			orgTechProduct.setId(UUID.randomUUID().toString());
 			orgTechProduct.setUid(TokenManager.getUserId());
 			orgTechProduct.setDeletedSign(0);
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			orgTechProduct.setCreateTime(now.getTime());
+			orgTechProduct.setYear(Calendar.getInstance().get(Calendar.YEAR) - 1);
 			orgTechProductService.insert(orgTechProduct);
 		} else {
 			orgTechProductService.updateByPrimaryKeySelective(orgTechProduct);
@@ -476,12 +475,29 @@ public class CognizanceApiController extends BaseApiController {
 		if (null == orgRatepay.getId()) {
 			orgRatepay.setId(UUID.randomUUID().toString());
 			orgRatepay.setUid(TokenManager.getUserId());
+			orgRatepay.setDeletedSign(0);
 			orgRatepayService.insert(orgRatepay);
 		} else {
 			orgRatepayService.updateByPrimaryKeySelective(orgRatepay);
 		}
 		return res;
 	}
+	
+	/**
+	 * 刪除企业纳税申报信息
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteRatepay", method = RequestMethod.POST)
+	public Result deleteRatepay(@RequestParam(name = "ids[]", required = true) String[] ids) {
+		Result res = new Result();
+		List<String> id = new ArrayList<String>();
+		for (String s : ids) {
+			id.add(s);
+		}
+		res.setData(orgRatepayService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
 
 	/**
 	 * 财务报表信息入口
@@ -518,6 +534,7 @@ public class CognizanceApiController extends BaseApiController {
 		if (null == orgFinance.getId()) {
 			orgFinance.setId(UUID.randomUUID().toString());
 			orgFinance.setUid(TokenManager.getUserId());
+			orgFinance.setDeletedSign(0);
 			orgFinanceService.insert(orgFinance);
 		} else {
 			orgFinanceService.updateByPrimaryKeySelective(orgFinance);
@@ -526,20 +543,39 @@ public class CognizanceApiController extends BaseApiController {
 	}
 	
 	/**
+	 * 删除财务报表
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteFinance", method = RequestMethod.POST)
+	public Result deleteFinance(@RequestParam(name = "ids[]", required = true) String[] ids) {
+		Result res = new Result();
+		List<String> id = new ArrayList<String>();
+		for (String s : ids) {
+			id.add(s);
+		}
+		res.setData(orgFinanceService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+
+	/**
 	 * 获取当前用户已录入项目标号列表
+	 * 
 	 * @param uid
 	 * @return
 	 */
 	@RequestMapping(value = "/activityNumber", method = RequestMethod.GET)
-	public Result listActivityNumber(){
+	public Result listActivityNumber() {
 		Result res = new Result();
-		List<ActivityNumberBo> activityNumberBo = orgActivityService.selectOrgActivityNumberBoByUid(TokenManager.getUserId());
+		List<ActivityNumberBo> activityNumberBo = orgActivityService
+				.selectOrgActivityNumberBoByUid(TokenManager.getUserId());
 		res.setData(activityNumberBo);
 		return res;
 	}
-	
+
 	/**
 	 * 高企相关材料上传
+	 * 
 	 * @param req
 	 * @param sign
 	 * @return
@@ -550,15 +586,16 @@ public class CognizanceApiController extends BaseApiController {
 		res.setData(handleFile(res, "/cognizance/", true, req, sign, uid));
 		return res;
 	}
-	
+
 	/**
 	 * 科技成果转化情况列表入口
+	 * 
 	 * @param pageNo
 	 * @param pageSize
 	 * @return
 	 */
 	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
-	public Result achievementList(String pageNo, String pageSize){
+	public Result achievementList(String pageNo, String pageSize) {
 		Result res = new Result();
 		res = checkCertify(res);
 		if (res.getError().isEmpty()) {
@@ -574,16 +611,21 @@ public class CognizanceApiController extends BaseApiController {
 		}
 		return res;
 	}
-	
+
 	/**
 	 * 科技成果转化情况新增+修改
+	 * 
 	 * @param achievement
 	 * @return
+	 * @throws ParseException 
 	 */
-	@RequestMapping(value= "/disposeAchievement", method = RequestMethod.POST)
-	public Result disposeAchievement(OrgTechAchievement achievement){
+	@RequestMapping(value = "/disposeAchievement", method = RequestMethod.POST)
+	public Result disposeAchievement(OrgTechAchievement achievement, String acquisitionTimeFormattedDate) throws ParseException {
 		Result res = new Result();
-		if (null == achievement.getId()){
+		if (!StringUtils.isBlank(acquisitionTimeFormattedDate)){
+			achievement.setAcquisitionTime(DateUtils.parseDate(acquisitionTimeFormattedDate, "yyyy-MM-dd"));
+		}
+		if (null == achievement.getId()) {
 			achievement.setId(UUID.randomUUID().toString());
 			achievement.setUid(TokenManager.getUserId());
 			achievement.setDeletedSign(0);
@@ -593,9 +635,10 @@ public class CognizanceApiController extends BaseApiController {
 		}
 		return res;
 	}
-	
+
 	/**
 	 * 删除科技成果转化情况
+	 * 
 	 * @param ids
 	 * @return
 	 */
@@ -609,15 +652,76 @@ public class CognizanceApiController extends BaseApiController {
 		res.setData(orgTechAchievementService.batchDeleteByPrimaryKey(id));
 		return res;
 	}
-	
-	
-	
-	
-	
-	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign, String uid) {
+
+	/**
+	 * 企业荣誉及其他证明材料列表入口
+	 * 
+	 * @return
+	 */
+	@RequestMapping(value = "/honorList", method = RequestMethod.GET)
+	public Result honorList(String pageNo, String pageSize) {
+		Result res = new Result();
+		res = checkCertify(res);
+		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);
+			}
+			res.setData(orgHonorDatumService.listOrgHonorDatum(pNo, pSize, TokenManager.getUserId()));
+		}
+		return res;
+	}
+
+	/**
+	 * 企业荣誉及其他证明材料新增+修改
+	 * 
+	 * @param achievement
+	 * @return
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "/disposeHonor", method = RequestMethod.POST)
+	public Result disposeHonor(OrgHonorDatum honor, String issuingTimeFormattedDate) throws ParseException {
+		Result res = new Result();
+		if (!StringUtils.isBlank(issuingTimeFormattedDate)){
+			honor.setIssuingTime(DateUtils.parseDate(issuingTimeFormattedDate, "yyyy-MM-dd"));
+		}
+		if (null == honor.getId()) {
+			honor.setId(UUID.randomUUID().toString());
+			honor.setUid(TokenManager.getUserId());
+			honor.setDeletedSign(0);
+			orgHonorDatumService.inset(honor);
+		} else {
+			orgHonorDatumService.updateByPrimaryKeySelective(honor);
+		}
+		return res;
+	}
+
+	/**
+	 * 删除企业荣誉及其他证明材料
+	 * 
+	 * @param ids
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteHonor", method = RequestMethod.POST)
+	public Result deleteHonor(@RequestParam(name = "ids[]", required = true) String[] ids) {
+		Result res = new Result();
+		List<String> id = new ArrayList<String>();
+		for (String s : ids) {
+			id.add(s);
+		}
+		res.setData(orgHonorDatumService.batchDeleteByPrimaryKey(id));
+		return res;
+	}
+
+	private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign,
+			String uid) {
 		List<MultipartFile> files = getFiles(req);
 		String fileName = "";
-		if (StringUtils.isBlank(uid)){
+		if (StringUtils.isBlank(uid)) {
 			fileName = path + TokenManager.getUserId() + "_" + sign + ".jpg";
 		} else {
 			fileName = path + uid + "_" + sign + ".jpg";
@@ -646,6 +750,5 @@ public class CognizanceApiController extends BaseApiController {
 		}
 		return res;
 	}
-	
 
 }

+ 4 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgFinanceService.java

@@ -1,5 +1,7 @@
 package com.goafanti.techservice.cognizance.service;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgFinance;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -12,4 +14,6 @@ public interface OrgFinanceService {
 
 	Pagination<OrgFinance> listFinance(Integer year, Integer pNo, Integer pSize, String userId);
 
+	int batchDeleteByPrimaryKey(List<String> id);
+
 }

+ 18 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgHonorDatumService.java

@@ -0,0 +1,18 @@
+package com.goafanti.techservice.cognizance.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.OrgHonorDatum;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface OrgHonorDatumService {
+
+	Pagination<OrgHonorDatum> listOrgHonorDatum(Integer pNo, Integer pSize, String userId);
+
+	OrgHonorDatum inset(OrgHonorDatum honor);
+
+	int updateByPrimaryKeySelective(OrgHonorDatum honor);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+}

+ 4 - 0
src/main/java/com/goafanti/techservice/cognizance/service/OrgRatepayService.java

@@ -1,5 +1,7 @@
 package com.goafanti.techservice.cognizance.service;
 
+import java.util.List;
+
 import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -12,4 +14,6 @@ public interface OrgRatepayService {
 
 	Pagination<OrgRatepay> listOrgRatepay(Integer year, Integer pNo, Integer pSize, String userId);
 
+	int batchDeleteByPrimaryKey(List<String> id);
+
 }

+ 6 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgFinanceServiceImpl.java

@@ -1,6 +1,7 @@
 package com.goafanti.techservice.cognizance.service.impl;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
@@ -52,5 +53,10 @@ public class OrgFinanceServiceImpl  extends BaseMybatisDao<OrgFinanceMapper> imp
 		return  (Pagination<OrgFinance>)findPage("findOrgFinanceListByPage",
 				"findOrgFinanceCount", params, pageNo, pageSize);
 	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgFinanceMapper.batchDeleteByPrimaryKey(id);
+	}
 	
 }

+ 56 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgHonorDatumServiceImpl.java

@@ -0,0 +1,56 @@
+package com.goafanti.techservice.cognizance.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.OrgHonorDatumMapper;
+import com.goafanti.common.model.OrgHonorDatum;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
+@Service
+public class OrgHonorDatumServiceImpl extends BaseMybatisDao<OrgHonorDatumMapper> implements OrgHonorDatumService {
+	@Autowired
+	private OrgHonorDatumMapper orgHonorDatumMapper;
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrgHonorDatum> listOrgHonorDatum(Integer pageNo, Integer pageSize, String uid) {
+		Map<String, Object> params = new HashMap<>();
+		
+		if (!StringUtils.isBlank(uid)){
+			params.put("uid", uid);
+		}
+
+		if (pageNo == null || pageNo < 0) {
+			pageNo = 1;
+		}
+
+		if (pageSize == null || pageSize < 0) {
+			pageSize = 10;
+		}
+		return  (Pagination<OrgHonorDatum>)findPage("findOrgHonorDatumListByPage",
+				"findOrgHonorDatumCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public OrgHonorDatum inset(OrgHonorDatum honor) {
+		orgHonorDatumMapper.insert(honor);
+		return honor;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(OrgHonorDatum honor) {
+		return orgHonorDatumMapper.updateByPrimaryKeySelective(honor);
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgHonorDatumMapper.batchDeleteByPrimaryKey(id);
+	}
+}

+ 6 - 0
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgRatepayServiceImpl.java

@@ -1,6 +1,7 @@
 package com.goafanti.techservice.cognizance.service.impl;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
@@ -53,4 +54,9 @@ public class OrgRatepayServiceImpl extends BaseMybatisDao<OrgRatepayMapper> impl
 				"findOrgRatepayCount", params, pageNo, pageSize);
 	}
 
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return orgRatepayMapper.batchDeleteByPrimaryKey(id);
+	}
+
 }

+ 1 - 1
src/main/webapp/WEB-INF/html/test.html

@@ -75,7 +75,7 @@
 	{
 	"mobile": "13600000000",
 	"password": "123456",
-	"type"    :0 ,
+	"type"    :1 ,
 	"remember":false
 }
       </textarea>