Quellcode durchsuchen

Merge branch 'test' into test009

anderx vor 3 Jahren
Ursprung
Commit
9b850848a7
52 geänderte Dateien mit 2982 neuen und 458 gelöschten Zeilen
  1. 39 0
      src/main/java/com/goafanti/ambSystem/bo/InputAmbPayment.java
  2. 30 0
      src/main/java/com/goafanti/ambSystem/controller/AmbApiController.java
  3. 100 0
      src/main/java/com/goafanti/ambSystem/controller/AmbPaymentApiController.java
  4. 7 0
      src/main/java/com/goafanti/ambSystem/service/AmbPaymentService.java
  5. 23 0
      src/main/java/com/goafanti/ambSystem/service/Impl/AmbPaymentServiceImpl.java
  6. 2 2
      src/main/java/com/goafanti/ambSystem/service/Impl/AmbServiceImpl.java
  7. 2 2
      src/main/java/com/goafanti/common/bo/EmailBo.java
  8. 17 0
      src/main/java/com/goafanti/common/dao/AmbPaymentApplicationMapper.java
  9. 2 0
      src/main/java/com/goafanti/common/dao/TOrderMidMapper.java
  10. 4 0
      src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java
  11. 8 63
      src/main/java/com/goafanti/common/dao/TaskLogMapper.java
  12. 22 0
      src/main/java/com/goafanti/common/dao/TaskStopLogMapper.java
  13. 20 0
      src/main/java/com/goafanti/common/dao/TaskStopMapper.java
  14. 6 0
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  15. 5 1
      src/main/java/com/goafanti/common/enums/NoticeTypes.java
  16. 9 3
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  17. 182 0
      src/main/java/com/goafanti/common/mapper/AmbPaymentApplicationMapper.xml
  18. 59 4
      src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml
  19. 1 1
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  20. 328 5
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  21. 163 4
      src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml
  22. 26 211
      src/main/java/com/goafanti/common/mapper/TaskLogMapper.xml
  23. 106 0
      src/main/java/com/goafanti/common/mapper/TaskStopLogMapper.xml
  24. 129 0
      src/main/java/com/goafanti/common/mapper/TaskStopMapper.xml
  25. 179 0
      src/main/java/com/goafanti/common/model/AmbPaymentApplication.java
  26. 13 11
      src/main/java/com/goafanti/common/model/Notice.java
  27. 13 0
      src/main/java/com/goafanti/common/model/TOrderMid.java
  28. 169 0
      src/main/java/com/goafanti/common/model/TTaskMid.java
  29. 81 119
      src/main/java/com/goafanti/common/model/TaskLog.java
  30. 113 0
      src/main/java/com/goafanti/common/model/TaskStop.java
  31. 87 0
      src/main/java/com/goafanti/common/model/TaskStopLog.java
  32. 105 3
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  33. 0 1
      src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java
  34. 9 0
      src/main/java/com/goafanti/order/bo/InputProjectStatistics.java
  35. 66 0
      src/main/java/com/goafanti/order/bo/InputProjectStop.java
  36. 195 0
      src/main/java/com/goafanti/order/bo/OutselectProjectSotp.java
  37. 198 0
      src/main/java/com/goafanti/order/bo/OutselectProjectSotpBo.java
  38. 7 1
      src/main/java/com/goafanti/order/bo/TOrderNewBo.java
  39. 28 1
      src/main/java/com/goafanti/order/bo/TOrderTaskBo.java
  40. 10 0
      src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java
  41. 12 2
      src/main/java/com/goafanti/order/bo/TaskLogBo.java
  42. 24 0
      src/main/java/com/goafanti/order/bo/TaskStopLogBo.java
  43. 42 0
      src/main/java/com/goafanti/order/controller/InputTaskStopLog.java
  44. 127 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  45. 5 2
      src/main/java/com/goafanti/order/enums/NewProjectStatus.java
  46. 14 1
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  47. 11 3
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  48. 15 7
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  49. 166 9
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  50. 1 0
      src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java
  51. 1 1
      src/main/resources/props/config_local.properties
  52. 1 1
      src/main/resources/props/config_test.properties

+ 39 - 0
src/main/java/com/goafanti/ambSystem/bo/InputAmbPayment.java

@@ -0,0 +1,39 @@
+package com.goafanti.ambSystem.bo;
+
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.model.AmbPaymentApplication;
+import com.goafanti.common.utils.Param;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+public class InputAmbPayment extends AmbPaymentApplication {
+
+    @Param(name="付款类型")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private Integer type;
+
+    @Param(name="付款金额")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private BigDecimal totalAmount;
+
+    @Override
+    public Integer getType() {
+        return type;
+    }
+
+    @Override
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    @Override
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    @Override
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+}

+ 30 - 0
src/main/java/com/goafanti/ambSystem/controller/AmbApiController.java

@@ -20,6 +20,12 @@ public class AmbApiController extends CertifyApiController {
 	@Autowired
 	private AmbService ambService;
 
+	/**
+	 * 新增巴
+	 * @param in
+	 * @param bindingResult
+	 * @return
+	 */
 	@RequestMapping(value="/add",method = RequestMethod.POST)
 	public Result addAmb(@Validated InputAmb in,BindingResult bindingResult){
 		Result res =new Result();
@@ -37,6 +43,11 @@ public class AmbApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 修改巴
+	 * @param in
+	 * @return
+	 */
 	@RequestMapping(value="/update",method = RequestMethod.POST)
 	public Result updateAmb( InputAmb in){
 		Result res =new Result();
@@ -48,6 +59,11 @@ public class AmbApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 删除巴
+	 * @param in
+	 * @return
+	 */
 	@RequestMapping(value="/delete",method = RequestMethod.POST)
 	public Result deleteAmb( InputAmb in){
 		Result res =new Result();
@@ -64,6 +80,11 @@ public class AmbApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 巴详情
+	 * @param in
+	 * @return
+	 */
 	@RequestMapping(value="/details",method = RequestMethod.GET)
 	public Result detailsAmb( InputAmb in){
 		Result res =new Result();
@@ -75,6 +96,11 @@ public class AmbApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 巴列表
+	 * @param in
+	 * @return
+	 */
 	@RequestMapping(value="/select",method = RequestMethod.GET)
 	public Result selectAmb( InputAmb in){
 		Result res =new Result();
@@ -82,6 +108,10 @@ public class AmbApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 下拉把列表
+	 * @return
+	 */
 	@RequestMapping(value="/selectAll",method = RequestMethod.GET)
 	public Result selectAll( ){
 		Result res =new Result();

+ 100 - 0
src/main/java/com/goafanti/ambSystem/controller/AmbPaymentApiController.java

@@ -0,0 +1,100 @@
+package com.goafanti.ambSystem.controller;
+
+import com.goafanti.ambSystem.bo.InputAmb;
+import com.goafanti.ambSystem.bo.InputAmbPayment;
+import com.goafanti.ambSystem.service.AmbPaymentService;
+import com.goafanti.ambSystem.service.AmbService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.utils.ParamUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequestMapping(value = "/api/admin/ambPayment")
+public class AmbPaymentApiController extends CertifyApiController {
+	@Autowired
+	private AmbPaymentService ambPaymentService;
+
+	/**
+	 * 新增巴付款
+	 * @param in
+	 * @param bindingResult
+	 * @return
+	 */
+	@RequestMapping(value="/add",method = RequestMethod.POST)
+	public Result addAmb(@Validated InputAmbPayment in, BindingResult bindingResult){
+		Result res =new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
+			return res;
+		}
+		int i=ambPaymentService.checkAmbPayment(in);
+		if (i==-1){
+			res.getError().add(buildError(String.format("[%s]已存在,请确认后再新增",in.getName())));
+			return res;
+		}
+		res.data(ambService.addAmb(in));
+		return res;
+	}
+
+	@RequestMapping(value="/update",method = RequestMethod.POST)
+	public Result updateAmb( InputAmb in){
+		Result res =new Result();
+		if (in.getId()==null){
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"巴编号"));
+			return res;
+		}
+		res.data(ambService.updateAmb(in));
+		return res;
+	}
+
+	@RequestMapping(value="/delete",method = RequestMethod.POST)
+	public Result deleteAmb( InputAmb in){
+		Result res =new Result();
+		if (in.getId()==null){
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"巴编号"));
+			return res;
+		}
+		int i=ambService.checkAmb(in,2);
+		if (i==-1){
+			res.getError().add(buildError("巴存在子项目,请先删除所有子项"));
+			return res;
+		}
+		res.data(ambService.deleteAmb(in));
+		return res;
+	}
+
+	@RequestMapping(value="/details",method = RequestMethod.GET)
+	public Result detailsAmb( InputAmb in){
+		Result res =new Result();
+		if (in.getId()==null){
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"巴编号"));
+			return res;
+		}
+		res.data(ambService.detailsAmb(in));
+		return res;
+	}
+
+	@RequestMapping(value="/select",method = RequestMethod.GET)
+	public Result selectAmb( InputAmb in){
+		Result res =new Result();
+		res.data(ambService.selectAmb(in));
+		return res;
+	}
+
+	@RequestMapping(value="/selectAll",method = RequestMethod.GET)
+	public Result selectAll( ){
+		Result res =new Result();
+		res.data(ambService.selectAll());
+		return res;
+	}
+
+}

+ 7 - 0
src/main/java/com/goafanti/ambSystem/service/AmbPaymentService.java

@@ -0,0 +1,7 @@
+package com.goafanti.ambSystem.service;
+
+import com.goafanti.ambSystem.bo.InputAmbPayment;
+
+public interface AmbPaymentService {
+    int checkAmbPayment(InputAmbPayment in);
+}

+ 23 - 0
src/main/java/com/goafanti/ambSystem/service/Impl/AmbPaymentServiceImpl.java

@@ -0,0 +1,23 @@
+package com.goafanti.ambSystem.service.Impl;
+
+import com.goafanti.ambSystem.bo.InputAmbPayment;
+import com.goafanti.ambSystem.service.AmbPaymentService;
+import com.goafanti.common.dao.AmbPaymentApplicationMapper;
+import com.goafanti.common.dao.AmbSystemMapper;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AmbPaymentServiceImpl extends BaseMybatisDao<AmbPaymentApplicationMapper> implements AmbPaymentService {
+    @Autowired
+    private AmbPaymentApplicationMapper ambPaymentApplicationMapper;
+    @Autowired
+    private AmbSystemMapper ambSystemMapper;
+
+    @Override
+    public int checkAmbPayment(InputAmbPayment in) {
+
+        return 0;
+    }
+}

+ 2 - 2
src/main/java/com/goafanti/ambSystem/service/Impl/AmbServiceImpl.java

@@ -35,7 +35,7 @@ public class AmbServiceImpl extends BaseMybatisDao<AmbSystemMapper> implements A
         in.setCreateBy(TokenManager.getAdminId());
         in.setCreateTime(new Date());
         ambSystemMapper.insertSelective(in);
-        pushAdminAmbRole(in,null);
+        updateAmbRole(in.getLeader());
         return  1;
     }
 
@@ -73,7 +73,7 @@ public class AmbServiceImpl extends BaseMybatisDao<AmbSystemMapper> implements A
     private void pushAdminAmbRole(InputAmb in,AmbSystem use) {
         //如果是修改,处理原负责人
         if (in.getId()!=null){
-            if (in.getLeader()!=null){
+            if (use !=null &&use.getLeader()!=null){
                 updateAmbRole(use.getLeader());
             }
         }

+ 2 - 2
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -104,7 +104,7 @@ public class EmailBo {
 	}
 
 	/**
-	 * 通用模版
+	 * 通用模版
 	 * @param subject
 	 * @param address
 	 * @param deptname
@@ -133,7 +133,7 @@ public class EmailBo {
 	}
 
 	/**
-	 *
+	 * 最新通用模版
 	 * @param subject 标题
 	 * @param address 邮件地址
 	 * @param content 内容

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

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

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderMidMapper.java

@@ -51,4 +51,6 @@ public interface TOrderMidMapper {
 
 
     List<TOrderMid> selectAll();
+
+    void updateStopProjectByOrderNo(String orderNo);
 }

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

@@ -81,4 +81,8 @@ public interface TOrderTaskMapper {
 
     Integer getSplitCount(Integer tid);
 
+
+    void updateBySuperId(TOrderTask t);
+
+    void deleteBySplitId(Integer id);
 }

+ 8 - 63
src/main/java/com/goafanti/common/dao/TaskLogMapper.java

@@ -8,72 +8,17 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface TaskLogMapper {
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	long countByExample(TaskLogExample example);
+    int insert(TaskLog record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int deleteByExample(TaskLogExample example);
+    int insertSelective(TaskLog record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int deleteByPrimaryKey(Integer id);
+    TaskLog selectByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int insert(TaskLog record);
+    int updateByPrimaryKeySelective(TaskLog record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int insertSelective(TaskLog record);
+    int updateByPrimaryKey(TaskLog record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	List<TaskLog> selectByExample(TaskLogExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	TaskLog selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") TaskLog record, @Param("example") TaskLogExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int updateByExample(@Param("record") TaskLog record, @Param("example") TaskLogExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int updateByPrimaryKeySelective(TaskLog record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_log
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	int updateByPrimaryKey(TaskLog record);
-
-	List<TaskLogBo> selectTaskLogList(Integer id);
-}
+    List<TaskLogBo> selectTaskLogList(Integer id);
+}

+ 22 - 0
src/main/java/com/goafanti/common/dao/TaskStopLogMapper.java

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TaskStopLog;
+import com.goafanti.order.bo.TaskStopLogBo;
+
+import java.util.List;
+
+public interface TaskStopLogMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(TaskStopLog record);
+
+    int insertSelective(TaskStopLog record);
+
+    TaskStopLog selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(TaskStopLog record);
+
+    int updateByPrimaryKey(TaskStopLog record);
+
+    List<TaskStopLogBo> selectListBySoptId(Integer taskStopId);
+}

+ 20 - 0
src/main/java/com/goafanti/common/dao/TaskStopMapper.java

@@ -0,0 +1,20 @@
+package com.goafanti.common.dao;
+
+
+import com.goafanti.common.model.TaskStop;
+
+public interface TaskStopMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(TaskStop record);
+
+    int insertSelective(TaskStop record);
+
+    TaskStop selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(TaskStop record);
+
+    int updateByPrimaryKey(TaskStop record);
+
+    TaskStop selectByTid(Integer id);
+}

+ 6 - 0
src/main/java/com/goafanti/common/enums/NoticeStatus.java

@@ -69,6 +69,12 @@ public enum NoticeStatus {
 	MENBER_START(60,"会员项目发起"),
 	MENBER_YES(61,"会员项目通过"),
 	MENBER_NO(62,"会员项目拒绝"),
+	PROJECT_SOPT_START(63,"项目暂停流程发起"),
+	PROJECT_SOPT_YES(64,"项目暂停流程通过"),
+	PROJECT_SOPT_NO(65,"项目暂停流程拒绝"),
+	PROJECT_RENEW_START(66,"项目重启流程发起"),
+	PROJECT_RENEW_YES(67,"项目重启流程通过"),
+	PROJECT_RENEW_NO(68,"项目重启流程拒绝"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

+ 5 - 1
src/main/java/com/goafanti/common/enums/NoticeTypes.java

@@ -42,7 +42,11 @@ public enum NoticeTypes {
 				|| i == NoticeStatus.PROJECT_OUTSOURCE_YES.getCode() || i == NoticeStatus.PROJECT_OUTSOURCE_NO.getCode()
 				|| i == NoticeStatus.ITEM_CHECK_START.getCode() || i == NoticeStatus.ITEM_CHECK_END.getCode()
 				|| i == NoticeStatus.MENBER_START.getCode() || i == NoticeStatus.MENBER_YES.getCode()
-				|| i == NoticeStatus.MENBER_NO.getCode() ) {
+				|| i == NoticeStatus.MENBER_NO.getCode() ||
+				i == NoticeStatus.PROJECT_SOPT_START.getCode() || i == NoticeStatus.PROJECT_SOPT_YES.getCode()
+				|| i == NoticeStatus.PROJECT_SOPT_NO.getCode()
+				|| i == NoticeStatus.PROJECT_RENEW_START.getCode() || i == NoticeStatus.PROJECT_RENEW_YES.getCode()
+				|| i == NoticeStatus.PROJECT_RENEW_NO.getCode() ) {
 			return 2;
 		} else if (i == NoticeStatus.CUSTOMER_LOSE30.getCode() || i == NoticeStatus.CUSTOMER_LOSE270.getCode()
 				|| i == NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode()

+ 9 - 3
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -44,7 +44,7 @@
     where id = #{id,jdbcType=VARCHAR}
   </delete>
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
-    insert into admin (mobile, `name`, `password`,
+    insert into admin (id,mobile, `name`, `password`,
       email, create_time, `number`,
       province, `position`, superior_id,
       city, department_id, `status`,
@@ -53,7 +53,7 @@
       open_id, `type`, reviewer,
       amb_id, amb_role, amb_manage
       )
-    values (#{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
+    values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
       #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{number,jdbcType=INTEGER},
       #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{superiorId,jdbcType=VARCHAR},
       #{city,jdbcType=VARCHAR}, #{departmentId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
@@ -66,6 +66,9 @@
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
     insert into admin
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="mobile != null">
         mobile,
       </if>
@@ -140,6 +143,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
       <if test="mobile != null">
         #{mobile,jdbcType=VARCHAR},
       </if>
@@ -1065,7 +1071,7 @@
 
 
   <select id="listAdminBydepIdAndRoleType" resultType="com.goafanti.common.model.Admin">
-    select a.id,a.name  from admin a left join user_role b on a.id =b.uid
+    select a.id,a.name,a.email  from admin a left join user_role b on a.id =b.uid
                                      left join `role` c on b.rid=c.id
     where department_id= #{depId}
       and c.role_type= #{roleType}

+ 182 - 0
src/main/java/com/goafanti/common/mapper/AmbPaymentApplicationMapper.xml

@@ -0,0 +1,182 @@
+<?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.AmbPaymentApplicationMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AmbPaymentApplication">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
+    <result column="process_status" jdbcType="INTEGER" property="processStatus" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="payment_amb_id" jdbcType="VARCHAR" property="paymentAmbId" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, `type`, total_amount, content, remarks, annex_url, process_status, `status`, 
+    create_by, create_time, update_by, update_time, payment_amb_id
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from amb_payment_application
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from amb_payment_application
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbPaymentApplication" useGeneratedKeys="true">
+    insert into amb_payment_application (`type`, total_amount, content, 
+      remarks, annex_url, process_status, 
+      `status`, create_by, create_time, 
+      update_by, update_time, payment_amb_id
+      )
+    values (#{type,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, #{content,jdbcType=VARCHAR}, 
+      #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR}, #{processStatus,jdbcType=INTEGER}, 
+      #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{paymentAmbId,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbPaymentApplication" useGeneratedKeys="true">
+    insert into amb_payment_application
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="totalAmount != null">
+        total_amount,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="processStatus != null">
+        process_status,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createBy != null">
+        create_by,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateBy != null">
+        update_by,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="paymentAmbId != null">
+        payment_amb_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="totalAmount != null">
+        #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="processStatus != null">
+        #{processStatus,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createBy != null">
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null">
+        #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="paymentAmbId != null">
+        #{paymentAmbId,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbPaymentApplication">
+    update amb_payment_application
+    <set>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="totalAmount != null">
+        total_amount = #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        annex_url = #{annexUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="processStatus != null">
+        process_status = #{processStatus,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createBy != null">
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null">
+        update_by = #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="paymentAmbId != null">
+        payment_amb_id = #{paymentAmbId,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AmbPaymentApplication">
+    update amb_payment_application
+    set `type` = #{type,jdbcType=INTEGER},
+      total_amount = #{totalAmount,jdbcType=DECIMAL},
+      content = #{content,jdbcType=VARCHAR},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      annex_url = #{annexUrl,jdbcType=VARCHAR},
+      process_status = #{processStatus,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_by = #{updateBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      payment_amb_id = #{paymentAmbId,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 59 - 4
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -37,6 +37,7 @@
     <result column="other_cost_actual" jdbcType="DECIMAL" property="otherCostActual" />
     <result column="expect_profit" jdbcType="DECIMAL" property="expectProfit" />
     <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
+    <result column="stop_project" jdbcType="INTEGER" property="stopProject" />
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, salesman_id, finance_id, salesman_name, finance_name, final_receivables,
@@ -44,7 +45,8 @@
     order_arrears, payment_amount, cost_amount, dep_name, province_name, legal_affairs,
     dun_start_time, legal_affairs_type, operation_time, legal_affairs_status, project_type,
     service_type, service_project, patent_cost, patent_cost_actual, soft_cost, soft_cost_actual,
-    audit_cost, audit_cost_actual, other_cost, other_cost_actual, expect_profit, actual_profit
+    audit_cost, audit_cost_actual, other_cost, other_cost_actual, expect_profit, actual_profit,
+    stop_project
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -68,7 +70,8 @@
       service_project, patent_cost, patent_cost_actual,
       soft_cost, soft_cost_actual, audit_cost,
       audit_cost_actual, other_cost, other_cost_actual,
-      expect_profit, actual_profit)
+      expect_profit, actual_profit, stop_project
+      )
     values (#{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR},
       #{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR}, #{finalReceivables,jdbcType=DECIMAL},
       #{finalReceivablesTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL},
@@ -80,7 +83,8 @@
       #{serviceProject,jdbcType=VARCHAR}, #{patentCost,jdbcType=DECIMAL}, #{patentCostActual,jdbcType=DECIMAL},
       #{softCost,jdbcType=DECIMAL}, #{softCostActual,jdbcType=DECIMAL}, #{auditCost,jdbcType=DECIMAL},
       #{auditCostActual,jdbcType=DECIMAL}, #{otherCost,jdbcType=DECIMAL}, #{otherCostActual,jdbcType=DECIMAL},
-      #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL})
+      #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL}, #{stopProject,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
     insert into t_order_mid
@@ -187,6 +191,9 @@
       <if test="actualProfit != null">
         actual_profit,
       </if>
+      <if test="stopProject != null">
+        stop_project,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -291,6 +298,9 @@
       <if test="actualProfit != null">
         #{actualProfit,jdbcType=DECIMAL},
       </if>
+      <if test="stopProject != null">
+        #{stopProject,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderMid">
@@ -398,6 +408,9 @@
       <if test="actualProfit != null">
         actual_profit = #{actualProfit,jdbcType=DECIMAL},
       </if>
+      <if test="stopProject != null">
+        stop_project = #{stopProject,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -436,7 +449,8 @@
       other_cost = #{otherCost,jdbcType=DECIMAL},
       other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
       expect_profit = #{expectProfit,jdbcType=DECIMAL},
-      actual_profit = #{actualProfit,jdbcType=DECIMAL}
+      actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      stop_project = #{stopProject,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -558,6 +572,39 @@
       <if test="serviceProject != null">
         service_project = #{serviceProject,jdbcType=VARCHAR},
       </if>
+      <if test="patentCost != null">
+        patent_cost = #{patentCost,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCostActual != null">
+        patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="softCost != null">
+        soft_cost = #{softCost,jdbcType=DECIMAL},
+      </if>
+      <if test="softCostActual != null">
+        soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCost != null">
+        audit_cost = #{auditCost,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCostActual != null">
+        audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCost != null">
+        other_cost = #{otherCost,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCostActual != null">
+        other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="expectProfit != null">
+        expect_profit = #{expectProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="actualProfit != null">
+        actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="stopProject != null">
+        stop_project = #{stopProject,jdbcType=INTEGER},
+      </if>
     </set>
     where order_no = #{orderNo,jdbcType=VARCHAR}
   </update>
@@ -695,6 +742,7 @@
     where a.order_no =b.order_no and a.order_no =c.order_no and a.order_receivables !=b.money;
   </update>
 
+
   <select id="judgeProjectType" resultType="java.lang.Integer">
     select count(*) from t_order_new a left join t_order_task b on a.order_no =b.order_no
                                        left join business_project c on b.commodity_id =c.id left join business_category d on c.cid =d.id
@@ -706,4 +754,11 @@
     from t_order_mid
   </select>
 
+  <update id="updateStopProjectByOrderNo">
+    update t_order_mid a,(select x.order_no,max(ps)ps from (select a.order_no ,if(a.project_status=29,1,0)ps
+        from t_order_task  a where a.order_no = #{orderNo} )x group by order_no) b
+    set a.stop_project =b.ps
+    where a.order_no =b.order_no
+    </update>
+
 </mapper>

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

@@ -935,7 +935,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,
   	a.order_status as orderStatus, a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,c.project_type projectType,
   	dep.name as depName,c.finance_name as financeName,c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount,
-    a.sales_type salesType, a.channel_id channelId ,a.other,a.examine_name examineName
+    a.sales_type salesType, a.channel_id channelId ,a.other,a.examine_name examineName,c.stop_project stopProject
     <if test="specially == 2">
   	,f.name as initiateName ,e.reason ,date_format(e.create_time,'%Y-%m-%d' ) as backDate,e.id as backId
   	</if>

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

@@ -90,7 +90,7 @@
     where id = #{id,jdbcType=INTEGER}
   </delete>
 
-  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
     insert into t_order_task (id, order_no, main,
       super_id, commodity_id, commodity_name,
       commodity_quantity, commodity_mode, commodity_price,
@@ -789,11 +789,11 @@
     c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,b.patent_transfer patentTransfer ,
     i.price,a.certificate_number as certificateNumber, a.commodity_id as commodityId,a.manager_id managerId,
     a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,j.contract_term contractTerm,
-    a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,
+    a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,ttm.stop_type stopType,ttm.stop_status stopStatus,
     a.task_receiver as taskReceiver ,a.if_certification_fee ifCertificationFee , a.split_status splitStatus,
     a.cost_reduction costReduction,a.official_cost officialCost,i.`type` ,d.name ,a.declaration_batch declarationBatch,
     a.patent_type patentType,a.picture_url pictureUrl,j.service_life serviceLife ,j.service_year serviceYear,j.year_sum yearSum,
-    ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome
+    ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,ttm.stop_status projectStopStatus
     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
@@ -994,7 +994,7 @@
       a.certificate_number as certificateNumber, a.status,a.form_retrieve as formRetrieve, a.task_refund as taskRefund,a.task_receiver taskReceiver,b.patent_transfer patentTransfer,
       a.refund_content as refundContent, a.declare_user as  declareUser, a.declare_pwd as declarePwd,e.contract_no as contractNo,e.contacts ,b.`type` bpType,
       date_format(a.task_end_time,'%Y-%m-%d') as endDate,date_format(a.accept_time,'%Y-%m-%d') as acceptDate,h.name as depName,e.contact_mobile as contactMobile ,
-      date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,a.outsource_price outsourcePrice,
+      date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,a.outsource_price outsourcePrice,e.delete_sign deleteSign,
       date_format(a.licence_time,'%Y-%m-%d') as licenceDate,date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDate,e.legal_person as legalPerson,
       e.legal_person_tel as legalPersonTel, a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,a.declaration_batch declarationBatch,a.patent_type patentType,
       a.if_certification_fee ifCertificationFee , a.certification_corporate certificationCorporate ,a.certification_fee certificationFee ,a.time_record timeRecord,
@@ -1342,6 +1342,9 @@
     <if test="projectStatus !=null">
       and bp.cid= #{projectStatus}
     </if>
+    <if test="taskProjectStatus !=null">
+      and a.project_status= #{taskProjectStatus}
+    </if>
     <if test="projectType !=null">
       and bp.type= #{projectType}
     </if>
@@ -1456,6 +1459,9 @@
     <if test="projectStatus !=null">
       and bp.cid= #{projectStatus}
     </if>
+    <if test="taskProjectStatus !=null">
+      and a.project_status= #{taskProjectStatus}
+    </if>
     <if test="projectType !=null">
       and bp.type= #{projectType}
     </if>
@@ -1753,11 +1759,12 @@
     set cost_amount =cost_amount + #{cost}
     where tid= #{tid}
   </update>
+
   <select id="selectAidByParam" resultType="com.goafanti.common.bo.OrderOperator">
     select a.id tid,b.order_no orderNo ,b.salesman_id salesmanId,b.finance_id financeId ,a.task_receiver techId,
     b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName
     from t_order_task a left join t_order_mid b on a.order_no=b.order_no
-    left join t_task_mid c on a.id =c.tid left join admin d on a.task_receiver=d.id
+    left join admin d on a.task_receiver=d.id
     where 1=1
     <if test="tid !=null">
       and a.id= #{tid}
@@ -1968,6 +1975,322 @@
     where split_super = #{tid}
   </select>
 
+  <select id="selectProjectSotpList" resultType="com.goafanti.order.bo.OutselectProjectSotp">
+    select DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') createTimes,dg.name province,c.contract_no contractNo, a.type stopType,a.status stopStatus,
+    c.order_no orderNo ,tom.buyer_name userName,b.cname ,b.commodity_name projectName,b.commodity_quantity commodityQuantity ,a.annex_url annexUrl,
+    tom.service_type serviceType , b.receiver_name receiverName ,b.status ,b.commodity_price commodityPrice ,a.reason,a.id,b.id tid,
+    ttm.stop_status projectStopStatus, ttm.stop_type projectStopType
+    from task_stop a left join t_order_task b on a.tid=b.id
+    left join t_order_new  c on b.order_no =c.order_no
+    left join t_task_mid ttm on b.id=ttm.tid
+    left join t_order_mid tom on c.order_no =tom.order_no
+    left join department d  on c.order_dep =d.id
+    left join district_glossory dg on d.province =dg.id
+    where 1=1
+    <if test="shiro ==1">
+      and c.salesman_id =#{aid}
+    </if>
+    <if test="shiro ==2">
+    and c.order_dep  in
+      <foreach close=")" collection="deps" item="dep" open="(" separator=",">
+        #{dep}
+      </foreach>
+    </if>
+    <if test="orderNo !=null">
+      and b.order_no = #{orderNo}
+    </if>
+    <if test="userName !=null">
+      and tom.buyer_name like CONCAT('%',#{userName},'%')
+    </if>
+    <if test="depId !=null">
+      and c.order_dep = #{depId}
+    </if>
+    <if test="contractNo !=null">
+      and c.contract_no like CONCAT('%',#{contractNo},'%')
+    </if>
+    <if test="projectName !=null">
+      and b.commodity_name like CONCAT('%',#{projectName},'%')
+    </if>
+    <if test="status !=null">
+      <if test="status==0">
+        and a.`type` =0 and a.status =0
+      </if>
+      <if test="status==1">
+        and a.`type` =1 and a.status =0
+      </if>
+      <if test="status==2">
+        and a.`type` =0 and a.status =1
+      </if>
+      <if test="status==3">
+        and a.`type` =1 and a.status =1
+      </if>
+      <if test="status==4">
+        and a.`type` =0 and a.status =2
+      </if>
+      <if test="status==5">
+        and a.`type` =1 and a.status =2
+      </if>
+    </if>
+    <if test="receiverId !=null">
+      and b.task_receiver  = #{receiverId}
+    </if>
+    <if test="startTime !=null and endTime !=null">
+      and a.create_time BETWEEN #{startTime} and #{endTime}
+    </if>
+    order by a.create_time desc
+    <if test="page_sql!=null">
+      ${page_sql}
+    </if>
+  </select>
+
+  <select id="selectProjectSotpCount" resultType="java.lang.Integer">
+    select count(*)
+    from task_stop a left join t_order_task b on a.tid=b.id
+    left join t_order_new  c on b.order_no =c.order_no
+    left join t_order_mid tom on c.order_no =tom.order_no
+    where 1=1
+    <if test="shiro ==1">
+      and c.salesman_id =#{aid}
+    </if>
+    <if test="shiro ==2">
+        and c.order_dep  in
+      <foreach close=")" collection="deps" item="dep" open="(" separator=",">
+        #{dep}
+      </foreach>
+    </if>
+    <if test="orderNo !=null">
+      and b.order_no = #{orderNo}
+    </if>
+    <if test="userName !=null">
+      and tom.buyer_name like CONCAT('%',#{userName},'%')
+    </if>
+    <if test="depId !=null">
+      and c.order_dep = #{depId}
+    </if>
+    <if test="contractNo !=null">
+      and c.contract_no like CONCAT('%',#{contractNo},'%')
+    </if>
+    <if test="projectName !=null">
+      and b.commodity_name like CONCAT('%',#{projectName},'%')
+    </if>
+    <if test="status !=null">
+      <if test="status==0">
+        and a.`type` =0 and a.status =0
+      </if>
+      <if test="status==1">
+        and a.`type` =1 and a.status =0
+      </if>
+      <if test="status==2">
+        and a.`type` =0 and a.status =1
+      </if>
+      <if test="status==3">
+        and a.`type` =1 and a.status =1
+      </if>
+      <if test="status==4">
+        and a.status=2
+      </if>
+    </if>
+    <if test="receiverId !=null">
+      and b.task_receiver  = #{receiverId}
+    </if>
+    <if test="startTime !=null and endTime !=null">
+      and a.create_time BETWEEN #{startTime} and #{endTime}
+    </if>
+  </select>
+
+  <update id="updateBySuperId">
+    update t_order_task
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="main != null">
+        main = #{main,jdbcType=INTEGER},
+      </if>
+      <if test="superId != null">
+        super_id = #{superId,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityId != null">
+        commodity_id = #{commodityId,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityName != null">
+        commodity_name = #{commodityName,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityQuantity != null">
+        commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
+      </if>
+      <if test="commodityMode != null">
+        commodity_mode = #{commodityMode,jdbcType=VARCHAR},
+      </if>
+      <if test="commodityPrice != null">
+        commodity_price = #{commodityPrice,jdbcType=DECIMAL},
+      </if>
+      <if test="taskStatus != null">
+        task_status = #{taskStatus,jdbcType=INTEGER},
+      </if>
+      <if test="taskDistributionTime != null">
+        task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskAllocator != null">
+        task_allocator = #{taskAllocator,jdbcType=VARCHAR},
+      </if>
+      <if test="taskReceiver != null">
+        task_receiver = #{taskReceiver,jdbcType=VARCHAR},
+      </if>
+      <if test="taskComment != null">
+        task_comment = #{taskComment,jdbcType=VARCHAR},
+      </if>
+      <if test="taskStartTime != null">
+        task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskEndTime != null">
+        task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="attachmentUrl != null">
+        attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="projectStatus != null">
+        project_status = #{projectStatus,jdbcType=INTEGER},
+      </if>
+      <if test="acceptTime != null">
+        accept_time = #{acceptTime,jdbcType=DATE},
+      </if>
+      <if test="reviewTime != null">
+        review_time = #{reviewTime,jdbcType=DATE},
+      </if>
+      <if test="publicityTime != null">
+        publicity_time = #{publicityTime,jdbcType=DATE},
+      </if>
+      <if test="licenceTime != null">
+        licence_time = #{licenceTime,jdbcType=DATE},
+      </if>
+      <if test="certificateNumber != null">
+        certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="formRetrieve != null">
+        form_retrieve = #{formRetrieve,jdbcType=INTEGER},
+      </if>
+      <if test="taskRefund != null">
+        task_refund = #{taskRefund,jdbcType=INTEGER},
+      </if>
+      <if test="refundContent != null">
+        refund_content = #{refundContent,jdbcType=VARCHAR},
+      </if>
+      <if test="retrieveContent != null">
+        retrieve_content = #{retrieveContent,jdbcType=VARCHAR},
+      </if>
+      <if test="declareUser != null">
+        declare_user = #{declareUser,jdbcType=VARCHAR},
+      </if>
+      <if test="declarePwd != null">
+        declare_pwd = #{declarePwd,jdbcType=VARCHAR},
+      </if>
+      <if test="setUpAmount != null">
+        set_up_amount = #{setUpAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="arrivalMoney != null">
+        arrival_money = #{arrivalMoney,jdbcType=INTEGER},
+      </if>
+      <if test="outsourceName != null">
+        outsource_name = #{outsourceName,jdbcType=VARCHAR},
+      </if>
+      <if test="outsourcePrice != null">
+        outsource_price = #{outsourcePrice,jdbcType=DECIMAL},
+      </if>
+      <if test="consultantId != null">
+        consultant_id = #{consultantId,jdbcType=VARCHAR},
+      </if>
+      <if test="managerId != null">
+        manager_id = #{managerId,jdbcType=VARCHAR},
+      </if>
+      <if test="outsource != null">
+        outsource = #{outsource,jdbcType=INTEGER},
+      </if>
+      <if test="splitStatus != null">
+        split_status = #{splitStatus,jdbcType=INTEGER},
+      </if>
+      <if test="splitId != null">
+        split_id = #{splitId,jdbcType=INTEGER},
+      </if>
+      <if test="splitAid != null">
+        split_aid = #{splitAid,jdbcType=VARCHAR},
+      </if>
+      <if test="splitTime != null">
+        split_time = #{splitTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cname != null">
+        cname = #{cname,jdbcType=VARCHAR},
+      </if>
+      <if test="receiverName != null">
+        receiver_name = #{receiverName,jdbcType=VARCHAR},
+      </if>
+      <if test="declarationBatch != null">
+        declaration_batch = #{declarationBatch,jdbcType=INTEGER},
+      </if>
+      <if test="costReduction != null">
+        cost_reduction = #{costReduction,jdbcType=INTEGER},
+      </if>
+      <if test="officialCost != null">
+        official_cost = #{officialCost,jdbcType=INTEGER},
+      </if>
+      <if test="setUpStatus != null">
+        set_up_status = #{setUpStatus,jdbcType=INTEGER},
+      </if>
+      <if test="setUpTime != null">
+        set_up_time = #{setUpTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="spotCheckStatus != null">
+        spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
+      </if>
+      <if test="highTechStatus != null">
+        high_tech_status = #{highTechStatus,jdbcType=INTEGER},
+      </if>
+      <if test="specialComment != null">
+        special_comment = #{specialComment,jdbcType=VARCHAR},
+      </if>
+      <if test="ifCertificationFee != null">
+        if_certification_fee = #{ifCertificationFee,jdbcType=INTEGER},
+      </if>
+      <if test="certificationFee != null">
+        certification_fee = #{certificationFee,jdbcType=DECIMAL},
+      </if>
+      <if test="certificationCorporate != null">
+        certification_corporate = #{certificationCorporate,jdbcType=VARCHAR},
+      </if>
+      <if test="timeRecord != null">
+        time_record = #{timeRecord,jdbcType=VARCHAR},
+      </if>
+      <if test="ifPublicity != null">
+        if_publicity = #{ifPublicity,jdbcType=INTEGER},
+      </if>
+      <if test="checkStatus != null">
+        check_status = #{checkStatus,jdbcType=INTEGER},
+      </if>
+      <if test="patentType != null">
+        patent_type = #{patentType,jdbcType=INTEGER},
+      </if>
+      <if test="pubicityUrl != null">
+        pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="processStatus != null">
+        process_status = #{processStatus,jdbcType=INTEGER},
+      </if>
+      <if test="memberType != null">
+        member_type = #{memberType,jdbcType=INTEGER},
+      </if>
+      <if test="pictureUrl != null">
+        picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where split_super = #{splitSuper,jdbcType=INTEGER}
+  </update>
 
+  <delete id="deleteBySplitId" parameterType="java.lang.Integer">
+    delete from t_order_task
+    where split_super = #{id,jdbcType=INTEGER}
+  </delete>
 
 </mapper>

+ 163 - 4
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -28,13 +28,28 @@
     <result column="last_year" jdbcType="VARCHAR" property="lastYear" />
     <result column="last_year_capital" jdbcType="DECIMAL" property="lastYearCapital" />
     <result column="last_year_income" jdbcType="DECIMAL" property="lastYearIncome" />
+    <result column="cost_actual" jdbcType="DECIMAL" property="costActual" />
+    <result column="patent_cost" jdbcType="DECIMAL" property="patentCost" />
+    <result column="patent_cost_actual" jdbcType="DECIMAL" property="patentCostActual" />
+    <result column="soft_cost" jdbcType="DECIMAL" property="softCost" />
+    <result column="soft_cost_actual" jdbcType="DECIMAL" property="softCostActual" />
+    <result column="audit_cost" jdbcType="DECIMAL" property="auditCost" />
+    <result column="audit_cost_actual" jdbcType="DECIMAL" property="auditCostActual" />
+    <result column="other_cost" jdbcType="DECIMAL" property="otherCost" />
+    <result column="other_cost_actual" jdbcType="DECIMAL" property="otherCostActual" />
+    <result column="expect_profit" jdbcType="DECIMAL" property="expectProfit" />
+    <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
+    <result column="stop_type" jdbcType="INTEGER" property="stopType" />
+    <result column="stop_status" jdbcType="INTEGER" property="stopStatus" />
   </resultMap>
   <sql id="Base_Column_List">
     id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day,
     if_material, reject_count, accept_count, end_count, authorize_count, apply_count,
     high_new_retrial, dispatch_count, stock_count, complete_count, promulgate_count,
     dispatch_province, duty_dep, set_up_count, spot_check_count, fail_count, last_year,
-    last_year_capital, last_year_income
+    last_year_capital, last_year_income, cost_actual, patent_cost, patent_cost_actual,
+    soft_cost, soft_cost_actual, audit_cost, audit_cost_actual, other_cost, other_cost_actual,
+    expect_profit, actual_profit, stop_type, stop_status
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -55,7 +70,11 @@
       complete_count, promulgate_count, dispatch_province,
       duty_dep, set_up_count, spot_check_count,
       fail_count, last_year, last_year_capital,
-      last_year_income)
+      last_year_income, cost_actual, patent_cost,
+      patent_cost_actual, soft_cost, soft_cost_actual,
+      audit_cost, audit_cost_actual, other_cost,
+      other_cost_actual, expect_profit, actual_profit,
+      stop_type, stop_status)
     values (#{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, #{partyAmount,jdbcType=DECIMAL},
       #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, #{urgentDay,jdbcType=INTEGER},
       #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, #{acceptCount,jdbcType=INTEGER},
@@ -64,7 +83,11 @@
       #{completeCount,jdbcType=INTEGER}, #{promulgateCount,jdbcType=INTEGER}, #{dispatchProvince,jdbcType=INTEGER},
       #{dutyDep,jdbcType=VARCHAR}, #{setUpCount,jdbcType=INTEGER}, #{spotCheckCount,jdbcType=INTEGER},
       #{failCount,jdbcType=INTEGER}, #{lastYear,jdbcType=VARCHAR}, #{lastYearCapital,jdbcType=DECIMAL},
-      #{lastYearIncome,jdbcType=DECIMAL})
+      #{lastYearIncome,jdbcType=DECIMAL}, #{costActual,jdbcType=DECIMAL}, #{patentCost,jdbcType=DECIMAL},
+      #{patentCostActual,jdbcType=DECIMAL}, #{softCost,jdbcType=DECIMAL}, #{softCostActual,jdbcType=DECIMAL},
+      #{auditCost,jdbcType=DECIMAL}, #{auditCostActual,jdbcType=DECIMAL}, #{otherCost,jdbcType=DECIMAL},
+      #{otherCostActual,jdbcType=DECIMAL}, #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL},
+      #{stopType,jdbcType=INTEGER}, #{stopStatus,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
     insert into t_task_mid
@@ -144,6 +167,45 @@
       <if test="lastYearIncome != null">
         last_year_income,
       </if>
+      <if test="costActual != null">
+        cost_actual,
+      </if>
+      <if test="patentCost != null">
+        patent_cost,
+      </if>
+      <if test="patentCostActual != null">
+        patent_cost_actual,
+      </if>
+      <if test="softCost != null">
+        soft_cost,
+      </if>
+      <if test="softCostActual != null">
+        soft_cost_actual,
+      </if>
+      <if test="auditCost != null">
+        audit_cost,
+      </if>
+      <if test="auditCostActual != null">
+        audit_cost_actual,
+      </if>
+      <if test="otherCost != null">
+        other_cost,
+      </if>
+      <if test="otherCostActual != null">
+        other_cost_actual,
+      </if>
+      <if test="expectProfit != null">
+        expect_profit,
+      </if>
+      <if test="actualProfit != null">
+        actual_profit,
+      </if>
+      <if test="stopType != null">
+        stop_type,
+      </if>
+      <if test="stopStatus != null">
+        stop_status,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="tid != null">
@@ -221,6 +283,45 @@
       <if test="lastYearIncome != null">
         #{lastYearIncome,jdbcType=DECIMAL},
       </if>
+      <if test="costActual != null">
+        #{costActual,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCost != null">
+        #{patentCost,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCostActual != null">
+        #{patentCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="softCost != null">
+        #{softCost,jdbcType=DECIMAL},
+      </if>
+      <if test="softCostActual != null">
+        #{softCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCost != null">
+        #{auditCost,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCostActual != null">
+        #{auditCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCost != null">
+        #{otherCost,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCostActual != null">
+        #{otherCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="expectProfit != null">
+        #{expectProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="actualProfit != null">
+        #{actualProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="stopType != null">
+        #{stopType,jdbcType=INTEGER},
+      </if>
+      <if test="stopStatus != null">
+        #{stopStatus,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
@@ -301,6 +402,45 @@
       <if test="lastYearIncome != null">
         last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
       </if>
+      <if test="costActual != null">
+        cost_actual = #{costActual,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCost != null">
+        patent_cost = #{patentCost,jdbcType=DECIMAL},
+      </if>
+      <if test="patentCostActual != null">
+        patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="softCost != null">
+        soft_cost = #{softCost,jdbcType=DECIMAL},
+      </if>
+      <if test="softCostActual != null">
+        soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCost != null">
+        audit_cost = #{auditCost,jdbcType=DECIMAL},
+      </if>
+      <if test="auditCostActual != null">
+        audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCost != null">
+        other_cost = #{otherCost,jdbcType=DECIMAL},
+      </if>
+      <if test="otherCostActual != null">
+        other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
+      </if>
+      <if test="expectProfit != null">
+        expect_profit = #{expectProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="actualProfit != null">
+        actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      </if>
+      <if test="stopType != null">
+        stop_type = #{stopType,jdbcType=INTEGER},
+      </if>
+      <if test="stopStatus != null">
+        stop_status = #{stopStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -330,7 +470,20 @@
       fail_count = #{failCount,jdbcType=INTEGER},
       last_year = #{lastYear,jdbcType=VARCHAR},
       last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
-      last_year_income = #{lastYearIncome,jdbcType=DECIMAL}
+      last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
+      cost_actual = #{costActual,jdbcType=DECIMAL},
+      patent_cost = #{patentCost,jdbcType=DECIMAL},
+      patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
+      soft_cost = #{softCost,jdbcType=DECIMAL},
+      soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
+      audit_cost = #{auditCost,jdbcType=DECIMAL},
+      audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
+      other_cost = #{otherCost,jdbcType=DECIMAL},
+      other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
+      expect_profit = #{expectProfit,jdbcType=DECIMAL},
+      actual_profit = #{actualProfit,jdbcType=DECIMAL},
+      stop_type = #{stopType,jdbcType=INTEGER},
+      stop_status = #{stopStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -436,6 +589,12 @@
       <if test="lastYearIncome != null">
         last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
       </if>
+      <if test="stopType != null">
+        stop_type = #{stopType,jdbcType=INTEGER},
+      </if>
+      <if test="stopStatus != null">
+        stop_status = #{stopStatus,jdbcType=INTEGER},
+      </if>
     </set>
     where tid = #{tid,jdbcType=INTEGER}
   </update>

+ 26 - 211
src/main/java/com/goafanti/common/mapper/TaskLogMapper.xml

@@ -2,165 +2,35 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TaskLogMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="content" jdbcType="VARCHAR" property="content" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="task_id" jdbcType="INTEGER" property="taskId" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="stop_id" jdbcType="INTEGER" property="stopId" />
   </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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    <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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    <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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    id, content, create_time, task_id, aid
+    id, content, create_time, task_id, aid, stop_id
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TaskLogExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from task_log
-    <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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    select 
+    select
     <include refid="Base_Column_List" />
     from task_log
     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 Tue Jun 04 10:17:22 CST 2019.
-    -->
     delete from task_log
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TaskLogExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
-    delete from task_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.TaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
-    insert into task_log (id, content, create_time, 
-      task_id, aid)
-    values (#{id,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{taskId,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskLog" useGeneratedKeys="true">
+    insert into task_log (content, create_time, task_id,
+      aid, stop_id)
+    values (#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{taskId,jdbcType=INTEGER},
+      #{aid,jdbcType=VARCHAR}, #{stopId,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.TaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskLog" useGeneratedKeys="true">
     insert into task_log
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="content != null">
         content,
       </if>
@@ -173,11 +43,11 @@
       <if test="aid != null">
         aid,
       </if>
+      <if test="stopId != null">
+        stop_id,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="content != null">
         #{content,jdbcType=VARCHAR},
       </if>
@@ -190,69 +60,12 @@
       <if test="aid != null">
         #{aid,jdbcType=VARCHAR},
       </if>
+      <if test="stopId != null">
+        #{stopId,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TaskLogExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
-    select count(*) from task_log
-    <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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    update task_log
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.content != null">
-        content = #{record.content,jdbcType=VARCHAR},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.taskId != null">
-        task_id = #{record.taskId,jdbcType=INTEGER},
-      </if>
-      <if test="record.aid != null">
-        aid = #{record.aid,jdbcType=VARCHAR},
-      </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 Tue Jun 04 10:17:22 CST 2019.
-    -->
-    update task_log
-    set id = #{record.id,jdbcType=INTEGER},
-      content = #{record.content,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      task_id = #{record.taskId,jdbcType=INTEGER},
-      aid = #{record.aid,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
     update task_log
     <set>
       <if test="content != null">
@@ -267,24 +80,26 @@
       <if test="aid != null">
         aid = #{aid,jdbcType=VARCHAR},
       </if>
+      <if test="stopId != null">
+        stop_id = #{stopId,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jun 04 10:17:22 CST 2019.
-    -->
     update task_log
     set content = #{content,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       task_id = #{taskId,jdbcType=INTEGER},
-      aid = #{aid,jdbcType=VARCHAR}
+      aid = #{aid,jdbcType=VARCHAR},
+      stop_id = #{stopId,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+
   <select id="selectTaskLogList" resultType="com.goafanti.order.bo.TaskLogBo">
-  select a.id,a.task_id taskId,a.content,date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTimes,b.name as aName  
-  from task_log a left join admin b on a.aid=b.id where a.task_id= #{id,jdbcType=INTEGER} order by a.create_time
+    select a.id,a.task_id taskId,a.content,date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTimes,b.name as aName,
+           a.stop_id stopId ,c.reason
+    from task_log a left join admin b on a.aid=b.id left join task_stop c on a.stop_id =c.id
+    where a.task_id= #{id,jdbcType=INTEGER} order by a.create_time
   </select>
-</mapper>
+</mapper>

+ 106 - 0
src/main/java/com/goafanti/common/mapper/TaskStopLogMapper.xml

@@ -0,0 +1,106 @@
+<?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.TaskStopLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskStopLog">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="task_stop_id" jdbcType="BIGINT" property="taskStopId" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="reason" jdbcType="VARCHAR" property="reason" />
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, task_stop_id, `status`, reason, create_by, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from task_stop_log
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from task_stop_log
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskStopLog" useGeneratedKeys="true">
+    insert into task_stop_log (task_stop_id, `status`, reason,
+      create_by, create_time)
+    values (#{taskStopId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR},
+      #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskStopLog" useGeneratedKeys="true">
+    insert into task_stop_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="taskStopId != null">
+        task_stop_id,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="reason != null">
+        reason,
+      </if>
+      <if test="createBy != null">
+        create_by,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="taskStopId != null">
+        #{taskStopId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="reason != null">
+        #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null">
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskStopLog">
+    update task_stop_log
+    <set>
+      <if test="taskStopId != null">
+        task_stop_id = #{taskStopId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="reason != null">
+        reason = #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null">
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </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.TaskStopLog">
+    update task_stop_log
+    set task_stop_id = #{taskStopId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=INTEGER},
+      reason = #{reason,jdbcType=VARCHAR},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectListBySoptId" resultType="com.goafanti.order.bo.TaskStopLogBo">
+    select a.id ,a.task_stop_id taskSoptId,a.status ,a.reason ,a.create_by createBy ,a.create_time createTime,
+           b.name createName,DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') createTimes
+    from task_stop_log a left join admin b on a.create_by =b.id
+    where a.task_stop_id = #{taskStopId}
+  </select>
+</mapper>

+ 129 - 0
src/main/java/com/goafanti/common/mapper/TaskStopMapper.xml

@@ -0,0 +1,129 @@
+<?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.TaskStopMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskStop">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="reason" jdbcType="VARCHAR" property="reason" />
+    <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, tid, `type`, `status`, reason, annex_url, create_by, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from task_stop
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from task_stop
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskStop" useGeneratedKeys="true">
+    insert into task_stop (tid, `type`, `status`,
+      reason, annex_url, create_by,
+      create_time)
+    values (#{tid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
+      #{reason,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
+      #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskStop" useGeneratedKeys="true">
+    insert into task_stop
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="tid != null">
+        tid,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="reason != null">
+        reason,
+      </if>
+      <if test="annexUrl != null">
+        annex_url,
+      </if>
+      <if test="createBy != null">
+        create_by,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="tid != null">
+        #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="reason != null">
+        #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        #{annexUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null">
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskStop">
+    update task_stop
+    <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="reason != null">
+        reason = #{reason,jdbcType=VARCHAR},
+      </if>
+      <if test="annexUrl != null">
+        annex_url = #{annexUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null">
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </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.TaskStop">
+    update task_stop
+    set tid = #{tid,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      reason = #{reason,jdbcType=VARCHAR},
+      annex_url = #{annexUrl,jdbcType=VARCHAR},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByTid"  resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from task_stop
+    where tid = #{tid} and status in (0,2)
+  </select>
+</mapper>

+ 179 - 0
src/main/java/com/goafanti/common/model/AmbPaymentApplication.java

@@ -0,0 +1,179 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * amb_payment_application
+ * @author 
+ */
+public class AmbPaymentApplication implements Serializable {
+    private Long id;
+
+    /**
+     * 类型 0=其他费用,1=内部结算,2=差旅(公对私报销),3=招待费,4=借款,5=工资奖金
+     */
+    private Integer type;
+
+    /**
+     * 金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 内容及说明
+     */
+    private String content;
+
+    /**
+     * 内容及说明
+     */
+    private String remarks;
+
+    /**
+     * 附件地址
+     */
+    private String annexUrl;
+
+    /**
+     * 审核流程 0=发起,1=本巴主,2=付款巴主,3=付款事业部总,4=财务总监,5=集团副总,
+     */
+    private Integer processStatus;
+
+    /**
+     * 审核状态 0=审核,1=通过,2=拒绝
+     */
+    private Integer status;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 付款巴编号
+     */
+    private String paymentAmbId;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl;
+    }
+
+    public Integer getProcessStatus() {
+        return processStatus;
+    }
+
+    public void setProcessStatus(Integer processStatus) {
+        this.processStatus = processStatus;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getPaymentAmbId() {
+        return paymentAmbId;
+    }
+
+    public void setPaymentAmbId(String paymentAmbId) {
+        this.paymentAmbId = paymentAmbId;
+    }
+}

+ 13 - 11
src/main/java/com/goafanti/common/model/Notice.java

@@ -2,6 +2,7 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
+import com.goafanti.common.enums.NoticeTypes;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
 import com.goafanti.common.constant.AFTConstants;
@@ -284,14 +285,14 @@ public class Notice implements Serializable {
 	}
 
 
-	
+
 	public Notice() {};
 //	Readed(0);//未读
 //	 n.setAid("1");
 //	 n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
 //	 n
 	/**
-	 * 
+	 *
 	 * @param id 编号
 	 * @param createTime 创建时间
 	 * @param readed 0未读
@@ -308,10 +309,10 @@ public class Notice implements Serializable {
 		this.content=content;
 		this.uid=uid;
 	}
-	
-	
+
+
 	/**
-	 * 
+	 *
 	 * @param id 编号
 	 * @param createTime 创建时间
 	 * @param readed 0未读
@@ -325,6 +326,7 @@ public class Notice implements Serializable {
 		this.readed=readed;
 		this.aid=aid;
 		this.noticeType=noticeType;
+		this.type= NoticeTypes.getType(noticeType);
 		this.content=content;
 	}
 
@@ -334,11 +336,11 @@ public class Notice implements Serializable {
 		if (null == this.noticeType)return null;
 		return NoticeStatus.getValueByCode(this.noticeType);
 	}
-    
+
 	public void setNoticeTypeName(Integer noticeType){
-		
+
 	}
-	
+
 	public String getCreateTimeFormattedDate() {
 		if (this.createTime == null) {
 			return null;
@@ -350,6 +352,6 @@ public class Notice implements Serializable {
 	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
 
 	}
-	
-	
-}
+
+
+}

+ 13 - 0
src/main/java/com/goafanti/common/model/TOrderMid.java

@@ -184,6 +184,11 @@ public class TOrderMid implements Serializable {
      */
     private BigDecimal actualProfit;
 
+    /**
+     * 暂停项目  0无 1有
+     */
+    private Integer stopProject;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -465,4 +470,12 @@ public class TOrderMid implements Serializable {
     public void setActualProfit(BigDecimal actualProfit) {
         this.actualProfit = actualProfit;
     }
+
+    public Integer getStopProject() {
+        return stopProject;
+    }
+
+    public void setStopProject(Integer stopProject) {
+        this.stopProject = stopProject;
+    }
 }

+ 169 - 0
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -139,6 +139,71 @@ public class TTaskMid implements Serializable {
      */
     private BigDecimal lastYearIncome;
 
+    /**
+     * 成本实付
+     */
+    private BigDecimal costActual;
+
+    /**
+     * 专利成本
+     */
+    private BigDecimal patentCost;
+
+    /**
+     * 专利成本实付
+     */
+    private BigDecimal patentCostActual;
+
+    /**
+     * 软著成本
+     */
+    private BigDecimal softCost;
+
+    /**
+     * 软著成本实付
+     */
+    private BigDecimal softCostActual;
+
+    /**
+     * 审计成本
+     */
+    private BigDecimal auditCost;
+
+    /**
+     * 审计成本实付
+     */
+    private BigDecimal auditCostActual;
+
+    /**
+     * 其他成本
+     */
+    private BigDecimal otherCost;
+
+    /**
+     * 其他成本实付
+     */
+    private BigDecimal otherCostActual;
+
+    /**
+     * 预计毛利
+     */
+    private BigDecimal expectProfit;
+
+    /**
+     * 实际毛利
+     */
+    private BigDecimal actualProfit;
+
+    /**
+     * 类型 0=项目暂停,1=项目重启
+     */
+    private Integer stopType;
+
+    /**
+     * 审核状态 0=发起,1=通过,2=拒绝
+     */
+    private Integer stopStatus;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -349,6 +414,110 @@ public class TTaskMid implements Serializable {
         this.lastYearIncome = lastYearIncome;
     }
 
+    public BigDecimal getCostActual() {
+        return costActual;
+    }
+
+    public void setCostActual(BigDecimal costActual) {
+        this.costActual = costActual;
+    }
+
+    public BigDecimal getPatentCost() {
+        return patentCost;
+    }
+
+    public void setPatentCost(BigDecimal patentCost) {
+        this.patentCost = patentCost;
+    }
+
+    public BigDecimal getPatentCostActual() {
+        return patentCostActual;
+    }
+
+    public void setPatentCostActual(BigDecimal patentCostActual) {
+        this.patentCostActual = patentCostActual;
+    }
+
+    public BigDecimal getSoftCost() {
+        return softCost;
+    }
+
+    public void setSoftCost(BigDecimal softCost) {
+        this.softCost = softCost;
+    }
+
+    public BigDecimal getSoftCostActual() {
+        return softCostActual;
+    }
+
+    public void setSoftCostActual(BigDecimal softCostActual) {
+        this.softCostActual = softCostActual;
+    }
+
+    public BigDecimal getAuditCost() {
+        return auditCost;
+    }
+
+    public void setAuditCost(BigDecimal auditCost) {
+        this.auditCost = auditCost;
+    }
+
+    public BigDecimal getAuditCostActual() {
+        return auditCostActual;
+    }
+
+    public void setAuditCostActual(BigDecimal auditCostActual) {
+        this.auditCostActual = auditCostActual;
+    }
+
+    public BigDecimal getOtherCost() {
+        return otherCost;
+    }
+
+    public void setOtherCost(BigDecimal otherCost) {
+        this.otherCost = otherCost;
+    }
+
+    public BigDecimal getOtherCostActual() {
+        return otherCostActual;
+    }
+
+    public void setOtherCostActual(BigDecimal otherCostActual) {
+        this.otherCostActual = otherCostActual;
+    }
+
+    public BigDecimal getExpectProfit() {
+        return expectProfit;
+    }
+
+    public void setExpectProfit(BigDecimal expectProfit) {
+        this.expectProfit = expectProfit;
+    }
+
+    public BigDecimal getActualProfit() {
+        return actualProfit;
+    }
+
+    public void setActualProfit(BigDecimal actualProfit) {
+        this.actualProfit = actualProfit;
+    }
+
+    public Integer getStopType() {
+        return stopType;
+    }
+
+    public void setStopType(Integer stopType) {
+        this.stopType = stopType;
+    }
+
+    public Integer getStopStatus() {
+        return stopStatus;
+    }
+
+    public void setStopStatus(Integer stopStatus) {
+        this.stopStatus = stopStatus;
+    }
+
     public TTaskMid(Integer tid, BigDecimal costAmount) {
         this.tid = tid;
         this.costAmount = costAmount;

+ 81 - 119
src/main/java/com/goafanti/common/model/TaskLog.java

@@ -1,125 +1,87 @@
 package com.goafanti.common.model;
 
+import java.io.Serializable;
 import java.util.Date;
 
-public class TaskLog {
+/**
+ * task_log
+ * @author
+ */
+public class TaskLog implements Serializable {
+    private Integer id;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 任务ID
+     */
+    private Integer taskId;
+
+    /**
+     * 操作人
+     */
+    private String aid;
+
     /**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_log.id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_log.content
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	private String content;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_log.create_time
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_log.task_id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	private Integer taskId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_log.aid
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	private String aid;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_log.id
-	 * @return  the value of task_log.id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_log.id
-	 * @param id  the value for task_log.id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_log.content
-	 * @return  the value of task_log.content
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public String getContent() {
-		return content;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_log.content
-	 * @param content  the value for task_log.content
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public void setContent(String content) {
-		this.content = content;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_log.create_time
-	 * @return  the value of task_log.create_time
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_log.create_time
-	 * @param createTime  the value for task_log.create_time
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_log.task_id
-	 * @return  the value of task_log.task_id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public Integer getTaskId() {
-		return taskId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_log.task_id
-	 * @param taskId  the value for task_log.task_id
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public void setTaskId(Integer taskId) {
-		this.taskId = taskId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_log.aid
-	 * @return  the value of task_log.aid
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public String getAid() {
-		return aid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_log.aid
-	 * @param aid  the value for task_log.aid
-	 * @mbg.generated  Tue Jun 04 10:17:22 CST 2019
-	 */
-	public void setAid(String aid) {
-		this.aid = aid;
-	}
-
-	public void setTaskId(String taskId) {
-        this.taskId = Integer.valueOf(taskId);
+     * 发起暂停编号
+     */
+    private Long stopId;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(Integer taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Long getStopId() {
+        return stopId;
+    }
+
+    public void setStopId(Long stopId) {
+        this.stopId = stopId;
     }
-}
+}

+ 113 - 0
src/main/java/com/goafanti/common/model/TaskStop.java

@@ -0,0 +1,113 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * task_stop
+ * @author 
+ */
+public class TaskStop implements Serializable {
+    private Long id;
+
+    /**
+     * 任务编号
+     */
+    private Integer tid;
+
+    /**
+     * 类型 0=项目暂停,1=项目重启
+     */
+    private Integer type;
+
+    /**
+     * 审核状态 0=发起,1=通过,2=拒绝
+     */
+    private Integer status;
+
+    /**
+     * 原因
+     */
+    private String reason;
+
+    /**
+     * 附件地址
+     */
+    private String annexUrl;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 87 - 0
src/main/java/com/goafanti/common/model/TaskStopLog.java

@@ -0,0 +1,87 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * task_stop_log
+ * @author 
+ */
+public class TaskStopLog implements Serializable {
+    private Long id;
+
+    /**
+     * 任务暂停编号
+     */
+    private Long taskStopId;
+
+    /**
+     * 审核状态 0=发起,1=通过,2=拒绝
+     */
+    private Integer status;
+
+    /**
+     * 原因
+     */
+    private String reason;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getTaskStopId() {
+        return taskStopId;
+    }
+
+    public void setTaskStopId(Long taskStopId) {
+        this.taskStopId = taskStopId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 105 - 3
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -9,22 +9,23 @@ import java.util.UUID;
 import javax.mail.MessagingException;
 
 import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.bo.OrderOperator;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.NoticeStatus;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.TChangeTask;
+import com.goafanti.common.model.*;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.NewOrderChangeBo;
+import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.enums.OrderChangeProcess;
 import com.goafanti.order.enums.ProcessStatus;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.enums.NoticeTypes;
-import com.goafanti.common.model.Notice;
 
 @Component
 @Async
@@ -39,6 +40,8 @@ public class AsyncUtils {
 	private NewOrderChangeMapper newOrderChangeMapper;
 	@Autowired
 	private TOrderInvoiceMapper tOrderInvoiceMapper;
+	@Autowired
+	private TOrderTaskMapper tOrderTaskMapper;
 
 
 
@@ -169,4 +172,103 @@ public class AsyncUtils {
 		if (str.length()>1)return str.substring(0,str.length()-1);
 		else return "暂无";
 	}
+
+	/**
+	 *
+	 * @param type  发送对象 0发起营销管理员 1 完成通知所有人 2拒绝发送给营销员
+	 *  @param sotpType  发送对象 类型 0=项目暂停,1=项目重启
+	 *
+	 */
+	public void addProjectSotpNotic(Integer type,  Integer sotpType, String ids, TOrderTask task) {
+		Integer noticeType=0;
+		if (task==null)task = tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(ids.split(",")[0]));
+		TOrderNewBo tOrderNew = tOrderNewMapper.getOrderNewDetail(task.getOrderNo());
+		List<Notice> notes=new ArrayList<>();
+		StringBuffer emails=new StringBuffer();
+		if (type==0){
+			noticeType=sotpType==0?NoticeStatus.PROJECT_SOPT_START.getCode() :NoticeStatus.PROJECT_RENEW_START.getCode();
+			String str=String.format("客户名称[%s]订单编号[%s]项目编号[%s],请及时审核。",tOrderNew.getUserName(),task.getOrderNo(),ids);
+			List<Admin> admins = adminMapper.listAdminBydepIdAndRoleType(tOrderNew.getOrderDep(),AFTConstants.SALESMAN_ADMIN);
+			for (Admin admin : admins) {
+				addNotic( noticeType,admin.getId(), str);
+				send(new EmailBo(NoticeStatus.getValueByCode(noticeType),admin.getEmail(),str));
+			}
+		}else if(type==1){
+			String str=String.format("客户名称[%s]订单编号[%s]项目编号[%s],已%s请悉知。",tOrderNew.getUserName(),task.getOrderNo(),task.getId(),sotpType==1?"重启":"暂停");
+			noticeType=sotpType==0?NoticeStatus.PROJECT_SOPT_YES.getCode() :NoticeStatus.PROJECT_RENEW_YES.getCode();
+			OrderOperator orderOperator = tOrderTaskMapper.selectAidByParam(task.getId());
+			List<String >aids=new ArrayList<>();
+			if (orderOperator.getSalesmanId()!=null&&!aids.contains(orderOperator.getFinanceId())){
+				aids.add(orderOperator.getSalesmanId());
+			}
+			if (task.getConsultantId()!=null&&!aids.contains(task.getConsultantId())){
+				 aids.add(task.getConsultantId());
+			}
+			if (task.getManagerId()!=null&&!aids.contains(task.getManagerId())){
+				aids.add(task.getManagerId());
+			}
+			if (orderOperator.getFinanceId()!=null&&!aids.contains(orderOperator.getFinanceId())){
+				aids.add(orderOperator.getFinanceId());
+			}
+			List<Admin> cwgly = adminMapper.selectAdminByRoleType(AFTConstants.FINANCE_ADMIN);
+			for (Admin admin : cwgly) {
+				if (!aids.contains(admin.getId())){
+					aids.add(admin.getId());
+				}
+			}
+			List<Admin> zxsgly = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
+			for (Admin admin : zxsgly) {
+				if (!aids.contains(admin.getId())){
+					aids.add(admin.getId());
+				}
+			}
+			List<Admin> zc = adminMapper.selectAdminByRoleType(AFTConstants.CED);
+			for (Admin admin : zc) {
+				if (!aids.contains(admin.getId())){
+					aids.add(admin.getId());
+				}
+			}
+			List<Admin> dsz = adminMapper.selectAdminByRoleType(AFTConstants.APPROVAL_DECISION);
+			for (Admin admin : dsz) {
+				if (!aids.contains(admin.getId())){
+					aids.add(admin.getId());
+				}
+			}
+			if (!aids.isEmpty()){
+				for (String aid : aids) {
+					pushParam( aid,  noticeType, str,  notes,  emails);
+				}
+			}
+			noticeMapper.insertBatch(notes);
+			send(new EmailBo(NoticeStatus.getValueByCode(noticeType),emails.substring(0,emails.length()-1),str));
+			}else if (type==2){
+				noticeType=sotpType==0?NoticeStatus.PROJECT_SOPT_NO.getCode() :NoticeStatus.PROJECT_RENEW_NO.getCode();
+				String str=String.format("客户名称[%s]订单编号[%s]项目编号[%s],已经被驳回。",tOrderNew.getUserName(),task.getOrderNo(),task.getId());
+				if (tOrderNew.getSalesmanId()!=null){
+					Admin admin = adminMapper.selectByPrimaryKey(tOrderNew.getSalesmanId());
+					addNotic( noticeType,admin.getId(), str);
+					send(new EmailBo(NoticeStatus.getValueByCode(noticeType),admin.getEmail(),str));
+				}
+			}
+		}
+
+	private void pushParam(String id, Integer noticeType, String str, List<Notice> notes, StringBuffer emails) {
+		Admin admin = adminMapper.selectByPrimaryKey(id);
+		pushParam(admin,noticeType,str,notes,emails);
+
+	}
+
+
+
+	private void pushParam(Admin admin, Integer noticeType, String str, List<Notice> notes, StringBuffer emails) {
+		notes.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, admin.getId(),
+				noticeType, str));
+		if (admin!=null &&StringUtils.isNotBlank(admin.getEmail())) {
+			if (!emails.toString().contains(admin.getEmail())){
+				emails = emails.append(admin.getEmail()).append(",");
+			}
+		}
+	}
+
+
 }

+ 0 - 1
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -345,7 +345,6 @@ public class NewExcelUtil<T> {
 			// 得到导出对象.
 			T vo = (T) list.get(i);
 			int column = 0;
-			System.out.println(i);
 			for (Object[] os : fields) {
 				Field field = (Field) os[0];
 				Excel excel = (Excel) os[1];

+ 9 - 0
src/main/java/com/goafanti/order/bo/InputProjectStatistics.java

@@ -33,6 +33,15 @@ public class InputProjectStatistics {
 	 */
 	private Integer screen;
 
+	private Integer taskProjectStatus;
+
+	public Integer getTaskProjectStatus() {
+		return taskProjectStatus;
+	}
+
+	public void setTaskProjectStatus(Integer taskProjectStatus) {
+		this.taskProjectStatus = taskProjectStatus;
+	}
 
 	public String getThchId() {
 		return thchId;

+ 66 - 0
src/main/java/com/goafanti/order/bo/InputProjectStop.java

@@ -0,0 +1,66 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.utils.Param;
+
+import javax.validation.constraints.NotNull;
+
+public class InputProjectStop {
+
+
+    private String ids;
+    @Param(name="类型")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private Integer type;
+    @Param(name="原因")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private String reason;
+    @Param(name="附件")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private String annexUrl;
+
+    private Long stopId;
+
+
+    public Long getStopId() {
+        return stopId;
+    }
+
+    public void setStopId(Long stopId) {
+        this.stopId = stopId;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+
+
+    public String getIds() {
+        return ids;
+    }
+
+    public void setIds(String ids) {
+        this.ids = ids;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl;
+    }
+}

+ 195 - 0
src/main/java/com/goafanti/order/bo/OutselectProjectSotp.java

@@ -0,0 +1,195 @@
+package com.goafanti.order.bo;
+
+
+import java.math.BigDecimal;
+
+public class OutselectProjectSotp {
+
+    private Long id;
+    private String createTimes;
+    private String province;
+    private String contractNo;
+    private String orderNo;
+    private String userName;
+    private String cname;
+    private String projectName;
+    private Integer commodityQuantity;
+    private String serviceType;
+    private String receiverName;
+    private Integer status;
+    private BigDecimal commodityPrice;
+    private String reason;
+    private String annexUrl;
+    private Integer stopType;
+
+    /**
+     *  审核状态 0=发起,1=通过,2=拒绝
+     */
+    private Integer stopStatus;
+    private Integer tid;
+
+    private Integer projectStopStatus;
+    private Integer projectStopType;
+
+    public Integer getProjectStopType() {
+        return projectStopType;
+    }
+
+    public void setProjectStopType(Integer projectStopType) {
+        this.projectStopType = projectStopType;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getAnnexUrl() {
+        return annexUrl;
+    }
+
+    public void setAnnexUrl(String annexUrl) {
+        this.annexUrl = annexUrl;
+    }
+
+    public Integer getStopType() {
+        return stopType;
+    }
+
+    public void setStopType(Integer stopType) {
+        this.stopType = stopType;
+    }
+
+    public Integer getStopStatus() {
+        return stopStatus;
+    }
+
+    public void setStopStatus(Integer stopStatus) {
+        this.stopStatus = stopStatus;
+    }
+
+    public Integer getProjectStopStatus() {
+        return projectStopStatus;
+    }
+
+    public void setProjectStopStatus(Integer projectStopStatus) {
+        this.projectStopStatus = projectStopStatus;
+    }
+
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getCname() {
+        return cname;
+    }
+
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public String getReceiverName() {
+        return receiverName;
+    }
+
+    public void setReceiverName(String receiverName) {
+        this.receiverName = receiverName;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+}

+ 198 - 0
src/main/java/com/goafanti/order/bo/OutselectProjectSotpBo.java

@@ -0,0 +1,198 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+import java.math.BigDecimal;
+
+public class OutselectProjectSotpBo extends  OutselectProjectSotp{
+
+    @Excel(name = "时间")
+    private String createTimes;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "签单客户")
+    private String userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String projectName;
+    @Excel(name = "数量")
+    private Integer commodityQuantity;
+    @Excel(name = "服务类型")
+    private String serviceType;
+    @Excel(name = "咨询师/咨询师经理")
+    private String receiverName;
+    @Excel(name = "项目状态")
+    private String statusName;
+    private Integer status;
+    @Excel(name = "项目金额")
+    private BigDecimal commodityPrice;
+    @Excel(name = "原因")
+    private String reason;
+    private Integer stopType;
+    private Integer stopStatus;
+
+    @Override
+    public Integer getStopType() {
+        return stopType;
+    }
+
+    @Override
+    public void setStopType(Integer stopType) {
+        this.stopType = stopType;
+    }
+
+    @Override
+    public Integer getStopStatus() {
+        return stopStatus;
+    }
+
+    @Override
+    public void setStopStatus(Integer stopStatus) {
+        this.stopStatus = stopStatus;
+    }
+
+    public String getStatusName() {
+        return statusName;
+    }
+
+    public void setStatusName(String statusName) {
+        this.statusName = statusName;
+    }
+
+    @Override
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    @Override
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+
+    @Override
+    public String getProvince() {
+        return province;
+    }
+
+    @Override
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    @Override
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    @Override
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    @Override
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    @Override
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String getUserName() {
+        return userName;
+    }
+
+    @Override
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    @Override
+    public String getCname() {
+        return cname;
+    }
+
+    @Override
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+
+    @Override
+    public String getProjectName() {
+        return projectName;
+    }
+
+    @Override
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @Override
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    @Override
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    @Override
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    @Override
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    @Override
+    public String getReceiverName() {
+        return receiverName;
+    }
+
+    @Override
+    public void setReceiverName(String receiverName) {
+        this.receiverName = receiverName;
+    }
+
+    @Override
+    public Integer getStatus() {
+        return status;
+    }
+
+    @Override
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    @Override
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+
+    @Override
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+    @Override
+    public String getReason() {
+        return reason;
+    }
+
+    @Override
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+
+}

+ 7 - 1
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -55,10 +55,16 @@ public class TOrderNewBo extends TOrderNew{
 	 * 是否变更 0否 1是
 	 */
 	private Integer ischange;
+	private Integer stopProject;
 
 
+	public Integer getStopProject() {
+		return stopProject;
+	}
 
-
+	public void setStopProject(Integer stopProject) {
+		this.stopProject = stopProject;
+	}
 
 	public String getDunSubject() {
 		if(getDunType()!=null&&getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+getProjectType()+getDunType()));

+ 28 - 1
src/main/java/com/goafanti/order/bo/TOrderTaskBo.java

@@ -49,11 +49,38 @@ public class TOrderTaskBo extends TOrderTask{
 	private String	serviceYear;
 	private String contractTerm;
 	private Integer	yearSum;
-
+	private Integer	stopStatus;
+	private Integer	stopType;
+	private Integer	projectStopStatus;
 	private String lastYear;
 	private BigDecimal lastYearCapital;
 	private BigDecimal lastYearIncome;
 
+
+	public Integer getStopType() {
+		return stopType;
+	}
+
+	public void setStopType(Integer stopType) {
+		this.stopType = stopType;
+	}
+
+	public Integer getProjectStopStatus() {
+		return projectStopStatus;
+	}
+
+	public void setProjectStopStatus(Integer projectStopStatus) {
+		this.projectStopStatus = projectStopStatus;
+	}
+
+	public Integer getStopStatus() {
+		return stopStatus;
+	}
+
+	public void setStopStatus(Integer stopStatus) {
+		this.stopStatus = stopStatus;
+	}
+
 	public String getLastYear() {
 		return lastYear;
 	}

+ 10 - 0
src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java

@@ -41,6 +41,7 @@ public class TOrderTaskDetailBo {
 	private String postalAddress;
 	private Integer declarationBatch;
 	private Integer ifCertificationFee;
+	private Integer deleteSign;
 	private String certificationCorporate;
 	private BigDecimal certificationFee;
 
@@ -124,6 +125,15 @@ public class TOrderTaskDetailBo {
 	private Integer processStatus;
 	private String commodityId;
 
+
+	public Integer getDeleteSign() {
+		return deleteSign;
+	}
+
+	public void setDeleteSign(Integer deleteSign) {
+		this.deleteSign = deleteSign;
+	}
+
 	public String getCommodityId() {
 		return commodityId;
 	}

+ 12 - 2
src/main/java/com/goafanti/order/bo/TaskLogBo.java

@@ -4,10 +4,20 @@ import com.goafanti.common.model.TaskLog;
 
 public class TaskLogBo extends TaskLog{
 		private String aName;
-		
+
 		private String createTimes;
 
-		public String getaName() {
+		private String reason;
+
+	public String getReason() {
+		return reason;
+	}
+
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	public String getaName() {
 			return aName;
 		}
 

+ 24 - 0
src/main/java/com/goafanti/order/bo/TaskStopLogBo.java

@@ -0,0 +1,24 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TaskStopLog;
+
+public class TaskStopLogBo extends TaskStopLog {
+    private String createName;
+    private String createTimes;
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+}

+ 42 - 0
src/main/java/com/goafanti/order/controller/InputTaskStopLog.java

@@ -0,0 +1,42 @@
+package com.goafanti.order.controller;
+
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.utils.Param;
+
+import javax.validation.constraints.NotNull;
+
+public class InputTaskStopLog {
+
+    @Param(name="编号")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private Long taskStopId;
+    @Param(name="原因")
+    @NotNull(message = "{"+ ErrorConstants.PARAM_EMPTY_ERROR+"}")
+    private String reason;
+
+    private Integer status;
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getTaskStopId() {
+        return taskStopId;
+    }
+
+    public void setTaskStopId(Long taskStopId) {
+        this.taskStopId = taskStopId;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+}

+ 127 - 0
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -4,6 +4,8 @@ package com.goafanti.order.controller;
 import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
@@ -11,11 +13,15 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.utils.ParamUtils;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.service.OrderNewService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -629,4 +635,125 @@ public class OrderProjectApiController extends CertifyApiController {
 		return res.data(orderProjectService.deleteMemberSonProject( id));
 	}
 
+	/**
+	 * 项目暂停
+	 *
+	 */
+	@RequestMapping(value = "/addProjectStop" ,method = RequestMethod.POST)
+	public Result addProjectStop(@Validated InputProjectStop in,BindingResult bindingResult){
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
+			return res;
+		}
+		if (in.getIds()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"编号","编号"));
+			return res;
+		}
+		return res.data(orderProjectService.addProjectStop( in));
+	}
+
+	/**
+	 * 项目暂停
+	 *
+	 */
+	@RequestMapping(value = "/updateProjectStop" ,method = RequestMethod.POST)
+	public Result updateProjectStop(@Validated InputProjectStop in,BindingResult bindingResult){
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
+			return res;
+		}
+		if (in.getStopId()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"暂停编号","暂停编号"));
+			return res;
+		}
+		return res.data(orderProjectService.updateProjectStop(in));
+	}
+
+	/**
+	 * 项目暂停审核
+	 *
+	 */
+	@RequestMapping(value = "/examineProjectStop" ,method = RequestMethod.POST)
+	public Result examineProjectStop(@Validated InputTaskStopLog in,BindingResult bindingResult){
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
+			return res;
+		}
+		return res.data(orderProjectService.pushExamineProjectStop( in));
+	}
+
+	/**
+	 * 项目暂停日志列表
+	 *
+	 */
+	@RequestMapping(value = "/projectStopList" ,method = RequestMethod.GET)
+	public Result projectStopList(Integer taskStopId){
+		Result res = new Result();
+		if (taskStopId==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目暂停编号","项目暂停编号"));
+			return res;
+		}
+		return res.data(orderProjectService.projectStopList( taskStopId));
+	}
+
+	/**
+	 * 项目暂停列表
+	 *
+	 */
+	@RequestMapping(value = "/selectProjectStop" ,method = RequestMethod.GET)
+	public Result selectProjectStop(String orderNo,String userName,String depId,String contractNo, String projectName,Integer status,
+									String startTime, String endTime, String receiverId, Integer pageNo,Integer pageSize){
+		Result res = new Result();
+
+		return res.data(orderProjectService.selectProjectStop(  orderNo, userName, depId, contractNo,
+				projectName, status,startTime,endTime,receiverId, pageNo, pageSize));
+	}
+
+	/**
+	 * 项目暂停列表
+	 *
+	 */
+	@RequestMapping(value = "/selectProjectStop/export" ,method = RequestMethod.GET)
+	public Result selectProjectSotpExport(String orderNo,String userName,String depId,String contractNo, String projectName,Integer status,
+									String startTime, String endTime, String receiverId, Integer pageNo,Integer pageSize){
+		NewExcelUtil newExcelUtil=new NewExcelUtil(OutselectProjectSotpBo.class);
+		Pagination<?> p = orderProjectService.selectProjectStop(orderNo, userName, depId, contractNo,
+				projectName, status, startTime, endTime, receiverId, pageNo, pageSize);
+		List<OutselectProjectSotp> list = (List<OutselectProjectSotp>) p.getList();
+		List<OutselectProjectSotpBo> list2=new ArrayList<>();
+			for (OutselectProjectSotp use : list) {
+				OutselectProjectSotpBo o = new OutselectProjectSotpBo();
+				BeanUtils.copyProperties(use,o);
+				StringBuffer str =new StringBuffer();
+				if (o.getStopStatus()==0){
+					str=str.append("已发起");
+				}else if (o.getStopStatus()==1){
+					str=str.append("已完成");
+				}else if (o.getStopStatus()==2){
+					str=str.append("已拒绝");
+				}
+				if (o.getStopType()==0){
+					str=str.append("暂停");
+				}else if (o.getStopStatus()==1){
+					str=str.append("重启");
+				}
+				o.setStatusName(str.toString());
+				list2.add(o);
+			}
+		return newExcelUtil.exportExcel(list2,"暂停项目列表",uploadPath);
+	}
+
+	/** 文件上传 **/
+	@RequestMapping(value = "/uploadStopFile", method = RequestMethod.POST)
+	public Result uploadStopFile(HttpServletRequest req,String sign){
+		Result res = new Result();
+		res.setData(handleFile(res, "/projectStopFile/", false, req, sign));
+		return res;
+	}
 }

+ 5 - 2
src/main/java/com/goafanti/order/enums/NewProjectStatus.java

@@ -16,6 +16,8 @@ import java.util.Map;
  *	0-4 19-20(4已提交=公示) 11-12
  *	会员
  *	0-3 21第1年进行中 22第1年服务完成 23第2年进行中 24第2年服务完成 25第3年进行中 26第3年服务完成 27所有会员服务全部完成 11-12
+ *	通用
+ *	29 暂停
  * @author Administrator
  *
  */
@@ -23,12 +25,13 @@ public enum NewProjectStatus {
 
 
 	WQD(0,"未启动"), JXZ(1,"进行中"), ZTKE(2,"暂停(客户通知暂停)"), ZTYW(3,"暂停(业务线通知暂停)"), YTJ(4,"已提交"), WTUIJIAN(5,"未推荐"),
-	YTUIJIAN(6,"已推荐"), WNGS(7,"未拟公示"), YNGS(8,"已拟公示"),CCWBA(28,"抽查未备案"), YBA(9,"已备案"), YXZ(10,"已下证 "), TDYSB(11,"退单(已申报/已下证)"),
-	TDWSB(12,"退单(未申报/未下证)"),
+	YTUIJIAN(6,"已推荐"), WNGS(7,"未拟公示"), YNGS(8,"已拟公示"), YBA(9,"已备案"), YXZ(10,"已下证 "), TDYSB(11,"退单(已申报/已下证)"),
+	TDWSB(12,"退单(未申报/未下证)"),CCWBA(28,"抽查未备案"),
 	YDB(13,"已答辩"),WLX(14,"未立项"),YLX(15,"已立项"),QBZ(16,"前补助"),HBZ(17,"后补助"),LXYBK(18,"立项已拨款"),
 	YWCXZ(19,"已完成(下证)"),YBH(20,"已驳回"),
 	D1NJX(21,"第1年进行中"),D1NWC(22,"第1年服务完成"),D2NJX(23,"第2年进行中"),D2NWC(24,"第2年服务完成"),D3NJX(25,"第3年进行中"),D3NWC(26,"第3年服务完成"),
 	QBWC(27,"所有会员服务全部完成"),
+	ZT(29,"暂停"),
 	INVALID(99,"未知");
 
 

+ 14 - 1
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -4,12 +4,12 @@ import java.util.List;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.UserOrderTask;
-import com.goafanti.common.model.MemberLog;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.bo.InputProjectCheck;
+import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.organization.bo.OutPaymentNode;
 
 public interface OrderProjectService {
@@ -134,4 +134,17 @@ public interface OrderProjectService {
 	Integer getOrderProcessStatus(String orderNo);
 
     void updateMidServiceProject(String orderNo);
+
+
+    Integer addProjectStop(InputProjectStop in);
+	Integer updateProjectStop(InputProjectStop in);
+
+	Pagination<?> selectProjectStop(String orderNo, String userName, String depId, String contractNo, String projectName,
+							 Integer status,String startTime,String endTime,String receiverId, Integer pageNo, Integer pageSize);
+
+	List<TaskStopLogBo> projectStopList(Integer taskStopId);
+
+	Object pushExamineProjectStop(InputTaskStopLog in);
+
+
 }

+ 11 - 3
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -579,7 +579,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			orderChangeLogMapper.insertSelective(ocl);
 			TOrderNew ton=new TOrderNew();
 			ton.setOrderNo(noc.getOrderNo());
-			ton.setDeleteSign(3);
+			ton.setDeleteSign(2);
 			tOrderNewMapper.updateByPrimaryKeySelective(ton);
 			sendNotice(0, t);
 		}else  if (changeType==2) {
@@ -597,8 +597,16 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			noc.setExamineName(ton.getSalesmanName());
 		}else if (noc.getProcessState()== OrderChangeProcess.YXGLY.getCode()){
 			TOrderNewBo ton = tOrderNewMapper.getSaleIdByOno(noc.getOrderNo());
-			OrganizationListOut dep = departmentMapper.selectAllById(ton.getOrderDep());
-			noc.setExamineName(dep.getManagerName());
+			StringBuffer str=new StringBuffer();
+			List<Admin> admins = adminMapper.listAdminBydepIdAndRoleType(ton.getOrderDep(),AFTConstants.SALESMAN_ADMIN);
+			if (admins.isEmpty()){
+				OrganizationListOut dep = departmentMapper.selectAllById(ton.getOrderDep());
+				admins = adminMapper.listAdminBydepIdAndRoleType(dep.getSuperId(),AFTConstants.SALESMAN_ADMIN);
+			}
+			for (Admin admin : admins) {
+				if (!str.toString().contains(admin.getName()))str.append(admin.getName()).append(",");
+			}
+			if (str.length()>0)noc.setExamineName(str.substring(0,str.length()-1));
 		}else if (noc.getProcessState()== OrderChangeProcess.JSY.getCode()){
 			List<OrderExamineBo> os = orderExamineMapper.selectByOrderNo(noc.getOrderNo(), 0);
 			StringBuffer str=new StringBuffer();

+ 15 - 7
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -389,6 +389,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public int delectOrderTask(Integer id) {
 		//连带催款一起删除
 		newOrderDunMapper.deleteByTid(id);
+		tOrderTaskMapper.deleteBySplitId(id);
 		return tOrderTaskMapper.deleteByPrimaryKey(id);
 	}
 
@@ -443,9 +444,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			contactBook.setMobile(t.getContactMobile());
 			organizationContactBookMapper.insertSelective(contactBook);
 		}
-		Admin admin = adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
+		Admin a = adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 		if (StringUtils.isBlank(t.getOrderDep())) {
-			t.setOrderDep(admin.getDepartmentId());
+			t.setOrderDep(a.getDepartmentId());
 		}
 		//订单提交
 		if (isSubmit==1) {
@@ -458,7 +459,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 			//特批逻辑处理
 			if (t2.getApproval()==ApprovalNewState.ZCDSH.getCode()){
-				if (admin.getId().equals(AFTConstants.CAOJIN_AID)){
+				if (a.getId().equals(AFTConstants.CAOJIN_AID)){
 					t.setApproval(ApprovalNewState.DSZDSH.getCode());
 				}else {
 					t.setApproval(ApprovalNewState.ZCDSH.getCode());
@@ -487,15 +488,21 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			updateOrderMid(t);
 			List<String> aids = new ArrayList<>();
 			Integer type;
-			AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
 			aids.addAll(adminMapper.listNameByDepAndName(a.getDepartmentId(), AFTConstants.SALESMAN_ADMIN));
 			type=NoticeStatus.ORDER_START.getCode();
-
 			TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
 			pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t.getApproval());
 			if (t.getOrderDep()!=null){
-				OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
-				t.setExamineName(dep.getManagerName());
+				List<Admin> admins = adminMapper.listAdminBydepIdAndRoleType(t.getOrderDep(),AFTConstants.SALESMAN_ADMIN);
+				StringBuffer str =new StringBuffer();
+				if (admins.isEmpty()){
+					OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
+					admins = adminMapper.listAdminBydepIdAndRoleType(dep.getSuperId(),AFTConstants.SALESMAN_ADMIN);
+				}
+				for (Admin admin : admins) {
+					if (!str.toString().contains(admin.getName()))str.append(admin.getName()).append(",");
+				}
+				if (str.length()>0)t.setExamineName(str.substring(0,str.length()-1));
 			}
 		}
 		if (t2.getApproval().equals(ApprovalNewState.ZCBH.getCode()) ||
@@ -900,6 +907,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		TOrderNew t2= checkDeleteSign(orderNo);
 		t.setOrderNo(orderNo);
 		t.setOrderDep(t2.getOrderDep());
+		t.setSalesmanId(t2.getSalesmanId());
 		List<String> aids = new ArrayList<>();
 		Integer type=null;
 		TOrderLog tl=new TOrderLog();

+ 166 - 9
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -4,28 +4,21 @@ import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
 import javax.mail.MessagingException;
 
 import com.alibaba.fastjson.JSON;
-import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.common.bo.*;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.dao.*;
-import com.goafanti.common.enums.OrderState;
 import com.goafanti.common.model.*;
 import com.goafanti.common.utils.*;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.order.enums.*;
-import com.goafanti.report.bo.SalesValues;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -123,6 +116,12 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	private OrderExamineMapper orderExamineMapper;
 	@Autowired
 	private NewOrderChangeMapper newOrderChangeMapper;
+	@Autowired
+	private TaskStopMapper taskStopMapper;
+	@Autowired
+	private TaskStopLogMapper taskStopLogMapper;
+
+
 
 	@Value(value = "${upload.path}")
 	private String 					uploadPath 			= null;
@@ -1457,5 +1456,163 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 	}
 
+	@Override
+	public Integer addProjectStop(InputProjectStop in) {
+		String[] split = in.getIds().split(",");
+		Date date = new Date();
+		String adminId = TokenManager.getAdminId();
+		for (String s : split) {
+			Integer id=Integer.valueOf(s);
+			TaskStop use = taskStopMapper.selectByTid(id);
+			if (use!=null){
+				throw new BusinessException(String.format("项目[%s]暂停流程已存在,请先走完流程",id));
+			}
+			TOrderTaskDetailBo orderOp = tOrderTaskMapper.getOrderTaskDetail(id);
+
+			if (orderOp.getDeleteSign()==2){
+				throw new BusinessException(String.format("订单[%s]存在变更审核,请先走完流程",orderOp.getOrderNo()));
+			}
+			TaskStop ts = new TaskStop();
+			ts.setTid(id);
+			ts.setType(in.getType());
+			ts.setStatus(0);
+			ts.setReason(in.getReason());
+			ts.setAnnexUrl(in.getAnnexUrl());
+			ts.setCreateBy(adminId);
+			ts.setCreateTime(date);
+			taskStopMapper.insertSelective(ts);
+			TaskStopLog log = new TaskStopLog();
+			log.setTaskStopId(ts.getId());
+			log.setReason(in.getReason());
+			log.setCreateBy(adminId);
+			log.setCreateTime(date);
+			taskStopLogMapper.insertSelective(log);
+			TTaskMid tt=new TTaskMid();
+			tt.setTid(id);
+			tt.setStopStatus(0);
+			tt.setStopType(in.getType());
+			tTaskMidMapper.updateByTid(tt);
+		}
+		asyncUtils.addProjectSotpNotic(0, in.getType(),in.getIds(),null);
+		return 1;
+	}
+
+	@Override
+	public Integer updateProjectStop(InputProjectStop in) {
+		TaskStop use = taskStopMapper.selectByPrimaryKey(in.getStopId());
+		Date date = new Date();
+		String adminId = TokenManager.getAdminId();
+		TaskStop ts = new TaskStop();
+		ts.setId(in.getStopId());
+		ts.setType(in.getType());
+		ts.setStatus(0);
+		ts.setReason(in.getReason());
+		ts.setAnnexUrl(in.getAnnexUrl());
+		taskStopMapper.updateByPrimaryKeySelective(ts);
+		TaskStopLog log = new TaskStopLog();
+		log.setTaskStopId(ts.getId());
+		log.setReason(in.getReason());
+		log.setCreateBy(adminId);
+		log.setCreateTime(date);
+		taskStopLogMapper.insertSelective(log);
+		TTaskMid tt=new TTaskMid();
+		tt.setTid(use.getTid());
+		tt.setStopStatus(0);
+		tTaskMidMapper.updateByTid(tt);
+		asyncUtils.addProjectSotpNotic(0, in.getType(),use.getTid().toString(),null);
+		return 1;
+	}
+
+	@Override
+	public Pagination<?> selectProjectStop(String orderNo, String userName, String depId, String contractNo, String projectName,
+										   Integer status,String startTime,String endTime,String receiverId, Integer pageNo, Integer pageSize) {
+		Map<String,Object>params =new HashMap<>();
+		if (orderNo!=null)params.put("orderNo",orderNo);
+		if (userName!=null)params.put("userName",userName);
+		if (depId!=null)params.put("depId",depId);
+		if (contractNo!=null)params.put("contractNo",contractNo);
+		if (projectName!=null)params.put("projectName",projectName);
+		if (status!=null)params.put("status",status);
+		if (startTime!=null)params.put("startTime",startTime);
+		if (endTime!=null)params.put("endTime",endTime+" 23:59:59");
+		if (receiverId!=null)params.put("receiverId",receiverId);
+		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+			params.put("shiro",0);
+		}else if (TokenManager.hasRole(AFTConstants.SALESMAN)||TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)){
+			params.put("shiro",1);
+			params.put("aid",TokenManager.getAdminId());
+		}else if (TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN)){
+			params.put("shiro",2);
+			params.put("deps",departmentService.selectMyDeps());
+		}else {
+			return new Pagination<>();
+		}
+		return findPage("selectProjectSotpList","selectProjectSotpCount",params,pageNo,pageSize);
+	}
+
+	@Override
+	public List<TaskStopLogBo> projectStopList(Integer taskStopId) {
+		List<TaskStopLogBo> list =taskStopLogMapper.selectListBySoptId(taskStopId);
+		return list;
+	}
+
+	@Override
+	public Object pushExamineProjectStop(InputTaskStopLog in) {
+		TaskStop use = taskStopMapper.selectByPrimaryKey(in.getTaskStopId());
+		TaskStop t=new TaskStop();
+		t.setId(use.getId());
+		TOrderTask task = tOrderTaskMapper.selectByPrimaryKey(use.getTid());
+		if (in.getStatus()==1){
+			t.setStatus(1);
+			StringBuffer str =new StringBuffer();
+			str.append("项目状态修改为:");
+			if (use.getType()==0){
+				task.setProjectStatus(NewProjectStatus.ZT.getCode());
+				str=str.append("已暂停");
+			}else {
+				task.setProjectStatus(NewProjectStatus.JXZ.getCode());
+				str=str.append("进行中");
+			}
+			TaskLog taskLog = new TaskLog();
+			taskLog.setStopId(in.getTaskStopId());
+			taskLog.setTaskId(use.getTid());
+			taskLog.setContent(str.toString());
+			taskLog.setAid(use.getCreateBy());
+			taskLogMapper.insertSelective(taskLog);
+			TOrderTask task2 =new TOrderTask();
+			task2.setId(task.getId());
+			task2.setProjectStatus(task.getProjectStatus());
+			tOrderTaskMapper.updateByPrimaryKeySelective(task2);
+			tOrderMidMapper.updateStopProjectByOrderNo(task.getOrderNo());
+			if (task.getSplitStatus()==1){
+				TOrderTask tot=new TOrderTask();
+				tot.setSplitSuper(task.getId());
+				tot.setProjectStatus(NewProjectStatus.ZT.getCode());
+				tOrderTaskMapper.updateBySuperId(tot);
+			}
+			updateMidServiceProject(task.getOrderNo());
+			examineProjectSotpAddNotice(task,1,use.getType());
+		}else if(in.getStatus()==2) {
+			t.setStatus(2);
+			examineProjectSotpAddNotice(task,2,use.getType());
+		}
+		TTaskMid tt=new TTaskMid();
+		tt.setTid(use.getTid());
+		tt.setStopStatus(in.getStatus());
+		tTaskMidMapper.updateByTid(tt);
+		TaskStopLog tsl=new TaskStopLog();
+		tsl.setTaskStopId(in.getTaskStopId());
+		tsl.setReason(in.getReason());
+		tsl.setStatus(in.getStatus());
+		tsl.setCreateTime(new Date());
+		tsl.setCreateBy(TokenManager.getAdminId());
+		taskStopLogMapper.insertSelective(tsl);
+		return taskStopMapper.updateByPrimaryKeySelective(t);
+	}
+
+	private void examineProjectSotpAddNotice(TOrderTask task,Integer status,Integer sotpType) {
+		asyncUtils.addProjectSotpNotic(status,sotpType,null,task);
+	}
+
 
 }

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java

@@ -62,6 +62,7 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		if(ps.getDeps()!=null)params.put("deps", departmentService.parseArray(ps.getDeps()));
 		if(ps.getThchDeps()!=null)params.put("thchDeps", departmentService.parseArray(ps.getThchDeps()));
 		if(ps.getProjectStatus()!=null)params.put("projectStatus", ps.getProjectStatus());
+		if(ps.getTaskProjectStatus()!=null)params.put("taskProjectStatus", ps.getTaskProjectStatus());
 		if(ps.getProjectType()!=null)params.put("projectType", ps.getProjectType());
 		if(ps.getOrderNo()!=null)params.put("orderNo", ps.getOrderNo());
 		if(ps.getContractNo()!=null)params.put("contractNo", ps.getContractNo());

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

@@ -52,7 +52,7 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.50
+static.host=//static.jishutao.com/1.2.53
 #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

@@ -49,7 +49,7 @@ yxjl_max=100
 
 amb.maxLvl=6
 
-static.host=//static.jishutao.com/1.2.50
+static.host=//static.jishutao.com/1.2.53
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload