anderx 3 years ago
parent
commit
cb4a017a9e
23 changed files with 807 additions and 136 deletions
  1. 2 2
      src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java
  2. 2 2
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  3. 1 1
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  4. 13 9
      src/main/java/com/goafanti/common/enums/NoticeTypes.java
  5. 12 4
      src/main/java/com/goafanti/common/enums/OrderLogProcess.java
  6. 2 2
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  7. 31 29
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  8. 1 1
      src/main/java/com/goafanti/common/mapper/NewOrderDunMapper.xml
  9. 43 0
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  10. 132 1
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  11. 8 3
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  12. 118 0
      src/main/java/com/goafanti/order/bo/InputMemberList.java
  13. 47 0
      src/main/java/com/goafanti/order/bo/InputMenber.java
  14. 115 0
      src/main/java/com/goafanti/order/bo/OutMemberList.java
  15. 5 7
      src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java
  16. 30 2
      src/main/java/com/goafanti/order/bo/outOrderDunListBo.java
  17. 8 4
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  18. 46 46
      src/main/java/com/goafanti/order/controller/AdminOrderApiController.java
  19. 44 1
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  20. 11 6
      src/main/java/com/goafanti/order/service/OrderNewService.java
  21. 12 2
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  22. 24 5
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  23. 100 9
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

+ 2 - 2
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -447,8 +447,8 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 
 
 	@Override
-	public List<BusinessProject> selectBusinessProjectByName(String businessName,String cid) {
-		return businessProjectMapper.selectBusinessProjectByName(businessName,cid);
+	public List<BusinessProject> selectBusinessProjectByName(String businessName,String cname) {
+		return businessProjectMapper.selectBusinessProjectByName(businessName,cname);
 	}
 
 	@Override

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

@@ -39,11 +39,11 @@ public interface BusinessProjectMapper {
 
 	int checkProject(String id);
 
-	List<BusinessProject> selectBusinessProjectByName(@Param("businessName")String businessName,@Param("cid")String cid);
+	List<BusinessProject> selectBusinessProjectByName(@Param("businessName")String businessName,@Param("cname")String cname);
 
 
 	 List<BusinessCategory> selectBusinessProjectCatalog();
 
 
 
-}
+}

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

@@ -65,7 +65,7 @@ public enum NoticeStatus {
 	PUBLIC_RELEASE_NO(56,"外出打卡驳回"),
 	ITEM_CHECK_START(57,"发起专利核对"),
 	ITEM_CHECK_END(58,"完成专利核对"),
-	MANBER_DUN(59,"完成专利核对"),
+	MENBER_DUN(59,"会员催款信息"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

+ 13 - 9
src/main/java/com/goafanti/common/enums/NoticeTypes.java

@@ -18,8 +18,10 @@ public enum NoticeTypes {
 	CKFK(5,"催款\\付款"),
 	/** 订单开票 */
 	DDKP(6,"订单开票"),
+
+	HYCS(7,"会员催收"),
 	ELSE(0,"其他");
-	
+
 	/**
 	 * 跟进通知类型获取大分类
 	 * @param i
@@ -57,12 +59,14 @@ public enum NoticeTypes {
 				|| i == NoticeStatus.ORDER_INVPICE_APPROVA_NO.getCode()
 				|| i == NoticeStatus.ORDER_INVPICE_END.getCode()) {
 			return 6;
+		}else if (i == NoticeStatus.MENBER_DUN.getCode()) {
+			return 7;
 		}
 		return 0;
 	}
-	
+
 	private static Map<Integer, NoticeTypes> status = new HashMap<Integer, NoticeTypes>();
-	
+
 	static {
 		for (NoticeTypes value : NoticeTypes.values()) {
 			status.put(value.getCode(), value);
@@ -74,7 +78,7 @@ public enum NoticeTypes {
 		}
 		return ELSE;
 	}
-	
+
 	public static String getValueByCode(Integer code){
         for(NoticeTypes NoticeTypes:NoticeTypes.values()){
             if(code.equals(NoticeTypes.getCode())){
@@ -83,7 +87,7 @@ public enum NoticeTypes {
         }
         return  ELSE.getDesc();
     }
-	
+
 	public static Integer getCount(){
 		Integer count=0;
         for(NoticeTypes x:NoticeTypes.values()){
@@ -91,15 +95,15 @@ public enum NoticeTypes {
         }
         return  --count;
     }
-	
-	
+
+
 	public static boolean containsType(Integer code) {
 		return status.containsKey(code);
 	}
-	
+
 	private String desc;
 	private Integer code;
-	
+
 	private NoticeTypes(Integer code, String desc) {
 		this.setCode(code);
 		this.setDesc(desc);

+ 12 - 4
src/main/java/com/goafanti/common/enums/OrderLogProcess.java

@@ -7,7 +7,9 @@ import org.apache.commons.lang3.StringUtils;
 
 
 public enum OrderLogProcess {
-//	流程 0发起退单 1提交 2审核 3驳回  4特批 5财务派单 6财务首付 7项目订单派单 8项目派单 9项目完成 10 退单完成 11财务全款 12发起外包 13外包通过 14外包拒绝15项目外包通过16项目外包驳回17订单离职转交
+//	流程1=提交,2=审核,3=驳回,4=特批,5=财务派单,6=财务首付,7=项目订单派单,8=项目派单,9=项目完成,0=发起退单,10=退单完成,11=财务全款,
+//	12=离职转交,13=发起会员项目,14=订单外包驳回,15=项目外包通过,16=项目外包驳回,17=订单离职转交,18=会员项目发起,19=会员财务通过,
+//	20=会员特批通过,21=会员财务驳回,22=会员特批驳回,23=会员项目完成
 	TJ(1, "营销员提交"),
 	SH(2, "管理员审核"),
 	BH(3, "驳回"),
@@ -26,9 +28,15 @@ public enum OrderLogProcess {
 	XMWBTG(15,"项目外包通过"),
 	XMWBBH(16,"项目外包驳回"),
 	DDLZZJ(17,"订单离职转交"),
+	HYXMFQ(18,"会员项目发起"),
+	HYCWTG(19,"会员财务通过"),
+	HYTPTG(20,"会员特批通过"),
+	HYCWBH(21,"会员财务驳回"),
+	HYTPBH(22,"会员特批驳回"),
+	HYXMWC(23,"会员项目完成"),
 	NOT(99,"未知"),
 	;
-	
+
 	private OrderLogProcess(Integer code, String desc) {
 		this.code = code;
 		this.desc = desc;
@@ -49,8 +57,8 @@ public enum OrderLogProcess {
         }
         return  NOT.getDesc();
     }
-	
-	
+
+
 	public static OrderLogProcess getStatus(Integer code) {
 		if (containsType(code)) {
 			return status.get(code);

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

@@ -529,7 +529,7 @@
     left join admin aa on aa.id = a.superior_id
     left join user_role ur on a.id=ur.uid
     left join `role` y on ur.rid=y.id
-    where a.id <![CDATA[ <> ]]> '1' and a.status='正常'
+    where a.id <![CDATA[ <> ]]> '1'
     <if test="roleName != null">
       and y.role_name= #{roleName,jdbcType=VARCHAR}
     </if>
@@ -568,7 +568,7 @@
     from(select a.id counts from (select a.id  from admin a
     left join user_role ur on a.id=ur.uid
     left join `role` y on ur.rid=y.id
-    where a.id <![CDATA[ <> ]]> '1' and a.status='正常'
+    where a.id <![CDATA[ <> ]]> '1'
     <if test="roleName != null">
       and y.role_name= #{roleName,jdbcType=VARCHAR}
     </if>

+ 31 - 29
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -32,13 +32,13 @@
     <result column="patent_transfer" jdbcType="INTEGER" property="patentTransfer" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, create_id, create_time, update_time, delete_sign, bname, cid, price, `offset`, 
-    activity_price, activity_flag, member_price, introduce, `status`, country, province, 
-    city, district, principal_id, Value_effect, client_size, min_logo, max_logo, project_url, 
+    id, create_id, create_time, update_time, delete_sign, bname, cid, price, `offset`,
+    activity_price, activity_flag, member_price, introduce, `status`, country, province,
+    city, district, principal_id, Value_effect, client_size, min_logo, max_logo, project_url,
     boutique, first_payment, `type`, patent_transfer
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from business_project
     where id = #{id,jdbcType=VARCHAR}
@@ -48,25 +48,25 @@
     where id = #{id,jdbcType=VARCHAR}
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.BusinessProject">
-    insert into business_project (id, create_id, create_time, 
-      update_time, delete_sign, bname, 
-      cid, price, `offset`, 
-      activity_price, activity_flag, member_price, 
-      introduce, `status`, country, 
-      province, city, district, 
-      principal_id, Value_effect, client_size, 
-      min_logo, max_logo, project_url, 
-      boutique, first_payment, `type`, 
+    insert into business_project (id, create_id, create_time,
+      update_time, delete_sign, bname,
+      cid, price, `offset`,
+      activity_price, activity_flag, member_price,
+      introduce, `status`, country,
+      province, city, district,
+      principal_id, Value_effect, client_size,
+      min_logo, max_logo, project_url,
+      boutique, first_payment, `type`,
       patent_transfer)
-    values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR}, 
-      #{cid,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL}, 
-      #{activityPrice,jdbcType=DECIMAL}, #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL}, 
-      #{introduce,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, 
-      #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR}, 
-      #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR}, 
-      #{minLogo,jdbcType=VARCHAR}, #{maxLogo,jdbcType=VARCHAR}, #{projectUrl,jdbcType=VARCHAR}, 
-      #{boutique,jdbcType=INTEGER}, #{firstPayment,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER}, 
+    values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+      #{updateTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR},
+      #{cid,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL},
+      #{activityPrice,jdbcType=DECIMAL}, #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL},
+      #{introduce,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR},
+      #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
+      #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR},
+      #{minLogo,jdbcType=VARCHAR}, #{maxLogo,jdbcType=VARCHAR}, #{projectUrl,jdbcType=VARCHAR},
+      #{boutique,jdbcType=INTEGER}, #{firstPayment,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
       #{patentTransfer,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.BusinessProject">
@@ -543,13 +543,15 @@
  </select>
 
  <select id="selectBusinessProjectByName" parameterType="java.lang.String" resultMap="BaseResultMap">
- 	select  id,bname,ifnull(price,0) as price,ifnull(first_payment,0) as firstPayment,type ,patent_transfer patentTransfer
- 	from business_project
- 	where 1=1
- 	<if test="cid != null">
- 		and cid = #{cid,jdbcType=VARCHAR}
+   select  a.id,a.bname,ifnull(a.price,0) as price,ifnull(a.first_payment,0) as firstPayment,
+   a.type ,a.patent_transfer patentTransfer,b.cname
+   from business_project a  left join business_category b on a.cid=b.id
+   where 1=1
+ 	<if test="cname != null">
+ 		and b.cname = #{cname,jdbcType=VARCHAR}
  	</if>
- 	and bname like concat('%',#{businessName},'%') and delete_sign=0 and status=0
+    and a.delete_sign=0 and a.status=0
+   and a.bname like concat('%',#{businessName},'%')
  </select>
 
 
@@ -566,4 +568,4 @@
   	select id,cname from business_category where delete_sign=0
   </select>
 
-</mapper>
+</mapper>

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

@@ -463,7 +463,7 @@
   <select id="selectAllOrderDun" resultType="com.goafanti.order.bo.OutNewOrderDunBo">
     select a.id, a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay,
      a.effective_count effectiveCount, a.aid, a.create_time createTime,b.approval,a.customize_time customizeTime,
-    date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName,a.money ,c.project_type projectType
+    date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName,a.money ,c.project_type memberType
     from new_order_dun a left join  t_order_new b on a.order_no=b.order_no left join t_order_mid c on a.order_no =c.order_no
     where 1=1 and a.status=0 and b.process_status &gt; 4 and b.delete_sign in (0,2,3)
   </select>

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

@@ -1218,6 +1218,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
 	b.total_amount as totalAmount,b.liquidation_status as liquidationStatus,b.settlement_amount as settlementAmount,a.money as accountsReceivable,
 	if((b.total_amount-b.settlement_amount) &lt; 0,0,(b.total_amount-b.settlement_amount)) as uncollectedAmount,b.order_status as orderStatus,
 	date_format(a.start_time, '%Y-%m-%d') as startDate,dep.name as depName,date_format(b.sign_time,'%Y-%m-%d') as signDate,
+    b.approval ,b.delete_sign deleteSign ,tm.project_type memberType,
 	<if test="newStatus == 0 ">
 	a.dun_subject as dunSubject,a.dun_status dunStatus
 	from t_order_dun a
@@ -1236,6 +1237,27 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="shiroType == 2 and fid !=null">
   	 and tm.finance_id in (select id from admin where superior_id= #{fid,jdbcType=VARCHAR})
   	</if>
+    <if test="amountStatus == 1">
+      and b.total_amount between 10 and 20
+    </if>
+    <if test="amountStatus == 2">
+      and b.total_amount between 20 and 30
+    </if>
+    <if test="amountStatus == 3">
+      and b.total_amount between 30 and 40
+    </if>
+    <if test="amountStatus == 4">
+      and b.total_amount  &gt; 40
+    </if>
+    <if test="approval != null and approval &lt; 3">
+      and b.approval = #{approval}
+    </if>
+    <if test="approval != null and approval ==4">
+      and b.approval in (1,2)
+    </if>
+	<if test="memberType !=null">
+      and b.projectType= #{memberType}
+    </if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
@@ -1284,6 +1306,27 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="shiroType == 2 and fid !=null">
   	 and tm.finance_id in (select id from admin where superior_id= #{fid,jdbcType=VARCHAR})
   	</if>
+     <if test="amountStatus == 1">
+       and b.total_amount between 10 and 20
+     </if>
+     <if test="amountStatus == 2">
+       and b.total_amount between 20 and 30
+     </if>
+     <if test="amountStatus == 3">
+       and b.total_amount between 30 and 40
+     </if>
+     <if test="amountStatus == 4">
+       and b.total_amount  &gt; 40
+     </if>
+     <if test="approval != null and approval &lt; 3">
+       and b.approval = #{approval}
+     </if>
+     <if test="approval != null and approval ==4">
+       and b.approval in (1,2)
+     </if>
+     <if test="memberType !=null">
+       and b.projectType= #{memberType}
+     </if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>

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

@@ -784,7 +784,7 @@
       and a.order_no= #{orderNo,jdbcType=VARCHAR}
       </if>
     <if test="type == 1">
-      and a.process_status= 3
+      and a.process_status in(0,3)
     </if>
     order by a.id
   </select>
@@ -1731,4 +1731,135 @@
     </if>
     desc
   </select>
+
+  <select id="findMemberList" resultType="com.goafanti.order.bo.OutMemberList">
+    select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
+           c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.task_comment projectComment,
+           a.process_status status
+    from t_order_task a left join t_order_new b on a.order_no =b.order_no
+    left join t_order_mid c on a.order_no =c.order_no
+    <if test="shiroType ==2">
+      left join department d on b.order_dep =d.id
+    </if>
+    where  b.approval in (0,1,2)
+    <if test="shiroType ==1">
+      and a.process_status in (1,2,3,4)
+      and b.salesman_id = #{aid}
+    </if>
+    <if test="shiroType ==2">
+      and a.process_status in (1,2,3)
+      and d.finance_id  = #{aid}
+    </if>
+    <if test="shiroType ==3">
+      and a.process_status in (1,2,3)
+    </if>
+    <if test="orderNo != null">
+      and a.order_no = #{orderNo}
+    </if>
+      <if test="userName != null">
+      and c.buyer_name like concat('%',#{userName},'%')
+      </if>
+    <if test="depId != null">
+      and b.order_dep = #{depId}
+    </if>
+    <if test="contractNo != null">
+      and b.contract_no =#{contractNo}
+    </if>
+    <if test="salesmanId != null">
+      and b.salesman_id =#{salesmanId}
+    </if>
+    <if test="projectName != null">
+      and a.commodity_name like concat('%',#{projectName},'%')
+    </if>
+    <if test="amountStatus == 0">
+      and b.total_amount &lt; 10
+    </if>
+    <if test="amountStatus == 1">
+      and b.total_amount between 10 and 20
+    </if>
+    <if test="amountStatus == 2">
+      and b.total_amount between 20 and 30
+    </if>
+    <if test="amountStatus == 3">
+      and b.total_amount between 30 and 40
+    </if>
+    <if test="amountStatus == 4">
+      and b.total_amount  &gt; 40
+    </if>
+    <if test="approval != null and approval &lt; 3">
+      and b.approval = #{approval}
+    </if>
+    <if test="approval != null and approval ==4">
+      and b.approval in (1,2)
+    </if>
+    <if test="status != null">
+      and a.process_status = #{status}
+    </if>
+    <if test="page_sql!=null">
+      ${page_sql}
+    </if>
+  </select>
+
+
+    <select id="findMemberCount" resultType="java.lang.Integer">
+      select count(*)
+      from t_order_task a left join t_order_new b on a.order_no =b.order_no
+      left join t_order_mid c on a.order_no =c.order_no
+      <if test="shiroType ==2">
+        left join department d on b.order_dep =d.id
+      </if>
+      where  b.approval in (0,1,2)
+      <if test="shiroType ==1">
+        and a.process_status in (1,2,3,4)
+        and b.salesman_id = #{aid}
+      </if>
+      <if test="shiroType ==2">
+        and a.process_status in (1,2,3)
+        and d.finance_id  = #{aid}
+      </if>
+      <if test="shiroType ==3">
+        and a.process_status in (1,2,3)
+      </if>
+      <if test="orderNo != null">
+        and a.order_no = #{orderNo}
+      </if>
+      <if test="userName != null">
+        and c.buyer_name like concat('%',#{userName},'%')
+      </if>
+      <if test="depId != null">
+        and b.order_dep = #{depId}
+      </if>
+      <if test="contractNo != null">
+        and b.contract_no =#{contractNo}
+      </if>
+      <if test="salesmanId != null">
+        and b.salesman_id =#{salesmanId}
+      </if>
+      <if test="projectName != null">
+        and a.commodity_name like concat('%',#{projectName},'%')
+      </if>
+      <if test="amountStatus == 1">
+        and b.total_amount between 10 and 20
+      </if>
+      <if test="amountStatus == 2">
+        and b.total_amount between 20 and 30
+      </if>
+      <if test="amountStatus == 3">
+        and b.total_amount between 30 and 40
+      </if>
+      <if test="amountStatus == 4">
+        and b.total_amount  &gt; 40
+      </if>
+      <if test="approval != null and approval &lt; 3">
+        and b.approval = #{approval}
+      </if>
+      <if test="approval != null and approval ==4">
+        and b.approval in (1,2)
+      </if>
+      <if test="status != null">
+        and a.process_status = #{status}
+      </if>
+  </select>
+
+
 </mapper>

+ 8 - 3
src/main/java/com/goafanti/common/task/OrderDunTask.java

@@ -40,7 +40,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 
 @Component
-//@RestController
+@RestController
 public class OrderDunTask {
 	@Autowired
 	private OrderNewService orderNewService;
@@ -72,7 +72,7 @@ public class OrderDunTask {
 	 */
 //	@ResponseBody
 	@Scheduled(cron = "0 0 3  * * ?")
-//	@RequestMapping(value = "/open/test", method = RequestMethod.GET)
+	@RequestMapping(value = "/open/test", method = RequestMethod.GET)
 //	@Scheduled(cron = "0 47 11  * * ?")
 	@Transactional(rollbackFor=Exception.class)
 	public void startTask() throws InterruptedException {
@@ -152,7 +152,7 @@ public class OrderDunTask {
 				}else if (o.getDunType()==0) {
 						CalendarTimeCleared(now);
 						//会员提前2个月多一个催款
-					if (o.getProjectType()==1){
+					if (o.getMemberType()==1){
 						pushMamberProject(o,now);
 					}
 					create.setTime(o.getCustomizeTime());
@@ -169,6 +169,11 @@ public class OrderDunTask {
 		}
   	}
 
+	/**
+	 * 此会员催款,只会在当天触发
+	 * @param o
+	 * @param now
+	 */
 	private void pushMamberProject(OutNewOrderDunBo o, Calendar now) {
 		Calendar start=Calendar.getInstance();
 		start.setTime(o.getCustomizeTime());

+ 118 - 0
src/main/java/com/goafanti/order/bo/InputMemberList.java

@@ -0,0 +1,118 @@
+package com.goafanti.order.bo;
+
+public class InputMemberList {
+    private String orderNo;
+    private String userName;
+    private String depId;
+    private String contractNo;
+    private String salesmanId;
+    private String projectName;
+    private Integer amountStatus;
+    private Integer approval;
+    private Integer status;
+
+    /**
+     * 0 所有  1营销(自己)  2财务审核 3特批审核
+     */
+    private Integer shiroType;
+
+    private Integer pageSize;
+    private Integer pageNo;
+
+    public Integer getShiroType() {
+        if (shiroType==null)return 1;
+        return shiroType;
+    }
+
+    public void setShiroType(Integer shiroType) {
+        this.shiroType = shiroType;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String 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 String getSalesmanId() {
+        return salesmanId;
+    }
+
+    public void setSalesmanId(String salesmanId) {
+        this.salesmanId = salesmanId;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Integer getAmountStatus() {
+        return amountStatus;
+    }
+
+    public void setAmountStatus(Integer amountStatus) {
+        this.amountStatus = amountStatus;
+    }
+
+    public Integer getApproval() {
+        return approval;
+    }
+
+    public void setApproval(Integer approval) {
+        this.approval = approval;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+}

+ 47 - 0
src/main/java/com/goafanti/order/bo/InputMenber.java

@@ -0,0 +1,47 @@
+package com.goafanti.order.bo;
+
+public class InputMenber {
+
+    private Integer id;
+
+    private Integer result;
+
+    /**
+     *  0 财务审核  1会员总裁审核
+     */
+    private Integer type;
+
+    private String remarks;
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getResult() {
+        return result;
+    }
+
+    public void setResult(Integer result) {
+        this.result = result;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+}

+ 115 - 0
src/main/java/com/goafanti/order/bo/OutMemberList.java

@@ -0,0 +1,115 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+public class OutMemberList {
+    private Integer id;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "客户名称")
+    private String userName;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "特批状态",readConverterExp = "0=非特批,1=待审核,2=通过,3=驳回")
+    private Integer approval;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "订单负责人")
+    private String salesmanName;
+    @Excel(name = "财务负责人")
+    private String financeName;
+    @Excel(name = "会员项目")
+    private String projectName;
+    @Excel(name = "项目说明")
+    private String projectComment;
+    @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回")
+    private String status;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Integer getApproval() {
+        return approval;
+    }
+
+    public void setApproval(Integer approval) {
+        this.approval = approval;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getFinanceName() {
+        return financeName;
+    }
+
+    public void setFinanceName(String financeName) {
+        this.financeName = financeName;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getProjectComment() {
+        return projectComment;
+    }
+
+    public void setProjectComment(String projectComment) {
+        this.projectComment = projectComment;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}

+ 5 - 7
src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java

@@ -16,16 +16,14 @@ public class OutNewOrderDunBo extends NewOrderDun {
 	private BigDecimal setUpAmount;
 	private String customizeTimes;
 
-	private Integer	projectType;
+	private Integer	memberType;
 
-	@Override
-	public Integer getProjectType() {
-		return projectType;
+	public Integer getMemberType() {
+		return memberType;
 	}
 
-	@Override
-	public void setProjectType(Integer projectType) {
-		this.projectType = projectType;
+	public void setMemberType(Integer memberType) {
+		this.memberType = memberType;
 	}
 
 	public String getDunTypeName() {

+ 30 - 2
src/main/java/com/goafanti/order/bo/outOrderDunListBo.java

@@ -30,7 +30,35 @@ public class outOrderDunListBo {
 	private BigDecimal setUpAmount;
 	private String customizeName;
 	private String customizeTimes;
-	
+
+	private Integer approval;
+	private Integer deleteSign;
+	private Integer memberType;
+
+	public Integer getApproval() {
+		return approval;
+	}
+
+	public void setApproval(Integer approval) {
+		this.approval = approval;
+	}
+
+	public Integer getDeleteSign() {
+		return deleteSign;
+	}
+
+	public void setDeleteSign(Integer deleteSign) {
+		this.deleteSign = deleteSign;
+	}
+
+	public Integer getMemberType() {
+		return memberType;
+	}
+
+	public void setMemberType(Integer memberType) {
+		this.memberType = memberType;
+	}
+
 	public String getId() {
 		return id;
 	}
@@ -184,6 +212,6 @@ public class outOrderDunListBo {
 	public void setCustomizeName(String customizeName) {
 		this.customizeName = customizeName;
 	}
-	
+
 
 }

+ 8 - 4
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -369,9 +369,11 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	 */
 	@RequestMapping(value="/dunOrderNewList", method = RequestMethod.GET)
 	public Result dunOrderNewList(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,
-			String adminName,String depId,Integer newStatus,Integer pageNo,Integer pageSize){
+			String adminName,String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer projectType,
+								  Integer pageNo,Integer pageSize){
 		Result res=new Result();
-		res.data(orderNewService.dunOrderNewList(name, orderNo,contractNo, starTime, endTime,specially,aid,  adminName, depId,newStatus,pageNo, pageSize));
+		res.data(orderNewService.dunOrderNewList(name, orderNo,contractNo, starTime, endTime,specially,aid,  adminName, depId,newStatus,
+				approval,amountStatus,projectType,pageNo, pageSize));
 		return res;
 	}
 
@@ -598,10 +600,12 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	 */
 	@RequestMapping(value = "/exportOrderDunData", method = RequestMethod.GET)
 	public Result exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially, String aid,String adminName,
-			String depId,Integer newStatus,Integer pageNo,Integer pageSize,HttpServletResponse response){
+			String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,
+									 Integer pageNo,Integer pageSize,HttpServletResponse response){
 		 Result res = new Result();
  		try {
- 			orderNewService.exportOrderDunData( name, orderNo,contractNo, starTime, endTime,specially, aid, adminName, depId,newStatus, pageNo, pageSize, response);
+ 			orderNewService.exportOrderDunData( name, orderNo,contractNo, starTime, endTime,specially, aid, adminName, depId,newStatus
+					, approval, amountStatus, memberType,pageNo, pageSize, response);
 		} catch (Exception e) {
 			res.getError().add(buildError("格式不正确"));
 			return res;

+ 46 - 46
src/main/java/com/goafanti/order/controller/AdminOrderApiController.java

@@ -44,7 +44,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectServiceOrder(bo, startDate, endDate, intention, formal, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/**
 	 * 订单详细
 	 * @param orderNo
@@ -60,7 +60,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectServiceOrderDetail(orderNo));
 		return res;
 	}
-	
+
 	/**
 	 * 修改订单
 	 * @param orderNo
@@ -92,7 +92,7 @@ public class AdminOrderApiController extends CertifyApiController {
 				orderRemarks,contractPictureUrl);
 		return res;
 	}
-	
+
 	/**
 	 * 签单
 	 * @param orderNo
@@ -142,12 +142,12 @@ public class AdminOrderApiController extends CertifyApiController {
 		fbb.setUid(uid);
 		fbb.setContactType(AFTConstants.DEFAULT_CONTACT_TYPE);
 		fbb.setResult(AFTConstants.DEFAULT_RESULT);
-		fbb.setUserBusinessList(list);	
+		fbb.setUserBusinessList(list);
 		orderServiceImpl.addBusinessProjectId(fbb);
 		return res;
 	}
-	
-	/** 
+
+	/**
 	 * 订单详情
 	 * @param orderNo
 	 * @return
@@ -162,7 +162,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectServiceOrderDetail(orderNo));
 		return res;
 	}
-	
+
 	/**
 	 * 确认意向
 	 * @param orderNo
@@ -179,7 +179,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateConfirmIntention(orderNo,confirm);
 		return res;
 	}
-	
+
 	/**
 	 * 作废订单
 	 * @param orderNo
@@ -195,19 +195,19 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateRevokeOrder(orderNo);
 		return res;
 	}
-	
+
 	/**
 	 * 模糊查询业务项目
 	 * @param businessName
 	 * @return
 	 */
 	@RequestMapping(value = "/getBusinessProjectByName", method = RequestMethod.GET)
-	public Result getBusinessProjectByName(String businessName,String cid){
+	public Result getBusinessProjectByName(String businessName,String cname){
 		Result res = new Result();
-		res.setData(businessProjectServiceImpl.selectBusinessProjectByName(businessName,cid));
+		res.setData(businessProjectServiceImpl.selectBusinessProjectByName(businessName,cname));
 		return res;
 	}
-	
+
 	/**
 	 * 查询业务项目分类
 	 * @return
@@ -218,7 +218,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(businessProjectServiceImpl.selectBusinessProjectCatalog());
 		return res;
 	}
-	
+
 	/**
 	 * 获取订单商品信息
 	 * @param orderNo
@@ -230,11 +230,11 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectOrderCommodity(orderNo));
 		return res;
 	}
-	
-	
+
+
 	/**
 	 * 添加订单商品
-	 * @param orderNo	
+	 * @param orderNo
 	 * @param commodityId
 	 * @param commodityMode
 	 * @param commodityQuantity
@@ -255,7 +255,7 @@ public class AdminOrderApiController extends CertifyApiController {
 				commodityPrice,discountPrice,commodityFirstPayment,discountFirstPayment,remarks);
 		return res;
 	}
-	
+
 	/**
 	 * 进入修改商品信息
 	 * @param id
@@ -268,10 +268,10 @@ public class AdminOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","明细ID"));
 			return res;
 		}
-		
+
 		return res;
 	}
-	
+
 	/**
 	 * 修改订单商品
 	 * @param detailId
@@ -292,7 +292,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateOrderCommodity(detailId,discountPrice, discountFirstPayment,commodityQuantity, remarks);
 		return res;
 	}
-	
+
 	/**
 	 * 删除订单商品
 	 * @param detailId
@@ -308,7 +308,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.deleteOrderCommodity(detailId);
 		return res;
 	}
-	
+
 	/**
 	 * 查询分管部门
 	 * @return
@@ -319,7 +319,7 @@ public class AdminOrderApiController extends CertifyApiController {
 			res.setData(orderServiceImpl.selectMyDeps());
 		return res;
 	}
-	
+
 	/**
 	 * 部门服务订单
 	 * @return
@@ -331,7 +331,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectDepServiceOrder(bo, startDate, endDate, intention, formal, depIds, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/**
 	 * 查询特批订单
 	 * @return
@@ -343,7 +343,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectApprovalServiceOrder(bo, startDate, endDate, depIds, approvalHistory, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/**
 	 * 审批特批订单
 	 * @param orderNo
@@ -355,9 +355,9 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateApprovalServiceOrder(orderNo,confirm);
 		return res;
 	}
-	
 
-	
+
+
 
 	/** 图片上传 **/
 	@RequestMapping(value = "/uploadOrderImg", method = RequestMethod.POST)
@@ -366,7 +366,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(handleFile(res, "/order_file/", false, req, sign));
 		return res;
 	}
-	
+
 	/** 查询公共订单 **/
 	@RequestMapping(value = "/listPublicOrder", method = RequestMethod.POST)
 	public Result listPublicOrder(OrderListBo bo,String startDate,String endDate,Integer pageNo, Integer pageSize){
@@ -374,7 +374,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectPublicOrder(bo,startDate,endDate,pageNo,pageSize));
 		return res;
 	}
-	
+
 	/** 分配订单到营销员 **/
 	@RequestMapping(value = "/appointSalesman", method = RequestMethod.GET)
 	public Result appointSalesman(String orderNo,String salesmanId){
@@ -401,7 +401,7 @@ public class AdminOrderApiController extends CertifyApiController {
 				TokenManager.getAdminId(), financeName, orderStatus, liquidationStatus, approval,null,startDate,endDate, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/** 结算订单管理 **/
 	@RequestMapping(value = "/listAllSettlement", method = RequestMethod.POST)
 	public Result listAllSettlement(String orderNo, String depId,String buyerName,String salesmanName, String financeName,
@@ -412,29 +412,29 @@ public class AdminOrderApiController extends CertifyApiController {
 				"", financeName, orderStatus, liquidationStatus, approval,isDistributionFinance, startDate,endDate, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/** 我的订单流水管理 **/
 	@RequestMapping(value = "/listMyBill", method = RequestMethod.POST)
 	public Result selectMyBillList(String payeeName, String payerName, String depId,
 			String salesmanName,String orderNo, Integer confirmSign,Integer deleteSign,Integer pageNo, Integer pageSize){
 		Result res = new Result();
-		res.setData(orderServiceImpl.selectMyBillList(payeeName, payerName, depId, salesmanName,orderNo, 
+		res.setData(orderServiceImpl.selectMyBillList(payeeName, payerName, depId, salesmanName,orderNo,
 				confirmSign, deleteSign, pageNo, pageSize));
 		return res;
 	}
-	
+
 
 	/** 我的订单流水查询 **/
 	@RequestMapping(value = "/queryMyBill", method = RequestMethod.POST)
 	public Result queryMyBillList(String payeeName, String payerName, String depId,
 			String salesmanName,String orderNo, Integer confirmSign,Integer deleteSign,Integer pageNo, Integer pageSize){
 		Result res = new Result();
-		res.setData(orderServiceImpl.queryMyBillList(payeeName, payerName, depId, salesmanName,orderNo, 
+		res.setData(orderServiceImpl.queryMyBillList(payeeName, payerName, depId, salesmanName,orderNo,
 				confirmSign, deleteSign, pageNo, pageSize));
 		return res;
 	}
-	
-	
+
+
 	/** 所有订单流水查询 **/
 	@RequestMapping(value = "/queryAllBill", method = RequestMethod.POST)
 	public Result queryAllBill(String payeeName, String payerName, String depId,
@@ -443,7 +443,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.queryAllBillList(payeeName, payerName, depId, salesmanName,financeName, orderNo,confirmSign,deleteSign, pageNo, pageSize));
 		return res;
 	}
-	
+
 	/** 查询流水详情 **/
 	@RequestMapping(value = "/selectBillDetail", method = RequestMethod.GET)
 	public Result selectBillDetail(String billNo){
@@ -455,7 +455,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectBillDetail(billNo));
 		return res;
 	}
-	
+
 	/**
 	 * 订单流水确认
 	 * @param billNo
@@ -489,7 +489,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateBill(billNo,orderNo,confirm,financialPayNo,financialPayTime,remarks);
 		return res;
 	}
-	
+
 	/**
 	 * 修改流水
 	 * @param billNo
@@ -512,7 +512,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateBill(billNo, orderNo,financialPayNo, financialPayTime, remarks);
 		return res;
 	}
-	
+
 	/**
 	 * 订单支付(测试用)
 	 * @return
@@ -527,7 +527,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updatePayForTest(orderNo, payAmount);
 		return res;
 	}
-	
+
 	/**
 	 * 订单退款(测试用)
 	 * @param orderNo
@@ -544,7 +544,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateRefundForTest(orderNo, refundAmount);
 		return res;
 	}
-	
+
 	/**
 	 * 派单
 	 * @param orderNo
@@ -594,7 +594,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectBillByOrderNo(orderNo));
 		return res;
 	}
-	
+
 	/**
 	 * 确认退款
 	 * @param orderNo
@@ -611,7 +611,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.updateConfirmRefund(orderNo,confirm);
 		return res;
 	}
-	
+
 	/**
 	 * 转交订单
 	 * @param orderNo
@@ -659,7 +659,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.addOrderChange(orderNo,changeComment,taskList,dunList);
 		return res;
 	}
-	
+
 	/**
 	 * 查看变更记录
 	 * @param orderNo
@@ -675,7 +675,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.selectOrderChange(orderNo));
 		return res;
 	}
-	
+
 	/**
 	 * 删除变更
 	 * @param changeId
@@ -691,7 +691,7 @@ public class AdminOrderApiController extends CertifyApiController {
 		orderServiceImpl.deleteOrderChange(changeId);
 		return res;
 	}
-	
+
 	/**
 	 * 更新变更记录
 	 * @param changeComment

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

@@ -484,6 +484,11 @@ public class OrderProjectApiController extends CertifyApiController {
 		return newExcelUtil.exportExcel(list,"高新复审详情",uploadPath,str.substring(0,str.toString().length()-1));
 	}
 
+	/**
+	 * 新增会员项目
+	 * @param t
+	 * @return
+	 */
 	@RequestMapping(value = "/addMemberProject" ,method = RequestMethod.POST)
 	public Result addMemberProject(TOrderTask t){
 		Result res = new Result();
@@ -493,11 +498,49 @@ public class OrderProjectApiController extends CertifyApiController {
 		}
 		t.setProcessStatus(1);
 		t.setMain(0);
-		return res.data(orderNewService.addOrderTask(t));
+		return res.data(orderNewService.addMemberProject(t));
+
+	}
+
+	/**
+	 * 会员项目审核
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/examineMemberProject" ,method = RequestMethod.POST)
+	public Result examineMemberProject(InputMenber in){
+		Result res = new Result();
+		if(in.getId()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目编号"));
+			return res;
+		}
+		return res.data(orderProjectService.pushExamineMemberProject(in));
 
 	}
 
+	/**
+	 * 会员项目列表
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/memberList" ,method = RequestMethod.GET)
+	public Result memberList(InputMemberList in){
+		Result res = new Result();
+		return res.data(orderProjectService.memberList(in));
+
+	}
 
+	/**
+	 * 会员项目列表
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/memberList/export" ,method = RequestMethod.GET)
+	public Result memberListExport(InputMemberList in){
+
+		return orderProjectService.memberListExport(in);
+
+	}
 
 
 }

+ 11 - 6
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -1,18 +1,16 @@
 package com.goafanti.order.service;
 
-import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
-import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
 
 
-import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.model.*;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.bo.InputMemberList;
 
 public interface OrderNewService {
 
@@ -28,6 +26,8 @@ public interface OrderNewService {
 	 * @param t
 	 */
 	int addOrderTask(TOrderTask t);
+
+	int addMemberProject(TOrderTask t);
 	/**
 	 * 修改项目信息
 	 * @param t
@@ -90,7 +90,11 @@ public interface OrderNewService {
 	 * @param pageSize
 	 */
 	Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo,String contractNo, String starTime, String endTime,Integer specially, String aid,String adminName,String depId,
-			Integer newStatus,Integer pageNo, Integer pageSize);
+			Integer newStatus,Integer approval,Integer amountStatus,Integer projectType,Integer pageNo, Integer pageSize);
+
+	void exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,String adminName,
+							String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,
+							Integer pageNo,Integer pageSize,HttpServletResponse response) throws  Exception;
 	/**
 	 * 新增催款记录
 	 */
@@ -141,8 +145,7 @@ public interface OrderNewService {
 
 	boolean checkORderTask(String orderNo);
 
-	void exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,String adminName,
-			String depId,Integer newStatus,Integer pageNo,Integer pageSize,HttpServletResponse response) throws  Exception;
+
 
 	int updateOrderOver(String orderNo);
 
@@ -215,4 +218,6 @@ public interface OrderNewService {
 	Pagination<TOrderNewBo> statisticsOrderList(InputStatisticsOrderList in);
 
 	int updateSalesType(TOrderNew in);
+
+
 }

+ 12 - 2
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -2,7 +2,9 @@ package com.goafanti.order.service;
 
 import java.util.List;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.UserOrderTask;
+import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
@@ -12,7 +14,7 @@ import com.goafanti.organization.bo.OutPaymentNode;
 public interface OrderProjectService {
 
 	/**
-	 * 
+	 *
 	 * @param taskId
 	 * @param taskReceiverId
 	 * @param remarks
@@ -28,7 +30,7 @@ public interface OrderProjectService {
 	int updateOrderTask(TOrderTaskDetailBo t);
 
 	int addTaskHours(TTaskHours t);
-	
+
 	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
 			Integer pageNo, Integer pageSize);
 
@@ -81,4 +83,12 @@ public interface OrderProjectService {
     List<OutHighNewRetrialStatistics> highNewRetrialStatistics(String depId, String startDate, String endDate);
 
 	List<OutHighNewRetrialList> highNewRetrialList(String province, String depId, String aid, Integer sort, String startDate, String endDate);
+
+	Pagination<OutMemberList> memberList(InputMemberList in);
+
+	Result memberListExport(InputMemberList in);
+
+    int updateMemberProject(TOrderTask t);
+
+	int pushExamineMemberProject(InputMenber in);
 }

+ 24 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -210,6 +210,16 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return 1;
 	}
 
+	@Override
+	public int addMemberProject(TOrderTask t){
+		TOrderLog tl=new TOrderLog();
+		tl.setOrderNo(t.getOrderNo());
+		tl.setProcess(OrderLogProcess.HYXMFQ.getCode());
+		tl.setAid(TokenManager.getAdminId());
+		addOrderLog(tl,"发起会员项目");
+		return addOrderTask( t);
+	}
+
 	public void checkOrder(TOrderNew order,TOrderTask t){
 		if(order == null)
 			 throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
@@ -619,6 +629,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateByPrimaryKeySelective(in);
 	}
 
+
+
 	@Override
 	public int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource o) {
 		TOrderNew t= new TOrderNew();
@@ -761,7 +773,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		StringBuffer sb=new StringBuffer();
 		Integer noticType=NoticeStatus.ORDER_DUN.getCode();
 		if (type==1){
-			noticType=NoticeStatus.MANBER_DUN.getCode();
+			noticType=NoticeStatus.MENBER_DUN.getCode();
 			sb=sb.append("[").append(b.getUserName()).append("]催款截点将于").append(o.getCustomizeTimes()).append("进行催款,会员项目请提前2个月催款,以免延误会员派单");
 		}else {
 			sb=sb.append("客户名称[").append(b.getUserName()).append("],按时触发应收款欠款,请按时催款,并及时增减项目,以免项目延期等问题。");
@@ -789,7 +801,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			//发送驳回邮件
 		if(SendEmailUtil.isEmail(b.getEmail())) {
 			EmailBo bo =new EmailBo();
-			if (noticType==NoticeStatus.MANBER_DUN.getCode()){
+			if (noticType==NoticeStatus.MENBER_DUN.getCode()){
 				bo = new EmailBo("会员提前催收", b.getEmail(), content);
 			}else {
 				bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
@@ -823,7 +835,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo,String contractNo, String starTime, String endTime,
-			Integer specially,String  aid, String adminName,String depId,Integer newStatus,Integer pageNo, Integer pageSize) {
+			Integer specially,String  aid, String adminName,String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,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;
@@ -836,6 +848,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		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");
+		if (approval!=null )params.put("approval",approval);
+		if (amountStatus!=null )params.put("amountStatus",amountStatus);
+		if (memberType!=null )params.put("memberType",memberType);
 		if (specially==null)specially=0;
 		params.put("specially", specially);
 		Integer i=null;
@@ -1079,12 +1094,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 */
 	@Override
 	public void exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,String adminName,
-			String depId,Integer newStatus,Integer pageNo,Integer pageSize,HttpServletResponse response) throws Exception  {
+			String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,
+								   Integer pageNo,Integer pageSize,HttpServletResponse response) throws Exception  {
 		OutputStream out = response.getOutputStream();
 		try {
 			@SuppressWarnings("unchecked")
 			List<outOrderDunListBo> list=(List<outOrderDunListBo>) dunOrderNewList( name,  orderNo, contractNo, starTime,  endTime,specially,
-					 aid,  adminName, depId,newStatus, pageNo,  pageSize).getList();
+					 aid,  adminName, depId,newStatus, approval, amountStatus, memberType, pageNo,  pageSize).getList();
 
     		String[] comment = {"合同编号","订单编号","客户名称","订单负责人","订单部门","订单状态","签单金额","应收款","已收款","拨款比例","结算状态","未收款","项目状态","催收科目","催款状态","催款启动时间","签单时间"};
     		String fileName ="催款信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
@@ -1449,4 +1465,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		return false;
 	}
+
+
+
 }

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

@@ -14,7 +14,11 @@ import java.util.UUID;
 import javax.mail.MessagingException;
 
 import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.bo.*;
+import com.goafanti.common.bo.Error;
 import com.goafanti.common.dao.*;
+import com.goafanti.common.utils.*;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.bo.*;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -25,11 +29,6 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import com.goafanti.common.bo.EmailBo;
-import com.goafanti.common.bo.Error;
-import com.goafanti.common.bo.OrderOperator;
-import com.goafanti.common.bo.UserOrderTask;
-import com.goafanti.common.bo.paymentNodeEmailBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.enums.ChannelStatus;
@@ -59,10 +58,6 @@ import com.goafanti.common.model.TaskProgressLog;
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.common.model.UserChannel;
 import com.goafanti.common.model.UserLockRelease;
-import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.common.utils.DateUtils;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -1057,4 +1052,100 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tOrderTaskMapper.highNewRetrialList( province,  depId,  aid,  sort,  startDate,  endDate);
 	}
 
+
+	@Override
+	public Pagination<OutMemberList> memberList(InputMemberList in) {
+		HashMap<String, Object> map = new HashMap<>();
+		addParam(in, map);
+		return (Pagination<OutMemberList>) findPage("findMemberList","findMemberCount",map,in.getPageNo(), in.getPageSize());
+	}
+
+	private void addParam(InputMemberList in, HashMap<String, Object> map) {
+		if(in.getOrderNo()!=null) map.put("orderNo", in.getOrderNo());
+		if(in.getUserName()!=null) map.put("userName", in.getUserName());
+		if(in.getDepId()!=null) map.put("depId", in.getDepId());
+		if(in.getContractNo()!=null) map.put("contractNo", in.getContractNo());
+		if(in.getSalesmanId()!=null) map.put("salesmanId", in.getSalesmanId());
+		if(in.getProjectName()!=null) map.put("projectName", in.getProjectName());
+		if(in.getAmountStatus()!=null) map.put("amountStatus", in.getAmountStatus());
+		if(in.getApproval()!=null) map.put("approval", in.getApproval());
+		if(in.getStatus()!=null) map.put("status", in.getStatus());
+		if(in.getShiroType()!=null) map.put("shiroType", in.getShiroType());
+		map.put("aid",TokenManager.getAdminId());
+	}
+
+	@Override
+	public Result memberListExport(InputMemberList in) {
+		HashMap<String, Object> map = new HashMap<>();
+		addParam(in, map);
+		List<OutMemberList>list= (List<OutMemberList>) findList("findMemberList",map,1,9999);
+		NewExcelUtil<OutMemberList> excelUtil=new NewExcelUtil<>(OutMemberList.class);
+		return excelUtil.exportExcel(list,"会员审核列表",uploadPath);
+	}
+
+
+
+	@Override
+	public int pushExamineMemberProject(InputMenber in) {
+		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(in.getId());
+		TOrderLog log=new TOrderLog();
+		log.setRemarks(in.getRemarks());
+		log.setOrderNo(task.getOrderNo());
+		log.setAid(TokenManager.getAdminId());
+		TOrderTask nt=new TOrderTask();
+		nt.setId(task.getId());
+		// 1=通过 0=驳回
+		if (in.getResult()==1){
+			//0=财务 1=特批
+			if (in.getType()==0){
+				if(task.getProcessStatus()!=1)throw  new BusinessException("审核状态错误");
+				log.setProcess(19);
+				if (task.getMemberType()==1||task.getMemberType()==2){
+					nt.setProcessStatus(2);
+					addLog(log,0);
+				}else if (task.getMemberType()==0){
+					nt.setProcessStatus(3);
+					addLog(log,1);
+				}
+			}else if(in.getType()==1){
+				if(task.getProcessStatus()!=2)throw  new BusinessException("审核状态错误");
+				nt.setProcessStatus(3);
+				log.setProcess(20);
+				addLog(log,1);
+			}
+		}else if (in.getResult()==0){
+			if (in.getType()==0){
+				log.setProcess(21);
+			}else if(in.getType()==1){
+				log.setProcess(22);
+			}
+			addLog(log,0);
+			nt.setProcessStatus(4);
+		}
+		return tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+	}
+
+	/**
+	 *
+	 * @param log
+	 * @param type 0只做审核 1并完成
+	 */
+	private void addLog(TOrderLog log,Integer type) {
+		tOrderLogMapper.insertSelective(log);
+		if (type==1){
+			log.setId(null);
+			log.setProcess(23);
+			tOrderLogMapper.insertSelective(log);
+		}
+	}
+
+	@Override
+	public int updateMemberProject(TOrderTask t) {
+		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		addOrderLog(task.getOrderNo(),OrderLogProcess.HYXMFQ.getCode(), "修改重新发起");
+		TOrderTaskDetailBo tt=new TOrderTaskDetailBo();
+		t.setProcessStatus(1);
+		return updateOrderTask(tt);
+	}
+
 }