ソースを参照

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

albertshaw 8 年 前
コミット
452f67788a

+ 1 - 0
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -2197,6 +2197,7 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
+		
 		if (!checkCertify(res, orgTechCenter.getUid()).getError().isEmpty()) {
 			return res;
 		}

+ 20 - 21
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java

@@ -147,23 +147,24 @@ public class CognizanceApiController extends CertifyApiController {
 	private PatentInfoService				patentInfoService;
 	@Resource
 	private CopyrightInfoService			copyrightInfoService;
-	
+
 	/**
 	 * 研发活动详情
+	 * 
 	 * @param id
 	 * @return
 	 */
 	@RequestMapping(value = "/activityDetail", method = RequestMethod.GET)
-	public Result activityDetail(String id){
+	public Result activityDetail(String id) {
 		Result res = new Result();
-		if (StringUtils.isBlank(id)){
+		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "研发活动id"));
 			return res;
 		}
-		Calendar a =Calendar.getInstance();
-		res.setData(orgActivityService.selectDetailByIdAndYear(id, a.get(Calendar.YEAR)-1));
+		Calendar a = Calendar.getInstance();
+		res.setData(orgActivityService.selectDetailByIdAndYear(id, a.get(Calendar.YEAR) - 1));
 		return res;
-		
+
 	}
 
 	/**
@@ -856,7 +857,7 @@ public class CognizanceApiController extends CertifyApiController {
 		}
 		return res;
 	}
-    
+
 	/**
 	 * 实名认证--企业上年度纳税申报表上传
 	 * 
@@ -871,8 +872,8 @@ public class CognizanceApiController extends CertifyApiController {
 
 		AttachmentType attachmentType = AttachmentType.getField(sign);
 		if (attachmentType == AttachmentType.RATEPAY) {
-			Calendar now = Calendar.getInstance(); 
-			sign = sign + "_" + (now.get(Calendar.YEAR)-1);
+			Calendar now = Calendar.getInstance();
+			sign = sign + "_" + (now.get(Calendar.YEAR) - 1);
 			res.setData(handleFiles(res, "/cognizance/", true, req, sign, TokenManager.getUserId()));
 		} else {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
@@ -880,7 +881,7 @@ public class CognizanceApiController extends CertifyApiController {
 
 		return res;
 	}
-	
+
 	/**
 	 * 企业纳税申报表上传
 	 * 
@@ -1661,7 +1662,8 @@ public class CognizanceApiController extends CertifyApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, TokenManager.getUserId(), startDate, endDate));
+		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, TokenManager.getUserId(), startDate,
+				endDate));
 		return res;
 	}
 
@@ -2097,10 +2099,6 @@ public class CognizanceApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!checkUserLogin(res)) {
-			return res;
-		}
-
 		User curUser = TokenManager.getUserToken();
 		if (!checkCertify(res, curUser)) {
 			return res;
@@ -2108,8 +2106,7 @@ public class CognizanceApiController extends CertifyApiController {
 
 		if (!StringUtils.isBlank(foundingTimeFormattedDate)) {
 			try {
-				orgTechCenter
-						.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
+				orgTechCenter.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, AFTConstants.YYYYMMDD));
 			} catch (ParseException e) {
 			}
 		}
@@ -2178,12 +2175,13 @@ public class CognizanceApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!checkUserLogin(res)) {
+		User curUser = TokenManager.getUserToken();
+		if (!checkCertify(res, curUser)) {
 			return res;
 		}
 
-		User curUser = TokenManager.getUserToken();
-		if (!checkCertify(res, curUser)) {
+		if (StringUtils.isBlank(orgTechCenterDetail.getCid())) {
+			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "研发部门相关信息未保存,无法保存!"));
 			return res;
 		}
 
@@ -2260,7 +2258,8 @@ public class CognizanceApiController extends CertifyApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(orgCognizanceService.listCognizance(contractId, TokenManager.getUserId(), null, locationProvince, pNo, pSize));
+		res.setData(orgCognizanceService.listCognizance(contractId, TokenManager.getUserId(), null, locationProvince,
+				pNo, pSize));
 
 		return res;
 	}

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

@@ -926,7 +926,7 @@
   			and d.budget_cost <![CDATA[ >= ]]> #{budgetCostLower,jdbcType=DECIMAL}
   		</if>
   		<if test="budgetCostUpper != null">
-  			and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}}
+  			and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}
   		</if>
   		<if test="demandType != null">
   			and d.demand_type = #{demandType,jdbcType=INTEGER}
@@ -961,7 +961,7 @@
   			and d.budget_cost <![CDATA[ >= ]]> #{budgetCostLower,jdbcType=DECIMAL}
   		</if>
   		<if test="budgetCostUpper != null">
-  			and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}}
+  			and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}
   		</if>
   		<if test="demandType != null">
   			and d.demand_type = #{demandType,jdbcType=INTEGER}

+ 509 - 478
src/main/java/com/goafanti/common/mapper/OrgHumanResourceMapper.xml

@@ -1,481 +1,512 @@
 <?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.OrgHumanResourceMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgHumanResource" >
-    <id column="id" property="id" jdbcType="VARCHAR" />
-    <result column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="firm_total" property="firmTotal" jdbcType="INTEGER" />
-    <result column="tech_total" property="techTotal" jdbcType="INTEGER" />
-    <result column="firm_in_service" property="firmInService" jdbcType="INTEGER" />
-    <result column="tech_in_service" property="techInService" jdbcType="INTEGER" />
-    <result column="firm_part_time" property="firmPartTime" jdbcType="INTEGER" />
-    <result column="tech_part_time" property="techPartTime" jdbcType="INTEGER" />
-    <result column="firm_temporary" property="firmTemporary" jdbcType="INTEGER" />
-    <result column="tech_temporary" property="techTemporary" jdbcType="INTEGER" />
-    <result column="firm_foreign" property="firmForeign" jdbcType="INTEGER" />
-    <result column="tech_foreign" property="techForeign" jdbcType="INTEGER" />
-    <result column="firm_abroad" property="firmAbroad" jdbcType="INTEGER" />
-    <result column="tech_abroad" property="techAbroad" jdbcType="INTEGER" />
-    <result column="firm_core" property="firmCore" jdbcType="INTEGER" />
-    <result column="tech_core" property="techCore" jdbcType="INTEGER" />
-    <result column="doctor" property="doctor" jdbcType="INTEGER" />
-    <result column="master" property="master" jdbcType="INTEGER" />
-    <result column="undergraduate" property="undergraduate" jdbcType="INTEGER" />
-    <result column="college" property="college" jdbcType="INTEGER" />
-    <result column="senior_title" property="seniorTitle" jdbcType="INTEGER" />
-    <result column="intermediate_title" property="intermediateTitle" jdbcType="INTEGER" />
-    <result column="junior_title" property="juniorTitle" jdbcType="INTEGER" />
-    <result column="senior_mechanic" property="seniorMechanic" jdbcType="INTEGER" />
-    <result column="below_thirty" property="belowThirty" jdbcType="INTEGER" />
-    <result column="thirtyone_to_thirtyfour" property="thirtyoneToThirtyfour" jdbcType="INTEGER" />
-    <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" />
-  </resultMap>
-  <sql id="Base_Column_List" >
-    id, uid, firm_total, tech_total, firm_in_service, tech_in_service, firm_part_time, 
-    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, new_employment, graduate_number,
-    roster_url, social_security_url, deleted_sign
-  </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from org_human_resource
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
-    delete from org_human_resource
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.OrgHumanResource" >
-    insert into org_human_resource (id, uid, firm_total, 
-      tech_total, firm_in_service, tech_in_service, 
-      firm_part_time, 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, 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}, 
-      #{techTemporary,jdbcType=INTEGER}, #{firmForeign,jdbcType=INTEGER}, #{techForeign,jdbcType=INTEGER}, 
-      #{firmAbroad,jdbcType=INTEGER}, #{techAbroad,jdbcType=INTEGER}, #{firmCore,jdbcType=INTEGER}, 
-      #{techCore,jdbcType=INTEGER}, #{doctor,jdbcType=INTEGER}, #{master,jdbcType=INTEGER}, 
-      #{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}, #{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" >
-    insert into org_human_resource
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        id,
-      </if>
-      <if test="uid != null" >
-        uid,
-      </if>
-      <if test="firmTotal != null" >
-        firm_total,
-      </if>
-      <if test="techTotal != null" >
-        tech_total,
-      </if>
-      <if test="firmInService != null" >
-        firm_in_service,
-      </if>
-      <if test="techInService != null" >
-        tech_in_service,
-      </if>
-      <if test="firmPartTime != null" >
-        firm_part_time,
-      </if>
-      <if test="techPartTime != null" >
-        tech_part_time,
-      </if>
-      <if test="firmTemporary != null" >
-        firm_temporary,
-      </if>
-      <if test="techTemporary != null" >
-        tech_temporary,
-      </if>
-      <if test="firmForeign != null" >
-        firm_foreign,
-      </if>
-      <if test="techForeign != null" >
-        tech_foreign,
-      </if>
-      <if test="firmAbroad != null" >
-        firm_abroad,
-      </if>
-      <if test="techAbroad != null" >
-        tech_abroad,
-      </if>
-      <if test="firmCore != null" >
-        firm_core,
-      </if>
-      <if test="techCore != null" >
-        tech_core,
-      </if>
-      <if test="doctor != null" >
-        doctor,
-      </if>
-      <if test="master != null" >
-        master,
-      </if>
-      <if test="undergraduate != null" >
-        undergraduate,
-      </if>
-      <if test="college != null" >
-        college,
-      </if>
-      <if test="seniorTitle != null" >
-        senior_title,
-      </if>
-      <if test="intermediateTitle != null" >
-        intermediate_title,
-      </if>
-      <if test="juniorTitle != null" >
-        junior_title,
-      </if>
-      <if test="seniorMechanic != null" >
-        senior_mechanic,
-      </if>
-      <if test="belowThirty != null" >
-        below_thirty,
-      </if>
-      <if test="thirtyoneToThirtyfour != null" >
-        thirtyone_to_thirtyfour,
-      </if>
-      <if test="fortyoneToFifty != null" >
-        fortyone_to_fifty,
-      </if>
-      <if test="aboveFifty != null" >
-        above_fifty,
-      </if>
-      <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>
-      <if test="socialSecurityUrl != null">
-      	social_security_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="firmTotal != null" >
-        #{firmTotal,jdbcType=INTEGER},
-      </if>
-      <if test="techTotal != null" >
-        #{techTotal,jdbcType=INTEGER},
-      </if>
-      <if test="firmInService != null" >
-        #{firmInService,jdbcType=INTEGER},
-      </if>
-      <if test="techInService != null" >
-        #{techInService,jdbcType=INTEGER},
-      </if>
-      <if test="firmPartTime != null" >
-        #{firmPartTime,jdbcType=INTEGER},
-      </if>
-      <if test="techPartTime != null" >
-        #{techPartTime,jdbcType=INTEGER},
-      </if>
-      <if test="firmTemporary != null" >
-        #{firmTemporary,jdbcType=INTEGER},
-      </if>
-      <if test="techTemporary != null" >
-        #{techTemporary,jdbcType=INTEGER},
-      </if>
-      <if test="firmForeign != null" >
-        #{firmForeign,jdbcType=INTEGER},
-      </if>
-      <if test="techForeign != null" >
-        #{techForeign,jdbcType=INTEGER},
-      </if>
-      <if test="firmAbroad != null" >
-        #{firmAbroad,jdbcType=INTEGER},
-      </if>
-      <if test="techAbroad != null" >
-        #{techAbroad,jdbcType=INTEGER},
-      </if>
-      <if test="firmCore != null" >
-        #{firmCore,jdbcType=INTEGER},
-      </if>
-      <if test="techCore != null" >
-        #{techCore,jdbcType=INTEGER},
-      </if>
-      <if test="doctor != null" >
-        #{doctor,jdbcType=INTEGER},
-      </if>
-      <if test="master != null" >
-        #{master,jdbcType=INTEGER},
-      </if>
-      <if test="undergraduate != null" >
-        #{undergraduate,jdbcType=INTEGER},
-      </if>
-      <if test="college != null" >
-        #{college,jdbcType=INTEGER},
-      </if>
-      <if test="seniorTitle != null" >
-        #{seniorTitle,jdbcType=INTEGER},
-      </if>
-      <if test="intermediateTitle != null" >
-        #{intermediateTitle,jdbcType=INTEGER},
-      </if>
-      <if test="juniorTitle != null" >
-        #{juniorTitle,jdbcType=INTEGER},
-      </if>
-      <if test="seniorMechanic != null" >
-        #{seniorMechanic,jdbcType=INTEGER},
-      </if>
-      <if test="belowThirty != null" >
-        #{belowThirty,jdbcType=INTEGER},
-      </if>
-      <if test="thirtyoneToThirtyfour != null" >
-        #{thirtyoneToThirtyfour,jdbcType=INTEGER},
-      </if>
-      <if test="fortyoneToFifty != null" >
-        #{fortyoneToFifty,jdbcType=INTEGER},
-      </if>
-      <if test="aboveFifty != null" >
-        #{aboveFifty,jdbcType=INTEGER},
-      </if>
-      <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>
-      <if test="socialSecurityUrl != null">
-        #{socialSecurityUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="deletedSign != null">
-        #{deleted_sign,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgHumanResource" >
-    update org_human_resource
-    <set >
-      <if test="uid != null" >
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="firmTotal != null" >
-        firm_total = #{firmTotal,jdbcType=INTEGER},
-      </if>
-      <if test="techTotal != null" >
-        tech_total = #{techTotal,jdbcType=INTEGER},
-      </if>
-      <if test="firmInService != null" >
-        firm_in_service = #{firmInService,jdbcType=INTEGER},
-      </if>
-      <if test="techInService != null" >
-        tech_in_service = #{techInService,jdbcType=INTEGER},
-      </if>
-      <if test="firmPartTime != null" >
-        firm_part_time = #{firmPartTime,jdbcType=INTEGER},
-      </if>
-      <if test="techPartTime != null" >
-        tech_part_time = #{techPartTime,jdbcType=INTEGER},
-      </if>
-      <if test="firmTemporary != null" >
-        firm_temporary = #{firmTemporary,jdbcType=INTEGER},
-      </if>
-      <if test="techTemporary != null" >
-        tech_temporary = #{techTemporary,jdbcType=INTEGER},
-      </if>
-      <if test="firmForeign != null" >
-        firm_foreign = #{firmForeign,jdbcType=INTEGER},
-      </if>
-      <if test="techForeign != null" >
-        tech_foreign = #{techForeign,jdbcType=INTEGER},
-      </if>
-      <if test="firmAbroad != null" >
-        firm_abroad = #{firmAbroad,jdbcType=INTEGER},
-      </if>
-      <if test="techAbroad != null" >
-        tech_abroad = #{techAbroad,jdbcType=INTEGER},
-      </if>
-      <if test="firmCore != null" >
-        firm_core = #{firmCore,jdbcType=INTEGER},
-      </if>
-      <if test="techCore != null" >
-        tech_core = #{techCore,jdbcType=INTEGER},
-      </if>
-      <if test="doctor != null" >
-        doctor = #{doctor,jdbcType=INTEGER},
-      </if>
-      <if test="master != null" >
-        master = #{master,jdbcType=INTEGER},
-      </if>
-      <if test="undergraduate != null" >
-        undergraduate = #{undergraduate,jdbcType=INTEGER},
-      </if>
-      <if test="college != null" >
-        college = #{college,jdbcType=INTEGER},
-      </if>
-      <if test="seniorTitle != null" >
-        senior_title = #{seniorTitle,jdbcType=INTEGER},
-      </if>
-      <if test="intermediateTitle != null" >
-        intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
-      </if>
-      <if test="juniorTitle != null" >
-        junior_title = #{juniorTitle,jdbcType=INTEGER},
-      </if>
-      <if test="seniorMechanic != null" >
-        senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
-      </if>
-      <if test="belowThirty != null" >
-        below_thirty = #{belowThirty,jdbcType=INTEGER},
-      </if>
-      <if test="thirtyoneToThirtyfour != null" >
-        thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
-      </if>
-      <if test="fortyoneToFifty != null" >
-        fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
-      </if>
-      <if test="aboveFifty != null" >
-        above_fifty = #{aboveFifty,jdbcType=INTEGER},
-      </if>
-      <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>
-      <if test="socialSecurityUrl != null">
-      	social_security_url = #{socialSecurityUrl,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.OrgHumanResource" >
-    update org_human_resource
-    set uid = #{uid,jdbcType=VARCHAR},
-      firm_total = #{firmTotal,jdbcType=INTEGER},
-      tech_total = #{techTotal,jdbcType=INTEGER},
-      firm_in_service = #{firmInService,jdbcType=INTEGER},
-      tech_in_service = #{techInService,jdbcType=INTEGER},
-      firm_part_time = #{firmPartTime,jdbcType=INTEGER},
-      tech_part_time = #{techPartTime,jdbcType=INTEGER},
-      firm_temporary = #{firmTemporary,jdbcType=INTEGER},
-      tech_temporary = #{techTemporary,jdbcType=INTEGER},
-      firm_foreign = #{firmForeign,jdbcType=INTEGER},
-      tech_foreign = #{techForeign,jdbcType=INTEGER},
-      firm_abroad = #{firmAbroad,jdbcType=INTEGER},
-      tech_abroad = #{techAbroad,jdbcType=INTEGER},
-      firm_core = #{firmCore,jdbcType=INTEGER},
-      tech_core = #{techCore,jdbcType=INTEGER},
-      doctor = #{doctor,jdbcType=INTEGER},
-      master = #{master,jdbcType=INTEGER},
-      undergraduate = #{undergraduate,jdbcType=INTEGER},
-      college = #{college,jdbcType=INTEGER},
-      senior_title = #{seniorTitle,jdbcType=INTEGER},
-      intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
-      junior_title = #{juniorTitle,jdbcType=INTEGER},
-      senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
-      below_thirty = #{belowThirty,jdbcType=INTEGER},
-      thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
-      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}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  
-  <select id="findOrgHumanResourceListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
-  	 select 
-    <include refid="Base_Column_List" />
-    from org_human_resource
-    where deleted_sign = 0
-    <if test="uid != null">
-	    and  uid = #{uid,jdbcType=VARCHAR}
-	</if>
-	<if test="year != null">
-		and year = #{year,jdbcType=INTEGER}
-	</if>
-	order by year desc
-    <if test="page_sql != null">
-    	${page_sql}
-    </if>
-    
-  </select>
-  
-  <select id="findOrgHumanResourceCount" resultType="java.lang.Integer" parameterType="String">
-   	select count(1) from 
-	   org_human_resource
-    where deleted_sign = 0
-    <if test="uid != null">
-	    and  uid = #{uid,jdbcType=VARCHAR}
-	</if>
-	<if test="year != null">
-		and year = #{year,jdbcType=INTEGER}
-	</if>
-	
-  </select>
-  
-  <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
-  	update org_human_resource set deleted_sign = 1
-  	where  id in 
-	<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
-		#{item}
-	</foreach>
-  </update>
-  
-   <select id="selectOrgHumanResourceByUidAndYear" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from org_human_resource
-    where year = #{0} and uid = #{1}
-  </select>
+<mapper namespace="com.goafanti.common.dao.OrgHumanResourceMapper">
+	<resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgHumanResource">
+		<id column="id" property="id" jdbcType="VARCHAR" />
+		<result column="uid" property="uid" jdbcType="VARCHAR" />
+		<result column="firm_total" property="firmTotal" jdbcType="INTEGER" />
+		<result column="tech_total" property="techTotal" jdbcType="INTEGER" />
+		<result column="firm_in_service" property="firmInService"
+			jdbcType="INTEGER" />
+		<result column="tech_in_service" property="techInService"
+			jdbcType="INTEGER" />
+		<result column="firm_part_time" property="firmPartTime"
+			jdbcType="INTEGER" />
+		<result column="tech_part_time" property="techPartTime"
+			jdbcType="INTEGER" />
+		<result column="firm_temporary" property="firmTemporary"
+			jdbcType="INTEGER" />
+		<result column="tech_temporary" property="techTemporary"
+			jdbcType="INTEGER" />
+		<result column="firm_foreign" property="firmForeign" jdbcType="INTEGER" />
+		<result column="tech_foreign" property="techForeign" jdbcType="INTEGER" />
+		<result column="firm_abroad" property="firmAbroad" jdbcType="INTEGER" />
+		<result column="tech_abroad" property="techAbroad" jdbcType="INTEGER" />
+		<result column="firm_core" property="firmCore" jdbcType="INTEGER" />
+		<result column="tech_core" property="techCore" jdbcType="INTEGER" />
+		<result column="doctor" property="doctor" jdbcType="INTEGER" />
+		<result column="master" property="master" jdbcType="INTEGER" />
+		<result column="undergraduate" property="undergraduate"
+			jdbcType="INTEGER" />
+		<result column="college" property="college" jdbcType="INTEGER" />
+		<result column="senior_title" property="seniorTitle" jdbcType="INTEGER" />
+		<result column="intermediate_title" property="intermediateTitle"
+			jdbcType="INTEGER" />
+		<result column="junior_title" property="juniorTitle" jdbcType="INTEGER" />
+		<result column="senior_mechanic" property="seniorMechanic"
+			jdbcType="INTEGER" />
+		<result column="below_thirty" property="belowThirty" jdbcType="INTEGER" />
+		<result column="thirtyone_to_thirtyfour" property="thirtyoneToThirtyfour"
+			jdbcType="INTEGER" />
+		<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" />
+	</resultMap>
+	<sql id="Base_Column_List">
+		id, uid, firm_total, tech_total, firm_in_service, tech_in_service,
+		firm_part_time,
+		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, new_employment,
+		graduate_number,
+		roster_url, social_security_url, deleted_sign
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
+		parameterType="java.lang.String">
+		select
+		<include refid="Base_Column_List" />
+		from org_human_resource
+		where id = #{id,jdbcType=VARCHAR}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+		delete from org_human_resource
+		where id = #{id,jdbcType=VARCHAR}
+	</delete>
+	<insert id="insert" parameterType="com.goafanti.common.model.OrgHumanResource">
+		insert into org_human_resource (id, uid, firm_total,
+		tech_total, firm_in_service, tech_in_service,
+		firm_part_time, 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, 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},
+		#{techTemporary,jdbcType=INTEGER}, #{firmForeign,jdbcType=INTEGER}, #{techForeign,jdbcType=INTEGER},
+		#{firmAbroad,jdbcType=INTEGER}, #{techAbroad,jdbcType=INTEGER},
+		#{firmCore,jdbcType=INTEGER},
+		#{techCore,jdbcType=INTEGER}, #{doctor,jdbcType=INTEGER}, #{master,jdbcType=INTEGER},
+		#{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}, #{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">
+		insert into org_human_resource
+		<trim prefix="(" suffix=")" suffixOverrides=",">
+			<if test="id != null">
+				id,
+			</if>
+			<if test="uid != null">
+				uid,
+			</if>
+			<if test="firmTotal != null">
+				firm_total,
+			</if>
+			<if test="techTotal != null">
+				tech_total,
+			</if>
+			<if test="firmInService != null">
+				firm_in_service,
+			</if>
+			<if test="techInService != null">
+				tech_in_service,
+			</if>
+			<if test="firmPartTime != null">
+				firm_part_time,
+			</if>
+			<if test="techPartTime != null">
+				tech_part_time,
+			</if>
+			<if test="firmTemporary != null">
+				firm_temporary,
+			</if>
+			<if test="techTemporary != null">
+				tech_temporary,
+			</if>
+			<if test="firmForeign != null">
+				firm_foreign,
+			</if>
+			<if test="techForeign != null">
+				tech_foreign,
+			</if>
+			<if test="firmAbroad != null">
+				firm_abroad,
+			</if>
+			<if test="techAbroad != null">
+				tech_abroad,
+			</if>
+			<if test="firmCore != null">
+				firm_core,
+			</if>
+			<if test="techCore != null">
+				tech_core,
+			</if>
+			<if test="doctor != null">
+				doctor,
+			</if>
+			<if test="master != null">
+				master,
+			</if>
+			<if test="undergraduate != null">
+				undergraduate,
+			</if>
+			<if test="college != null">
+				college,
+			</if>
+			<if test="seniorTitle != null">
+				senior_title,
+			</if>
+			<if test="intermediateTitle != null">
+				intermediate_title,
+			</if>
+			<if test="juniorTitle != null">
+				junior_title,
+			</if>
+			<if test="seniorMechanic != null">
+				senior_mechanic,
+			</if>
+			<if test="belowThirty != null">
+				below_thirty,
+			</if>
+			<if test="thirtyoneToThirtyfour != null">
+				thirtyone_to_thirtyfour,
+			</if>
+			<if test="fortyoneToFifty != null">
+				fortyone_to_fifty,
+			</if>
+			<if test="aboveFifty != null">
+				above_fifty,
+			</if>
+			<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>
+			<if test="socialSecurityUrl != null">
+				social_security_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="firmTotal != null">
+				#{firmTotal,jdbcType=INTEGER},
+			</if>
+			<if test="techTotal != null">
+				#{techTotal,jdbcType=INTEGER},
+			</if>
+			<if test="firmInService != null">
+				#{firmInService,jdbcType=INTEGER},
+			</if>
+			<if test="techInService != null">
+				#{techInService,jdbcType=INTEGER},
+			</if>
+			<if test="firmPartTime != null">
+				#{firmPartTime,jdbcType=INTEGER},
+			</if>
+			<if test="techPartTime != null">
+				#{techPartTime,jdbcType=INTEGER},
+			</if>
+			<if test="firmTemporary != null">
+				#{firmTemporary,jdbcType=INTEGER},
+			</if>
+			<if test="techTemporary != null">
+				#{techTemporary,jdbcType=INTEGER},
+			</if>
+			<if test="firmForeign != null">
+				#{firmForeign,jdbcType=INTEGER},
+			</if>
+			<if test="techForeign != null">
+				#{techForeign,jdbcType=INTEGER},
+			</if>
+			<if test="firmAbroad != null">
+				#{firmAbroad,jdbcType=INTEGER},
+			</if>
+			<if test="techAbroad != null">
+				#{techAbroad,jdbcType=INTEGER},
+			</if>
+			<if test="firmCore != null">
+				#{firmCore,jdbcType=INTEGER},
+			</if>
+			<if test="techCore != null">
+				#{techCore,jdbcType=INTEGER},
+			</if>
+			<if test="doctor != null">
+				#{doctor,jdbcType=INTEGER},
+			</if>
+			<if test="master != null">
+				#{master,jdbcType=INTEGER},
+			</if>
+			<if test="undergraduate != null">
+				#{undergraduate,jdbcType=INTEGER},
+			</if>
+			<if test="college != null">
+				#{college,jdbcType=INTEGER},
+			</if>
+			<if test="seniorTitle != null">
+				#{seniorTitle,jdbcType=INTEGER},
+			</if>
+			<if test="intermediateTitle != null">
+				#{intermediateTitle,jdbcType=INTEGER},
+			</if>
+			<if test="juniorTitle != null">
+				#{juniorTitle,jdbcType=INTEGER},
+			</if>
+			<if test="seniorMechanic != null">
+				#{seniorMechanic,jdbcType=INTEGER},
+			</if>
+			<if test="belowThirty != null">
+				#{belowThirty,jdbcType=INTEGER},
+			</if>
+			<if test="thirtyoneToThirtyfour != null">
+				#{thirtyoneToThirtyfour,jdbcType=INTEGER},
+			</if>
+			<if test="fortyoneToFifty != null">
+				#{fortyoneToFifty,jdbcType=INTEGER},
+			</if>
+			<if test="aboveFifty != null">
+				#{aboveFifty,jdbcType=INTEGER},
+			</if>
+			<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>
+			<if test="socialSecurityUrl != null">
+				#{socialSecurityUrl,jdbcType=VARCHAR},
+			</if>
+			<if test="deletedSign != null">
+				#{deleted_sign,jdbcType=INTEGER},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgHumanResource">
+		update org_human_resource
+		<set>
+			<if test="uid != null">
+				uid = #{uid,jdbcType=VARCHAR},
+			</if>
+			<if test="firmTotal != null">
+				firm_total = #{firmTotal,jdbcType=INTEGER},
+			</if>
+			<if test="techTotal != null">
+				tech_total = #{techTotal,jdbcType=INTEGER},
+			</if>
+			<if test="firmInService != null">
+				firm_in_service = #{firmInService,jdbcType=INTEGER},
+			</if>
+			<if test="techInService != null">
+				tech_in_service = #{techInService,jdbcType=INTEGER},
+			</if>
+			<if test="firmPartTime != null">
+				firm_part_time = #{firmPartTime,jdbcType=INTEGER},
+			</if>
+			<if test="techPartTime != null">
+				tech_part_time = #{techPartTime,jdbcType=INTEGER},
+			</if>
+			<if test="firmTemporary != null">
+				firm_temporary = #{firmTemporary,jdbcType=INTEGER},
+			</if>
+			<if test="techTemporary != null">
+				tech_temporary = #{techTemporary,jdbcType=INTEGER},
+			</if>
+			<if test="firmForeign != null">
+				firm_foreign = #{firmForeign,jdbcType=INTEGER},
+			</if>
+			<if test="techForeign != null">
+				tech_foreign = #{techForeign,jdbcType=INTEGER},
+			</if>
+			<if test="firmAbroad != null">
+				firm_abroad = #{firmAbroad,jdbcType=INTEGER},
+			</if>
+			<if test="techAbroad != null">
+				tech_abroad = #{techAbroad,jdbcType=INTEGER},
+			</if>
+			<if test="firmCore != null">
+				firm_core = #{firmCore,jdbcType=INTEGER},
+			</if>
+			<if test="techCore != null">
+				tech_core = #{techCore,jdbcType=INTEGER},
+			</if>
+			<if test="doctor != null">
+				doctor = #{doctor,jdbcType=INTEGER},
+			</if>
+			<if test="master != null">
+				master = #{master,jdbcType=INTEGER},
+			</if>
+			<if test="undergraduate != null">
+				undergraduate = #{undergraduate,jdbcType=INTEGER},
+			</if>
+			<if test="college != null">
+				college = #{college,jdbcType=INTEGER},
+			</if>
+			<if test="seniorTitle != null">
+				senior_title = #{seniorTitle,jdbcType=INTEGER},
+			</if>
+			<if test="intermediateTitle != null">
+				intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
+			</if>
+			<if test="juniorTitle != null">
+				junior_title = #{juniorTitle,jdbcType=INTEGER},
+			</if>
+			<if test="seniorMechanic != null">
+				senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
+			</if>
+			<if test="belowThirty != null">
+				below_thirty = #{belowThirty,jdbcType=INTEGER},
+			</if>
+			<if test="thirtyoneToThirtyfour != null">
+				thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
+			</if>
+			<if test="fortyoneToFifty != null">
+				fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
+			</if>
+			<if test="aboveFifty != null">
+				above_fifty = #{aboveFifty,jdbcType=INTEGER},
+			</if>
+			<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>
+			<if test="socialSecurityUrl != null">
+				social_security_url = #{socialSecurityUrl,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.OrgHumanResource">
+		update org_human_resource
+		set uid = #{uid,jdbcType=VARCHAR},
+		firm_total = #{firmTotal,jdbcType=INTEGER},
+		tech_total = #{techTotal,jdbcType=INTEGER},
+		firm_in_service = #{firmInService,jdbcType=INTEGER},
+		tech_in_service = #{techInService,jdbcType=INTEGER},
+		firm_part_time = #{firmPartTime,jdbcType=INTEGER},
+		tech_part_time = #{techPartTime,jdbcType=INTEGER},
+		firm_temporary = #{firmTemporary,jdbcType=INTEGER},
+		tech_temporary = #{techTemporary,jdbcType=INTEGER},
+		firm_foreign = #{firmForeign,jdbcType=INTEGER},
+		tech_foreign = #{techForeign,jdbcType=INTEGER},
+		firm_abroad = #{firmAbroad,jdbcType=INTEGER},
+		tech_abroad = #{techAbroad,jdbcType=INTEGER},
+		firm_core = #{firmCore,jdbcType=INTEGER},
+		tech_core = #{techCore,jdbcType=INTEGER},
+		doctor = #{doctor,jdbcType=INTEGER},
+		master = #{master,jdbcType=INTEGER},
+		undergraduate = #{undergraduate,jdbcType=INTEGER},
+		college = #{college,jdbcType=INTEGER},
+		senior_title = #{seniorTitle,jdbcType=INTEGER},
+		intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
+		junior_title = #{juniorTitle,jdbcType=INTEGER},
+		senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
+		below_thirty = #{belowThirty,jdbcType=INTEGER},
+		thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
+		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}
+		where id = #{id,jdbcType=VARCHAR}
+	</update>
+
+	<select id="findOrgHumanResourceListByPage" parameterType="java.lang.String"
+		resultMap="BaseResultMap">
+		select
+		<include refid="Base_Column_List" />
+		from org_human_resource
+		where deleted_sign = 0
+		<if test="uid != null">
+			and uid = #{uid,jdbcType=VARCHAR}
+		</if>
+		<if test="year != null">
+			and year = #{year,jdbcType=INTEGER}
+		</if>
+		order by year desc
+		<if test="page_sql != null">
+			${page_sql}
+		</if>
+
+	</select>
+
+	<select id="findOrgHumanResourceCount" resultType="java.lang.Integer"
+		parameterType="String">
+		select count(1) from
+		org_human_resource
+		where deleted_sign = 0
+		<if test="uid != null">
+			and uid = #{uid,jdbcType=VARCHAR}
+		</if>
+		<if test="year != null">
+			and year = #{year,jdbcType=INTEGER}
+		</if>
+
+	</select>
+
+	<update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
+		update org_human_resource set deleted_sign = 1
+		where id in
+		<foreach item="item" collection="list" open="(" separator=","
+			close=")">
+			#{item}
+		</foreach>
+	</update>
+
+	<select id="selectOrgHumanResourceByUidAndYear" resultMap="BaseResultMap">
+		select
+		<include refid="Base_Column_List" />
+		from org_human_resource
+		where year = #{0} and uid = #{1}
+	</select>
 </mapper>

+ 30 - 64
src/main/java/com/goafanti/common/mapper/UserInterestMapper.xml

@@ -89,73 +89,39 @@
   </select>
   
   <select id="findInterestUserListByPage" parameterType="java.lang.String" resultType="com.goafanti.user.bo.InterestUserListBo">
-	  	SELECT
-		x.interestId,
-		x.uid,
-	    x.userProvince,
-	    x.orgProvince,
-		x.username,
-		x.unitName,
-		x.type,
-		x.createTime, 
-		count(a.id) AS achievementNum,
-		count(d.id) AS demandNum
+	SELECT
+			uii.username,
+			oi.unit_name AS unitName,
+			u.type,
+			u.id AS uid,
+			ui.id AS interestId,
+			ui.create_time AS createTime,
+			uii.province AS userProvince,
+			oi.licence_province AS orgProvince,
+			uinfo.person_portrait_url AS personPortraitUrl,
+			oinfo.logo_url AS logoUrl,
+			adc.achievement_count AS achievementNum,
+			adc.demand_count AS demandNum
 	FROM
-		(
-			SELECT
-				uii.username,
-				oi.unit_name AS unitName,
-				u.type,
-				u.id AS uid,
-				ui.id AS interestId,
-				ui.create_time AS createTime,
-	      uii.province as userProvince,
-	      oi.licence_province as orgProvince,
-	      uinfo.person_portrait_url as personPortraitUrl,
-	      oinfo.logo_url as logoUrl
-			FROM
-				user_interest ui
-			LEFT JOIN user_identity uii ON uii.uid = ui.to_uid
-			LEFT JOIN organization_identity oi ON oi.uid = ui.to_uid
-			LEFT JOIN user u ON u.id = ui.to_uid
-			LEFT JOIN user_info uinfo on uinfo.uid = ui.to_uid
-			LEFT JOIN organization_info oinfo on oinfo.uid = ui.to_uid 
-			WHERE
-				ui.from_uid = #{fromUid,jdbcType=VARCHAR}
-		) x
-	LEFT JOIN achievement a ON a.owner_id = x.uid
-	LEFT JOIN demand d ON d.employer_id = x.uid
-	AND d.deleted_sign = 0
-	AND d.audit_status = 3
-	AND d.release_status = 1
-	AND a.deleted_sign = 0
-	AND a.audit_status = 3
-	AND a.release_status = 1
-	GROUP BY
-		x.uid
-	ORDER BY x.createTime
+		user_interest ui
+	LEFT JOIN user_identity uii ON uii.uid = ui.to_uid
+	LEFT JOIN organization_identity oi ON oi.uid = ui.to_uid
+	LEFT JOIN <![CDATA[user]]> u ON u.id = ui.to_uid
+	LEFT JOIN user_info uinfo ON uinfo.uid = ui.to_uid
+	LEFT JOIN organization_info oinfo ON oinfo.uid = ui.to_uid
+	LEFT JOIN achievement_demand_count adc ON adc.uid = ui.to_uid
+	WHERE
+		ui.from_uid = #{fromUid,jdbcType=VARCHAR}
+	ORDER BY
+		ui.create_time DESC
   </select>
   
   <select id="findInterestUserCount" resultType="java.lang.Integer" parameterType="java.lang.String">
-  		SELECT
-		count(distinct(x.uid))
-	FROM
-		(
-			SELECT
-				u.id AS uid
-			FROM
-				user_interest ui
-			LEFT JOIN user u ON u.id = ui.to_uid
-			WHERE
-				ui.from_uid = #{fromUid,jdbcType=VARCHAR}
-		) x
-	LEFT JOIN achievement a ON a.owner_id = x.uid
-	LEFT JOIN demand d ON d.employer_id = x.uid
-	AND d.deleted_sign = 0
-	AND d.audit_status = 3
-	AND d.release_status = 1
-	AND a.deleted_sign = 0
-	AND a.audit_status = 3
-	AND a.release_status = 1
+  	SELECT
+	  count(1)
+    FROM
+	 user_interest ui
+    WHERE
+	 ui.from_uid = #{fromUid,jdbcType=VARCHAR}
   </select>
 </mapper>

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

@@ -21,7 +21,7 @@ public class InputOrganizationTech {
 
 	private String	searchAreaDet;
 
-	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	specialty;
 
 	public String getId() {

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

@@ -2,8 +2,7 @@ package com.goafanti.user.controller;
 
 import java.math.BigDecimal;
 import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Arrays;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -665,14 +664,14 @@ public class UserApiController extends BaseApiController {
 					OrgHumanResourceFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-		
-		if (null == ohr.getYear()){
+
+		if (null == ohr.getYear()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
 			return res;
 		}
 		OrgHumanResource orgHumanResource = new OrgHumanResource();
 		BeanUtils.copyProperties(ohr, orgHumanResource);
-		
+
 		if (StringUtils.isBlank(orgHumanResource.getId())) {
 			if (null != orgHumanResourceService.selectOrgHumanResourceByUidAndYear(orgHumanResource.getYear(),
 					orgHumanResource.getUid())) {
@@ -694,13 +693,13 @@ public class UserApiController extends BaseApiController {
 	 * 
 	 * @return
 	 */
-	public Result deleteHumanResource(@RequestParam(name = "ids[]", required = true) String[] ids) {
+	public Result deleteHumanResource(@RequestParam(name = "ids[]", required = false) String[] ids) {
 		Result res = new Result();
-		List<String> id = new ArrayList<String>();
-		for (String s : ids) {
-			id.add(s);
+		if (ids == null || ids.length < 1) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
+		} else {
+			orgHumanResourceService.batchDeleteByPrimaryKey(Arrays.asList(ids));
 		}
-		orgHumanResourceService.batchDeleteByPrimaryKey(id);
 		return res;
 	}
 

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

@@ -306,7 +306,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		if (TokenManager.hasRole(AFTConstants.MANAGERADMIN)) {
 			return organizationIdentityMapper.selectManagerAchievementOrgOwner(aid, name);
 		} else {
-			if (TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			if (TokenManager.hasRole(AFTConstants.SUPERADMIN) || TokenManager.hasRole(AFTConstants.TECHBROKER)) {
 				aid = null;
 			}
 			return organizationIdentityMapper.selectAchievementOrgOwner(aid, name);