Browse Source

Merge branch 'test'

# Conflicts:
#	src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
#	src/main/resources/props/config_local.properties
#	src/main/resources/props/config_test.properties
anderx 3 years ago
parent
commit
6a133f5b95

+ 9 - 10
src/main/java/com/goafanti/admin/controller/AdminOrgBaiscInfoApiController.java

@@ -38,7 +38,7 @@ import com.goafanti.user.service.OrganizationIdentityService;
 @Controller
 @RequestMapping(value = "/api/admin/basic")
 public class AdminOrgBaiscInfoApiController extends CertifyApiController {
-	
+
 	@Resource
 	private NatureOwnershipService		natureOwnershipService;
 	@Resource
@@ -46,7 +46,7 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 
 	/**
 	 * 企业基本信息保存
-	 * 
+	 *
 	 * @param info
 	 * @param bindingResult
 	 * @return
@@ -108,7 +108,7 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 
 	/**
 	 * 企业基本信息入口
-	 * 
+	 *
 	 * @param uid
 	 * @return
 	 */
@@ -124,14 +124,14 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 		return res;
 	}
 
-	
-	
 
-	
+
+
+
 
 	/**
 	 * 自然人股权列表
-	 * 
+	 *
 	 * @param uid
 	 * @return
 	 */
@@ -149,7 +149,7 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 
 	/**
 	 * 删除自然人股权
-	 * 
+	 *
 	 * @param ids
 	 * @return
 	 */
@@ -166,7 +166,7 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 
 	/**
 	 * 自然人股权保存修改
-	 * 
+	 *
 	 * @param data
 	 * @return
 	 */
@@ -198,5 +198,4 @@ public class AdminOrgBaiscInfoApiController extends CertifyApiController {
 		}
 		return res;
 	}
-
 }

+ 37 - 91
src/main/java/com/goafanti/common/dao/TChangeTaskMapper.java

@@ -8,96 +8,42 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface TChangeTaskMapper {
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	long countByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int deleteByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int insert(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int insertSelective(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	List<TChangeTask> selectByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	TChangeTask selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByExample(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByPrimaryKeySelective(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByPrimaryKey(TChangeTask record);
-
-	void insertSelectiveList(@Param("list")List<TChangeTask> list);
-
-	List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
-
-	/**
-	 *
-	 * @param tid 变更项目id
-	 * @param sid 变更拆分父项目id
-	 * @param type 处理类型
-	 * @return
-	 */
-	int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
-
-	int deleteByTid(Integer tid);
-
-	/**
-	 *   获取变更子项�???
-	 * @param splitSuper
-	 * @param cid
-	 * @return
-	 */
-	List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);
-
-
-	TChangeTask selectBytid(Integer id);
+    int insert(TChangeTask record);
+
+    int insertSelective(TChangeTask record);
+
+    TChangeTask selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TChangeTask record);
+
+    int updateByPrimaryKey(TChangeTask record);
+
+
+    void insertSelectiveList(@Param("list")List<TChangeTask> list);
+
+    List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
+
+    /**
+     *
+     * @param tid 变更项目id
+     * @param sid 变更拆分父项目id
+     * @param type 处理类型
+     * @return
+     */
+    int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
+
+    int deleteByTid(Integer tid);
+
+    /**
+     *   获取变更子项�???
+     * @param splitSuper
+     * @param cid
+     * @return
+     */
+    List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);
+
+
+    TChangeTask selectBytid(Integer id);
 }

+ 6 - 6
src/main/java/com/goafanti/common/dao/UserLockReleaseMapper.java

@@ -87,15 +87,15 @@ public interface UserLockReleaseMapper {
 	 * @return
 	 */
 	int updateUserLock(@Param("uid")String uid,@Param("aid")String aid,@Param("oldStatus")Integer oldStatus,@Param("newStatus")Integer newStatus);
-	
+
 	int updateUsersLock(@Param("uList")List<String> uList,@Param("aid")String aid,@Param("oldStatus")Integer oldStatus,@Param("newStatus")Integer newStatus);
-	
+
 	int updateUserTypeLock(@Param("uid")String uid,@Param("aid")String aid,@Param("type")Integer type,
 			@Param("newStatus")Integer newStatus,@Param("date") Date date);
 	void updateUserTypeLockList(@Param("list")List<String> list, @Param("aid")String aid,@Param("type")Integer type,
 			@Param("newStatus")Integer newStatus,@Param("date") Date date);
-	
-	List<LockingReleaseBo> selectWaitReleaseCustomer(@Param("aid")String aid, @Param("type")Integer type);
+
+	List<LockingReleaseBo> selectWaitReleaseCustomer(@Param("aid")String aid);
 
 	List<LockingReleaseBo> selectWaitReleaseBusiness(String aid);
 
@@ -113,7 +113,7 @@ public interface UserLockReleaseMapper {
 
 	List<LockingReleaseBo> checkUserProject(@Param("uid")String uid, @Param("pid")String pid, @Param("aid")String aid);
 
-	List<userDaysBo> selectUserDays(@Param("aid")String aid, @Param("x")Integer x, @Param("y")Integer y);
+	List<userDaysBo> selectUserDays(@Param("aid")String aid,  @Param("y")Integer y);
 
 
 
@@ -140,4 +140,4 @@ public interface UserLockReleaseMapper {
 	List<userDaysBo> selectChannelNotFollow(@Param("days")Integer days, @Param("aid")String aid);
 
 
-}
+}

+ 48 - 252
src/main/java/com/goafanti/common/mapper/TChangeTaskMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TChangeTaskMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:53:59 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="cid" jdbcType="INTEGER" property="cid" />
@@ -24,160 +19,42 @@
     <result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
     <result column="official_cost" jdbcType="INTEGER" property="officialCost" />
     <result column="cost_reduction" jdbcType="INTEGER" property="costReduction" />
+    <result column="service_life" jdbcType="VARCHAR" property="serviceLife" />
+    <result column="service_year" jdbcType="VARCHAR" property="serviceYear" />
+    <result column="year_sum" jdbcType="INTEGER" property="yearSum" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:53:59 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price,
-    task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
-    cost_reduction
+    task_comment, `type`, create_time, split_status, split_super, receiver_name, official_cost,
+    cost_reduction, service_life, service_year, year_sum
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     select
     <include refid="Base_Column_List" />
     from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     delete from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TChangeTaskExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    delete from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     insert into t_change_task (id, tid, cid,
       order_no, main, commodity_id,
       commodity_name, commodity_quantity, commodity_price,
-      task_comment, type, create_time,
+      task_comment, `type`, create_time,
       split_status, split_super, receiver_name,
-      official_cost, cost_reduction)
+      official_cost, cost_reduction, service_life,
+      service_year, year_sum)
     values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
       #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR},
       #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
       #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
       #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR},
-      #{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER})
+      #{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR},
+      #{serviceYear,jdbcType=VARCHAR}, #{yearSum,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     insert into t_change_task
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -211,7 +88,7 @@
         task_comment,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="createTime != null">
         create_time,
@@ -231,6 +108,15 @@
       <if test="costReduction != null">
         cost_reduction,
       </if>
+      <if test="serviceLife != null">
+        service_life,
+      </if>
+      <if test="serviceYear != null">
+        service_year,
+      </if>
+      <if test="yearSum != null">
+        year_sum,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -284,117 +170,18 @@
       <if test="costReduction != null">
         #{costReduction,jdbcType=INTEGER},
       </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    select count(*) from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    update t_change_task
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.tid != null">
-        tid = #{record.tid,jdbcType=INTEGER},
-      </if>
-      <if test="record.cid != null">
-        cid = #{record.cid,jdbcType=INTEGER},
-      </if>
-      <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.main != null">
-        main = #{record.main,jdbcType=INTEGER},
+      <if test="serviceLife != null">
+        #{serviceLife,jdbcType=VARCHAR},
       </if>
-      <if test="record.commodityId != null">
-        commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      <if test="serviceYear != null">
+        #{serviceYear,jdbcType=VARCHAR},
       </if>
-      <if test="record.commodityName != null">
-        commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      <if test="yearSum != null">
+        #{yearSum,jdbcType=INTEGER},
       </if>
-      <if test="record.commodityQuantity != null">
-        commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="record.commodityPrice != null">
-        commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.taskComment != null">
-        task_comment = #{record.taskComment,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.splitStatus != null">
-        split_status = #{record.splitStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.splitSuper != null">
-        split_super = #{record.splitSuper,jdbcType=INTEGER},
-      </if>
-      <if test="record.receiverName != null">
-        receiver_name = #{record.receiverName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.officialCost != null">
-        official_cost = #{record.officialCost,jdbcType=INTEGER},
-      </if>
-      <if test="record.costReduction != null">
-        cost_reduction = #{record.costReduction,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    update t_change_task
-    set id = #{record.id,jdbcType=INTEGER},
-      tid = #{record.tid,jdbcType=INTEGER},
-      cid = #{record.cid,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      main = #{record.main,jdbcType=INTEGER},
-      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
-      commodity_name = #{record.commodityName,jdbcType=VARCHAR},
-      commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      task_comment = #{record.taskComment,jdbcType=VARCHAR},
-      type = #{record.type,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      split_status = #{record.splitStatus,jdbcType=INTEGER},
-      split_super = #{record.splitSuper,jdbcType=INTEGER},
-      receiver_name = #{record.receiverName,jdbcType=VARCHAR},
-      official_cost = #{record.officialCost,jdbcType=INTEGER},
-      cost_reduction = #{record.costReduction,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
+    </trim>
+  </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     update t_change_task
     <set>
       <if test="tid != null">
@@ -425,7 +212,7 @@
         task_comment = #{taskComment,jdbcType=VARCHAR},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -445,15 +232,19 @@
       <if test="costReduction != null">
         cost_reduction = #{costReduction,jdbcType=INTEGER},
       </if>
+      <if test="serviceLife != null">
+        service_life = #{serviceLife,jdbcType=VARCHAR},
+      </if>
+      <if test="serviceYear != null">
+        service_year = #{serviceYear,jdbcType=VARCHAR},
+      </if>
+      <if test="yearSum != null">
+        year_sum = #{yearSum,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     update t_change_task
     set tid = #{tid,jdbcType=INTEGER},
       cid = #{cid,jdbcType=INTEGER},
@@ -464,13 +255,16 @@
       commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
       commodity_price = #{commodityPrice,jdbcType=DECIMAL},
       task_comment = #{taskComment,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       split_status = #{splitStatus,jdbcType=INTEGER},
       split_super = #{splitSuper,jdbcType=INTEGER},
       receiver_name = #{receiverName,jdbcType=VARCHAR},
       official_cost = #{officialCost,jdbcType=INTEGER},
-      cost_reduction = #{costReduction,jdbcType=INTEGER}
+      cost_reduction = #{costReduction,jdbcType=INTEGER},
+      service_life = #{serviceLife,jdbcType=VARCHAR},
+      service_year = #{serviceYear,jdbcType=VARCHAR},
+      year_sum = #{yearSum,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -478,20 +272,22 @@
     insert into t_change_task ( tid, cid, split_status,
       order_no, commodity_id, commodity_name,
       commodity_quantity, commodity_price, task_comment,
-        split_super , receiver_name, create_time)
+        split_super , receiver_name, create_time,service_life,
+    service_year, year_sum, picture_url)
     values
     <foreach collection="list" index="index" item="item" separator=",">
       ( #{item.tid,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER}, #{item.splitStatus,jdbcType=INTEGER},
       #{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR},
       #{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR},
-       #{item.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now())
+       #{item.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now(), #{item.serviceLife,jdbcType=VARCHAR},
+      #{item.serviceYear,jdbcType=VARCHAR}, #{item.yearSum,jdbcType=INTEGER}, #{item.pictureUrl,jdbcType=VARCHAR})
     </foreach>
   </insert>
   <select id="selectByCid" resultType="com.goafanti.order.bo.TChangeTaskOut">
     select a.id,a.order_no as orderNo,a.main, c.cname,c.sort cSort,a.commodity_name as commodityName,a.official_cost officialCost,
 	a.official_cost officialCost, a.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,a.type,a.tid,
 	a.receiver_name receiverName, a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,
-	a.split_super splitSuper
+	a.split_super splitSuper,a.picture_url pictureUrl, a.service_life serviceLife ,a.service_year serviceYear,a.year_sum yearSum
     from t_change_task a left join business_project i on a.commodity_id=i.id
   	left join business_category c on i.cid=c.id
   	where 1=1

+ 7 - 5
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -813,10 +813,12 @@
            c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,a.receiver_name receiverName,
            a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
            a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,  a.task_receiver as taskReceiver ,
-           a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType
+           a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType,
+           a.picture_url pictureUrl, ttm.service_life serviceLife ,ttm.service_year serviceYear,ttm.year_sum yearSum
     from t_order_task a left join business_project b on a.commodity_id=b.id left join t_order_new e on a.order_no=e.order_no
-                        left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
-                        left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
+    left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
+    left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
+    left join t_task_member ttm on a.id=ttm.tid
     where a.super_id is null  and  a.order_no= #{orderNo,jdbcType=VARCHAR} order by a.id
   </select>
 
@@ -1763,10 +1765,10 @@
     b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
     a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
     a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
-    d.service_life serviceLife ,d.service_year serviceYear,d.year_sum yearSum
+    e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum
     from t_order_task a left join t_order_new b on a.order_no =b.order_no
     left join t_order_mid c on a.order_no =c.order_no
-    left join t_task_member d on a.id=d.tid
+    left join t_task_member e on a.id=e.tid
     <if test="shiroType ==2">
       left join department d on b.order_dep =d.id
     </if>

+ 3 - 18
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -386,13 +386,8 @@
 		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
 	on t0.uid = t1.uid
 	left join user u on t0.uid=u.id
-	where u.channel=0
-	<if test="type==0">
+	where u.channel=0 and u.new_channel
 	 and datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t0.lock_time))>30
-	</if>
-	<if test="type==1">
-	 and datediff(now(),t0.lock_time)>270
-	</if>
   </select>
 
   <select id="selectWaitReleaseBusiness"  resultType="com.goafanti.customer.bo.LockingReleaseBo">
@@ -448,24 +443,14 @@
   </select>
 
   <select id="selectUserDays" resultType="com.goafanti.common.bo.userDaysBo">
-  select  t0.uid, t0.aid, u.nickname name ,u.channel ,1 type,u.new_channel newChannel
+    select  t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
 	from
 		(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
 	left join
 		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
 	on t0.uid = t1.uid
 	left join user u on t0.uid=u.id
-	where u.channel=0
-	and  datediff(now(),t0.lock_time)> #{x}
-	UNION
-	select  t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel
-	from
-		(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
-	left join
-		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
-	on t0.uid = t1.uid
-	left join user u on t0.uid=u.id
-	where u.channel=0
+	where u.channel=0 and u.new_channel=0
 	and datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t0.lock_time)) &gt; 15
 	UNION
 	  select  t0.uid, t0.aid, u.nickname name ,u.channel ,0 type,u.new_channel newChannel

+ 5 - 4
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -344,7 +344,7 @@
 		left join district_glossory dg2 on b.location_city = dg2.id
 		left join district_glossory dg3 on b.location_area = dg3.id
 		left join admin d on a.aid = d.id
-		where a.type = 1 and a.status =0
+		where a.type = 1 and a.status =0 and a.source in (1,2,3)
 	<if test="role == 0">
 		and un.name
 		<if test="names == null">
@@ -397,7 +397,7 @@
 		from admin
 		where department_id=#{departmentId,jdbcType=VARCHAR}) d on a.aid = d.id
 		</if>
-		where a.type = 1 and a.status =0
+		where a.type = 1 and a.status =0 and a.source in (1,2,3)
 		<if test="role == 0">
 			and un.name
 			<if test="names == null">
@@ -2192,13 +2192,14 @@ inner join(
   </select>
 
   <select id="getUserByNameList" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
-  	select id,nickname name from `user` where nickname like concat('%',#{name},'%')
+  	select id,nickname name from `user` where type = 1 and status =0 and source in (1,2,3)
+	and nickname like concat('%',#{name},'%')
   	<if test="page_sql != null">
    		${page_sql}
 	</if>
     </select>
     <select id="getUserByNameCount" resultType="java.lang.Integer" >
-  	select count(*) from `user` where nickname like concat('%',#{name},'%')
+  	select count(*) from `user` where type = 1 and status =0 and source in (1,2,3) and  nickname like concat('%',#{name},'%')
     </select>
     <select id="getAllUser" resultType="com.goafanti.common.bo.OutUser">
 		select id,name ,province ,name_mobile nameMobile from user_now

+ 267 - 393
src/main/java/com/goafanti/common/model/TChangeTask.java

@@ -1,399 +1,273 @@
 package com.goafanti.common.model;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
-public class TChangeTask {
-
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer tid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer cid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String orderNo;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer main;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String commodityId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String commodityName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer commodityQuantity;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private BigDecimal commodityPrice;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String taskComment;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer type;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer splitStatus;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer splitSuper;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String receiverName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer officialCost;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer costReduction;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.id
-	 * @return  the value of t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.id
-	 * @param id  the value for t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.tid
-	 * @return  the value of t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getTid() {
-		return tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.tid
-	 * @param tid  the value for t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setTid(Integer tid) {
-		this.tid = tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.cid
-	 * @return  the value of t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCid() {
-		return cid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.cid
-	 * @param cid  the value for t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCid(Integer cid) {
-		this.cid = cid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.order_no
-	 * @return  the value of t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getOrderNo() {
-		return orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.order_no
-	 * @param orderNo  the value for t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.main
-	 * @return  the value of t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getMain() {
-		return main;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.main
-	 * @param main  the value for t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setMain(Integer main) {
-		this.main = main;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_id
-	 * @return  the value of t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getCommodityId() {
-		return commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_id
-	 * @param commodityId  the value for t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityId(String commodityId) {
-		this.commodityId = commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_name
-	 * @return  the value of t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getCommodityName() {
-		return commodityName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_name
-	 * @param commodityName  the value for t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityName(String commodityName) {
-		this.commodityName = commodityName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_quantity
-	 * @return  the value of t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCommodityQuantity() {
-		return commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_quantity
-	 * @param commodityQuantity  the value for t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityQuantity(Integer commodityQuantity) {
-		this.commodityQuantity = commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_price
-	 * @return  the value of t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public BigDecimal getCommodityPrice() {
-		return commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_price
-	 * @param commodityPrice  the value for t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityPrice(BigDecimal commodityPrice) {
-		this.commodityPrice = commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.task_comment
-	 * @return  the value of t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getTaskComment() {
-		return taskComment;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.task_comment
-	 * @param taskComment  the value for t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setTaskComment(String taskComment) {
-		this.taskComment = taskComment;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.type
-	 * @return  the value of t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getType() {
-		return type;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.type
-	 * @param type  the value for t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setType(Integer type) {
-		this.type = type;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.create_time
-	 * @return  the value of t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.create_time
-	 * @param createTime  the value for t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.split_status
-	 * @return  the value of t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getSplitStatus() {
-		return splitStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.split_status
-	 * @param splitStatus  the value for t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setSplitStatus(Integer splitStatus) {
-		this.splitStatus = splitStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.split_super
-	 * @return  the value of t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getSplitSuper() {
-		return splitSuper;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.split_super
-	 * @param splitSuper  the value for t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setSplitSuper(Integer splitSuper) {
-		this.splitSuper = splitSuper;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.receiver_name
-	 * @return  the value of t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getReceiverName() {
-		return receiverName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.receiver_name
-	 * @param receiverName  the value for t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setReceiverName(String receiverName) {
-		this.receiverName = receiverName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.official_cost
-	 * @return  the value of t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getOfficialCost() {
-		return officialCost;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.official_cost
-	 * @param officialCost  the value for t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setOfficialCost(Integer officialCost) {
-		this.officialCost = officialCost;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.cost_reduction
-	 * @return  the value of t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCostReduction() {
-		return costReduction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.cost_reduction
-	 * @param costReduction  the value for t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCostReduction(Integer costReduction) {
-		this.costReduction = costReduction;
-	}
+/**
+ * t_change_task
+ * @author 
+ */
+public class TChangeTask implements Serializable {
+    /**
+     * 任务编号
+     */
+    private Integer id;
+
+    /**
+     * 订单任务编号
+     */
+    private Integer tid;
+
+    /**
+     * 变更编号
+     */
+    private Integer cid;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 是否为主要任务 0-否,1-是
+     */
+    private Integer main;
+
+    /**
+     * 商品id
+     */
+    private String commodityId;
+
+    /**
+     * 商品名称(冗余)
+     */
+    private String commodityName;
+
+    /**
+     * 商品数量
+     */
+    private Integer commodityQuantity;
+
+    /**
+     * 合同商品价格
+     */
+    private BigDecimal commodityPrice;
+
+    /**
+     * 任务说明
+     */
+    private String taskComment;
+
+    /**
+     * 状态 0正常 1新增 2修改 3删除 
+     */
+    private Integer type;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 0否 1父拆分 2子拆分
+     */
+    private Integer splitStatus;
+
+    /**
+     * 拆分父id
+     */
+    private Integer splitSuper;
+
+    /**
+     * 负责人
+     */
+    private String receiverName;
+
+    /**
+     * 官费 0否 1有
+     */
+    private Integer officialCost;
+
+    /**
+     * 费减 0否 1有 
+     */
+    private Integer costReduction;
+
+    /**
+     * 服务年限
+     */
+    private String serviceLife;
+
+    /**
+     * 本次年份
+     */
+    private String serviceYear;
+
+    /**
+     * 服务年限计数
+     */
+    private Integer yearSum;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+    public Integer getCid() {
+        return cid;
+    }
+
+    public void setCid(Integer cid) {
+        this.cid = cid;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Integer getMain() {
+        return main;
+    }
+
+    public void setMain(Integer main) {
+        this.main = main;
+    }
+
+    public String getCommodityId() {
+        return commodityId;
+    }
+
+    public void setCommodityId(String commodityId) {
+        this.commodityId = commodityId;
+    }
+
+    public String getCommodityName() {
+        return commodityName;
+    }
+
+    public void setCommodityName(String commodityName) {
+        this.commodityName = commodityName;
+    }
+
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+    public String getTaskComment() {
+        return taskComment;
+    }
+
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getSplitStatus() {
+        return splitStatus;
+    }
+
+    public void setSplitStatus(Integer splitStatus) {
+        this.splitStatus = splitStatus;
+    }
+
+    public Integer getSplitSuper() {
+        return splitSuper;
+    }
+
+    public void setSplitSuper(Integer splitSuper) {
+        this.splitSuper = splitSuper;
+    }
+
+    public String getReceiverName() {
+        return receiverName;
+    }
+
+    public void setReceiverName(String receiverName) {
+        this.receiverName = receiverName;
+    }
+
+    public Integer getOfficialCost() {
+        return officialCost;
+    }
+
+    public void setOfficialCost(Integer officialCost) {
+        this.officialCost = officialCost;
+    }
+
+    public Integer getCostReduction() {
+        return costReduction;
+    }
+
+    public void setCostReduction(Integer costReduction) {
+        this.costReduction = costReduction;
+    }
+
+    public String getServiceLife() {
+        return serviceLife;
+    }
+
+    public void setServiceLife(String serviceLife) {
+        this.serviceLife = serviceLife;
+    }
+
+    public String getServiceYear() {
+        return serviceYear;
+    }
+
+    public void setServiceYear(String serviceYear) {
+        this.serviceYear = serviceYear;
+    }
+
+    public Integer getYearSum() {
+        return yearSum;
+    }
+
+    public void setYearSum(Integer yearSum) {
+        this.yearSum = yearSum;
+    }
 }

+ 5 - 20
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -123,22 +123,14 @@ public class ReleaseUserTask {
 			if (userList != null && !userList.isEmpty()) {
 				for (User u : userList) {
 					List<LockingReleaseBo> userTmpList = new ArrayList<LockingReleaseBo>();
-					List<LockingReleaseBo> userTmpList2 = new ArrayList<LockingReleaseBo>();
+
 					if (StringUtils.isNotBlank(u.getId())) {
 						// 获取30天释放
-						userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
+						userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
 						customerService.pushReleaseLog(userTmpList, 0);
-						// 获取270天释放
-						if(!u.getId().equals("734092ad-6564-4021-b7ab-aab5af3a1537")){
-							userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
-							customerService.pushReleaseLog(userTmpList2, 1);
-						}
-						addUserNotice(userTmpList,userTmpList2);
-						//
+						addUserNotice(userTmpList);
 						if (userTmpList != null && !userTmpList.isEmpty())
 							lockUserList.addAll(userTmpList);
-						if (userTmpList2 != null && !userTmpList2.isEmpty())
-							lockUserList.addAll(userTmpList2);
 					}
 				}
 			}
@@ -232,7 +224,7 @@ public class ReleaseUserTask {
 	}
 
 
-	private void addUserNotice(List<LockingReleaseBo> userTmpList, List<LockingReleaseBo> userTmpList2) {
+	private void addUserNotice(List<LockingReleaseBo> userTmpList) {
 		List<Notice> nl=new ArrayList<Notice>();
 		if (!userTmpList.isEmpty()) {
 			for (LockingReleaseBo u : userTmpList) {
@@ -245,14 +237,7 @@ public class ReleaseUserTask {
 						u.getUid()));
 			}
 		}
-		if (!userTmpList2.isEmpty()) {
-			for (LockingReleaseBo u : userTmpList2) {
-				nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
-						NoticeStatus.CUSTOMER_LOSE270.getCode(),
-						String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
-						u.getUid()));
-			}
-		}
+
 		if(!nl.isEmpty())addNoticeBatch(nl);
 	}
 

+ 1 - 2
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -429,10 +429,9 @@ public interface CustomerService {
 	/**
 	 * 查询需要释放的客户
 	 * @param uid 客户Id
-	 * @param type   0 未跟进  1未签单
 	 * @return
 	 */
-	List<LockingReleaseBo> selectWaitReleaseCustomer(String uid, Integer type);
+	List<LockingReleaseBo> selectWaitReleaseCustomer(String uid);
 
 	List<LockingReleaseBo> selectWaitReleaseBusiness(String uid);
 

+ 5 - 5
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1863,8 +1863,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public List<LockingReleaseBo> selectWaitReleaseCustomer(String uid, Integer type) {
-		return userLockReleaseMapper.selectWaitReleaseCustomer(uid, type);
+	public List<LockingReleaseBo> selectWaitReleaseCustomer(String uid) {
+		return userLockReleaseMapper.selectWaitReleaseCustomer(uid);
 	}
 
 	/**
@@ -2109,10 +2109,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public List<userDaysBo> selectReleaseUserDays(String id) {
-		Integer x = 270, y = USER_CHANNEL_DAYS;
-		x = x - USER_REMIND_DAYS;
+		//渠道
+		Integer y = USER_CHANNEL_DAYS;
 		y = y - USER_REMIND_DAYS;
-		List<userDaysBo> list = userLockReleaseMapper.selectUserDays(id, x, y);
+		List<userDaysBo> list = userLockReleaseMapper.selectUserDays(id,  y);
 		return list;
 	}
 

+ 8 - 0
src/main/java/com/goafanti/order/controller/OrderChangeApiController.java

@@ -21,6 +21,8 @@ import com.goafanti.order.bo.InputTChangeTask;
 import com.goafanti.order.bo.NewOrderChangeBo;
 import com.goafanti.order.service.OrderChangeService;
 
+import java.io.BufferedReader;
+
 @RestController
 @RequestMapping(value = "/api/admin/orderChange")
 public class OrderChangeApiController extends CertifyApiController {
@@ -383,6 +385,12 @@ public class OrderChangeApiController extends CertifyApiController {
 			res.getError().add(buildError("订单编号和类型不能为空", "订单编号和类型不能为空"));
 			return res;
 		}
+		if (orderChangeService.checkChangeId(nb.getId())){
+			StringBuffer str=new StringBuffer("操作异常");
+			str=str.append("[").append(nb.getId()).append("]").append("编号变更已经完成");
+			res.getError().add(buildError(str.toString(), str.toString()));
+			return res;
+		}
 		res.data(orderChangeService.pushCompleteOrderChange(nb));
 		return res;
 	}

+ 2 - 0
src/main/java/com/goafanti/order/service/OrderChangeService.java

@@ -106,4 +106,6 @@ public interface OrderChangeService {
 
 
 	int pushCompleteRefund(NewOrderChangeBo nb);
+
+    boolean checkChangeId(Integer id);
 }

+ 39 - 1
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -75,7 +75,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	@Autowired
 	private OrderRefundInvoiceMapper	orderRefundInvoiceMapper;
 	@Autowired
-	private DepartmentMapper	departmentMapper;
+	private TTaskMemberMapper	tTaskMemberMapper;
 	@Autowired
 	private NewOrderRefundMapper	newOrderRefundMapper;
 	@Autowired
@@ -172,6 +172,11 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 					ck.setReceiverName(tt.getReceiverName());
 					ck.setMain(tt.getMain());
 					ck.setTid(tt.getId());
+					if(tt.getServiceLife()!=null){
+						ck.setServiceLife(tt.getServiceLife());
+						ck.setServiceYear(tt.getServiceYear());
+						ck.setYearSum(tt.getYearSum());
+					}
 					listck.add(ck);
 				}
 				tChangeTaskMapper.insertSelectiveList(listck);
@@ -530,6 +535,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		}else {
 			parameter.put("aid", TokenManager.getAdminId());
 		}
+		parameter.put("deps", orderService.selectMyDeps());
 		Pagination<NewOderCahngeListBo> data = (Pagination<NewOderCahngeListBo>)findPage("selectOrderChangeList", "selectOrderChangeCount", parameter, pageNo, pageSize);
 		return data;
 	}
@@ -682,6 +688,15 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		return 1;
 	}
 
+	@Override
+	public boolean checkChangeId(Integer id) {
+		NewOrderChangeBo nob=newOrderChangeMapper.selectById(id);
+		if (nob.getStatus()==4){
+			return true;
+		}
+		return false;
+	}
+
 	/**
 	 * 修改订单数据
 	 * @param nb
@@ -756,6 +771,9 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			ot.setMain(cd.getMain());
 			ot.setTaskStatus(0);
 			tOrderTaskMapper.insertSelective(ot);
+			if (cd.getServiceLife()!=null){
+				addTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum());
+			}
 			cd.setTid(ot.getId());
 			tChangeTaskMapper.updateByPrimaryKeySelective(cd);
 			tChangeDunMapper.updateByCTid(cd.getId(), ot.getId());
@@ -764,6 +782,9 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				ot.setCommodityPrice(cd.getCommodityPrice());
 				ot.setCommodityQuantity(cd.getCommodityQuantity());
 				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+				if (cd.getServiceLife()!=null){
+					updateTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum());
+				}
 			}else if(cd.getType()==3) {
 				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
 			}
@@ -800,6 +821,23 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		}
 	}
 
+	private void updateTaskMember(Integer id, String serviceLife, String serviceYear, Integer yearSum) {
+		TTaskMember ttm=new TTaskMember();
+		ttm.setTid(id);
+		ttm.setServiceLife(serviceLife);
+		ttm.setServiceYear(serviceYear);
+		ttm.setYearSum(yearSum);
+		tTaskMemberMapper.updateByTid(ttm);
+	}
+
+	private void addTaskMember(Integer id, String serviceLife, String serviceYear, Integer yearSum) {
+		TTaskMember ttm=new TTaskMember();
+		ttm.setTid(id);
+		ttm.setServiceLife(serviceLife);
+		ttm.setServiceYear(serviceYear);
+		ttm.setYearSum(yearSum);
+		tTaskMemberMapper.insertSelective(ttm);
+	}
 
 
 	@Override

+ 10 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -130,6 +130,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private BusinessCategoryMapper businessCategoryMapper;
 	@Autowired
 	private OrderProjectService orderProjectService;
+	@Autowired
+	private TTaskMemberMapper tTaskMemberMapper;
+
+	@Autowired
+	private DepartmentService departmentService;
 	@Value(value = "${upload.path}")
 	private String					uploadPath			= null;
 
@@ -372,15 +377,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (StringUtils.isBlank(t.getOrderDep())) {
 			t.setOrderDep(adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getDepartmentId());
 		}
-			//订单提交
-		if (isSubmit==1) {
+		if (isSubmit==1) {//订单提交
 			if(t2.getProcessStatus()<ProcessStatus.YPYXGLY.getCode()) {
 				t.setOrderStatus(OrderNewState.QDDS.getCode());
 				t.setProcessStatus(ProcessStatus.YPYXGLY.getCode());
 			}else {
 				t.setOrderStatus(OrderNewState.QDSHTG.getCode());
 			}
-			if (t2.getApproval().equals(ApprovalNewState.BH.getCode())){
+			if (t2.getApproval()==ApprovalNewState.BH.getCode()){
 				t.setApproval(ApprovalNewState.DSH.getCode());
 			}
 			//生成流转
@@ -870,6 +874,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 *  订单分配触发
 	 * @param orderNo
 	 */
+	@Override
 	public void pushOrderDun(String orderNo) {
 		TOrderNew b=tOrderNewMapper.selectByPrimaryKey(orderNo);
 		if(b.getApproval()==0){
@@ -907,6 +912,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 * @param o	订单催款类实对线
 	 * @return
 	 */
+	@Override
 	@Synchronized
 	public TOrderMid pushOrderMidDun(String orderNo, BigDecimal settlementAmount, Date date, OutNewOrderDunBo o) {
 		TOrderMid tm=tOrderMidMapper.selectByOrderNo(orderNo);
@@ -1222,6 +1228,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return true;
 	}
 
+
 	@Override
 	public boolean chekeApprovalOrderStatus(String orderNo) {
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);

+ 1 - 1
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -81,7 +81,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (u!=null&&u.getShareType()==2){
 			in.setNewUser(1);
 		}
-		if (u.getAid().equals(TokenManager.getAdminId())){
+		if (u==null||StringUtils.isEmpty(u.getAid())||u.getAid().equals(TokenManager.getAdminId())){
 			in.setMainStatus(1);
 		}
 		AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());

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

@@ -46,7 +46,7 @@ user_remind_days=15
 user_channel_days=90
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.34
+static.host=//static.jishutao.com/1.2.37
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.27
 #static.host=http://172.16.1.187/prod/1.2.25

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

@@ -43,7 +43,7 @@ user_remind_days=15
 #\u63D0\u524D\u63D0\u9192\u5929\u6570
 user_channel_days=90
 
-static.host=//static.jishutao.com/1.2.34
+static.host=//static.jishutao.com/1.2.37
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload