Explorar o código

Merge branch 'test'

anderx %!s(int64=3) %!d(string=hai) anos
pai
achega
d087357755

+ 2 - 0
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -158,6 +158,8 @@ public class AdminSuperviserApiController extends CertifyApiController {
 			Admin ad = new Admin();
 			BeanUtils.copyProperties(admin, ad);
 			ad.setNumber(a.getNumber());
+			ad.setPassword(a.getPassword());
+			ad.setCreateTime(a.getCreateTime());
 			res = disposeAdminLocationList(res, jo, ad);
 			if (!res.getError().isEmpty()) {
 				return res;

+ 17 - 0
src/main/java/com/goafanti/common/dao/RdDetailsMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.RdDetails;
+
+public interface RdDetailsMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(RdDetails record);
+
+    int insertSelective(RdDetails record);
+
+    RdDetails selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(RdDetails record);
+
+    int updateByPrimaryKey(RdDetails record);
+}

+ 291 - 0
src/main/java/com/goafanti/common/mapper/RdDetailsMapper.xml

@@ -0,0 +1,291 @@
+<?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.RdDetailsMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.RdDetails">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
+    <result column="rd_no" jdbcType="VARCHAR" property="rdNo" />
+    <result column="ip_no" jdbcType="VARCHAR" property="ipNo" />
+    <result column="rd_name" jdbcType="VARCHAR" property="rdName" />
+    <result column="rd_start" jdbcType="TIMESTAMP" property="rdStart" />
+    <result column="rd_end" jdbcType="TIMESTAMP" property="rdEnd" />
+    <result column="technical_field" jdbcType="VARCHAR" property="technicalField" />
+    <result column="technology_source" jdbcType="VARCHAR" property="technologySource" />
+    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
+    <result column="recent_three_amount" jdbcType="DECIMAL" property="recentThreeAmount" />
+    <result column="rd_objective" jdbcType="VARCHAR" property="rdObjective" />
+    <result column="core_technology" jdbcType="VARCHAR" property="coreTechnology" />
+    <result column="achieve_results" jdbcType="VARCHAR" property="achieveResults" />
+    <result column="consultant_name" jdbcType="VARCHAR" property="consultantName" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, user_name, rd_no, ip_no, rd_name, rd_start, rd_end, technical_field, technology_source,
+    total_amount, recent_three_amount, rd_objective, core_technology, achieve_results,
+    consultant_name, `status`, open_time, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from rd_details
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from rd_details
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RdDetails" useGeneratedKeys="true">
+    insert into rd_details (user_name, rd_no, ip_no,
+      rd_name, rd_start, rd_end,
+      technical_field, technology_source, total_amount,
+      recent_three_amount, rd_objective, core_technology,
+      achieve_results, consultant_name, `status`,
+      open_time, create_time)
+    values (#{userName,jdbcType=VARCHAR}, #{rdNo,jdbcType=VARCHAR}, #{ipNo,jdbcType=VARCHAR},
+      #{rdName,jdbcType=VARCHAR}, #{rdStart,jdbcType=TIMESTAMP}, #{rdEnd,jdbcType=TIMESTAMP},
+      #{technicalField,jdbcType=VARCHAR}, #{technologySource,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
+      #{recentThreeAmount,jdbcType=DECIMAL}, #{rdObjective,jdbcType=VARCHAR}, #{coreTechnology,jdbcType=VARCHAR},
+      #{achieveResults,jdbcType=VARCHAR}, #{consultantName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
+      #{openTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RdDetails" useGeneratedKeys="true">
+    insert into rd_details
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="userName != null">
+        user_name,
+      </if>
+      <if test="rdNo != null">
+        rd_no,
+      </if>
+      <if test="ipNo != null">
+        ip_no,
+      </if>
+      <if test="rdName != null">
+        rd_name,
+      </if>
+      <if test="rdStart != null">
+        rd_start,
+      </if>
+      <if test="rdEnd != null">
+        rd_end,
+      </if>
+      <if test="technicalField != null">
+        technical_field,
+      </if>
+      <if test="technologySource != null">
+        technology_source,
+      </if>
+      <if test="totalAmount != null">
+        total_amount,
+      </if>
+      <if test="recentThreeAmount != null">
+        recent_three_amount,
+      </if>
+      <if test="rdObjective != null">
+        rd_objective,
+      </if>
+      <if test="coreTechnology != null">
+        core_technology,
+      </if>
+      <if test="achieveResults != null">
+        achieve_results,
+      </if>
+      <if test="consultantName != null">
+        consultant_name,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="openTime != null">
+        open_time,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="rdNo != null">
+        #{rdNo,jdbcType=VARCHAR},
+      </if>
+      <if test="ipNo != null">
+        #{ipNo,jdbcType=VARCHAR},
+      </if>
+      <if test="rdName != null">
+        #{rdName,jdbcType=VARCHAR},
+      </if>
+      <if test="rdStart != null">
+        #{rdStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="rdEnd != null">
+        #{rdEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="technicalField != null">
+        #{technicalField,jdbcType=VARCHAR},
+      </if>
+      <if test="technologySource != null">
+        #{technologySource,jdbcType=VARCHAR},
+      </if>
+      <if test="totalAmount != null">
+        #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="recentThreeAmount != null">
+        #{recentThreeAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="rdObjective != null">
+        #{rdObjective,jdbcType=VARCHAR},
+      </if>
+      <if test="coreTechnology != null">
+        #{coreTechnology,jdbcType=VARCHAR},
+      </if>
+      <if test="achieveResults != null">
+        #{achieveResults,jdbcType=VARCHAR},
+      </if>
+      <if test="consultantName != null">
+        #{consultantName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="openTime != null">
+        #{openTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.RdDetails">
+    update rd_details
+    <set>
+      <if test="userName != null">
+        user_name = #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="rdNo != null">
+        rd_no = #{rdNo,jdbcType=VARCHAR},
+      </if>
+      <if test="ipNo != null">
+        ip_no = #{ipNo,jdbcType=VARCHAR},
+      </if>
+      <if test="rdName != null">
+        rd_name = #{rdName,jdbcType=VARCHAR},
+      </if>
+      <if test="rdStart != null">
+        rd_start = #{rdStart,jdbcType=TIMESTAMP},
+      </if>
+      <if test="rdEnd != null">
+        rd_end = #{rdEnd,jdbcType=TIMESTAMP},
+      </if>
+      <if test="technicalField != null">
+        technical_field = #{technicalField,jdbcType=VARCHAR},
+      </if>
+      <if test="technologySource != null">
+        technology_source = #{technologySource,jdbcType=VARCHAR},
+      </if>
+      <if test="totalAmount != null">
+        total_amount = #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="recentThreeAmount != null">
+        recent_three_amount = #{recentThreeAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="rdObjective != null">
+        rd_objective = #{rdObjective,jdbcType=VARCHAR},
+      </if>
+      <if test="coreTechnology != null">
+        core_technology = #{coreTechnology,jdbcType=VARCHAR},
+      </if>
+      <if test="achieveResults != null">
+        achieve_results = #{achieveResults,jdbcType=VARCHAR},
+      </if>
+      <if test="consultantName != null">
+        consultant_name = #{consultantName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="openTime != null">
+        open_time = #{openTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.RdDetails">
+    update rd_details
+    set user_name = #{userName,jdbcType=VARCHAR},
+      rd_no = #{rdNo,jdbcType=VARCHAR},
+      ip_no = #{ipNo,jdbcType=VARCHAR},
+      rd_name = #{rdName,jdbcType=VARCHAR},
+      rd_start = #{rdStart,jdbcType=TIMESTAMP},
+      rd_end = #{rdEnd,jdbcType=TIMESTAMP},
+      technical_field = #{technicalField,jdbcType=VARCHAR},
+      technology_source = #{technologySource,jdbcType=VARCHAR},
+      total_amount = #{totalAmount,jdbcType=DECIMAL},
+      recent_three_amount = #{recentThreeAmount,jdbcType=DECIMAL},
+      rd_objective = #{rdObjective,jdbcType=VARCHAR},
+      core_technology = #{coreTechnology,jdbcType=VARCHAR},
+      achieve_results = #{achieveResults,jdbcType=VARCHAR},
+      consultant_name = #{consultantName,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      open_time = #{openTime,jdbcType=TIMESTAMP},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
+  <select id="checkRdNo" resultType="java.lang.Integer">
+    select count(*)
+    from rd_details
+    where rd_no =#{rdNo}
+  </select>
+  <sql id="details_List">
+     a.id, a.user_name userName, a.rd_no rdNo, a.ip_no ipNo, a.rd_name rdName,a.technical_field technicalField,
+     a.technology_source technologySource, a.total_amount totalAmount, a.recent_three_amount recentThreeAmount,
+     a.rd_objective rdObjective, a.core_technology coreTechnology, a.achieve_results achieveResults,
+     a.consultant_name consultantName, a.status, date_format(a.rd_start, '%Y-%m-%d %H:%i:%s') rdStartS,
+     date_format(a.rd_end , '%Y-%m-%d %H:%i:%s') rdEndS,date_format(a.open_time, '%Y-%m-%d %H:%i:%s')openTimeS,
+     date_format(a.create_time, '%Y-%m-%d %H:%i:%s') createTimeS
+  </sql>
+  <select id="details" resultType="com.goafanti.RD.bo.OutRdDetails">
+    select
+    <include refid="details_List" />
+    from rd_details a
+    where a.id =#{id}
+  </select>
+
+  <select id="RdDetailsList" resultType="com.goafanti.RD.bo.OutRdDetails">
+    select
+    <include refid="details_List" />
+    from rd_details a
+    where 1=1
+    <if test="RdStart !=null and RdEnd !=null">
+      and a.rd_start >= #{RdStart} and a.rd_end <![CDATA[ <= ]]> #{RdEnd}
+    </if>
+    <if test="RdName !=null ">
+      and a.rd_name =#{RdName}
+    </if>
+    <if test="page_sql !=null ">
+        ${page_sql}
+    </if>
+  </select>
+  <select id="RdDetailsCount" resultType="java.lang.Integer">
+    select
+    count(*)
+    from rd_details a
+    where 1=1
+    <if test="RdStart !=null and RdEnd !=null">
+      and a.rd_start >= #{RdStart} and a.rd_end <![CDATA[ <= ]]> #{RdEnd}
+    </if>
+    <if test="RdName !=null ">
+      and a.rd_name =#{RdName}
+    </if>
+  </select>
+
+
+</mapper>

+ 257 - 0
src/main/java/com/goafanti/common/model/RdDetails.java

@@ -0,0 +1,257 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * rd_details
+ * @author 
+ */
+public class RdDetails implements Serializable {
+    private Long id;
+
+    /**
+     * 公司名称
+     */
+    private String userName;
+
+    /**
+     * 研发活动编号
+     */
+    private String rdNo;
+
+    /**
+     * 知识产权编号
+     */
+    private String ipNo;
+
+    /**
+     * 发研活动名称
+     */
+    private String rdName;
+
+    /**
+     * 开始时间
+     */
+    private Date rdStart;
+
+    /**
+     * 结束时间
+     */
+    private Date rdEnd;
+
+    /**
+     * 技术领域
+     */
+    private String technicalField;
+
+    /**
+     * 技术来源
+     */
+    private String technologySource;
+
+    /**
+     * 研发经费总预算(万元)
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 研发经费近三年总支出(万元)
+     */
+    private BigDecimal recentThreeAmount;
+
+    /**
+     * 研发目的及组织实施方式
+     */
+    private String rdObjective;
+
+    /**
+     * 核心技术及创新点
+     */
+    private String coreTechnology;
+
+    /**
+     * 取得的创段性成果
+     */
+    private String achieveResults;
+
+    /**
+     * 操作人
+     */
+    private String consultantName;
+
+    /**
+     * 状态 0=草稿,1=正常,2=删除
+     */
+    private Integer status;
+
+    /**
+     * 开放时间
+     */
+    private Date openTime;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 录入人
+     */
+    private String aid;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getRdNo() {
+        return rdNo;
+    }
+
+    public void setRdNo(String rdNo) {
+        this.rdNo = rdNo;
+    }
+
+    public String getIpNo() {
+        return ipNo;
+    }
+
+    public void setIpNo(String ipNo) {
+        this.ipNo = ipNo;
+    }
+
+    public String getRdName() {
+        return rdName;
+    }
+
+    public void setRdName(String rdName) {
+        this.rdName = rdName;
+    }
+
+    public Date getRdStart() {
+        return rdStart;
+    }
+
+    public void setRdStart(Date rdStart) {
+        this.rdStart = rdStart;
+    }
+
+    public Date getRdEnd() {
+        return rdEnd;
+    }
+
+    public void setRdEnd(Date rdEnd) {
+        this.rdEnd = rdEnd;
+    }
+
+    public String getTechnicalField() {
+        return technicalField;
+    }
+
+    public void setTechnicalField(String technicalField) {
+        this.technicalField = technicalField;
+    }
+
+    public String getTechnologySource() {
+        return technologySource;
+    }
+
+    public void setTechnologySource(String technologySource) {
+        this.technologySource = technologySource;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public BigDecimal getRecentThreeAmount() {
+        return recentThreeAmount;
+    }
+
+    public void setRecentThreeAmount(BigDecimal recentThreeAmount) {
+        this.recentThreeAmount = recentThreeAmount;
+    }
+
+    public String getRdObjective() {
+        return rdObjective;
+    }
+
+    public void setRdObjective(String rdObjective) {
+        this.rdObjective = rdObjective;
+    }
+
+    public String getCoreTechnology() {
+        return coreTechnology;
+    }
+
+    public void setCoreTechnology(String coreTechnology) {
+        this.coreTechnology = coreTechnology;
+    }
+
+    public String getAchieveResults() {
+        return achieveResults;
+    }
+
+    public void setAchieveResults(String achieveResults) {
+        this.achieveResults = achieveResults;
+    }
+
+    public String getConsultantName() {
+        return consultantName;
+    }
+
+    public void setConsultantName(String consultantName) {
+        this.consultantName = consultantName;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Date getOpenTime() {
+        return openTime;
+    }
+
+    public void setOpenTime(Date openTime) {
+        this.openTime = openTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+}

+ 7 - 2
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -368,7 +368,12 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				orderExamineMapper.updateByOrderNo(orderNo,1,1);
 			}
 			if (rejectState==3) {
-				zxsFlag=pushZXSprocess(nb);
+				orderExamineMapper.updateByOrderNoAndAid(nb.getOrderNo(),TokenManager.getAdminId(),0);
+				int wsh=orderExamineMapper.checkCountStatus(nb.getOrderNo(),0,0);
+				if (wsh==0){
+					zxsFlag=true;
+					zxsjlFlag= pushZXSJLprocess( nb);
+				}
 			}else if(rejectState==4){
 				zxsjlFlag=pushZXSJLprocess(nb);
 			}
@@ -378,7 +383,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			Date date =new Date();
 			date.setTime(date.getTime()+1000);
 			if (zxsFlag){
-				addOrderChangeLog("无咨询师自动通过", status, orderNo, nb.getId(),date);
+				addOrderChangeLog("无咨询师自动通过", 2, orderNo, nb.getId(),date);
 			}
 			if (zxsjlFlag){
 				addOrderChangeLog("无咨询师经理自动通过", 2, nb.getOrderNo(), nb.getId(),date);

+ 8 - 14
src/main/java/com/goafanti/order/service/impl/PushOrderService.java

@@ -84,56 +84,50 @@ public class PushOrderService {
             flag=true;
         }else{
             switch (processStatus) {
-                case 1:
+                case 2:
                     if(TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN)){
                         flag=true;
                     }
                     break;
-                case 2:
+                case 3:
                     if(TokenManager.hasRole(AFTConstants.TECH)){
                         flag=true;
                     }
                     break;
-                case 3:
+                case 4:
                     if(TokenManager.hasRole(AFTConstants.TECH_MANAGER)){
                         flag=true;
                     }
                     break;
-                case 4:
+                case 5:
                     if(TokenManager.hasRole(AFTConstants.TECH_ADMIN)){
                         flag=true;
                     }
                     break;
-                case 5:
+                case 6:
                     if(TokenManager.hasRole(AFTConstants.FINANCE)){
                         flag=true;
                     }
                     break;
-                case 6:
+                case 7:
                     if(TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)){
                         flag=true;
                     }
                     break;
-                case 7:
+                case 8:
 
                     if((TokenManager.hasRole(AFTConstants.CED)&&status!=2)||
                             (TokenManager.hasRole(AFTConstants.FINANCE)&&status==2)){
                         flag=true;
                     }
                     break;
-                case 8:
+                case 9:
 
                     if((TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||(TokenManager.hasRole(AFTConstants.APPROVAL_DECISION_AUDITOR))&&status!=2)||
                             (TokenManager.hasRole(AFTConstants.FINANCE)&&status==2)){
                         flag=true;
                     }
                     break;
-                case 9:
-                    if(TokenManager.hasRole(AFTConstants.FINANCE)){
-                        flag=true;
-                    }
-                    break;
-
             }
         }
         if (flag){