Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 6 years ago
parent
commit
b6b8bad04a
28 changed files with 9319 additions and 8838 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 78 78
      src/main/java/com/goafanti/common/dao/TOrderOutsourceMapper.java
  3. 111 111
      src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java
  4. 102 99
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  5. 82 80
      src/main/java/com/goafanti/common/enums/OrderLogProcess.java
  6. 2 2
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  7. 562 511
      src/main/java/com/goafanti/common/mapper/TOrderOutsourceMapper.xml
  8. 1265 1240
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  9. 352 306
      src/main/java/com/goafanti/common/model/TOrderOutsource.java
  10. 1222 1102
      src/main/java/com/goafanti/common/model/TOrderOutsourceExample.java
  11. 884 861
      src/main/java/com/goafanti/common/model/TOrderTask.java
  12. 2609 2549
      src/main/java/com/goafanti/common/model/TOrderTaskExample.java
  13. 122 87
      src/main/java/com/goafanti/order/bo/OrderOutsourceBo.java
  14. 176 162
      src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java
  15. 69 62
      src/main/java/com/goafanti/order/bo/inuptTaskHoursListBo.java
  16. 218 218
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  17. 202 183
      src/main/java/com/goafanti/order/controller/OutsourceOrgApiController.java
  18. 201 199
      src/main/java/com/goafanti/order/service/OrderNewService.java
  19. 53 52
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  20. 34 34
      src/main/java/com/goafanti/order/service/OutsourceOrgService.java
  21. 13 5
      src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java
  22. 105 99
      src/main/java/com/goafanti/order/service/impl/OrderBillServiceImpl.java
  23. 21 5
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  24. 27 15
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  25. 626 620
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  26. 179 154
      src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java
  27. 2 2
      src/main/resources/props/config_local.properties
  28. 1 1
      src/main/resources/props/config_test.properties

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  />
-    <table schema="aft" tableName="t_order_new"/>
+    <table schema="aft" tableName="t_order_task"/>
   </context>
 </generatorConfiguration>

+ 78 - 78
src/main/java/com/goafanti/common/dao/TOrderOutsourceMapper.java

@@ -1,79 +1,79 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.TOrderOutsource;
-import com.goafanti.common.model.TOrderOutsourceExample;
-import com.goafanti.order.bo.OrderOutsourceDtails;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface TOrderOutsourceMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	long countByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int deleteByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int insert(TOrderOutsource record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int insertSelective(TOrderOutsource record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	List<TOrderOutsource> selectByExample(TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	TOrderOutsource selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") TOrderOutsource record,
-			@Param("example") TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int updateByExample(@Param("record") TOrderOutsource record, @Param("example") TOrderOutsourceExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int updateByPrimaryKeySelective(TOrderOutsource record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	int updateByPrimaryKey(TOrderOutsource record);
-
-	OrderOutsourceDtails selectByOrderNo(String orderNo);
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderOutsource;
+import com.goafanti.common.model.TOrderOutsourceExample;
+import com.goafanti.order.bo.OrderOutsourceDtails;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderOutsourceMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	long countByExample(TOrderOutsourceExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int deleteByExample(TOrderOutsourceExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int insert(TOrderOutsource record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int insertSelective(TOrderOutsource record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	List<TOrderOutsource> selectByExample(TOrderOutsourceExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	TOrderOutsource selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") TOrderOutsource record,
+			@Param("example") TOrderOutsourceExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int updateByExample(@Param("record") TOrderOutsource record, @Param("example") TOrderOutsourceExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int updateByPrimaryKeySelective(TOrderOutsource record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_outsource
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	int updateByPrimaryKey(TOrderOutsource record);
+
+	OrderOutsourceDtails selectByOrderNo( @Param("orderNo") String orderNo,@Param("tid")String tid);
 }

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

@@ -1,112 +1,112 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.TOrderTask;
-import com.goafanti.common.model.TOrderTaskExample;
-import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-
-import java.util.Collection;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface TOrderTaskMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	long countByExample(TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int deleteByExample(TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int insert(TOrderTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int insertSelective(TOrderTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	List<TOrderTask> selectByExampleWithBLOBs(TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	List<TOrderTask> selectByExample(TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	TOrderTask selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByExampleWithBLOBs(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByExample(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByPrimaryKeySelective(TOrderTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByPrimaryKeyWithBLOBs(TOrderTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
-	 * @mbg.generated  Wed Nov 20 10:18:39 CST 2019
-	 */
-	int updateByPrimaryKey(TOrderTask record);
-
-	List<TOrderTaskBo> selectOrderTask(String orderNo);
-
-	TOrderTaskDetailBo getOrderTaskDetail(String id);
-
-	TOrderTask selectBySuperId(String superId);
-	
-	List<TOrderTask> getReceiverByOid(String oid);
-
-	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId, @Param("type")Integer type);
-
-	String selectEstimateCost(String orderNo);
-
-	List<String> listNameByDepAndName(@Param("orderNo")String orderNo, @Param("type")Integer type);
-
-
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.TOrderTaskExample;
+import com.goafanti.order.bo.TOrderTaskBo;
+import com.goafanti.order.bo.TOrderTaskDetailBo;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderTaskMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	long countByExample(TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int deleteByExample(TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int insert(TOrderTask record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int insertSelective(TOrderTask record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	List<TOrderTask> selectByExampleWithBLOBs(TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	List<TOrderTask> selectByExample(TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	TOrderTask selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByExampleWithBLOBs(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByExample(@Param("record") TOrderTask record, @Param("example") TOrderTaskExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByPrimaryKeySelective(TOrderTask record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByPrimaryKeyWithBLOBs(TOrderTask record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_task
+	 * @mbg.generated  Thu Mar 05 14:35:19 CST 2020
+	 */
+	int updateByPrimaryKey(TOrderTask record);
+
+	List<TOrderTaskBo> selectOrderTask(String orderNo);
+
+	TOrderTaskDetailBo getOrderTaskDetail(String id);
+
+	TOrderTask selectBySuperId(String superId);
+	
+	List<TOrderTask> getReceiverByOid(String oid);
+
+	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId, @Param("type")Integer type);
+
+	String selectEstimateCost(String orderNo);
+
+	List<String> listNameByDepAndName(@Param("orderNo")String orderNo, @Param("type")Integer type);
+
+
 }

+ 102 - 99
src/main/java/com/goafanti/common/enums/NoticeStatus.java

@@ -1,99 +1,102 @@
-package com.goafanti.common.enums;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.goafanti.order.enums.OrderDunSubject;
-
-public enum NoticeStatus {
-	PATENTINFO(1, "专利申请管理"),
-	COGNIZANCE(2, "高企认定管理"),
-	COPYRIGHT(3, "软著申请管理"),
-	TECHPROJECT(4, "科技项目申报管理"),
-	PERSONALCERTIFY(5, "个人用户认证审核"),
-	ORGANIZATIONCERTIFY(6, "团体组织用户认证审核"),
-	CONTRACT(7, "合同管理"),
-	PERSONALDEMAND(8, "个人用户科技需求管理"),
-	ORGANIZATIONDEMAND(9, "团体组织用户需求管理"),
-	PERSONALACHIEVEMENTT(10, "个人用户科技需求管理"),
-	ORGANIZATIONACHIEVEMENT(11, "组织用户科技成果管理"),
-	ORDER_CHANGE_ADD(12,"订单变更信息添加"),
-	ORDER_CHANGE_UDPATE(13,"订单变更信息修改"),
-	ORDER_DUN(14,"订单催款信息"),
-	ORDER_BACK(15,"订单驳回信息"),
-	ORDER_REFUND(16,"订单退单同意信息"),
-	ORDER_BONUS(17,"奖金信息"),
-	ORDER_REFUND_REFUSE(18,"退单拒绝信息"),
-	ORDER_CHANGE_START(19,"订单变更发起"),
-	ORDER_CHANGE_YES(20,"订单变更通过"),
-	ORDER_CHANGE_NO(21,"订单变更驳回"),
-	ORDER_CHANGE_END(22,"订单变更完成"),
-	ORDER_INVPICE_START(23,"订单开票发起"),
-	ORDER_INVPICE_YES(24,"订单开票通过"),
-	ORDER_INVPICE_NO(25,"订单开票驳回"),
-	ORDER_INVPICE_APPROVA_YES(26,"订单开票特批通过"),
-	ORDER_INVPICE_APPROVA_NO(27,"订单开票特批驳回"),
-	ORDER_INVPICE_END(28,"订单开票完成"),
-	ORDER_START(29,"订单审核发起"),
-	ORDER_APPROVA_YES(30,"订单特批通过"),
-	ORDER_APPROVA_NO(31,"订单特批驳回"),
-	ORDER_OUTSOURCE_YES(32,"订单外包通过"),
-	ORDER_OUTSOURCE_NO(33,"订单外包驳回"),
-	ORDER_YES(34,"订单审核通过"),
-	ORDER_NO(35,"订单审核驳回"),
-	ORDER_TASK_TO(36,"项目任务分配"),
-	OTHER(0, "其他");
-
-	private NoticeStatus(Integer code, String desc) {
-		this.code = code;
-		this.desc = desc;
-	}
-
-	private static Map<Integer, NoticeStatus> status = new HashMap<Integer, NoticeStatus>();
-
-	static {
-		for (NoticeStatus value : NoticeStatus.values()) {
-			status.put(value.getCode(), value);
-		}
-	}
-	public static String getValueByCode(Integer code){
-        for(NoticeStatus oticeStatus:NoticeStatus.values()){
-            if(code.equals(oticeStatus.getCode())){
-                return oticeStatus.getDesc();
-            }
-        }
-        return  null;
-    }
-
-	public static NoticeStatus getStatus(Integer code) {
-		if (containsType(code)) {
-			return status.get(code);
-		}
-		return OTHER;
-	}
-
-	public static NoticeStatus getStatus(String code) {
-		if (StringUtils.isNumeric(code)) {
-			return getStatus(Integer.parseInt(code));
-		}
-		return OTHER;
-	}
-
-	public static boolean containsType(Integer code) {
-		return status.containsKey(code);
-	}
-
-	private Integer	code;
-	private String	desc;
-
-	public Integer getCode() {
-		return code;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-
-}
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.goafanti.order.enums.OrderDunSubject;
+
+public enum NoticeStatus {
+	PATENTINFO(1, "专利申请管理"),
+	COGNIZANCE(2, "高企认定管理"),
+	COPYRIGHT(3, "软著申请管理"),
+	TECHPROJECT(4, "科技项目申报管理"),
+	PERSONALCERTIFY(5, "个人用户认证审核"),
+	ORGANIZATIONCERTIFY(6, "团体组织用户认证审核"),
+	CONTRACT(7, "合同管理"),
+	PERSONALDEMAND(8, "个人用户科技需求管理"),
+	ORGANIZATIONDEMAND(9, "团体组织用户需求管理"),
+	PERSONALACHIEVEMENTT(10, "个人用户科技需求管理"),
+	ORGANIZATIONACHIEVEMENT(11, "组织用户科技成果管理"),
+	ORDER_CHANGE_ADD(12,"订单变更信息添加"),
+	ORDER_CHANGE_UDPATE(13,"订单变更信息修改"),
+	ORDER_DUN(14,"订单催款信息"),
+	ORDER_BACK(15,"订单驳回信息"),
+	ORDER_REFUND(16,"订单退单同意信息"),
+	ORDER_BONUS(17,"奖金信息"),
+	ORDER_REFUND_REFUSE(18,"退单拒绝信息"),
+	ORDER_CHANGE_START(19,"订单变更发起"),
+	ORDER_CHANGE_YES(20,"订单变更通过"),
+	ORDER_CHANGE_NO(21,"订单变更驳回"),
+	ORDER_CHANGE_END(22,"订单变更完成"),
+	ORDER_INVPICE_START(23,"订单开票发起"),
+	ORDER_INVPICE_YES(24,"订单开票通过"),
+	ORDER_INVPICE_NO(25,"订单开票驳回"),
+	ORDER_INVPICE_APPROVA_YES(26,"订单开票特批通过"),
+	ORDER_INVPICE_APPROVA_NO(27,"订单开票特批驳回"),
+	ORDER_INVPICE_END(28,"订单开票完成"),
+	ORDER_START(29,"订单审核发起"),
+	ORDER_APPROVA_YES(30,"订单特批通过"),
+	ORDER_APPROVA_NO(31,"订单特批驳回"),
+	ORDER_OUTSOURCE_YES(32,"订单外包通过"),
+	ORDER_OUTSOURCE_NO(33,"订单外包驳回"),
+	ORDER_YES(34,"订单审核通过"),
+	ORDER_NO(35,"订单审核驳回"),
+	ORDER_TASK_TO(36,"项目任务分配"),
+	PROJECT_OUTSOURCE_START(37,"项目外包发起"),
+	PROJECT_OUTSOURCE_YES(38,"项目外包通过"),
+	PROJECT_OUTSOURCE_NO(39,"项目外包拒绝"),
+	OTHER(0, "其他");
+
+	private NoticeStatus(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, NoticeStatus> status = new HashMap<Integer, NoticeStatus>();
+
+	static {
+		for (NoticeStatus value : NoticeStatus.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static String getValueByCode(Integer code){
+        for(NoticeStatus oticeStatus:NoticeStatus.values()){
+            if(code.equals(oticeStatus.getCode())){
+                return oticeStatus.getDesc();
+            }
+        }
+        return  null;
+    }
+
+	public static NoticeStatus getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static NoticeStatus getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

+ 82 - 80
src/main/java/com/goafanti/common/enums/OrderLogProcess.java

@@ -1,80 +1,82 @@
-package com.goafanti.common.enums;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.goafanti.order.enums.OrderNewState;
-
-public enum OrderLogProcess {
-//	流程 0发起退单 1提交 2审核 3驳回  4特批 5财务派单 6财务首付 7项目订单派单 8项目派单 9项目完成 10 退单完成 11财务全款 12发起外包 13外包通过 14外包拒绝
-	TJ(1, "营销员提交"),
-	SH(2, "管理员审核"),
-	BH(3, "驳回"),
-	TP(4, "特批通过"),
-	CWPD(5, "财务派单"),
-	CWSF(6, "财务首付"),
-	XMDDPD(7, "项目订单派单"),
-	XMPD(8, "项目派单"),
-	XMWC(9, "项目完成"),
-	FQTD(0,"发起退单"),
-	WCTD(10,"退单完成"),
-	CWQK(11,"财务全款"),
-	FQWB(12,"发起外包"),
-	WBSH(13,"外包审核通过"),
-	WBBH(14,"外包审核驳回"),
-	NOT(99,"未知"),
-	;
-	
-	private OrderLogProcess(Integer code, String desc) {
-		this.code = code;
-		this.desc = desc;
-	}
-
-	private static Map<Integer, OrderLogProcess> status = new HashMap<Integer, OrderLogProcess>();
-
-	static {
-		for (OrderLogProcess value : OrderLogProcess.values()) {
-			status.put(value.getCode(), value);
-		}
-	}
-	public static String getValueByCode(Integer code){
-        for(OrderLogProcess orderLogProcess:OrderLogProcess.values()){
-            if(code.equals(orderLogProcess.getCode())){
-                return orderLogProcess.getDesc();
-            }
-        }
-        return  NOT.getDesc();
-    }
-	
-	
-	public static OrderLogProcess getStatus(Integer code) {
-		if (containsType(code)) {
-			return status.get(code);
-		}
-		return null;
-	}
-
-	public static OrderLogProcess getStatus(String code) {
-		if (StringUtils.isNumeric(code)) {
-			return getStatus(Integer.parseInt(code));
-		}
-		return null;
-	}
-
-	public static boolean containsType(Integer code) {
-		return status.containsKey(code);
-	}
-
-	private Integer	code;
-	private String	desc;
-
-	public Integer getCode() {
-		return code;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-}
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.goafanti.order.enums.OrderNewState;
+
+public enum OrderLogProcess {
+//	流程 0发起退单 1提交 2审核 3驳回  4特批 5财务派单 6财务首付 7项目订单派单 8项目派单 9项目完成 10 退单完成 11财务全款 12发起外包 13外包通过 14外包拒绝
+	TJ(1, "营销员提交"),
+	SH(2, "管理员审核"),
+	BH(3, "驳回"),
+	TP(4, "特批通过"),
+	CWPD(5, "财务派单"),
+	CWSF(6, "财务首付"),
+	XMDDPD(7, "项目订单派单"),
+	XMPD(8, "项目派单"),
+	XMWC(9, "项目完成"),
+	FQTD(0,"发起退单"),
+	WCTD(10,"退单完成"),
+	CWQK(11,"财务全款"),
+	FQWB(12,"发起外包"),
+	WBTG(13,"订单外包通过"),
+	WBBH(14,"订单外包驳回"),
+	XMWBTG(15,"项目外包通过"),
+	XMWBBH(16,"项目外包驳回"),
+	NOT(99,"未知"),
+	;
+	
+	private OrderLogProcess(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, OrderLogProcess> status = new HashMap<Integer, OrderLogProcess>();
+
+	static {
+		for (OrderLogProcess value : OrderLogProcess.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static String getValueByCode(Integer code){
+        for(OrderLogProcess orderLogProcess:OrderLogProcess.values()){
+            if(code.equals(orderLogProcess.getCode())){
+                return orderLogProcess.getDesc();
+            }
+        }
+        return  NOT.getDesc();
+    }
+	
+	
+	public static OrderLogProcess getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return null;
+	}
+
+	public static OrderLogProcess getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return null;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

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

@@ -1123,7 +1123,7 @@
 	too.company_name as outsourceName, 0 as companyId, d.name as departmentName, a.final_receivables finalReceivables ,
 	date_format(a.`final_Receivables_time`, '%Y-%m-%d %H:%i:%s')finalReceivablesTime,a.invoice_amount invoiceAmount from t_order_new o 
 left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no 
-left join t_order_outsource too on o.order_no=too.order_no where delete_sign != 1 and (approval = 0 or approval = 2) 
+left join t_order_outsource too on o.order_no=too.order_no where delete_sign != 1 and approval !=3 
 	and outsource=  #{o.outsource,jdbcType=INTEGER}	
   	 	<if test="o.processStatus == 3">
 	  	and o.process_status = #{o.processStatus,jdbcType=INTEGER}
@@ -1192,7 +1192,7 @@ left join t_order_outsource too on o.order_no=too.order_no where delete_sign !=
   <select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
  select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id  
 left join department d on o.order_dep = d.id   left join t_order_mid a on o.order_no=a.order_no
- where delete_sign != 1 and (approval = 0 or approval = 2) and outsource=  #{o.outsource,jdbcType=INTEGER}
+ where delete_sign != 1 and approval !=3 and outsource=  #{o.outsource,jdbcType=INTEGER}
   	 	<if test="o.processStatus == 3">
 	  	and o.process_status = #{o.processStatus,jdbcType=INTEGER}
 	  	</if>

File diff suppressed because it is too large
+ 562 - 511
src/main/java/com/goafanti/common/mapper/TOrderOutsourceMapper.xml


File diff suppressed because it is too large
+ 1265 - 1240
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml


+ 352 - 306
src/main/java/com/goafanti/common/model/TOrderOutsource.java

@@ -1,307 +1,353 @@
-package com.goafanti.common.model;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-public class TOrderOutsource {
-
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.id
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.order_no
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String orderNo;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.refund_status
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private Integer refundStatus;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.create_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String remarks;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.attachment_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String attachmentUrl;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.picture_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String pictureUrl;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.amount
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private BigDecimal amount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.company_name
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String companyName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.audit_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private Date auditTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_price
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private BigDecimal unitPrice;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_number
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private Integer unitNumber;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.outsource_remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	private String outsourceRemarks;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.id
-	 * @return  the value of t_order_outsource.id
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.id
-	 * @param id  the value for t_order_outsource.id
-	 * @mbg.generated  Mon Aug 12 10:26:36 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 t_order_outsource.order_no
-	 * @return  the value of t_order_outsource.order_no
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getOrderNo() {
-		return orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.order_no
-	 * @param orderNo  the value for t_order_outsource.order_no
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.refund_status
-	 * @return  the value of t_order_outsource.refund_status
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public Integer getRefundStatus() {
-		return refundStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.refund_status
-	 * @param refundStatus  the value for t_order_outsource.refund_status
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setRefundStatus(Integer refundStatus) {
-		this.refundStatus = refundStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.create_time
-	 * @return  the value of t_order_outsource.create_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.create_time
-	 * @param createTime  the value for t_order_outsource.create_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 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 t_order_outsource.remarks
-	 * @return  the value of t_order_outsource.remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getRemarks() {
-		return remarks;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.remarks
-	 * @param remarks  the value for t_order_outsource.remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setRemarks(String remarks) {
-		this.remarks = remarks;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.attachment_url
-	 * @return  the value of t_order_outsource.attachment_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getAttachmentUrl() {
-		return attachmentUrl;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.attachment_url
-	 * @param attachmentUrl  the value for t_order_outsource.attachment_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setAttachmentUrl(String attachmentUrl) {
-		this.attachmentUrl = attachmentUrl;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.picture_url
-	 * @return  the value of t_order_outsource.picture_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getPictureUrl() {
-		return pictureUrl;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.picture_url
-	 * @param pictureUrl  the value for t_order_outsource.picture_url
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setPictureUrl(String pictureUrl) {
-		this.pictureUrl = pictureUrl;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.amount
-	 * @return  the value of t_order_outsource.amount
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public BigDecimal getAmount() {
-		return amount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.amount
-	 * @param amount  the value for t_order_outsource.amount
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setAmount(BigDecimal amount) {
-		this.amount = amount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.company_name
-	 * @return  the value of t_order_outsource.company_name
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getCompanyName() {
-		return companyName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.company_name
-	 * @param companyName  the value for t_order_outsource.company_name
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setCompanyName(String companyName) {
-		this.companyName = companyName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.audit_time
-	 * @return  the value of t_order_outsource.audit_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public Date getAuditTime() {
-		return auditTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.audit_time
-	 * @param auditTime  the value for t_order_outsource.audit_time
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setAuditTime(Date auditTime) {
-		this.auditTime = auditTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_price
-	 * @return  the value of t_order_outsource.unit_price
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public BigDecimal getUnitPrice() {
-		return unitPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_price
-	 * @param unitPrice  the value for t_order_outsource.unit_price
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setUnitPrice(BigDecimal unitPrice) {
-		this.unitPrice = unitPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_number
-	 * @return  the value of t_order_outsource.unit_number
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public Integer getUnitNumber() {
-		return unitNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_number
-	 * @param unitNumber  the value for t_order_outsource.unit_number
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setUnitNumber(Integer unitNumber) {
-		this.unitNumber = unitNumber;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.outsource_remarks
-	 * @return  the value of t_order_outsource.outsource_remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public String getOutsourceRemarks() {
-		return outsourceRemarks;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.outsource_remarks
-	 * @param outsourceRemarks  the value for t_order_outsource.outsource_remarks
-	 * @mbg.generated  Mon Aug 12 10:26:36 CST 2019
-	 */
-	public void setOutsourceRemarks(String outsourceRemarks) {
-		this.outsourceRemarks = outsourceRemarks;
-	}
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class TOrderOutsource {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.id
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.order_no
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.refund_status
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Integer refundStatus;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.create_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String remarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.attachment_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String attachmentUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.picture_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String pictureUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.amount
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private BigDecimal amount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.company_name
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String companyName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.audit_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Date auditTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_price
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private BigDecimal unitPrice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.unit_number
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Integer unitNumber;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.outsource_remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private String outsourceRemarks;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.type
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_outsource.tid
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	private Integer tid;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.id
+	 * @return  the value of t_order_outsource.id
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.id
+	 * @param id  the value for t_order_outsource.id
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.order_no
+	 * @return  the value of t_order_outsource.order_no
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.order_no
+	 * @param orderNo  the value for t_order_outsource.order_no
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.refund_status
+	 * @return  the value of t_order_outsource.refund_status
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Integer getRefundStatus() {
+		return refundStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.refund_status
+	 * @param refundStatus  the value for t_order_outsource.refund_status
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setRefundStatus(Integer refundStatus) {
+		this.refundStatus = refundStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.create_time
+	 * @return  the value of t_order_outsource.create_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.create_time
+	 * @param createTime  the value for t_order_outsource.create_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.remarks
+	 * @return  the value of t_order_outsource.remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getRemarks() {
+		return remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.remarks
+	 * @param remarks  the value for t_order_outsource.remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setRemarks(String remarks) {
+		this.remarks = remarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.attachment_url
+	 * @return  the value of t_order_outsource.attachment_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getAttachmentUrl() {
+		return attachmentUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.attachment_url
+	 * @param attachmentUrl  the value for t_order_outsource.attachment_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setAttachmentUrl(String attachmentUrl) {
+		this.attachmentUrl = attachmentUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.picture_url
+	 * @return  the value of t_order_outsource.picture_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getPictureUrl() {
+		return pictureUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.picture_url
+	 * @param pictureUrl  the value for t_order_outsource.picture_url
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setPictureUrl(String pictureUrl) {
+		this.pictureUrl = pictureUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.amount
+	 * @return  the value of t_order_outsource.amount
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public BigDecimal getAmount() {
+		return amount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.amount
+	 * @param amount  the value for t_order_outsource.amount
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setAmount(BigDecimal amount) {
+		this.amount = amount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.company_name
+	 * @return  the value of t_order_outsource.company_name
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getCompanyName() {
+		return companyName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.company_name
+	 * @param companyName  the value for t_order_outsource.company_name
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setCompanyName(String companyName) {
+		this.companyName = companyName;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.audit_time
+	 * @return  the value of t_order_outsource.audit_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Date getAuditTime() {
+		return auditTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.audit_time
+	 * @param auditTime  the value for t_order_outsource.audit_time
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setAuditTime(Date auditTime) {
+		this.auditTime = auditTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_price
+	 * @return  the value of t_order_outsource.unit_price
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public BigDecimal getUnitPrice() {
+		return unitPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_price
+	 * @param unitPrice  the value for t_order_outsource.unit_price
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setUnitPrice(BigDecimal unitPrice) {
+		this.unitPrice = unitPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.unit_number
+	 * @return  the value of t_order_outsource.unit_number
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Integer getUnitNumber() {
+		return unitNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.unit_number
+	 * @param unitNumber  the value for t_order_outsource.unit_number
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setUnitNumber(Integer unitNumber) {
+		this.unitNumber = unitNumber;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.outsource_remarks
+	 * @return  the value of t_order_outsource.outsource_remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public String getOutsourceRemarks() {
+		return outsourceRemarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.outsource_remarks
+	 * @param outsourceRemarks  the value for t_order_outsource.outsource_remarks
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setOutsourceRemarks(String outsourceRemarks) {
+		this.outsourceRemarks = outsourceRemarks;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.type
+	 * @return  the value of t_order_outsource.type
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.type
+	 * @param type  the value for t_order_outsource.type
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_outsource.tid
+	 * @return  the value of t_order_outsource.tid
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public Integer getTid() {
+		return tid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_outsource.tid
+	 * @param tid  the value for t_order_outsource.tid
+	 * @mbg.generated  Wed Mar 04 11:31:18 CST 2020
+	 */
+	public void setTid(Integer tid) {
+		this.tid = tid;
+	}
 }

File diff suppressed because it is too large
+ 1222 - 1102
src/main/java/com/goafanti/common/model/TOrderOutsourceExample.java


File diff suppressed because it is too large
+ 884 - 861
src/main/java/com/goafanti/common/model/TOrderTask.java


File diff suppressed because it is too large
+ 2609 - 2549
src/main/java/com/goafanti/common/model/TOrderTaskExample.java


+ 122 - 87
src/main/java/com/goafanti/order/bo/OrderOutsourceBo.java

@@ -1,87 +1,122 @@
-package com.goafanti.order.bo;
-
-
-public class OrderOutsourceBo  {
-	private String orderNo;
-	private String contractNo;
-	private String createTime;
-	private String signTime;
-	private String userName;
-	private String depName;
-	private String totalAmount;
-	private String adminName;
-	private String financeName;
-	private Integer liquidationStatus;
-	private Integer refundStatus;
-	
-	
-	public String getOrderNo() {
-		return orderNo;
-	}
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-	public String getContractNo() {
-		return contractNo;
-	}
-	public void setContractNo(String contractNo) {
-		this.contractNo = contractNo;
-	}
-
-	public String getSignTime() {
-		return signTime;
-	}
-	public void setSignTime(String signTime) {
-		this.signTime = signTime;
-	}
-	public String getUserName() {
-		return userName;
-	}
-	public void setUserName(String userName) {
-		this.userName = userName;
-	}
-	public String getDepName() {
-		return depName;
-	}
-	public void setDepName(String depName) {
-		this.depName = depName;
-	}
-	public String getTotalAmount() {
-		return totalAmount;
-	}
-	public void setTotalAmount(String totalAmount) {
-		this.totalAmount = totalAmount;
-	}
-	public String getAdminName() {
-		return adminName;
-	}
-	public void setAdminName(String adminName) {
-		this.adminName = adminName;
-	}
-	public String getFinanceName() {
-		if(financeName==null)return "";
-		return financeName;
-	}
-	public void setFinanceName(String financeName) {
-		this.financeName = financeName;
-	}
-	public Integer getLiquidationStatus() {
-		return liquidationStatus;
-	}
-	public void setLiquidationStatus(Integer liquidationStatus) {
-		this.liquidationStatus = liquidationStatus;
-	}
-	public Integer getRefundStatus() {
-		return refundStatus;
-	}
-	public void setRefundStatus(Integer refundStatus) {
-		this.refundStatus = refundStatus;
-	}
-	public String getCreateTime() {
-		return createTime;
-	}
-	public void setCreateTime(String createTime) {
-		this.createTime = createTime;
-	}
-	
-}
+package com.goafanti.order.bo;
+
+
+public class OrderOutsourceBo  {
+	private String orderNo;
+	private String contractNo;
+	private String createTime;
+	private String signTime;
+	private String userName;
+	private String depName;
+	private String totalAmount;
+	private String adminName;
+	private String financeName;
+	private Integer liquidationStatus;
+	private Integer refundStatus;
+	private Integer type;
+	private Integer tid;
+	private String cname;
+	private String pname;
+	private String bname;
+	
+	
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getContractNo() {
+		return contractNo;
+	}
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+
+	public String getSignTime() {
+		return signTime;
+	}
+	public void setSignTime(String signTime) {
+		this.signTime = signTime;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getDepName() {
+		return depName;
+	}
+	public void setDepName(String depName) {
+		this.depName = depName;
+	}
+	public String getTotalAmount() {
+		return totalAmount;
+	}
+	public void setTotalAmount(String totalAmount) {
+		this.totalAmount = totalAmount;
+	}
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+	public String getFinanceName() {
+		if(financeName==null)return "";
+		return financeName;
+	}
+	public void setFinanceName(String financeName) {
+		this.financeName = financeName;
+	}
+	public Integer getLiquidationStatus() {
+		return liquidationStatus;
+	}
+	public void setLiquidationStatus(Integer liquidationStatus) {
+		this.liquidationStatus = liquidationStatus;
+	}
+	public Integer getRefundStatus() {
+		return refundStatus;
+	}
+	public void setRefundStatus(Integer refundStatus) {
+		this.refundStatus = refundStatus;
+	}
+	public String getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	public Integer getTid() {
+		return tid;
+	}
+	public void setTid(Integer tid) {
+		this.tid = tid;
+	}
+	public String getCname() {
+		return cname;
+	}
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+	public String getPname() {
+		return pname;
+	}
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+	public String getBname() {
+		return bname;
+	}
+	public void setBname(String bname) {
+		this.bname = bname;
+	}
+	
+}

+ 176 - 162
src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java

@@ -1,162 +1,176 @@
-package com.goafanti.order.bo;
-
-import java.math.BigDecimal;
-
-public class TOrderTaskListBo {
-	private String id;
-	private String taskName;
-	private String orderNo;
-	private String userName;
-	private String cname;
-	private String receiverName;
-	private Integer projectStatus;
-	private Integer taskStatus;
-	private String taskDate;
-	private Integer commodityQuantity;
-	private BigDecimal commodityPrice;
-	private Double hours;
-	private String depName;
-	private String contractNo;
-	private String creteTime;
-	private String signTime;
-	private Integer alreadyNumber;
-	private String salesmanName;
-	private String taskDistributionTime;
-	private String taskEndTime;
-	private Integer approval;
-	/** 外包部门 */
-	private String outsourceName;
-	public String getContractNo() {
-		return contractNo;
-	}
-	public void setContractNo(String contractNo) {
-		this.contractNo = contractNo;
-	}
-	public String getCreteTime() {
-		return creteTime;
-	}
-	public void setCreteTime(String creteTime) {
-		this.creteTime = creteTime;
-	}
-	public String getSignTime() {
-		return signTime;
-	}
-	public void setSignTime(String signTime) {
-		this.signTime = signTime;
-	}
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public String getTaskName() {
-		return taskName;
-	}
-	public void setTaskName(String taskName) {
-		this.taskName = taskName;
-	}
-	public String getOrderNo() {
-		return orderNo;
-	}
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-	public String getCname() {
-		return cname;
-	}
-	public void setCname(String cname) {
-		this.cname = cname;
-	}
-	public String getReceiverName() {
-		return receiverName;
-	}
-	public void setReceiverName(String receiverName) {
-		this.receiverName = receiverName;
-	}
-	public Integer getProjectStatus() {
-		return projectStatus;
-	}
-	public void setProjectStatus(Integer projectStatus) {
-		this.projectStatus = projectStatus;
-	}
-	public Integer getTaskStatus() {
-		return taskStatus;
-	}
-	public void setTaskStatus(Integer taskStatus) {
-		this.taskStatus = taskStatus;
-	}
-	public String getTaskDate() {
-		return taskDate;
-	}
-	public void setTaskDate(String taskDate) {
-		this.taskDate = taskDate;
-	}
-	public Integer getCommodityQuantity() {
-		return commodityQuantity;
-	}
-	public void setCommodityQuantity(Integer commodityQuantity) {
-		this.commodityQuantity = commodityQuantity;
-	}
-	public String getUserName() {
-		return userName;
-	}
-	public void setUserName(String userName) {
-		this.userName = userName;
-	}
-	public Double getHours() {
-		return hours;
-	}
-	public void setHours(Double hours) {
-		this.hours = hours;
-	}
-	public String getDepName() {
-		return depName;
-	}
-	public void setDepName(String depName) {
-		this.depName = depName;
-	}
-	public Integer getAlreadyNumber() {
-		return alreadyNumber;
-	}
-	public void setAlreadyNumber(Integer alreadyNumber) {
-		this.alreadyNumber = alreadyNumber;
-	}
-	public String getOutsourceName() {
-		return outsourceName;
-	}
-	public void setOutsourceName(String outsourceName) {
-		this.outsourceName = outsourceName;
-	}
-	public String getTaskDistributionTime() {
-		return taskDistributionTime;
-	}
-	public void setTaskDistributionTime(String taskDistributionTime) {
-		this.taskDistributionTime = taskDistributionTime;
-	}
-	public String getTaskEndTime() {
-		return taskEndTime;
-	}
-	public void setTaskEndTime(String taskEndTime) {
-		this.taskEndTime = taskEndTime;
-	}
-	public BigDecimal getCommodityPrice() {
-		return commodityPrice;
-	}
-	public void setCommodityPrice(BigDecimal commodityPrice) {
-		this.commodityPrice = commodityPrice;
-	}
-	public String getSalesmanName() {
-		return salesmanName;
-	}
-	public void setSalesmanName(String salesmanName) {
-		this.salesmanName = salesmanName;
-	}
-	public Integer getApproval() {
-		return approval;
-	}
-	public void setApproval(Integer approval) {
-		this.approval = approval;
-	}
-	
-}
+package com.goafanti.order.bo;
+
+import java.math.BigDecimal;
+
+public class TOrderTaskListBo {
+	private String id;
+	private String taskName;
+	private String orderNo;
+	private String userName;
+	private String cname;
+	private String receiverName;
+	private Integer projectStatus;
+	private Integer taskStatus;
+	private String taskDate;
+	private Integer commodityQuantity;
+	private BigDecimal commodityPrice;
+	private Double hours;
+	private String depName;
+	private String contractNo;
+	private String creteTime;
+	private String signTime;
+	private Integer alreadyNumber;
+	private String salesmanName;
+	private String taskDistributionTime;
+	private String taskEndTime;
+	private Integer approval;
+	private Integer outsource;
+	/** 外包部门 */
+	private String outsourceName;
+	private Integer outsourceStatus;
+	public String getContractNo() {
+		return contractNo;
+	}
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+	public String getCreteTime() {
+		return creteTime;
+	}
+	public void setCreteTime(String creteTime) {
+		this.creteTime = creteTime;
+	}
+	public String getSignTime() {
+		return signTime;
+	}
+	public void setSignTime(String signTime) {
+		this.signTime = signTime;
+	}
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getTaskName() {
+		return taskName;
+	}
+	public void setTaskName(String taskName) {
+		this.taskName = taskName;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getCname() {
+		return cname;
+	}
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+	public String getReceiverName() {
+		return receiverName;
+	}
+	public void setReceiverName(String receiverName) {
+		this.receiverName = receiverName;
+	}
+	public Integer getProjectStatus() {
+		return projectStatus;
+	}
+	public void setProjectStatus(Integer projectStatus) {
+		this.projectStatus = projectStatus;
+	}
+	public Integer getTaskStatus() {
+		return taskStatus;
+	}
+	public void setTaskStatus(Integer taskStatus) {
+		this.taskStatus = taskStatus;
+	}
+	public String getTaskDate() {
+		return taskDate;
+	}
+	public void setTaskDate(String taskDate) {
+		this.taskDate = taskDate;
+	}
+	public Integer getCommodityQuantity() {
+		return commodityQuantity;
+	}
+	public void setCommodityQuantity(Integer commodityQuantity) {
+		this.commodityQuantity = commodityQuantity;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public Double getHours() {
+		return hours;
+	}
+	public void setHours(Double hours) {
+		this.hours = hours;
+	}
+	public String getDepName() {
+		return depName;
+	}
+	public void setDepName(String depName) {
+		this.depName = depName;
+	}
+	public Integer getAlreadyNumber() {
+		return alreadyNumber;
+	}
+	public void setAlreadyNumber(Integer alreadyNumber) {
+		this.alreadyNumber = alreadyNumber;
+	}
+	public String getOutsourceName() {
+		return outsourceName;
+	}
+	public void setOutsourceName(String outsourceName) {
+		this.outsourceName = outsourceName;
+	}
+	public String getTaskDistributionTime() {
+		return taskDistributionTime;
+	}
+	public void setTaskDistributionTime(String taskDistributionTime) {
+		this.taskDistributionTime = taskDistributionTime;
+	}
+	public String getTaskEndTime() {
+		return taskEndTime;
+	}
+	public void setTaskEndTime(String taskEndTime) {
+		this.taskEndTime = taskEndTime;
+	}
+	public BigDecimal getCommodityPrice() {
+		return commodityPrice;
+	}
+	public void setCommodityPrice(BigDecimal commodityPrice) {
+		this.commodityPrice = commodityPrice;
+	}
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
+	public Integer getApproval() {
+		return approval;
+	}
+	public void setApproval(Integer approval) {
+		this.approval = approval;
+	}
+	public Integer getOutsource() {
+		return outsource;
+	}
+	public void setOutsource(Integer outsource) {
+		this.outsource = outsource;
+	}
+	public Integer getOutsourceStatus() {
+		return outsourceStatus;
+	}
+	public void setOutsourceStatus(Integer outsourceStatus) {
+		this.outsourceStatus = outsourceStatus;
+	}
+	
+}

+ 69 - 62
src/main/java/com/goafanti/order/bo/inuptTaskHoursListBo.java

@@ -1,62 +1,69 @@
-package com.goafanti.order.bo;
-
-
-public class inuptTaskHoursListBo {
-	private String name;
-	private String orderNo;
-	private String taskId;
-	private String starTime;
-	private String endTime; 
-	private String cid;
-	private String depId;
-	private String contractNo;
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getOrderNo() {
-		return orderNo;
-	}
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-	public String getTaskId() {
-		return taskId;
-	}
-	public void setTaskId(String taskId) {
-		this.taskId = taskId;
-	}
-	public String getStarTime() {
-		return starTime;
-	}
-	public void setStarTime(String starTime) {
-		this.starTime = starTime;
-	}
-	public String getEndTime() {
-		return endTime;
-	}
-	public void setEndTime(String endTime) {
-		this.endTime = endTime;
-	}
-	public String getCid() {
-		return cid;
-	}
-	public void setCid(String cid) {
-		this.cid = cid;
-	}
-	public String getDepId() {
-		return depId;
-	}
-	public void setDepId(String depId) {
-		this.depId = depId;
-	}
-	public String getContractNo() {
-		return contractNo;
-	}
-	public void setContractNo(String contractNo) {
-		this.contractNo = contractNo;
-	}
-	
-}
+package com.goafanti.order.bo;
+
+
+public class inuptTaskHoursListBo {
+	private String name;
+	private String orderNo;
+	private String taskId;
+	private String starTime;
+	private String endTime; 
+	private String cid;
+	private String depId;
+	private String contractNo;
+	private Integer outsource;
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getTaskId() {
+		return taskId;
+	}
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+	public String getStarTime() {
+		return starTime;
+	}
+	public void setStarTime(String starTime) {
+		this.starTime = starTime;
+	}
+	public String getEndTime() {
+		return endTime;
+	}
+	public void setEndTime(String endTime) {
+		this.endTime = endTime;
+	}
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getDepId() {
+		return depId;
+	}
+	public void setDepId(String depId) {
+		this.depId = depId;
+	}
+	public String getContractNo() {
+		return contractNo;
+	}
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+	public Integer getOutsource() {
+		return outsource;
+	}
+	public void setOutsource(Integer outsource) {
+		this.outsource = outsource;
+	}
+	
+}

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

@@ -1,218 +1,218 @@
-package com.goafanti.order.controller;
-
-
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.model.TTaskHours;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-import com.goafanti.order.bo.TaskProgressBo;
-import com.goafanti.order.bo.inuptTaskHoursListBo;
-import com.goafanti.order.service.OrderProjectService;
-
-@RestController
-@RequestMapping(value = "/api/admin/orderProject")
-public class OrderProjectApiController extends CertifyApiController {
-	
-	@Autowired
-	
-	private OrderProjectService	orderProjectService;
-	
-	/**
-	 * 项目分配
-	 * taskId 项目ID
-	 * taskReceiverId 受理人ID
-	 * specially 0 任务派单(咨询师经理派单) 1项目派单(咨询师管理员派单)2咨询师退回给经理
-	 */
-	@RequestMapping(value = "/projectDistribution", method = RequestMethod.POST)
-	public Result projectDistribution(Integer taskId,String taskReceiverId,Integer specially ,String remarks){
-		Result res = new Result();
-		if(null==taskId || StringUtils.isBlank(taskReceiverId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "任务编号和受理人"));
-			return res;
-		}
-		res.setData(orderProjectService.updateProjectDistribution( taskId, taskReceiverId,specially,remarks));
-		return res;
-	}
-	
-	/**
-	 * 任务派单列表
-	 */
-	@RequestMapping(value="/orderTaskList" ,method = RequestMethod.GET)
-	public Result orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
-			String contractNo,Integer projectStatus ,Integer approval,Integer pageNo,Integer pageSize,Integer outsource){
-		Result res=new Result();
-		res.setData(orderProjectService.orderTaskList( name, orderNo, taskId, taskStatus, adminName,specially ,  depId,contractNo, 
-				projectStatus,approval,pageNo, pageSize, outsource));
-		return res;
-	}
-	
-	
-	/**
-	 * 任务派单查询
-	 */
-	@RequestMapping(value="/selectTaskList" ,method = RequestMethod.GET)
-	public Result selectTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially  ,String depId  ,Integer pageNo,Integer pageSize){
-		Result res=new Result();
-		res.setData(orderProjectService.selectTaskList( name, orderNo, taskId, taskStatus, adminName,specially ,  depId  ,pageNo, pageSize));
-		return res;
-	}
-	/**
-	 * 任务详情
-	 */
-	@RequestMapping(value="/orderTaskDetail" ,method = RequestMethod.GET)
-	public Result orderTaskDetail(String id){
-		Result res=new Result();
-		res.setData(orderProjectService.orderTaskDetail(id));
-		return res;
-	}
-	/**
-	 * 任务修改
-	 */
-	@RequestMapping(value="/updateOrderTask" ,method = RequestMethod.POST)
-	public Result updateOrderTask(TOrderTaskDetailBo t){
-		Result res=new Result();
-		res.setData(orderProjectService.updateOrderTask(t));
-		return res;
-	}
-	/**
-	 * 添加工时
-	 */
-	@RequestMapping(value="/addTaskHours" ,method = RequestMethod.POST)
-	public Result addTaskHours(TTaskHours t,String taskDate){
-		Result res=new Result();
-		if (t.getHours()==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "任务时间"));
-			return res;
-		}
-		if (StringUtils.isBlank(taskDate)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作日期"));
-			return res;
-		}
-		if (StringUtils.isBlank(t.getRemarks())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作内容"));
-			return res;
-		}
-		if (StringUtils.isNotBlank(taskDate)) {
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-			try {
-				t.setTaskDay(sdf.parse(taskDate));
-			} catch (ParseException e) {
-				e.printStackTrace();
-			}
-		}
-		res.setData(orderProjectService.addTaskHours(t));
-		return res;
-	}
-	/**
-	 * 任务工时列表
-	 */
-	@RequestMapping(value="/taskHoursList" ,method = RequestMethod.GET)
-	public Result taskHoursList(inuptTaskHoursListBo ib,
-			Integer pageNo, Integer pageSize){
-		Result res=new Result();
-		res.setData(orderProjectService.taskHoursList(ib,pageNo, pageSize));
-		return res;
-	}
-	/**
-	 * 任务工时详情列表
-	 */
-	@RequestMapping(value="/taskHoursDetailsList" ,method = RequestMethod.GET)
-	public Result taskHoursDetailsList( String taskId ){
-		Result res=new Result();
-		if (StringUtils.isBlank(taskId)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "项目编号"));
-			return res;
-		}
-		res.setData(orderProjectService.taskHoursDetailsList(taskId));
-		return res;
-	}
-	
-	
-	/**
-	 * 任务操作日志
-	 */
-	@RequestMapping(value="/TaskLogList" ,method = RequestMethod.GET)
-	public Result TaskLogList(Integer id){
-		Result res=new Result();
-		res.setData(orderProjectService.TaskLogList(id));
-		return res;
-	}
-	/** 任务文件上传 **/
-	@RequestMapping(value = "/uploadOrderTaskFile", method = RequestMethod.POST)
-	public Result uploadOrderTaskFile(HttpServletRequest req,String sign){
-		Result res = new Result();
-		res.setData(handleFile(res, "/order_task_file/", false, req, sign));
-		return res;
-	}
-	/**
-	 * 	新增项目申报进度
-	 */
-	@RequestMapping(value="/createTaskProgress" ,method = RequestMethod.POST)
-	public Result createTaskProgress(TaskProgressBo t){
-		Result res=new Result();
-		if (StringUtils.isBlank(t.getLicenceTimes())|| null==t.getTaskId()|| null==t.getAlreadyNumber()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
-		}
-		res.setData(orderProjectService.createTaskProgress(t));
-		return res;
-	}
-	
-	/**
-	 * 	删除项目申报进度
-	 */
-	@RequestMapping(value="/delectTaskProgress" ,method = RequestMethod.POST)
-	public Result delectTaskProgress(Integer id){
-		Result res=new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
-		}
-		res.setData(orderProjectService.delectTaskProgress(id));
-		return res;
-	}
-	/**
-	 * 	查看项目申报进度
-	 */
-	@RequestMapping(value="/selectTaskProgress" ,method = RequestMethod.GET)
-	public Result selectTaskProgress(Integer tid){
-		Result res=new Result();
-		if (null==tid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
-		}
-		res.setData(orderProjectService.selectTaskProgress(tid));
-		return res;
-	}
-	
-	
-	/**
-	 * 我的任务列表导出xls
-	 * @throws IOException 
-	 */
-	@RequestMapping(value = "/exportMyTaskList", method = RequestMethod.GET)
-	public Result exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize) throws IOException{
-		Result res=new Result();
-		try {
-			orderProjectService.exportMyTaskList( response, ib,  pageNo, pageSize);
-		} catch (Exception e) {
-			res.getError().add(buildError("格式不正确"));
-			e.printStackTrace();
-			return res;
-		}
-     res.data(1); 
-	return res;
-		
-	}
-}
+package com.goafanti.order.controller;
+
+
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.TTaskHours;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.order.bo.TOrderTaskDetailBo;
+import com.goafanti.order.bo.TaskProgressBo;
+import com.goafanti.order.bo.inuptTaskHoursListBo;
+import com.goafanti.order.service.OrderProjectService;
+
+@RestController
+@RequestMapping(value = "/api/admin/orderProject")
+public class OrderProjectApiController extends CertifyApiController {
+	
+	@Autowired
+	
+	private OrderProjectService	orderProjectService;
+	
+	/**
+	 * 项目分配
+	 * taskId 项目ID
+	 * taskReceiverId 受理人ID
+	 * specially 0 任务派单(咨询师经理派单) 1项目派单(咨询师管理员派单)2咨询师退回给经理
+	 */
+	@RequestMapping(value = "/projectDistribution", method = RequestMethod.POST)
+	public Result projectDistribution(Integer taskId,String taskReceiverId,Integer specially ,String remarks){
+		Result res = new Result();
+		if(null==taskId || StringUtils.isBlank(taskReceiverId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "任务编号和受理人"));
+			return res;
+		}
+		res.setData(orderProjectService.updateProjectDistribution( taskId, taskReceiverId,specially,remarks));
+		return res;
+	}
+	
+	/**
+	 * 任务派单列表
+	 */
+	@RequestMapping(value="/orderTaskList" ,method = RequestMethod.GET)
+	public Result orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
+			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.setData(orderProjectService.orderTaskList( name, orderNo, taskId, taskStatus, adminName,specially ,  depId,contractNo, 
+				projectStatus,approval, outsource, outsourceStatus,pageNo, pageSize));
+		return res;
+	}
+	
+	
+	/**
+	 * 任务派单查询
+	 */
+	@RequestMapping(value="/selectTaskList" ,method = RequestMethod.GET)
+	public Result selectTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially  ,String depId  ,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.setData(orderProjectService.selectTaskList( name, orderNo, taskId, taskStatus, adminName,specially ,  depId  ,pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 任务详情
+	 */
+	@RequestMapping(value="/orderTaskDetail" ,method = RequestMethod.GET)
+	public Result orderTaskDetail(String id){
+		Result res=new Result();
+		res.setData(orderProjectService.orderTaskDetail(id));
+		return res;
+	}
+	/**
+	 * 任务修改
+	 */
+	@RequestMapping(value="/updateOrderTask" ,method = RequestMethod.POST)
+	public Result updateOrderTask(TOrderTaskDetailBo t){
+		Result res=new Result();
+		res.setData(orderProjectService.updateOrderTask(t));
+		return res;
+	}
+	/**
+	 * 添加工时
+	 */
+	@RequestMapping(value="/addTaskHours" ,method = RequestMethod.POST)
+	public Result addTaskHours(TTaskHours t,String taskDate){
+		Result res=new Result();
+		if (t.getHours()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "任务时间"));
+			return res;
+		}
+		if (StringUtils.isBlank(taskDate)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作日期"));
+			return res;
+		}
+		if (StringUtils.isBlank(t.getRemarks())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "工作内容"));
+			return res;
+		}
+		if (StringUtils.isNotBlank(taskDate)) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+			try {
+				t.setTaskDay(sdf.parse(taskDate));
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+		}
+		res.setData(orderProjectService.addTaskHours(t));
+		return res;
+	}
+	/**
+	 * 任务工时列表
+	 */
+	@RequestMapping(value="/taskHoursList" ,method = RequestMethod.GET)
+	public Result taskHoursList(inuptTaskHoursListBo ib,
+			Integer pageNo, Integer pageSize){
+		Result res=new Result();
+		res.setData(orderProjectService.taskHoursList(ib,pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 任务工时详情列表
+	 */
+	@RequestMapping(value="/taskHoursDetailsList" ,method = RequestMethod.GET)
+	public Result taskHoursDetailsList( String taskId ){
+		Result res=new Result();
+		if (StringUtils.isBlank(taskId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "项目编号"));
+			return res;
+		}
+		res.setData(orderProjectService.taskHoursDetailsList(taskId));
+		return res;
+	}
+	
+	
+	/**
+	 * 任务操作日志
+	 */
+	@RequestMapping(value="/TaskLogList" ,method = RequestMethod.GET)
+	public Result TaskLogList(Integer id){
+		Result res=new Result();
+		res.setData(orderProjectService.TaskLogList(id));
+		return res;
+	}
+	/** 任务文件上传 **/
+	@RequestMapping(value = "/uploadOrderTaskFile", method = RequestMethod.POST)
+	public Result uploadOrderTaskFile(HttpServletRequest req,String sign){
+		Result res = new Result();
+		res.setData(handleFile(res, "/order_task_file/", false, req, sign));
+		return res;
+	}
+	/**
+	 * 	新增项目申报进度
+	 */
+	@RequestMapping(value="/createTaskProgress" ,method = RequestMethod.POST)
+	public Result createTaskProgress(TaskProgressBo t){
+		Result res=new Result();
+		if (StringUtils.isBlank(t.getLicenceTimes())|| null==t.getTaskId()|| null==t.getAlreadyNumber()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
+		}
+		res.setData(orderProjectService.createTaskProgress(t));
+		return res;
+	}
+	
+	/**
+	 * 	删除项目申报进度
+	 */
+	@RequestMapping(value="/delectTaskProgress" ,method = RequestMethod.POST)
+	public Result delectTaskProgress(Integer id){
+		Result res=new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
+		}
+		res.setData(orderProjectService.delectTaskProgress(id));
+		return res;
+	}
+	/**
+	 * 	查看项目申报进度
+	 */
+	@RequestMapping(value="/selectTaskProgress" ,method = RequestMethod.GET)
+	public Result selectTaskProgress(Integer tid){
+		Result res=new Result();
+		if (null==tid) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
+		}
+		res.setData(orderProjectService.selectTaskProgress(tid));
+		return res;
+	}
+	
+	
+	/**
+	 * 我的任务列表导出xls
+	 * @throws IOException 
+	 */
+	@RequestMapping(value = "/exportMyTaskList", method = RequestMethod.GET)
+	public Result exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize) throws IOException{
+		Result res=new Result();
+		try {
+			orderProjectService.exportMyTaskList( response, ib,  pageNo, pageSize);
+		} catch (Exception e) {
+			res.getError().add(buildError("格式不正确"));
+			e.printStackTrace();
+			return res;
+		}
+     res.data(1); 
+	return res;
+		
+	}
+}

+ 202 - 183
src/main/java/com/goafanti/order/controller/OutsourceOrgApiController.java

@@ -1,183 +1,202 @@
-package com.goafanti.order.controller;
-
-
-
-
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.model.OutsourceOrganization;
-import com.goafanti.common.model.TOrderOutsource;
-import com.goafanti.order.bo.OrderOutsourceDtails;
-import com.goafanti.order.enums.OrderNewState;
-import com.goafanti.order.service.OrderNewService;
-import com.goafanti.order.service.OutsourceOrgService;
-
-@RestController
-@RequestMapping(value = "/api/admin/outsourceOrg")
-public class OutsourceOrgApiController extends CertifyApiController {
-	
-	@Resource
-	private OutsourceOrgService	outsourceOrgService;
-	@Resource
-	private OrderNewService	orderNewService;
-	
-	@RequestMapping(value = "/addOutsourceOrg", method=RequestMethod.POST)
-	public Result addOutsourceOrg(OutsourceOrganization o) {
-		Result res=new Result();
-		if (StringUtils.isBlank(o.getName())||
-				StringUtils.isBlank(o.getContacts())||
-					StringUtils.isBlank(o.getContactsMobile())) {
-			res.getError().add(buildError("", "名称、联系人、电话不能为空"));
-			return res;
-		}
-		res.data(outsourceOrgService.addOutsourceOrg(o));
-		return res;
-	}
-	@RequestMapping(value = "/updateOutsourceOrg", method=RequestMethod.POST)
-	public Result updateOutsourceOrg(OutsourceOrganization o) {
-		Result res=new Result();
-		if (StringUtils.isBlank(o.getName())||
-				StringUtils.isBlank(o.getContacts())||
-					StringUtils.isBlank(o.getContactsMobile())) {
-			res.getError().add(buildError("", "名称、联系人、电话不能为空"));
-			return res;
-		}
-		res.data(outsourceOrgService.updateOutsourceOrg(o));
-		
-		return res;
-	}
-	@RequestMapping(value = "/deleteOutsourceOrg", method=RequestMethod.POST)
-	public Result deleteOutsourceOrg(Integer id) {
-		Result res=new Result();
-		if (id==null) {
-			res.getError().add(buildError("", "必须选择外包公司"));
-			return res;
-		}
-		res.data(outsourceOrgService.deleteOutsourceOrg(id));
-		return res;
-	}
-	@RequestMapping(value = "/selectOutsourceOrg", method=RequestMethod.GET)
-	public Result selectOutsourceOrg(String  orderNo,String tid) {
-		Result res=new Result();
-		if (orderNo==null) {
-			res.getError().add(buildError("", "必须选择订单"));
-			return res;
-		}
-		res.data(outsourceOrgService.selectOutsourceOrg(orderNo,tid));
-		return res;
-	}
-	/** 外包文件上传 **/
-	@RequestMapping(value = "/uploadOutsourceFile", method = RequestMethod.POST)
-	public Result uploadOutsourceFile(HttpServletRequest req,String sign){
-		Result res = new Result();
-		//order_refund_file
-		res.setData(handleFile(res, "/order_outsource/", false, req, sign));
-		return res;
-	}
-	/**
-	 * 订单外包列表
-	 * @param orderNo
-	 * @return
-	 */
-	@RequestMapping(value = "/selectOrderOutsourceOrg", method=RequestMethod.GET)
-	public Result selectOrderOutsourceOrg(String  orderNo) {
-		Result res=new Result();
-		if (orderNo==null) {
-			res.getError().add(buildError("", "必须选择订单"));
-			return res;
-		}
-		res.data(outsourceOrgService.selectOrderOutsourceOrg(orderNo));
-		return res;
-	}
-	
-	/**
-	 * 审核并外包
-	 */
-	@RequestMapping(value="/auditOutsource", method = RequestMethod.POST)
-	public Result auditOutsource(TOrderOutsource o,Integer orderStatus){
-		Result res=new Result();
-		if(StringUtils.isBlank(o.getOrderNo())||StringUtils.isBlank(o.getCompanyName())||
-				o.getAmount()==null){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包信息","外包信息"));
-			return res;
-		}
-		if(orderStatus==null||(orderStatus!=OrderNewState.QDSHTG.getCode()&&orderStatus!=OrderNewState.QDSHJJ.getCode())||
-				orderNewService.chekeOrderStatus(o.getOrderNo())){
-			res.getError().add(buildError( "审核状态错误","审核状态错误"));
-			return res;
-		}
-		return res.data(orderNewService.updateOrderNew(o.getOrderNo(),orderStatus,null,1,o));
-	}
-	/**
-	 * 外包审核列表
-	 */
-	@RequestMapping(value="/orderOutsourceList", method = RequestMethod.GET)
-	public Result orderOutsourceList(String name,String contractNo,String starTime,String endTime,Integer refundStatus,Integer pageNo,Integer pageSize){
-		Result res=new Result();
-		res.data(outsourceOrgService.orderOutsourceList(name, contractNo, starTime, endTime,refundStatus, pageNo, pageSize));
-		return res;
-	}
-	
-	/**
-	 * 外包审核列表(营销管理员列表)
-	 */
-	@RequestMapping(value="/salesmanOrderOutsourceList", method = RequestMethod.GET)
-	public Result salesmanOrderOutsourceList(String name,String contractNo,String starTime,String endTime,Integer refundStatus,Integer pageNo,Integer pageSize){
-		Result res=new Result();
-		res.data(outsourceOrgService.salesmanOrderOutsourceList(name, contractNo, starTime, endTime,refundStatus, pageNo, pageSize));
-		return res;
-	}
-	/**
-	 * 外包审核详情
-	 */
-	@RequestMapping(value="/orderOutsourceDtails", method = RequestMethod.GET)
-	public Result orderOutsourceDtails(String orderNo){
-		Result res=new Result();
-		res.data(outsourceOrgService.orderOutsourceDtails(orderNo));
-		return res;
-	}
-	/**
-	 * 外包审核
-	 */
-	@RequestMapping(value="/auditOutsourceNew", method = RequestMethod.POST)
-	public Result auditOutsourceNew(OrderOutsourceDtails o){
-		Result res=new Result();
-		if (o.getId()==null||null==o.getRefundStatus()||StringUtils.isBlank(o.getRemarks())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包信息","外包信息"));
-			return res;
-		}
-		res.data(outsourceOrgService.updateAuditOutsource(o));
-		return res;
-	}
-	 /**
-     *	 下载文档
-     * 
-     * @param response
-     * @return
-     */
-    @RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
-    public Result downloadTemplateFile(HttpServletResponse response, String path) {
-        Result res = new Result();
-            if (null == path) {
-                res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "", "找不到文件!"));
-            } else {
-               String suffix = path.substring(path.lastIndexOf("."));
-               String name=path.substring(path.lastIndexOf("_")+1, path.lastIndexOf("."));
-                String fileName = name + suffix;
-                downloadFile(response, fileName, path);
-        } 
-        return res;
-    } 
-    
-}
+package com.goafanti.order.controller;
+
+
+
+
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.OutsourceOrganization;
+import com.goafanti.common.model.TOrderOutsource;
+import com.goafanti.order.bo.OrderOutsourceDtails;
+import com.goafanti.order.enums.OrderNewState;
+import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OutsourceOrgService;
+
+@RestController
+@RequestMapping(value = "/api/admin/outsourceOrg")
+public class OutsourceOrgApiController extends CertifyApiController {
+	
+	@Resource
+	private OutsourceOrgService	outsourceOrgService;
+	@Resource
+	private OrderNewService	orderNewService;
+	
+	@RequestMapping(value = "/addOutsourceOrg", method=RequestMethod.POST)
+	public Result addOutsourceOrg(OutsourceOrganization o) {
+		Result res=new Result();
+		if (StringUtils.isBlank(o.getName())||
+				StringUtils.isBlank(o.getContacts())||
+					StringUtils.isBlank(o.getContactsMobile())) {
+			res.getError().add(buildError("", "名称、联系人、电话不能为空"));
+			return res;
+		}
+		res.data(outsourceOrgService.addOutsourceOrg(o));
+		return res;
+	}
+	@RequestMapping(value = "/updateOutsourceOrg", method=RequestMethod.POST)
+	public Result updateOutsourceOrg(OutsourceOrganization o) {
+		Result res=new Result();
+		if (StringUtils.isBlank(o.getName())||
+				StringUtils.isBlank(o.getContacts())||
+					StringUtils.isBlank(o.getContactsMobile())) {
+			res.getError().add(buildError("", "名称、联系人、电话不能为空"));
+			return res;
+		}
+		res.data(outsourceOrgService.updateOutsourceOrg(o));
+		
+		return res;
+	}
+	@RequestMapping(value = "/deleteOutsourceOrg", method=RequestMethod.POST)
+	public Result deleteOutsourceOrg(Integer id) {
+		Result res=new Result();
+		if (id==null) {
+			res.getError().add(buildError("", "必须选择外包公司"));
+			return res;
+		}
+		res.data(outsourceOrgService.deleteOutsourceOrg(id));
+		return res;
+	}
+	@RequestMapping(value = "/selectOutsourceOrg", method=RequestMethod.GET)
+	public Result selectOutsourceOrg(String  orderNo,String tid) {
+		Result res=new Result();
+		if (orderNo==null) {
+			res.getError().add(buildError("", "必须选择订单"));
+			return res;
+		}
+		res.data(outsourceOrgService.selectOutsourceOrg(orderNo,tid));
+		return res;
+	}
+	/** 外包文件上传 **/
+	@RequestMapping(value = "/uploadOutsourceFile", method = RequestMethod.POST)
+	public Result uploadOutsourceFile(HttpServletRequest req,String sign){
+		Result res = new Result();
+		//order_refund_file
+		res.setData(handleFile(res, "/order_outsource/", false, req, sign));
+		return res;
+	}
+	/**
+	 * 订单外包列表
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/selectOrderOutsourceOrg", method=RequestMethod.GET)
+	public Result selectOrderOutsourceOrg(String  orderNo) {
+		Result res=new Result();
+		if (orderNo==null) {
+			res.getError().add(buildError("", "必须选择订单"));
+			return res;
+		}
+		res.data(outsourceOrgService.selectOrderOutsourceOrg(orderNo));
+		return res;
+	}
+	
+	/**
+	 * 订单发起外包
+	 */
+	@RequestMapping(value="/auditOutsource", method = RequestMethod.POST)
+	public Result auditOutsource(TOrderOutsource o,Integer orderStatus){
+		Result res=new Result();
+		if(StringUtils.isBlank(o.getOrderNo())||StringUtils.isBlank(o.getCompanyName())||
+				o.getAmount()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包信息","外包信息"));
+			return res;
+		}
+		if(orderStatus==null||(orderStatus!=OrderNewState.QDSHTG.getCode()&&orderStatus!=OrderNewState.QDSHJJ.getCode())||
+				orderNewService.chekeOrderStatus(o.getOrderNo())){
+			res.getError().add(buildError( "审核状态错误","审核状态错误"));
+			return res;
+		}
+		return res.data(orderNewService.updateOrderNew(o.getOrderNo(),orderStatus,null,1,o));
+	}
+	
+	/**
+	 * 项目发起外包
+	 */
+	@RequestMapping(value="/outsourceProjectAudit", method = RequestMethod.POST)
+	public Result outsourceProjectAudit(TOrderOutsource o){
+		Result res=new Result();
+		if(StringUtils.isBlank(o.getOrderNo())||StringUtils.isBlank(o.getCompanyName())||
+				o.getAmount()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包信息","外包信息"));
+			return res;
+		}
+		if(o.getType()!=1||o.getTid()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目外包信息","项目外包信息"));
+			return res;
+		}
+		
+		return res.data(orderNewService.pushOutsourceProjectAudit(o));
+	}
+	/**
+	 * 外包审核列表
+	 */
+	@RequestMapping(value="/orderOutsourceList", method = RequestMethod.GET)
+	public Result orderOutsourceList(String name,String contractNo,String starTime,String endTime,Integer refundStatus,Integer type,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.data(outsourceOrgService.orderOutsourceList(name, contractNo, starTime, endTime,refundStatus,type, pageNo, pageSize));
+		return res;
+	}
+	
+	/**
+	 * 外包审核列表(营销管理员列表)
+	 */
+	@RequestMapping(value="/salesmanOrderOutsourceList", method = RequestMethod.GET)
+	public Result salesmanOrderOutsourceList(String name,String contractNo,String starTime,String endTime,Integer refundStatus,Integer pageNo,Integer pageSize){
+		Result res=new Result();
+		res.data(outsourceOrgService.salesmanOrderOutsourceList(name, contractNo, starTime, endTime,refundStatus, pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 外包审核详情
+	 */
+	@RequestMapping(value="/orderOutsourceDtails", method = RequestMethod.GET)
+	public Result orderOutsourceDtails(String orderNo,String tid){
+		Result res=new Result();
+		res.data(outsourceOrgService.orderOutsourceDtails(orderNo,tid));
+		return res;
+	}
+	/**
+	 * 外包审核
+	 */
+	@RequestMapping(value="/auditOutsourceNew", method = RequestMethod.POST)
+	public Result auditOutsourceNew(OrderOutsourceDtails o){
+		Result res=new Result();
+		if (o.getId()==null||null==o.getRefundStatus()||StringUtils.isBlank(o.getRemarks())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "外包信息","外包信息"));
+			return res;
+		}
+		res.data(outsourceOrgService.updateAuditOutsource(o));
+		return res;
+	}
+	 /**
+     *	 下载文档
+     * 
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
+    public Result downloadTemplateFile(HttpServletResponse response, String path) {
+        Result res = new Result();
+            if (null == path) {
+                res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "", "找不到文件!"));
+            } else {
+               String suffix = path.substring(path.lastIndexOf("."));
+               String name=path.substring(path.lastIndexOf("_")+1, path.lastIndexOf("."));
+                String fileName = name + suffix;
+                downloadFile(response, fileName, path);
+        } 
+        return res;
+    } 
+    
+}

+ 201 - 199
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -1,199 +1,201 @@
-package com.goafanti.order.service;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.List;
-
-import javax.mail.MessagingException;
-import javax.servlet.http.HttpServletResponse;
-
-
-import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.TOrderDun;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.common.model.TOrderOutsource;
-import com.goafanti.common.model.TOrderRefundWithBLOBs;
-import com.goafanti.common.model.TOrderTask;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.OrderDunTaskBo;
-import com.goafanti.order.bo.OrderRefundDetailBo;
-import com.goafanti.order.bo.OutNewOrderDunBo;
-import com.goafanti.order.bo.TDunLogListBo;
-import com.goafanti.order.bo.TOrderLogBo;
-import com.goafanti.order.bo.TOrderNewBo;
-import com.goafanti.order.bo.TOrderRefundBo;
-import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.bo.outOrderDunListBo;
-
-public interface OrderNewService {
-	
-	/**
-	 * 创建订单
-	 * @param uid
-	 * @param orderType
-	 * @return
-	 */
-	int createServiceOrder(String uid, Integer orderType);
-	/**
-	 * 创建项目
-	 * @param t
-	 */
-	int addOrderTask(TOrderTask t);
-	/**
-	 * 修改项目信息
-	 * @param t
-	 * @return
-	 */
-	int updateOrderTask(TOrderTask t);
-	/**
-	 * 删除项目
-	 * @param id
-	 * @return
-	 */
-	int delectOrderTask(Integer id);
-	/**
-	 * 项目详情
-	 * @param orderNo
-	 * @return
-	 */
-	 List<TOrderTaskBo> selectOrderTask(String orderNo);
-	 /**
-	  * 订单提交或保存
-	  * @param t
-	  * @param isSubmit
-	  * @return
-	  */
-	int updateServiceOrder(TOrderNew t, Integer isSubmit);
-	/**
-	 * 订单详情
-	 * @param orderNo
-	 * @return
-	 */
-	TOrderNewBo getOrderNewDetail(String orderNo);
-	/**
-	 * 收款截点编辑
-	 * @param orderDun
-	 * @return
-	 */
-	int createOrderDun(String orderDun,String orderNo);
-	/**
-	 * 订单列表
-	 * @param name
-	 * @param orderNo
-	 * @param starTime
-	 * @param endTime
-	 * @param orderStatus
-	 * @param pageNo
-	 * @param pageSize
-	 * @param amountStatus 
-	 * @return
-	 */
-	Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially ,Integer approval,Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer amountStatus,Integer pageNo, Integer pageSize);
-	/**
-	 * 订单审核
-	 * @param orderNo
-	 * @param orderStatus
-	 * @param object 
-	 * @return
-	 */
-	int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource object);
-	
-	/**
-	 * 催款订单列表
-	 * @param name
-	 * @param orderNo
-	 * @param starTime
-	 * @param endTime
-	 * @param orderStatus
-	 * @param pageNo
-	 * @param pageSize
-	 * @return
-	 */
-	Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
-			Integer newStatus,Integer pageNo, Integer pageSize);
-	/**
-	 * 新增催款记录
-	 * @return
-	 */
-	int createDunLog(String dunId,String dumTime,String remarks);
-	/**
-	 * 查询催款记录
-	 * @param dunId
-	 * @return
-	 */
-	List<TDunLogListBo> selectDunLogList(String dunId);
-	/**
-	 * 新增退单
-	 * @param t
-	 * @return
-	 */
-	int addOrderRefund(TOrderRefundWithBLOBs t);
-	/**
-	 * 特批审核
-	 * @param orderNo
-	 * @param confirm
-	 * @return
-	 */
-	int updateApprovalOrder(String orderNo,Integer confirm,String reason);
-	/**
-	 * 查看收款截点
-	 * @param orderNo
-	 * @return
-	 */
-	List<TOrderDun> selectOrderDun(String orderNo);
-	/**
-	 * 退单列表
-	 * @param name
-	 * @param orderNo
-	 * @param starTime
-	 * @param endTime
-	 * @param specially
-	 * @param pageNo
-	 * @param pageSize
-	 * @return
-	 */
-	Pagination<TOrderRefundBo> orderRefundList(String name, String orderNo, String starTime, String endTime, Integer specially,
-			Integer pageNo, Integer pageSize);
-	
-	boolean checkOrderMain(TOrderTask t);
-	
-	boolean chekeOrderStatus(String orderNo);
-	
-	boolean chekeApprovalOrderStatus(String orderNo);
-	
-	int deleteOrderNew(String orderNo);
-	
-	boolean checkOderSettlementAmount(String orderNo);
-	
-	boolean checkORderTask(String orderNo);
-	
-	void exportOrderDunData(String name,String orderNo,String starTime,String endTime,Integer specially,String adminName,
-			String depId,Integer newStatus,Integer pageNo,Integer pageSize,HttpServletResponse response) throws  Exception;
-	
-	int updateOrderOver(String orderNo);
-	
-	OrderRefundDetailBo orderRefundDetail(String id);
-	
-	int updateOrderRefund(TOrderRefundWithBLOBs t);
-	
-	int updatetechnicianBackOrder(String orderNo, String reason);
-	
-	List<OrderDunTaskBo> selectAllOrderDun();
-	
-	void updateOrderDun(TOrderDun tDun);
-	
-	void addNoticAndSendEmail(String orderNo, OrderDunTaskBo t, Integer code)throws UnsupportedEncodingException, MessagingException;
-	
-	void addNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o);
-	
-	void addTimingTaskNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o);
-	
-	boolean checkORderDun(String orderNo);
-	
-	int updateFinance(String orderNo, String newFinance);
-	List<TOrderLogBo> selectOrderLog(String orderNo);
-
-	void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,String OrderNo,String adminId,Integer approval);
-	void exportOrderTaskData(String orderNo, HttpServletResponse response)throws IOException,BusinessException ;
-	
-}
+package com.goafanti.order.service;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+import javax.mail.MessagingException;
+import javax.servlet.http.HttpServletResponse;
+
+
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.TOrderDun;
+import com.goafanti.common.model.TOrderNew;
+import com.goafanti.common.model.TOrderOutsource;
+import com.goafanti.common.model.TOrderRefundWithBLOBs;
+import com.goafanti.common.model.TOrderTask;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.OrderDunTaskBo;
+import com.goafanti.order.bo.OrderRefundDetailBo;
+import com.goafanti.order.bo.OutNewOrderDunBo;
+import com.goafanti.order.bo.TDunLogListBo;
+import com.goafanti.order.bo.TOrderLogBo;
+import com.goafanti.order.bo.TOrderNewBo;
+import com.goafanti.order.bo.TOrderRefundBo;
+import com.goafanti.order.bo.TOrderTaskBo;
+import com.goafanti.order.bo.outOrderDunListBo;
+
+public interface OrderNewService {
+	
+	/**
+	 * 创建订单
+	 * @param uid
+	 * @param orderType
+	 * @return
+	 */
+	int createServiceOrder(String uid, Integer orderType);
+	/**
+	 * 创建项目
+	 * @param t
+	 */
+	int addOrderTask(TOrderTask t);
+	/**
+	 * 修改项目信息
+	 * @param t
+	 * @return
+	 */
+	int updateOrderTask(TOrderTask t);
+	/**
+	 * 删除项目
+	 * @param id
+	 * @return
+	 */
+	int delectOrderTask(Integer id);
+	/**
+	 * 项目详情
+	 * @param orderNo
+	 * @return
+	 */
+	 List<TOrderTaskBo> selectOrderTask(String orderNo);
+	 /**
+	  * 订单提交或保存
+	  * @param t
+	  * @param isSubmit
+	  * @return
+	  */
+	int updateServiceOrder(TOrderNew t, Integer isSubmit);
+	/**
+	 * 订单详情
+	 * @param orderNo
+	 * @return
+	 */
+	TOrderNewBo getOrderNewDetail(String orderNo);
+	/**
+	 * 收款截点编辑
+	 * @param orderDun
+	 * @return
+	 */
+	int createOrderDun(String orderDun,String orderNo);
+	/**
+	 * 订单列表
+	 * @param name
+	 * @param orderNo
+	 * @param starTime
+	 * @param endTime
+	 * @param orderStatus
+	 * @param pageNo
+	 * @param pageSize
+	 * @param amountStatus 
+	 * @return
+	 */
+	Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially ,Integer approval,Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer amountStatus,Integer pageNo, Integer pageSize);
+	/**
+	 * 订单审核
+	 * @param orderNo
+	 * @param orderStatus
+	 * @param object 
+	 * @return
+	 */
+	int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource object);
+	
+	/**
+	 * 催款订单列表
+	 * @param name
+	 * @param orderNo
+	 * @param starTime
+	 * @param endTime
+	 * @param orderStatus
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
+			Integer newStatus,Integer pageNo, Integer pageSize);
+	/**
+	 * 新增催款记录
+	 * @return
+	 */
+	int createDunLog(String dunId,String dumTime,String remarks);
+	/**
+	 * 查询催款记录
+	 * @param dunId
+	 * @return
+	 */
+	List<TDunLogListBo> selectDunLogList(String dunId);
+	/**
+	 * 新增退单
+	 * @param t
+	 * @return
+	 */
+	int addOrderRefund(TOrderRefundWithBLOBs t);
+	/**
+	 * 特批审核
+	 * @param orderNo
+	 * @param confirm
+	 * @return
+	 */
+	int updateApprovalOrder(String orderNo,Integer confirm,String reason);
+	/**
+	 * 查看收款截点
+	 * @param orderNo
+	 * @return
+	 */
+	List<TOrderDun> selectOrderDun(String orderNo);
+	/**
+	 * 退单列表
+	 * @param name
+	 * @param orderNo
+	 * @param starTime
+	 * @param endTime
+	 * @param specially
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	Pagination<TOrderRefundBo> orderRefundList(String name, String orderNo, String starTime, String endTime, Integer specially,
+			Integer pageNo, Integer pageSize);
+	
+	boolean checkOrderMain(TOrderTask t);
+	
+	boolean chekeOrderStatus(String orderNo);
+	
+	boolean chekeApprovalOrderStatus(String orderNo);
+	
+	int deleteOrderNew(String orderNo);
+	
+	boolean checkOderSettlementAmount(String orderNo);
+	
+	boolean checkORderTask(String orderNo);
+	
+	void exportOrderDunData(String name,String orderNo,String starTime,String endTime,Integer specially,String adminName,
+			String depId,Integer newStatus,Integer pageNo,Integer pageSize,HttpServletResponse response) throws  Exception;
+	
+	int updateOrderOver(String orderNo);
+	
+	OrderRefundDetailBo orderRefundDetail(String id);
+	
+	int updateOrderRefund(TOrderRefundWithBLOBs t);
+	
+	int updatetechnicianBackOrder(String orderNo, String reason);
+	
+	List<OrderDunTaskBo> selectAllOrderDun();
+	
+	void updateOrderDun(TOrderDun tDun);
+	
+	void addNoticAndSendEmail(String orderNo, OrderDunTaskBo t, Integer code)throws UnsupportedEncodingException, MessagingException;
+	
+	void addNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o);
+	
+	void addTimingTaskNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o);
+	
+	boolean checkORderDun(String orderNo);
+	
+	int updateFinance(String orderNo, String newFinance);
+	List<TOrderLogBo> selectOrderLog(String orderNo);
+
+	void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,String OrderNo,String adminId,Integer approval);
+	void exportOrderTaskData(String orderNo, HttpServletResponse response)throws IOException,BusinessException ;
+	
+	int pushOutsourceProjectAudit(TOrderOutsource o);
+	
+}

+ 53 - 52
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -1,52 +1,53 @@
-package com.goafanti.order.service;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-
-import com.goafanti.common.model.TTaskHours;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-import com.goafanti.order.bo.TOrderTaskListBo;
-import com.goafanti.order.bo.TaskLogBo;
-import com.goafanti.order.bo.TaskProgressBo;
-import com.goafanti.order.bo.inuptTaskHoursListBo;
-
-public interface OrderProjectService {
-
-	int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially, String remarks);
-
-	Pagination<TOrderTaskListBo> orderTaskList(String name, String orderNo, String taskId, Integer taskStatus, String adminName,Integer specially, String depId,
-			String contractNo, Integer approval, Integer pageNo, Integer pageSize,Integer outsource, Integer outsource2);
-
-	TOrderTaskDetailBo orderTaskDetail(String id);
-
-	int updateOrderTask(TOrderTaskDetailBo t);
-
-	int addTaskHours(TTaskHours t);
-	
-	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
-			Integer pageNo, Integer pageSize);
-
-
-	Pagination<TOrderTaskListBo>  selectTaskList(String name, String orderNo, String taskId, Integer taskStatus, String adminName,
-			Integer specially,String depId  , Integer pageNo, Integer pageSize);
-
-	List<TaskLogBo> TaskLogList(Integer id);
-
-	int createTaskProgress(TaskProgressBo t);
-
-	int delectTaskProgress(Integer id);
-
-	List<TaskProgressBo> selectTaskProgress(Integer tid);
-
-
-	List<TTaskHours> taskHoursDetailsList(String taskId);
-
-	void exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize)throws IOException ;
-
-	
-}
+package com.goafanti.order.service;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.TTaskHours;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.TOrderTaskDetailBo;
+import com.goafanti.order.bo.TOrderTaskListBo;
+import com.goafanti.order.bo.TaskLogBo;
+import com.goafanti.order.bo.TaskProgressBo;
+import com.goafanti.order.bo.inuptTaskHoursListBo;
+
+public interface OrderProjectService {
+
+	int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially, String remarks);
+
+	Pagination<TOrderTaskListBo> orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
+			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,Integer pageNo,Integer pageSize);
+
+	TOrderTaskDetailBo orderTaskDetail(String id);
+
+	int updateOrderTask(TOrderTaskDetailBo t);
+
+	int addTaskHours(TTaskHours t);
+	
+	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
+			Integer pageNo, Integer pageSize);
+
+
+	Pagination<TOrderTaskListBo>  selectTaskList(String name, String orderNo, String taskId, Integer taskStatus, String adminName,
+			Integer specially,String depId  , Integer pageNo, Integer pageSize);
+
+	List<TaskLogBo> TaskLogList(Integer id);
+
+	int createTaskProgress(TaskProgressBo t);
+
+	int delectTaskProgress(Integer id);
+
+	List<TaskProgressBo> selectTaskProgress(Integer tid);
+
+
+	List<TTaskHours> taskHoursDetailsList(String taskId);
+
+	void exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize)throws IOException ;
+
+	void checkProjiectAllocation(String orderNo);
+}

+ 34 - 34
src/main/java/com/goafanti/order/service/OutsourceOrgService.java

@@ -1,34 +1,34 @@
-package com.goafanti.order.service;
-
-import java.util.List;
-
-import com.goafanti.common.model.OutsourceOrganization;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.OrderOutsourceBo;
-import com.goafanti.order.bo.OrderOutsourceDtails;
-import com.goafanti.order.bo.OutsourceOrganizationBo;
-
-public interface OutsourceOrgService {
-	
-	int addOutsourceOrg(OutsourceOrganization o);
-	
-	int updateOutsourceOrg(OutsourceOrganization o);
-	
-	int deleteOutsourceOrg(Integer id);
-
-	List<OutsourceOrganizationBo> selectOutsourceOrg(String orderNo,String tid);
-
-	List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo);
-	
-	Pagination<OrderOutsourceBo> orderOutsourceList(String name, String contractNo, String starTime, String endTime,Integer refundStatus, Integer pageNo,
-			Integer pageSize);
-	
-	OrderOutsourceDtails orderOutsourceDtails(String orderNo);
-	
-	int updateAuditOutsource(OrderOutsourceDtails o);
-
-	Pagination<OrderOutsourceBo> salesmanOrderOutsourceList(String name, String contractNo, String starTime, String endTime,
-			Integer refundStatus, Integer pageNo, Integer pageSize);
-
-	
-}
+package com.goafanti.order.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.OutsourceOrganization;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.OrderOutsourceBo;
+import com.goafanti.order.bo.OrderOutsourceDtails;
+import com.goafanti.order.bo.OutsourceOrganizationBo;
+
+public interface OutsourceOrgService {
+	
+	int addOutsourceOrg(OutsourceOrganization o);
+	
+	int updateOutsourceOrg(OutsourceOrganization o);
+	
+	int deleteOutsourceOrg(Integer id);
+
+	List<OutsourceOrganizationBo> selectOutsourceOrg(String orderNo,String tid);
+
+	List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo);
+	
+	Pagination<OrderOutsourceBo> orderOutsourceList(String name, String contractNo, String starTime, String endTime,Integer refundStatus,Integer type, Integer pageNo,
+			Integer pageSize);
+	
+	OrderOutsourceDtails orderOutsourceDtails(String orderNo, String tid);
+	
+	int updateAuditOutsource(OrderOutsourceDtails o);
+
+	Pagination<OrderOutsourceBo> salesmanOrderOutsourceList(String name, String contractNo, String starTime, String endTime,
+			Integer refundStatus, Integer pageNo, Integer pageSize);
+
+	
+}

+ 13 - 5
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -507,12 +507,20 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		if (new1.getBackStatus()==3) {
 			t.setBackStatus(0);
 		}
-		t.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
-		OrganizationListOut oo=organizationManagementMapper.selectAllById(new1.getOrderDep());
-		t.setFinanceId(oo.getFinanceId());
 		List<String> aids = new ArrayList<>();
-		for (Admin admin : adminMapper.getAdminRoleList("咨询师管理员")) {
-			aids.add(admin.getId());
+		if (new1.getApproval()==ApprovalNewState.DSH.getCode()||
+				new1.getApproval()==ApprovalNewState.BH.getCode()) {
+			t.setProcessStatus(ProcessStatus.YPTPSH.getCode());
+			for (Admin admin : adminMapper.getAdminRoleList("总裁")) {
+				aids.add(admin.getId());
+			}
+		}else {
+			t.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
+			OrganizationListOut oo=organizationManagementMapper.selectAllById(new1.getOrderDep());
+			t.setFinanceId(oo.getFinanceId());
+			for (Admin admin : adminMapper.getAdminRoleList("咨询师管理员")) {
+				aids.add(admin.getId());
+			}
 		}
 		TOrderLog tl=new TOrderLog();
 		tl.setAid(TokenManager.getAdminId());

+ 105 - 99
src/main/java/com/goafanti/order/service/impl/OrderBillServiceImpl.java

@@ -1,99 +1,105 @@
-package com.goafanti.order.service.impl;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.TOrderBillNewMapper;
-import com.goafanti.common.dao.TOrderNewMapper;
-import com.goafanti.common.model.TOrderBillNew;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.common.utils.ExportExcelUtil;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.service.OrderBillService;
-
-@Service
-public class OrderBillServiceImpl extends BaseMybatisDao<TOrderBillNewMapper> implements OrderBillService {
-	
-	@Autowired
-	private TOrderBillNewMapper billNewMapper;
-	@Autowired
-	private TOrderNewMapper	tOrderNewMapper;
-	@Value(value = "${upload.path}")
-	private String	uploadPath = null;
-
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<TOrderBillNew> myBillList(TOrderBillNew billNew,Integer whoType,
-			Integer pageNo, Integer pageSize) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		if(whoType==null)whoType=0;
-		if (whoType==0) billNew.setCreater(TokenManager.getAdminId());
-		params.put("b", billNew);
-		return (Pagination<TOrderBillNew>)findPage("myBillList", "myBillCount", params, pageNo, pageSize);
-	}
-
-
-	@Override
-	public XSSFWorkbook exportBillData(TOrderBillNew billNew) {
-		// 判断导出是否有部门
-		String deptid = billNew.getDepartmentId();
-		Map<String, List<TOrderBillNew>> map = new HashMap<String, List<TOrderBillNew>>();
-		if(StringUtils.isBlank(deptid)){
-			//获得所有有数据的部门
-			List<TOrderBillNew> dlist = billNewMapper.getDeptBySome(billNew);
-			if(null == dlist || dlist.size() == 0){
-				return null;
-			}
-			for (int i = 0; i < dlist.size(); i++) {
-				TOrderBillNew ob = dlist.get(i);
-				billNew.setDepartmentId(ob.getDepartmentId());
-				map.put(ob.getDepartmentName(), billNewMapper.getBillData(billNew));
-			}
-		}else{
-			map.put(billNew.getDepartmentName(), billNewMapper.getBillData(billNew));
-		}
-		String[] comment = {"平台流水编号","平台流水时间","交易金额(万元)","付款方","收款方","流水科目","交易渠道","交易时间","财务流水号","订单编号","订单负责人"};
-		String filePath = uploadPath + "/billtemp";
-//		File f = new File(filePath);
-//		if(!f.exists()){
-//			f.mkdirs();
-//		}
-		//filePath += "/" + System.nanoTime() +".xls";
-		XSSFWorkbook wb = ExportExcelUtil.exportDeptBillInfo(map,  comment, filePath);
-		
-		return wb;
-	}
-
-
-	@Override
-	public int deleteMyBill(String billNo) {
-		TOrderBillNew tbn=billNewMapper.selectByPrimaryKey(billNo);
-		TOrderNew o=tOrderNewMapper.selectByPrimaryKey(tbn.getOrderNo());
-		TOrderNew o2=new TOrderNew();
-		o2.setOrderNo(o.getOrderNo());
-		o2.setSettlementAmount(o.getSettlementAmount().subtract(tbn.getTransactionAmount()));
-		tOrderNewMapper.updateByPrimaryKeySelective(o2);
-		TOrderBillNew ntbn=new TOrderBillNew();
-		ntbn.setBillNo(tbn.getBillNo());
-		ntbn.setDeleteSign((byte)1);
-		ntbn.setDeleteTime(new Date());
-		billNewMapper.updateByPrimaryKeySelective(ntbn);
-		return 1;
-	}
-	
-
-	
-}
+package com.goafanti.order.service.impl;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.TOrderBillNewMapper;
+import com.goafanti.common.dao.TOrderNewMapper;
+import com.goafanti.common.model.TOrderBillNew;
+import com.goafanti.common.model.TOrderNew;
+import com.goafanti.common.utils.ExportExcelUtil;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.enums.LiquidationNewState;
+import com.goafanti.order.service.OrderBillService;
+
+@Service
+public class OrderBillServiceImpl extends BaseMybatisDao<TOrderBillNewMapper> implements OrderBillService {
+	
+	@Autowired
+	private TOrderBillNewMapper billNewMapper;
+	@Autowired
+	private TOrderNewMapper	tOrderNewMapper;
+	@Value(value = "${upload.path}")
+	private String	uploadPath = null;
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<TOrderBillNew> myBillList(TOrderBillNew billNew,Integer whoType,
+			Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(whoType==null)whoType=0;
+		if (whoType==0) billNew.setCreater(TokenManager.getAdminId());
+		params.put("b", billNew);
+		return (Pagination<TOrderBillNew>)findPage("myBillList", "myBillCount", params, pageNo, pageSize);
+	}
+
+
+	@Override
+	public XSSFWorkbook exportBillData(TOrderBillNew billNew) {
+		// 判断导出是否有部门
+		String deptid = billNew.getDepartmentId();
+		Map<String, List<TOrderBillNew>> map = new HashMap<String, List<TOrderBillNew>>();
+		if(StringUtils.isBlank(deptid)){
+			//获得所有有数据的部门
+			List<TOrderBillNew> dlist = billNewMapper.getDeptBySome(billNew);
+			if(null == dlist || dlist.size() == 0){
+				return null;
+			}
+			for (int i = 0; i < dlist.size(); i++) {
+				TOrderBillNew ob = dlist.get(i);
+				billNew.setDepartmentId(ob.getDepartmentId());
+				map.put(ob.getDepartmentName(), billNewMapper.getBillData(billNew));
+			}
+		}else{
+			map.put(billNew.getDepartmentName(), billNewMapper.getBillData(billNew));
+		}
+		String[] comment = {"平台流水编号","平台流水时间","交易金额(万元)","付款方","收款方","流水科目","交易渠道","交易时间","财务流水号","订单编号","订单负责人"};
+		String filePath = uploadPath + "/billtemp";
+//		File f = new File(filePath);
+//		if(!f.exists()){
+//			f.mkdirs();
+//		}
+		//filePath += "/" + System.nanoTime() +".xls";
+		XSSFWorkbook wb = ExportExcelUtil.exportDeptBillInfo(map,  comment, filePath);
+		
+		return wb;
+	}
+
+
+	@Override
+	public int deleteMyBill(String billNo) {
+		TOrderBillNew tbn=billNewMapper.selectByPrimaryKey(billNo);
+		TOrderNew o=tOrderNewMapper.selectByPrimaryKey(tbn.getOrderNo());
+		TOrderNew o2=new TOrderNew();
+		o2.setOrderNo(o.getOrderNo());
+		o2.setSettlementAmount(o.getSettlementAmount().subtract(tbn.getTransactionAmount()));
+		if(o2.getSettlementAmount().compareTo(o.getFirstAmount())== -1) {
+			o2.setLiquidationStatus(LiquidationNewState.WAIT_PAY_FIRST_BALANCE.getCode());
+		}else if(o2.getSettlementAmount().compareTo(o.getFirstAmount())> -1&&
+				o2.getSettlementAmount().compareTo(o.getTotalAmount())== -1) {
+			o2.setLiquidationStatus(LiquidationNewState.WAIT_PAY_LAST_BALANCE.getCode());
+		}else if(o2.getSettlementAmount().compareTo(o.getTotalAmount())== 0) {
+			o2.setLiquidationStatus(LiquidationNewState.ALREADY_PAY.getCode());
+		}
+		tOrderNewMapper.updateByPrimaryKeySelective(o2);
+		TOrderBillNew ntbn=new TOrderBillNew();
+		ntbn.setBillNo(tbn.getBillNo());
+		ntbn.setDeleteSign((byte)1);
+		ntbn.setDeleteTime(new Date());
+		billNewMapper.updateByPrimaryKeySelective(ntbn);
+		return 1;
+	}
+	
+}

+ 21 - 5
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -8,6 +8,7 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
@@ -79,11 +80,14 @@ import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.enums.OrderChangeType;
 import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.enums.OrderType;
+import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.FundManageOrderService;
 import com.goafanti.order.service.NewOrderDunService;
 import com.goafanti.order.service.OrderChangeService;
 import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.order.service.OrderService;
+import com.goafanti.techproject.enums.TaskState;
 
 @Service
 public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper> implements OrderChangeService {
@@ -120,6 +124,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	@Autowired
 	private OrderNewService	orderNewService;
 	@Autowired
+	private OrderProjectService	orderProjectService;
+	@Autowired
 	private NewOrderDunService	newOrderDunService;
 	@Autowired
 	private TChangeTaskMapper	TChangeTaskMapper;
@@ -539,8 +545,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	public int pushCompleteOrderChange(NewOrderChangeBo nb) {
 		//变更完成
 		changeAdopt(nb);
-		//新增退款金额
-		//addOrderRefund(nb);
 		TOrderNew o=pushChange(nb);
 		List<String> alist = new ArrayList<>();
 		alist.add(o.getSalesmanId());
@@ -583,6 +587,21 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			pushTaskAndDun(nob.getId(),nob.getOrderNo());
 		}
 		//
+		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(nb.getOrderNo());
+		int i=0;
+		for (TOrderTaskBo to : taskBos) {
+			if (to.getTaskStatus()>TaskState.UN_DISTRIBUTION.getCode()&&to.getTaskStatus()<TaskState.INVALID.getCode()) {
+				i++;
+			}
+			
+		}
+		if (i==taskBos.size()) {
+			o.setProcessStatus(ProcessStatus.YQBFPZXSGLY.getCode());
+		}else if(i>0&&i<taskBos.size()){
+			o.setProcessStatus(ProcessStatus.YBFPZXSGLY.getCode());
+		}else if(i==0){
+			o.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
+		}
 		tOrderNewMapper.updateByPrimaryKeySelective(o);
 		return o; 
 	}
@@ -640,9 +659,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				newOrderDunMapper.deleteByPrimaryKey(cd.getDid());
 			}
 		}
-		
-
-		
 	}
 
 	@Override

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

@@ -101,6 +101,7 @@ import com.goafanti.order.enums.TaskState;
 import com.goafanti.order.enums.refundState;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderService;
+import com.goafanti.organization.bo.OrganizationListOut;
 
 @Service
 @EnableAsync
@@ -522,8 +523,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tl.setAid(TokenManager.getAdminId());
 		if (orderStatus==OrderNewState.QDSHTG.getCode()) {
 			t.setOutsource(outsource);
-			if (t2.getApproval()==ApprovalNewState.FTP.getCode()||
-					t2.getApproval()==ApprovalNewState.TG.getCode()) {//如果通过分配给财务管理员
+			//外包单给外包审核员 否则给财务专员
 				if(outsource==0) {
 					t.setProcessStatus(ProcessStatus.YPCWZY.getCode());
 					//如果是转的暂时不删除外包信息
@@ -538,12 +538,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 					addOrderLog(tl,reason);
 					
 				}
-			}else {
-				t.setProcessStatus(ProcessStatus.YPTPSH.getCode());
-				for (Admin admin : adminMapper.getAdminRoleList("总裁")) {
-					aids.add(admin.getId());
-				}
-			}
+			
 			type=NoticeStatus.ORDER_YES.getCode();
 			tl.setOrderNo(orderNo);
 			tl.setProcess(OrderLogProcess.SH.getCode());
@@ -754,15 +749,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tl.setOrderNo(orderNo);
 		if (confirm==2) {
 			t.setApproval(2);
-			if(t2.getOutsource()==0) {
-				t.setProcessStatus(ProcessStatus.YPCWZY.getCode());
-				aids.add(organizationManagementMapper.selectByPrimaryKey(t2.getOrderDep()).getFinanceId());
-			}else {
-				t.setProcessStatus(ProcessStatus.YPWBSH.getCode());
-				for (Admin admin : adminMapper.getAdminRoleList("外包审核员")) {
+				t.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
+				OrganizationListOut oo=organizationManagementMapper.selectAllById(t2.getOrderDep());
+				t.setFinanceId(oo.getFinanceId());
+				for (Admin admin : adminMapper.getAdminRoleList("咨询师管理员")) {
 					aids.add(admin.getId());
 				}
-			}
 			type=NoticeStatus.ORDER_APPROVA_YES.getCode();
 			tl.setProcess(OrderLogProcess.TP.getCode());
 		} else {
@@ -1237,6 +1229,26 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 
+	@Override
+	public int pushOutsourceProjectAudit(TOrderOutsource o) {
+		o.setRefundStatus(0);
+		o.setCreateTime(new Date());
+		List<String> aids = new ArrayList<>();
+		for (Admin admin : adminMapper.getAdminRoleList("外包审核员")) {
+			aids.add(admin.getId());
+		}
+		TOrderNew t2= checkDeleteSign(o.getOrderNo());
+		pushGeneralSendNoticeAndEmail(aids, NoticeStatus.PROJECT_OUTSOURCE_START.getCode(),o.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
+		if (o.getId()!=null) {
+			tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
+		}else {
+			tOrderOutsourceMapper.insertSelective(o);
+		}
+		return 1;
+	}
+
+
+
 
 
 	

File diff suppressed because it is too large
+ 626 - 620
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java


+ 179 - 154
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -1,154 +1,179 @@
-package com.goafanti.order.service.impl;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.hibernate.validator.constraints.Mod11Check.ProcessingDirection;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.admin.bo.AdminListBo;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.OrganizationManagementMapper;
-import com.goafanti.common.dao.OutsourceOrganizationMapper;
-import com.goafanti.common.dao.TOrderLogMapper;
-import com.goafanti.common.dao.TOrderNewMapper;
-import com.goafanti.common.dao.TOrderOutsourceMapper;
-import com.goafanti.common.enums.NoticeStatus;
-import com.goafanti.common.enums.OrderLogProcess;
-import com.goafanti.common.model.OutsourceOrganization;
-import com.goafanti.common.model.TOrderLog;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.OrderOutsourceBo;
-import com.goafanti.order.bo.OrderOutsourceDtails;
-import com.goafanti.order.bo.OutsourceOrganizationBo;
-import com.goafanti.order.enums.ProcessStatus;
-import com.goafanti.order.service.OrderNewService;
-import com.goafanti.order.service.OrderService;
-import com.goafanti.order.service.OutsourceOrgService;
-import com.goafanti.organization.bo.OrganizationListOut;
-@Service
-public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapper> implements OutsourceOrgService {
-	@Autowired
-	private OutsourceOrganizationMapper  outsourceOrganizationMapper;
-	@Autowired
-	private OrganizationManagementMapper	organizationManagementMapper;
-	@Autowired
-	private TOrderOutsourceMapper	tOrderOutsourceMapper;
-	@Autowired
-	private TOrderNewMapper	tOrderNewMapper;
-	@Autowired
-	private OrderService	orderService;
-	@Autowired
-	private TOrderLogMapper	tOrderLogMapper;
-	@Autowired
-	private OrderNewService	orderNewService;
-	@Autowired
-	private AdminMapper	adminMapper;
-	@Override
-	public int addOutsourceOrg(OutsourceOrganization o) {
-		return outsourceOrganizationMapper.insertSelective(o);
-	}
-	@Override
-	public int updateOutsourceOrg(OutsourceOrganization o) {
-		return outsourceOrganizationMapper.updateByPrimaryKeySelective(o);
-	}
-	@Override
-	public int deleteOutsourceOrg(Integer id) {
-		return outsourceOrganizationMapper.deleteByPrimaryKey(id);
-	}
-	@Override
-	public List<OutsourceOrganizationBo> selectOutsourceOrg(String orderNo,String tid) {
-		List<OutsourceOrganizationBo> l=outsourceOrganizationMapper.selectOutsourceOrg(orderNo,tid);
-		return l;
-	}
-	@Override
-	public List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo) {
-		
-		return outsourceOrganizationMapper.selectOrderOutsourceOrg(orderNo);
-	}
-	
-	@Override
-	@SuppressWarnings("unchecked")
-	public Pagination<OrderOutsourceBo> orderOutsourceList(String name, String contractNo, String starTime,
-			String endTime,Integer refundStatus, Integer pageNo, Integer pageSize) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		if(pageSize==null||pageSize<0)pageSize=10;
-		if(pageNo==null||pageNo<0)pageNo=1;
-		if (StringUtils.isNotBlank(name)) params.put("name", name);
-		if(refundStatus != null) params.put("refundStatus", refundStatus);
-		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
-		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
-		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		Pagination<OrderOutsourceBo> p = (Pagination<OrderOutsourceBo>)findPage("orderOutsourceList", "orderOutsourceCount", params, pageNo, pageSize);
-		return p;
-	}
-
-
-
-	@Override
-	public OrderOutsourceDtails orderOutsourceDtails(String orderNo) {
-		return tOrderOutsourceMapper.selectByOrderNo(orderNo);
-	}
-
-
-
-	@Override
-	public int updateAuditOutsource(OrderOutsourceDtails o) {
-		o.setAuditTime(new Date());
-		TOrderNew t=new TOrderNew();
-		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(o.getOrderNo());
-		List<String> aids = new ArrayList<>();
-		Integer type=null;
-		t.setOrderNo(o.getOrderNo());
-		if (o.getRefundStatus()==1) {
-			t.setOrderStatus(2);//订单审核标记通过
-			t.setProcessStatus(ProcessStatus.YPCWZY.getCode());
-			addOrderLog(o.getOrderNo(),OrderLogProcess.WBSH.getCode());
-			aids.add(organizationManagementMapper.selectByPrimaryKey(t2.getOrderDep()).getFinanceId());
-			type=NoticeStatus.ORDER_OUTSOURCE_YES.getCode();
-		}else {
-			t.setOrderStatus(1);
-			t.setProcessStatus(ProcessStatus.YPYXGLY.getCode());
-			addOrderLog(o.getOrderNo(),OrderLogProcess.WBBH.getCode());
-			aids.addAll(adminMapper.listNameByDepAndName(adminMapper.getDeptNameByAid(t2.getSalesmanId()).getDepartmentId(), "营销管理员"));
-			type=NoticeStatus.ORDER_OUTSOURCE_NO.getCode();
-		}
-		tOrderNewMapper.updateByPrimaryKeySelective(t);
-		orderNewService.pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
-		return tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
-	}
-	
-	public void addOrderLog(String orderNo, Integer code) {
-		TOrderLog tl=new TOrderLog();
-		tl.setOrderNo(orderNo);
-		tl.setProcess(code);
-		tl.setAid(TokenManager.getAdminId());
-		tOrderLogMapper.insertSelective(tl);
-		
-	}
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<OrderOutsourceBo> salesmanOrderOutsourceList(String name, String contractNo, String starTime,
-			String endTime, Integer refundStatus, Integer pageNo, Integer pageSize) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		if(pageSize==null||pageSize<0)pageSize=10;
-		if(pageNo==null||pageNo<0)pageNo=1;
-		if (StringUtils.isNotBlank(name)) params.put("name", name);
-		params.put("deps", orderService.selectMyDeps());
-		if(refundStatus != null) params.put("refundStatus", refundStatus);
-		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
-		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
-		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		Pagination<OrderOutsourceBo> p = (Pagination<OrderOutsourceBo>)findPage("salesmanOrderOutsourceList", "salesmanOrderOutsourceCount", params, pageNo, pageSize);
-		return p;
-	}
-
-}
+package com.goafanti.order.service.impl;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.validator.constraints.Mod11Check.ProcessingDirection;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.OrganizationManagementMapper;
+import com.goafanti.common.dao.OutsourceOrganizationMapper;
+import com.goafanti.common.dao.TOrderLogMapper;
+import com.goafanti.common.dao.TOrderNewMapper;
+import com.goafanti.common.dao.TOrderOutsourceMapper;
+import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.OrderLogProcess;
+import com.goafanti.common.model.OutsourceOrganization;
+import com.goafanti.common.model.TOrderLog;
+import com.goafanti.common.model.TOrderNew;
+import com.goafanti.common.model.TOrderTask;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.OrderOutsourceBo;
+import com.goafanti.order.bo.OrderOutsourceDtails;
+import com.goafanti.order.bo.OutsourceOrganizationBo;
+import com.goafanti.order.enums.ProcessStatus;
+import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OrderService;
+import com.goafanti.order.service.OutsourceOrgService;
+import com.goafanti.organization.bo.OrganizationListOut;
+@Service
+public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapper> implements OutsourceOrgService {
+	@Autowired
+	private OutsourceOrganizationMapper  outsourceOrganizationMapper;
+	@Autowired
+	private OrganizationManagementMapper	organizationManagementMapper;
+	@Autowired
+	private TOrderOutsourceMapper	tOrderOutsourceMapper;
+	@Autowired
+	private TOrderNewMapper	tOrderNewMapper;
+	@Autowired
+	private TOrderTaskMapper	tOrderTaskMapper;
+	@Autowired
+	private OrderService	orderService;
+	@Autowired
+	private TOrderLogMapper	tOrderLogMapper;
+	@Autowired
+	private OrderNewService	orderNewService;
+	@Autowired
+	private AdminMapper	adminMapper;
+	@Override
+	public int addOutsourceOrg(OutsourceOrganization o) {
+		return outsourceOrganizationMapper.insertSelective(o);
+	}
+	@Override
+	public int updateOutsourceOrg(OutsourceOrganization o) {
+		return outsourceOrganizationMapper.updateByPrimaryKeySelective(o);
+	}
+	@Override
+	public int deleteOutsourceOrg(Integer id) {
+		return outsourceOrganizationMapper.deleteByPrimaryKey(id);
+	}
+	@Override
+	public List<OutsourceOrganizationBo> selectOutsourceOrg(String orderNo,String tid) {
+		
+		return outsourceOrganizationMapper.selectOutsourceOrg(orderNo,tid);
+	}
+	@Override
+	public List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo) {
+		
+		return outsourceOrganizationMapper.selectOrderOutsourceOrg(orderNo);
+	}
+	
+	@Override
+	@SuppressWarnings("unchecked")
+	public Pagination<OrderOutsourceBo> orderOutsourceList(String name, String contractNo, String starTime,
+			String endTime,Integer refundStatus,Integer type, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		if(refundStatus != null) params.put("refundStatus", refundStatus);
+		if(type != null)  params.put("type", type);
+		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
+		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
+		Pagination<OrderOutsourceBo> p = (Pagination<OrderOutsourceBo>)findPage("orderOutsourceList", "orderOutsourceCount", params, pageNo, pageSize);
+		return p;
+	}
+
+
+
+	@Override
+	public OrderOutsourceDtails orderOutsourceDtails(String orderNo,String tid) {
+		return tOrderOutsourceMapper.selectByOrderNo(orderNo,tid);
+	}
+
+
+
+	@Override
+	public int updateAuditOutsource(OrderOutsourceDtails o) {
+		o.setAuditTime(new Date());
+		List<String> aids = new ArrayList<>();
+		Integer type=null;
+		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(o.getOrderNo());
+		//外包订单
+		if (o.getType()==null||o.getType()==0) {
+			o.setType(0);
+			TOrderNew t=new TOrderNew();
+			t.setOrderNo(o.getOrderNo());
+			if (o.getRefundStatus()==1) {
+				t.setOrderStatus(2);//订单审核标记通过
+				t.setProcessStatus(ProcessStatus.YPCWZY.getCode());
+				addOrderLog(o.getOrderNo(),OrderLogProcess.WBTG.getCode(),o.getRemarks());
+				aids.add(organizationManagementMapper.selectByPrimaryKey(t2.getOrderDep()).getFinanceId());
+				type=NoticeStatus.ORDER_OUTSOURCE_YES.getCode();
+			}else {
+				t.setOrderStatus(1);
+				t.setProcessStatus(ProcessStatus.YPYXGLY.getCode());
+				addOrderLog(o.getOrderNo(),OrderLogProcess.WBBH.getCode(),o.getRemarks());
+				aids.addAll(adminMapper.listNameByDepAndName(adminMapper.getDeptNameByAid(t2.getSalesmanId()).getDepartmentId(), "营销管理员"));
+				type=NoticeStatus.ORDER_OUTSOURCE_NO.getCode();
+			}
+			tOrderNewMapper.updateByPrimaryKeySelective(t);
+		}else if (o.getType()==1) {//项目外包
+			TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(o.getTid());
+			aids.add(tt.getTaskReceiver());
+			if (o.getRefundStatus()==1) {
+				//把项目更改成外包项目
+				TOrderTask tt2=new TOrderTask();
+				tt2.setId(o.getTid());
+				tt2.setOutsource(1);
+				tOrderTaskMapper.updateByPrimaryKeySelective(tt2);
+				type=NoticeStatus.PROJECT_OUTSOURCE_YES.getCode();
+				addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBTG.getCode(),o.getRemarks());
+			}else {
+				type=NoticeStatus.PROJECT_OUTSOURCE_NO.getCode();
+				addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBBH.getCode(),o.getRemarks());
+			}
+		}
+		orderNewService.pushGeneralSendNoticeAndEmail(aids, type,o.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
+		return tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
+	}
+	
+	public void addOrderLog(String orderNo, Integer code,String remarks) {
+		TOrderLog tl=new TOrderLog();
+		tl.setOrderNo(orderNo);
+		tl.setProcess(code);
+		tl.setAid(TokenManager.getAdminId());
+		tl.setRemarks(remarks);
+		tOrderLogMapper.insertSelective(tl);
+		
+	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OrderOutsourceBo> salesmanOrderOutsourceList(String name, String contractNo, String starTime,
+			String endTime, Integer refundStatus, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		if(pageSize==null||pageSize<0)pageSize=10;
+		if(pageNo==null||pageNo<0)pageNo=1;
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		params.put("deps", orderService.selectMyDeps());
+		if(refundStatus != null) params.put("refundStatus", refundStatus);
+		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
+		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
+		Pagination<OrderOutsourceBo> p = (Pagination<OrderOutsourceBo>)findPage("salesmanOrderOutsourceList", "salesmanOrderOutsourceCount", params, pageNo, pageSize);
+		return p;
+	}
+
+}

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

@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-#static.host=//sb.jishutao.com/1.1.31
+#static.host=//sb.jishutao.com/1.1.33
 #avatar.host=//sb.jishutao.com
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.31
+static.host=//static.jishutao.com/1.1.33
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

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

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/1.1.31
+static.host=//static.jishutao.com/1.1.33
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload