Просмотр исходного кода

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

anderx лет назад: 3
Родитель
Сommit
b75065f3e0
65 измененных файлов с 1960 добавлено и 1044 удалено
  1. 4 3
      src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java
  2. 2 2
      src/main/java/com/goafanti/admin/service/AdminService.java
  3. 12 3
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  4. 1 1
      src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java
  5. 2 2
      src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java
  6. 1 1
      src/main/java/com/goafanti/common/bo/EmailBo.java
  7. 1 1
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  8. 2 2
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  9. 22 0
      src/main/java/com/goafanti/common/dao/MemberLogMapper.java
  10. 2 3
      src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java
  11. 4 0
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  12. 16 10
      src/main/java/com/goafanti/common/enums/NoticeTypes.java
  13. 6 4
      src/main/java/com/goafanti/common/enums/OrderLogProcess.java
  14. 7 1
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  15. 31 29
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  16. 115 0
      src/main/java/com/goafanti/common/mapper/MemberLogMapper.xml
  17. 22 22
      src/main/java/com/goafanti/common/mapper/NewOrderDunMapper.xml
  18. 13 2
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  19. 49 0
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  20. 179 372
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  21. 90 0
      src/main/java/com/goafanti/common/model/MemberLog.java
  22. 14 1
      src/main/java/com/goafanti/common/model/PublicRelease.java
  23. 21 97
      src/main/java/com/goafanti/common/model/TOrderTask.java
  24. 43 22
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  25. 0 1
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  26. 0 1
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  27. 28 29
      src/main/java/com/goafanti/common/utils/ExcelUtils.java
  28. 0 2
      src/main/java/com/goafanti/common/utils/ParamUtils.java
  29. 0 2
      src/main/java/com/goafanti/common/utils/WeChatUtils.java
  30. 2 11
      src/main/java/com/goafanti/common/utils/excel/ExcelConstant.java
  31. 12 10
      src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java
  32. 3 5
      src/main/java/com/goafanti/core/auth/RestClient.java
  33. 8 3
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  34. 118 0
      src/main/java/com/goafanti/order/bo/InputMemberList.java
  35. 47 0
      src/main/java/com/goafanti/order/bo/InputMenber.java
  36. 25 0
      src/main/java/com/goafanti/order/bo/MemberLogBo.java
  37. 224 0
      src/main/java/com/goafanti/order/bo/OutMemberList.java
  38. 16 6
      src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java
  39. 30 10
      src/main/java/com/goafanti/order/bo/TOrderTaskBo.java
  40. 32 14
      src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java
  41. 73 18
      src/main/java/com/goafanti/order/bo/outOrderDunListBo.java
  42. 20 21
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  43. 46 46
      src/main/java/com/goafanti/order/controller/AdminOrderApiController.java
  44. 87 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  45. 4 4
      src/main/java/com/goafanti/order/enums/LiquidationNewState.java
  46. 1 0
      src/main/java/com/goafanti/order/enums/NewProjectStatus.java
  47. 13 4
      src/main/java/com/goafanti/order/enums/salesTypes.java
  48. 29 11
      src/main/java/com/goafanti/order/service/OrderNewService.java
  49. 17 2
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  50. 5 4
      src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java
  51. 1 1
      src/main/java/com/goafanti/order/service/impl/LegalAffairsServiceImpl.java
  52. 1 1
      src/main/java/com/goafanti/order/service/impl/NewOrderDunServiceImpl.java
  53. 5 4
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  54. 202 88
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  55. 135 43
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  56. 32 36
      src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java
  57. 45 46
      src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java
  58. 12 13
      src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java
  59. 15 16
      src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java
  60. 2 3
      src/main/java/com/goafanti/user/service/impl/UserInterestServiceImpl.java
  61. 2 2
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  62. 1 1
      src/main/java/com/goafanti/weChat/service/PublicReleaseService.java
  63. 6 6
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  64. 1 1
      src/main/resources/props/config_local.properties
  65. 1 1
      src/main/resources/props/config_test.properties

+ 4 - 3
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -42,10 +42,11 @@ public class AdminSuperviserApiController extends CertifyApiController {
 	private AdminLocationService	adminLocationService;
 	@Resource
 	private RedisUtil redisUtil;
-	@Resource
-	private RedisTemplate  redisTemplate;
 
-	/**管理员列表*/
+
+	/**
+	 * 管理员列表
+	 * */
 	@RequestMapping(value = "/adminList", method = RequestMethod.GET)
 	public Result adminList(AdminListBo alb, String rid,String roleName, String pageNo,
 			String pageSize) {

+ 2 - 2
src/main/java/com/goafanti/admin/service/AdminService.java

@@ -64,7 +64,7 @@ public interface AdminService {
 
 	Map<String, String> listAdminSelect();
 
-	List<Admin> listAdminByName(String name);
+	List<Admin> listAdminByName(String name,Integer satus);
 
 	List<AdminListBo> selectDepartmentStaff(String departmentId,String name);
 
@@ -89,5 +89,5 @@ public interface AdminService {
 	depCountBo selectAllUser(String depId, String startTime, String endTime, String aName);
 
 
-	
+
 }

+ 12 - 3
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -234,8 +234,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	}
 
 	@Override
-	public List<Admin> listAdminByName(String name) {
-		return adminMapper.listAdminByName(name);
+	public List<Admin> listAdminByName(String name,Integer status) {
+		if(status==null)status=0;
+		return adminMapper.listAdminByName(name,status);
 	}
 
 	@Override
@@ -474,7 +475,15 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		else  params.put("type", type);
 		if (StringUtils.isNotBlank(startTime)) params.put("startTime", startTime);
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		return (Pagination<AdminCustomerDetailBo>)findPage("selectAdminCustomerDetailList", "selectAdminCustomerDetailCount", params, pageNo, pageSize);
+		Pagination<AdminCustomerDetailBo> p =(Pagination<AdminCustomerDetailBo>)findPage("selectAdminCustomerDetailList", "selectAdminCustomerDetailCount", params, pageNo, pageSize);
+		if (type == 2&& !TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			List<AdminCustomerDetailBo> list = (List<AdminCustomerDetailBo>) p.getList();
+			for (AdminCustomerDetailBo out : list) {
+				out.setContacts("***");
+				out.setContactMobile("***");
+			}
+		}
+		return p;
 	}
 
 	@Override

+ 1 - 1
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -248,7 +248,7 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 	@Override
 	public List<Admin> listAdminByName(String name) {
 
-		return adminMapper.listAdminByName(name);
+		return adminMapper.listAdminByName(name,0);
 	}
 
 	@Override

+ 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

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

@@ -75,7 +75,7 @@ public class EmailBo {
 	}
 
 	/**
-	 *
+	 *		催款模版
 	 * @param subject	标题
 	 * @param address	收件地址
 	 * @param deptname		发起人部门

+ 1 - 1
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -56,7 +56,7 @@ public interface AdminMapper {
 
     List<Admin> listAdminSelectByAreaAdmin(@Param("provinceList")List<Integer> provinceList, @Param("cityList")List<Integer> cityList);
 
-    List<Admin> listAdminByName(@Param("name")String name);
+    List<Admin> listAdminByName(@Param("name")String name,@Param("status")Integer status);
 
 
     int insertn(Admin record);

+ 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();
 
 
 
-}
+}

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

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.MemberLog;
+import com.goafanti.order.bo.MemberLogBo;
+
+import java.util.List;
+
+public interface MemberLogMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(MemberLog record);
+
+    int insertSelective(MemberLog record);
+
+    MemberLog selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(MemberLog record);
+
+    int updateByPrimaryKey(MemberLog record);
+
+    List<MemberLogBo> memberLog(Integer id);
+}

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

@@ -23,13 +23,13 @@ public interface TOrderTaskMapper {
 
     int updateByPrimaryKey(TOrderTask record);
 
-    List<TOrderTaskBo> selectOrderTask(String orderNo);
+    List<TOrderTaskBo> selectOrderTask(@Param("orderNo") String orderNo,@Param("type") Integer type);
 
     TOrderTaskDetailBo getOrderTaskDetail(String id);
 
     TOrderTask selectBySuperId(String superId);
 
-    List<TOrderTask> getReceiverByOid(String oid);
+    List<TOrderTaskBo> getReceiverByOid(String oid);
 
     void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId, @Param("type")Integer type);
 
@@ -45,7 +45,6 @@ public interface TOrderTaskMapper {
 
     void updateByOutsourceToOrderNo(@Param("orderNo")String orderNo, @Param("type")Integer type);
 
-    int insertSelectiveGetId(TOrderTask tn);
 
     List<String> getLockId(@Param("orderNo")String orderNo, @Param("aid")String aid, @Param("uid")String uid);
 

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

@@ -65,6 +65,10 @@ public enum NoticeStatus {
 	PUBLIC_RELEASE_NO(56,"外出打卡驳回"),
 	ITEM_CHECK_START(57,"发起专利核对"),
 	ITEM_CHECK_END(58,"完成专利核对"),
+	MENBER_DUN(59,"会员催款信息"),
+	MENBER_START(60,"会员项目发起"),
+	MENBER_YES(61,"会员项目通过"),
+	MENBER_NO(62,"会员项目拒绝"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

+ 16 - 10
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
@@ -38,7 +40,9 @@ public enum NoticeTypes {
 				|| i == NoticeStatus.ORDER_YES.getCode() || i == NoticeStatus.ORDER_NO.getCode()
 				|| i == NoticeStatus.ORDER_TASK_TO.getCode() || i == NoticeStatus.PROJECT_OUTSOURCE_START.getCode()
 				|| i == NoticeStatus.PROJECT_OUTSOURCE_YES.getCode() || i == NoticeStatus.PROJECT_OUTSOURCE_NO.getCode()
-				|| i == NoticeStatus.ITEM_CHECK_START.getCode() || i == NoticeStatus.ITEM_CHECK_END.getCode()) {
+				|| i == NoticeStatus.ITEM_CHECK_START.getCode() || i == NoticeStatus.ITEM_CHECK_END.getCode()
+				|| i == NoticeStatus.MENBER_START.getCode() || i == NoticeStatus.MENBER_YES.getCode()
+				|| i == NoticeStatus.MENBER_NO.getCode() ) {
 			return 2;
 		} else if (i == NoticeStatus.CUSTOMER_LOSE30.getCode() || i == NoticeStatus.CUSTOMER_LOSE270.getCode()
 				|| i == NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode()
@@ -57,12 +61,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 +80,7 @@ public enum NoticeTypes {
 		}
 		return ELSE;
 	}
-	
+
 	public static String getValueByCode(Integer code){
         for(NoticeTypes NoticeTypes:NoticeTypes.values()){
             if(code.equals(NoticeTypes.getCode())){
@@ -83,7 +89,7 @@ public enum NoticeTypes {
         }
         return  ELSE.getDesc();
     }
-	
+
 	public static Integer getCount(){
 		Integer count=0;
         for(NoticeTypes x:NoticeTypes.values()){
@@ -91,15 +97,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);

+ 6 - 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, "驳回"),
@@ -28,7 +30,7 @@ public enum OrderLogProcess {
 	DDLZZJ(17,"订单离职转交"),
 	NOT(99,"未知"),
 	;
-	
+
 	private OrderLogProcess(Integer code, String desc) {
 		this.code = code;
 		this.desc = desc;
@@ -49,8 +51,8 @@ public enum OrderLogProcess {
         }
         return  NOT.getDesc();
     }
-	
-	
+
+
 	public static OrderLogProcess getStatus(Integer code) {
 		if (containsType(code)) {
 			return status.get(code);

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

@@ -506,7 +506,13 @@
 
 
   <select id="listAdminByName" parameterType="java.lang.String" resultMap="BaseResultMap">
-    select id,name from admin where status='正常'  and name like concat('%',#{name},'%')
+    select id,name from admin where   name like concat('%',#{name},'%')
+    <if test="status==0">
+      and status= '正常'
+    </if>
+    <if test="status==1">
+      and status= '锁定'
+    </if>
   </select>
 
   <!--*************************************************************************-->

+ 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>

+ 115 - 0
src/main/java/com/goafanti/common/mapper/MemberLogMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.MemberLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.MemberLog">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="pid" jdbcType="INTEGER" property="pid" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, pid, aid, `status`, remarks, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from member_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from member_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.MemberLog">
+    insert into member_log (id, pid, aid,
+      `status`, remarks, create_time
+      )
+    values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
+      #{status,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.MemberLog">
+    insert into member_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.MemberLog">
+    update member_log
+    <set>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=INTEGER},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.MemberLog">
+    update member_log
+    set pid = #{pid,jdbcType=INTEGER},
+      aid = #{aid,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="memberLog" resultType="com.goafanti.order.bo.MemberLogBo">
+    select a.id, a.pid, a.aid, a.`status`, a.remarks, a.create_time createTime,
+           b.name aname,date_format(a.create_time,'%Y-%m-%d %H:%i:%s' )createTimes
+    from member_log a left join admin b on a.aid =b.id
+    where pid= #{id}
+    order by a.create_time
+  </select>
+</mapper>

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

@@ -97,7 +97,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 15 09:46:56 CST 2020.
     -->
-    id, order_no, tid, project_type, dun_type, wait_day, effective_count, aid, status, 
+    id, order_no, tid, project_type, dun_type, wait_day, effective_count, aid, status,
     create_time, start_time, money, appropriation_ratio, customize_name, customize_time
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.NewOrderDunExample" resultMap="BaseResultMap">
@@ -125,7 +125,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 15 09:46:56 CST 2020.
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     from new_order_dun
     where id = #{id,jdbcType=INTEGER}
@@ -156,16 +156,16 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 15 09:46:56 CST 2020.
     -->
-    insert into new_order_dun (id, order_no, tid, 
-      project_type, dun_type, wait_day, 
-      effective_count, aid, status, 
-      create_time, start_time, money, 
+    insert into new_order_dun (id, order_no, tid,
+      project_type, dun_type, wait_day,
+      effective_count, aid, status,
+      create_time, start_time, money,
       appropriation_ratio, customize_name, customize_time
       )
-    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{tid,jdbcType=INTEGER}, 
-      #{projectType,jdbcType=INTEGER}, #{dunType,jdbcType=INTEGER}, #{waitDay,jdbcType=INTEGER}, 
-      #{effectiveCount,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL}, 
+    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{tid,jdbcType=INTEGER},
+      #{projectType,jdbcType=INTEGER}, #{dunType,jdbcType=INTEGER}, #{waitDay,jdbcType=INTEGER},
+      #{effectiveCount,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
+      #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL},
       #{appropriationRatio,jdbcType=DECIMAL}, #{customizeName,jdbcType=VARCHAR}, #{customizeTime,jdbcType=TIMESTAMP}
       )
   </insert>
@@ -443,14 +443,14 @@
     where id = #{id,jdbcType=INTEGER}
   </update>
   <delete id="deleteByTid" parameterType="java.lang.Integer">
-    
+
     delete from new_order_dun
     where tid = #{tid,jdbcType=INTEGER}
   </delete>
   <select id="selectListNewOrderDun" 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, b.set_up_amount setUpAmount,
   a.effective_count effectiveCount, a.aid, a.create_time createTime ,b.commodity_name commodityName,a.money,a.status,a.customize_time customizeTime,
-  a.appropriation_ratio appropriationRatio,date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName 
+  a.appropriation_ratio appropriationRatio,date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName
   from new_order_dun a left join t_order_task b on a.tid=b.id where 1=1
   <if test="orderNo != null">
   and  a.order_no= #{orderNo}
@@ -458,18 +458,18 @@
   <if test="status != null">
   and  a.status= #{status}
   </if>
-   order by project_type,dun_type 
+   order by project_type,dun_type
   </select>
-  <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 
-  from new_order_dun a left join  t_order_new b on a.order_no=b.order_no
-  where 1=1 and a.status=0 and b.process_status &gt; 4 and b.delete_sign in (0,2,3)
+  <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 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>
   <select id="selectByTid" 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.money,a.create_time createTime 
+    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.money,a.create_time createTime
   	,date_format(a.customize_time,'%Y-%m-%d') customizeTimes, a.customize_name customizeName
   	from new_order_dun a
     where tid = #{tid} and status=0
@@ -538,4 +538,4 @@
     <if test="sort==1"> z.money </if>
     desc
   </select>
-</mapper>
+</mapper>

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

@@ -39,13 +39,14 @@
     <result column="assist_aid_name" jdbcType="VARCHAR" property="assistAidName" />
     <result column="main_id" jdbcType="INTEGER" property="mainId" />
     <result column="main_name" jdbcType="VARCHAR" property="mainName" />
+    <result column="clock_in_remarks" jdbcType="VARCHAR" property="clockInRemarks" />
   </resultMap>
   <sql id="Base_Column_List">
     id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
     latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
     ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info,
     `plan`, expected_effect, next_plan, `type`, order_no, update_time, update_status,
-    assist, assist_aid, assist_aid_name, main_id, main_name
+    assist, assist_aid, assist_aid_name, main_id, main_name, clock_in_remarks
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -201,6 +202,9 @@
       <if test="mainName != null">
         main_name,
       </if>
+      <if test="clockInRemarks != null">
+        clock_in_remarks,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -314,6 +318,9 @@
       <if test="mainName != null">
         #{mainName,jdbcType=VARCHAR},
       </if>
+      <if test="clockInRemarks != null">
+        #{clockInRemarks,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
@@ -427,6 +434,9 @@
       <if test="mainName != null">
         main_name = #{mainName,jdbcType=VARCHAR},
       </if>
+      <if test="clockInRemarks != null">
+        clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -467,7 +477,8 @@
       assist_aid = #{assistAid,jdbcType=VARCHAR},
       assist_aid_name = #{assistAidName,jdbcType=VARCHAR},
       main_id = #{mainId,jdbcType=INTEGER},
-      main_name = #{mainName,jdbcType=VARCHAR}
+      main_name = #{mainName,jdbcType=VARCHAR},
+      clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 

+ 49 - 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,30 @@ 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 == 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="memberType !=null">
+      and tm.project_type= #{memberType}
+    </if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
@@ -1284,6 +1309,30 @@ 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 == 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="memberType !=null">
+       and tm.project_type= #{memberType}
+     </if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>

+ 179 - 372
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -62,6 +62,8 @@
     <result column="check_status" jdbcType="INTEGER" property="checkStatus" />
     <result column="patent_type" jdbcType="INTEGER" property="patentType" />
     <result column="pubicity_url" jdbcType="VARCHAR" property="pubicityUrl" />
+    <result column="process_status" jdbcType="INTEGER" property="processStatus" />
+    <result column="member_type" jdbcType="INTEGER" property="memberType" />
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
@@ -73,7 +75,8 @@
     split_super, split_status, split_id, split_aid, split_time, cname, receiver_name,
     declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status,
     high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate,
-    time_record, if_publicity, check_status, patent_type, pubicity_url
+    time_record, if_publicity, check_status, patent_type, pubicity_url, process_status,
+    member_type
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -105,8 +108,8 @@
       set_up_time, spot_check_status, high_tech_status,
       special_comment, if_certification_fee, certification_fee,
       certification_corporate, time_record, if_publicity,
-      check_status, patent_type, pubicity_url
-      )
+      check_status, patent_type, pubicity_url,
+      process_status, member_type)
     values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR},
       #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
       #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
@@ -126,8 +129,8 @@
       #{setUpTime,jdbcType=TIMESTAMP}, #{spotCheckStatus,jdbcType=INTEGER}, #{highTechStatus,jdbcType=INTEGER},
       #{specialComment,jdbcType=VARCHAR}, #{ifCertificationFee,jdbcType=INTEGER}, #{certificationFee,jdbcType=DECIMAL},
       #{certificationCorporate,jdbcType=VARCHAR}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER},
-      #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR}
-      )
+      #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR},
+      #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
     insert into t_order_task
@@ -309,6 +312,12 @@
       <if test="pubicityUrl != null">
         pubicity_url,
       </if>
+      <if test="processStatus != null">
+        process_status,
+      </if>
+      <if test="memberType != null">
+        member_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -488,6 +497,12 @@
       <if test="pubicityUrl != null">
         #{pubicityUrl,jdbcType=VARCHAR},
       </if>
+      <if test="processStatus != null">
+        #{processStatus,jdbcType=INTEGER},
+      </if>
+      <if test="memberType != null">
+        #{memberType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
@@ -670,6 +685,12 @@
       <if test="pubicityUrl != null">
         pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
       </if>
+      <if test="processStatus != null">
+        process_status = #{processStatus,jdbcType=INTEGER},
+      </if>
+      <if test="memberType != null">
+        member_type = #{memberType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -733,374 +754,13 @@
       if_publicity = #{ifPublicity,jdbcType=INTEGER},
       check_status = #{checkStatus,jdbcType=INTEGER},
       patent_type = #{patentType,jdbcType=INTEGER},
-      pubicity_url = #{pubicityUrl,jdbcType=VARCHAR}
+      pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
+      process_status = #{processStatus,jdbcType=INTEGER},
+      member_type = #{memberType,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
-  <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
-    insert into t_order_task
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="orderNo != null">
-        order_no,
-      </if>
-      <if test="main != null">
-        main,
-      </if>
-      <if test="superId != null">
-        super_id,
-      </if>
-      <if test="commodityId != null">
-        commodity_id,
-      </if>
-      <if test="commodityName != null">
-        commodity_name,
-      </if>
-      <if test="commodityQuantity != null">
-        commodity_quantity,
-      </if>
-      <if test="commodityMode != null">
-        commodity_mode,
-      </if>
-      <if test="commodityPrice != null">
-        commodity_price,
-      </if>
-      <if test="taskStatus != null">
-        task_status,
-      </if>
-      <if test="taskDistributionTime != null">
-        task_distribution_time,
-      </if>
-      <if test="taskAllocator != null">
-        task_allocator,
-      </if>
-      <if test="taskReceiver != null">
-        task_receiver,
-      </if>
-      <if test="taskComment != null">
-        task_comment,
-      </if>
-      <if test="taskStartTime != null">
-        task_start_time,
-      </if>
-      <if test="taskEndTime != null">
-        task_end_time,
-      </if>
-      <if test="projectStatus != null">
-        project_status,
-      </if>
-      <if test="acceptTime != null">
-        accept_time,
-      </if>
-      <if test="reviewTime != null">
-        review_time,
-      </if>
-      <if test="publicityTime != null">
-        publicity_time,
-      </if>
-      <if test="licenceTime != null">
-        licence_time,
-      </if>
-      <if test="certificateNumber != null">
-        certificate_number,
-      </if>
-      <if test="status != null">
-        `status`,
-      </if>
-      <if test="formRetrieve != null">
-        form_retrieve,
-      </if>
-      <if test="taskRefund != null">
-        task_refund,
-      </if>
-      <if test="refundContent != null">
-        refund_content,
-      </if>
-      <if test="retrieveContent != null">
-        retrieve_content,
-      </if>
-      <if test="declareUser != null">
-        declare_user,
-      </if>
-      <if test="declarePwd != null">
-        declare_pwd,
-      </if>
-      <if test="setUpAmount != null">
-        set_up_amount,
-      </if>
-      <if test="arrivalMoney != null">
-        arrival_money,
-      </if>
-      <if test="outsourceName != null">
-        outsource_name,
-      </if>
-      <if test="outsourcePrice != null">
-        outsource_price,
-      </if>
-      <if test="consultantId != null">
-        consultant_id,
-      </if>
-      <if test="managerId != null">
-        manager_id,
-      </if>
-      <if test="outsource != null">
-        outsource,
-      </if>
-      <if test="splitSuper != null">
-        split_super,
-      </if>
-      <if test="splitStatus != null">
-        split_status,
-      </if>
-      <if test="splitId != null">
-        split_id,
-      </if>
-      <if test="splitAid != null">
-        split_aid,
-      </if>
-      <if test="splitTime != null">
-        split_time,
-      </if>
-      <if test="cname != null">
-        cname,
-      </if>
-      <if test="receiverName != null">
-        receiver_name,
-      </if>
-      <if test="declarationBatch != null">
-        declaration_batch,
-      </if>
-      <if test="costReduction != null">
-        cost_reduction,
-      </if>
-      <if test="officialCost != null">
-        official_cost,
-      </if>
-      <if test="setUpStatus != null">
-        set_up_status,
-      </if>
-      <if test="setUpTime != null">
-        set_up_time,
-      </if>
-      <if test="spotCheckStatus != null">
-        spot_check_status,
-      </if>
-      <if test="highTechStatus != null">
-        high_tech_status,
-      </if>
-      <if test="specialComment != null">
-        special_comment,
-      </if>
-      <if test="ifCertificationFee != null">
-        if_certification_fee,
-      </if>
-      <if test="certificationFee != null">
-        certification_fee,
-      </if>
-      <if test="certificationCorporate != null">
-        certification_corporate,
-      </if>
-      <if test="ifPublicity != null">
-        if_publicity,
-      </if>
-      <if test="checkStatus != null">
-        check_status,
-      </if>
-      <if test="patentType != null">
-        patent_type,
-      </if>
-      <if test="attachmentUrl != null">
-        attachment_url,
-      </if>
-      <if test="timeRecord != null">
-        time_record,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="orderNo != null">
-        #{orderNo,jdbcType=VARCHAR},
-      </if>
-      <if test="main != null">
-        #{main,jdbcType=INTEGER},
-      </if>
-      <if test="superId != null">
-        #{superId,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityId != null">
-        #{commodityId,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityName != null">
-        #{commodityName,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityQuantity != null">
-        #{commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="commodityMode != null">
-        #{commodityMode,jdbcType=VARCHAR},
-      </if>
-      <if test="commodityPrice != null">
-        #{commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="taskStatus != null">
-        #{taskStatus,jdbcType=INTEGER},
-      </if>
-      <if test="taskDistributionTime != null">
-        #{taskDistributionTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="taskAllocator != null">
-        #{taskAllocator,jdbcType=VARCHAR},
-      </if>
-      <if test="taskReceiver != null">
-        #{taskReceiver,jdbcType=VARCHAR},
-      </if>
-      <if test="taskComment != null">
-        #{taskComment,jdbcType=VARCHAR},
-      </if>
-      <if test="taskStartTime != null">
-        #{taskStartTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="taskEndTime != null">
-        #{taskEndTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="projectStatus != null">
-        #{projectStatus,jdbcType=INTEGER},
-      </if>
-      <if test="acceptTime != null">
-        #{acceptTime,jdbcType=DATE},
-      </if>
-      <if test="reviewTime != null">
-        #{reviewTime,jdbcType=DATE},
-      </if>
-      <if test="publicityTime != null">
-        #{publicityTime,jdbcType=DATE},
-      </if>
-      <if test="licenceTime != null">
-        #{licenceTime,jdbcType=DATE},
-      </if>
-      <if test="certificateNumber != null">
-        #{certificateNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null">
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="formRetrieve != null">
-        #{formRetrieve,jdbcType=INTEGER},
-      </if>
-      <if test="taskRefund != null">
-        #{taskRefund,jdbcType=INTEGER},
-      </if>
-      <if test="refundContent != null">
-        #{refundContent,jdbcType=VARCHAR},
-      </if>
-      <if test="retrieveContent != null">
-        #{retrieveContent,jdbcType=VARCHAR},
-      </if>
-      <if test="declareUser != null">
-        #{declareUser,jdbcType=VARCHAR},
-      </if>
-      <if test="declarePwd != null">
-        #{declarePwd,jdbcType=VARCHAR},
-      </if>
-      <if test="setUpAmount != null">
-        #{setUpAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="arrivalMoney != null">
-        #{arrivalMoney,jdbcType=INTEGER},
-      </if>
-      <if test="outsourceName != null">
-        #{outsourceName,jdbcType=VARCHAR},
-      </if>
-      <if test="outsourcePrice != null">
-        #{outsourcePrice,jdbcType=DECIMAL},
-      </if>
-      <if test="consultantId != null">
-        #{consultantId,jdbcType=VARCHAR},
-      </if>
-      <if test="managerId != null">
-        #{managerId,jdbcType=VARCHAR},
-      </if>
-      <if test="outsource != null">
-        #{outsource,jdbcType=INTEGER},
-      </if>
-      <if test="splitSuper != null">
-        #{splitSuper,jdbcType=INTEGER},
-      </if>
-      <if test="splitStatus != null">
-        #{splitStatus,jdbcType=INTEGER},
-      </if>
-      <if test="splitId != null">
-        #{splitId,jdbcType=INTEGER},
-      </if>
-      <if test="splitAid != null">
-        #{splitAid,jdbcType=VARCHAR},
-      </if>
-      <if test="splitTime != null">
-        #{splitTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="cname != null">
-        #{cname,jdbcType=VARCHAR},
-      </if>
-      <if test="receiverName != null">
-        #{receiverName,jdbcType=VARCHAR},
-      </if>
-      <if test="declarationBatch != null">
-        #{declarationBatch,jdbcType=INTEGER},
-      </if>
-      <if test="costReduction != null">
-        #{costReduction,jdbcType=INTEGER},
-      </if>
-      <if test="officialCost != null">
-        #{officialCost,jdbcType=INTEGER},
-      </if>
-      <if test="setUpStatus != null">
-        #{setUpStatus,jdbcType=INTEGER},
-      </if>
-      <if test="setUpTime != null">
-        #{setUpTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="spotCheckStatus != null">
-        #{spotCheckStatus,jdbcType=INTEGER},
-      </if>
-      <if test="highTechStatus != null">
-        #{highTechStatus,jdbcType=INTEGER},
-      </if>
-      <if test="specialComment != null">
-        #{specialComment,jdbcType=VARCHAR},
-      </if>
-      <if test="ifCertificationFee != null">
-        #{ifCertificationFee,jdbcType=INTEGER},
-      </if>
-      <if test="certificationFee != null">
-        #{certificationFee,jdbcType=DECIMAL},
-      </if>
-      <if test="certificationCorporate != null">
-        #{certificationCorporate,jdbcType=VARCHAR},
-      </if>
-      <if test="ifPublicity != null">
-        #{ifPublicity,jdbcType=INTEGER},
-      </if>
-      <if test="checkStatus != null">
-        #{checkStatus,jdbcType=INTEGER},
-      </if>
-      <if test="patentType != null">
-        #{patentType,jdbcType=INTEGER},
-      </if>
-      <if test="attachmentUrl != null">
-        #{attachmentUrl,jdbcType=LONGVARCHAR},
-      </if>
-      <if test="timeRecord != null">
-        #{timeRecord,jdbcType=LONGVARCHAR},
-      </if>
-    </trim>
-    <selectKey keyProperty="id" order="AFTER" resultType="int">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-  </insert>
+
   <select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
     select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,
            a.outsource_name outsourceName,a.outsource, a.outsource_price outsourcePrice,g.name depName,
@@ -1119,7 +779,14 @@
                         left join business_project i on a.commodity_id=i.id left join
          business_category c on b.cid=c.id left join admin d on
       a.task_receiver=d.id
-    where a.super_id is null and a.split_status in(0,1) and a.order_no= #{orderNo,jdbcType=VARCHAR} order by a.id
+    where a.super_id is null and a.split_status in(0,1)
+      <if test="orderNo != null">
+      and a.order_no= #{orderNo,jdbcType=VARCHAR}
+      </if>
+    <if test="type == 1">
+      and a.process_status in(0,3)
+    </if>
+    order by a.id
   </select>
 
   <select id="selectOrderTaskAll" resultType="com.goafanti.order.bo.TOrderTaskBo">
@@ -1457,7 +1124,7 @@
     </if>
   </select>
   <!-- 根据订单编号获得所有的任务负责人 -->
-  <select id="getReceiverByOid" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="getReceiverByOid" resultType="com.goafanti.order.bo.TOrderTaskBo">
     select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
                                                                                   inner join admin a on t.task_receiver = a.id
     where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
@@ -2064,4 +1731,144 @@
     </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.member_type memberType,
+    b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
+    a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
+    a.commodity_quantity commodityQuantity,a.task_comment taskComment
+    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.delete_sign in (0,2) and b.approval in (0,1,2)
+    <if test="shiroType ==0">
+      and a.process_status in (1,2,3,4)
+    </if>
+    <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 status !=5">
+      and a.process_status = #{status}
+    </if>
+    order by a.process_status
+    <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.delete_sign in (0,2) and b.approval in (0,1,2)
+      <if test="shiroType ==0">
+        and a.process_status in (1,2,3,4)
+      </if>
+      <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 status !=5">
+        and a.process_status = #{status}
+      </if>
+  </select>
+
+
 </mapper>

+ 90 - 0
src/main/java/com/goafanti/common/model/MemberLog.java

@@ -0,0 +1,90 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * member_log
+ * @author 
+ */
+public class MemberLog implements Serializable {
+    /**
+     * 日志id
+     */
+    private Integer id;
+
+    /**
+     * 开票id
+     */
+    private Integer pid;
+
+    /**
+     * 开票id
+     */
+    private String aid;
+
+    /**
+     * 审核状态 0=发起,1=通过,2=拒绝,3=完成
+     */
+    private Integer status;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getPid() {
+        return pid;
+    }
+
+    public void setPid(Integer pid) {
+        this.pid = pid;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 14 - 1
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -66,7 +66,7 @@ public class PublicRelease implements Serializable {
     private Date createTime;
 
     /**
-     * 打卡
+     * 打卡状态 1正常打卡 2异常打卡
      */
     private Integer clockIn;
 
@@ -190,6 +190,11 @@ public class PublicRelease implements Serializable {
      */
     private String mainName;
 
+    /**
+     * 打卡说明
+     */
+    private String clockInRemarks;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -487,4 +492,12 @@ public class PublicRelease implements Serializable {
     public void setMainName(String mainName) {
         this.mainName = mainName;
     }
+
+    public String getClockInRemarks() {
+        return clockInRemarks;
+    }
+
+    public void setClockInRemarks(String clockInRemarks) {
+        this.clockInRemarks = clockInRemarks;
+    }
 }

+ 21 - 97
src/main/java/com/goafanti/common/model/TOrderTask.java

@@ -1,7 +1,5 @@
 package com.goafanti.common.model;
 
-import com.goafanti.common.utils.excel.Excel;
-
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
@@ -19,13 +17,11 @@ public class TOrderTask implements Serializable {
     /**
      * 订单编号
      */
-    @Excel(name = "订单编号", sort = 2)
     private String orderNo;
 
     /**
      * 是否为主要任务 0-否,1-是
      */
-    @Excel(name = "是否主项目", sort = 8, readConverterExp = "0=否,1=是")
     private Integer main;
 
     /**
@@ -41,13 +37,11 @@ public class TOrderTask implements Serializable {
     /**
      * 商品名称(冗余)
      */
-    @Excel(name = "项目名称", sort = 10)
     private String commodityName;
 
     /**
      * 商品数量
      */
-    @Excel(name = "项目数量", sort = 11)
     private Integer commodityQuantity;
 
     /**
@@ -58,7 +52,6 @@ public class TOrderTask implements Serializable {
     /**
      * 合同商品价格
      */
-    @Excel(name = "服务市价", sort = 11)
     private BigDecimal commodityPrice;
 
     /**
@@ -84,7 +77,6 @@ public class TOrderTask implements Serializable {
     /**
      * 任务说明
      */
-    @Excel(name = "项目说明", sort = 14)
     private String taskComment;
 
     /**
@@ -130,7 +122,6 @@ public class TOrderTask implements Serializable {
     /**
      * 证书编号
      */
-    @Excel(name = "证书編号", sort = 12)
     private String certificateNumber;
 
     /**
@@ -181,13 +172,11 @@ public class TOrderTask implements Serializable {
     /**
      * 外包公司名称
      */
-    @Excel(name = "外包(内部)公司", sort = 15)
     private String outsourceName;
 
     /**
      * 单价
      */
-    @Excel(name = "外包(内部)价格", sort = 16)
     private BigDecimal outsourcePrice;
 
     /**
@@ -320,6 +309,16 @@ public class TOrderTask implements Serializable {
      */
     private String pubicityUrl;
 
+    /**
+     * 流程状态 0=驳回,1=财务审核,2=特批审核,3=通过
+     */
+    private Integer processStatus;
+
+    /**
+     * 会员付款状态 0=已付会员截点全款,1=已付部分期款,需特批,2=未付款,需特批
+     */
+    private Integer memberType;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -802,94 +801,19 @@ public class TOrderTask implements Serializable {
         this.pubicityUrl = pubicityUrl;
     }
 
+    public Integer getProcessStatus() {
+        return processStatus;
+    }
 
+    public void setProcessStatus(Integer processStatus) {
+        this.processStatus = processStatus;
+    }
 
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(getClass().getSimpleName());
-        sb.append(" [");
-        sb.append("Hash = ").append(hashCode());
-        sb.append(", id=").append(id);
-        sb.append(", orderNo=").append(orderNo);
-        sb.append(", main=").append(main);
-        sb.append(", superId=").append(superId);
-        sb.append(", commodityId=").append(commodityId);
-        sb.append(", commodityName=").append(commodityName);
-        sb.append(", commodityQuantity=").append(commodityQuantity);
-        sb.append(", commodityMode=").append(commodityMode);
-        sb.append(", commodityPrice=").append(commodityPrice);
-        sb.append(", taskStatus=").append(taskStatus);
-        sb.append(", taskDistributionTime=").append(taskDistributionTime);
-        sb.append(", taskAllocator=").append(taskAllocator);
-        sb.append(", taskReceiver=").append(taskReceiver);
-        sb.append(", taskComment=").append(taskComment);
-        sb.append(", taskStartTime=").append(taskStartTime);
-        sb.append(", taskEndTime=").append(taskEndTime);
-        sb.append(", attachmentUrl=").append(attachmentUrl);
-        sb.append(", projectStatus=").append(projectStatus);
-        sb.append(", acceptTime=").append(acceptTime);
-        sb.append(", reviewTime=").append(reviewTime);
-        sb.append(", publicityTime=").append(publicityTime);
-        sb.append(", licenceTime=").append(licenceTime);
-        sb.append(", certificateNumber=").append(certificateNumber);
-        sb.append(", status=").append(status);
-        sb.append(", formRetrieve=").append(formRetrieve);
-        sb.append(", taskRefund=").append(taskRefund);
-        sb.append(", refundContent=").append(refundContent);
-        sb.append(", retrieveContent=").append(retrieveContent);
-        sb.append(", declareUser=").append(declareUser);
-        sb.append(", declarePwd=").append(declarePwd);
-        sb.append(", setUpAmount=").append(setUpAmount);
-        sb.append(", arrivalMoney=").append(arrivalMoney);
-        sb.append(", outsourceName=").append(outsourceName);
-        sb.append(", outsourcePrice=").append(outsourcePrice);
-        sb.append(", consultantId=").append(consultantId);
-        sb.append(", managerId=").append(managerId);
-        sb.append(", outsource=").append(outsource);
-        sb.append(", splitSuper=").append(splitSuper);
-        sb.append(", splitStatus=").append(splitStatus);
-        sb.append(", splitId=").append(splitId);
-        sb.append(", splitAid=").append(splitAid);
-        sb.append(", splitTime=").append(splitTime);
-        sb.append(", cname=").append(cname);
-        sb.append(", receiverName=").append(receiverName);
-        sb.append(", declarationBatch=").append(declarationBatch);
-        sb.append(", costReduction=").append(costReduction);
-        sb.append(", officialCost=").append(officialCost);
-        sb.append(", setUpStatus=").append(setUpStatus);
-        sb.append(", setUpTime=").append(setUpTime);
-        sb.append(", spotCheckStatus=").append(spotCheckStatus);
-        sb.append(", highTechStatus=").append(highTechStatus);
-        sb.append(", specialComment=").append(specialComment);
-        sb.append(", ifCertificationFee=").append(ifCertificationFee);
-        sb.append(", certificationFee=").append(certificationFee);
-        sb.append(", certificationCorporate=").append(certificationCorporate);
-        sb.append(", timeRecord=").append(timeRecord);
-        sb.append(", ifPublicity=").append(ifPublicity);
-        sb.append(", checkStatus=").append(checkStatus);
-        sb.append(", patentType=").append(patentType);
-        sb.append(", pubicityUrl=").append(pubicityUrl);
-        sb.append(", serialVersionUID=").append(serialVersionUID);
-        sb.append("]");
-        return sb.toString();
-    }
-    private String name;
-    private String email;
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
+    public Integer getMemberType() {
+        return memberType;
     }
 
+    public void setMemberType(Integer memberType) {
+        this.memberType = memberType;
+    }
 }

+ 43 - 22
src/main/java/com/goafanti/common/task/OrderDunTask.java

@@ -123,40 +123,46 @@ public class OrderDunTask {
   			LoggerUtils.debug(logger, "======================新催款任务轮询启动===================");
 			List<OutNewOrderDunBo> list= newOrderDunService.selectAllOrderDun();
 			Calendar now=Calendar.getInstance();
-			Calendar now2=Calendar.getInstance();
+			Calendar create=Calendar.getInstance();
 			Date date =new Date();
 			for (OutNewOrderDunBo o : list) {
 				now.setTime(date);
-				now2.setTime(o.getCreateTime());
+				create.setTime(o.getCreateTime());
 				//计算特批首期款 特批通过 为催款为首期款 催款时间不为空则计算触发
 				if (o.getApproval()!=null&& o.getApproval()==2&& o.getDunType()==1&&o.getWaitDay()!=null) {
-						now2.add(Calendar.DATE, o.getWaitDay());
-					updateOrderDun(o,now,now2);
+					create.add(Calendar.DATE, o.getWaitDay());
+					updateOrderDun(o,now,create);
 				//会员-期限计算
 				}else if(o.getProjectType().equals(OrderDunProjectType.HY.getCode())&&o.getDunType()==2) {
-					now2.add(Calendar.DATE, o.getEffectiveCount()*180);
-					CalendarTimeCleared(now2);
-					updateOrderDun(o,now,now2);
+					create.add(Calendar.DATE, o.getEffectiveCount()*180);
+					CalendarTimeCleared(create);
+					updateOrderDun(o,now,create);
 				//财税-期限 计算时间
 				} else if(o.getProjectType().equals(OrderDunProjectType.CS.getCode())&&o.getDunType()==2) {
 					//获取年
-					int year = now2.get(Calendar.YEAR);
+					int year = create.get(Calendar.YEAR);
 					//获取月份,0表示1月份
-					int month = now2.get(Calendar.MONTH) + 1;
+					int month = create.get(Calendar.MONTH) + 1;
 					if(month<10)year=year+1;
 					if(month>9)year=year+2;
-					now2.set(year, 5, 1);
-					CalendarTimeCleared(now2);
-					updateOrderDun(o,now,now2);
+					create.set(year, 5, 1);
+					CalendarTimeCleared(create);
+					updateOrderDun(o,now,create);
 				//自定义 超过设置的时间则触发
 				}else if (o.getDunType()==0) {
-					now2.setTime(o.getCustomizeTime());
-					CalendarTimeCleared(now);
-					updateOrderDun(o,now,now2);
+						CalendarTimeCleared(now);
+						//会员提前2个月多一个催款
+					if (o.getMemberType()==1){
+						pushMamberProject(o,now);
+					}
+					create.setTime(o.getCustomizeTime());
+					updateOrderDun(o,now,create);
+
 				}
 			}
+			//校准
 			calibrationDun();
-  		} catch (Exception e) {
+	} catch (Exception e) {
   			EmailBo emailBo = new EmailBo( "催款处理失败",  AFTConstants.ADMIN_EMAIL,  "超管", "平台",  "系统", devName+"催款处理失败");
   			asyncUtils.send(emailBo);
 			LoggerUtils.error(getClass(), "===================新催款的信息处理失败======================", e);
@@ -164,6 +170,22 @@ public class OrderDunTask {
   	}
 
 	/**
+	 * 此会员催款,只会在当天触发
+	 * @param o
+	 * @param now
+	 */
+	private void pushMamberProject(OutNewOrderDunBo o, Calendar now) {
+		Calendar start=Calendar.getInstance();
+		start.setTime(o.getCustomizeTime());
+		start.add(Calendar.MONTH,-2);
+		CalendarTimeCleared(start);
+		if (now.getTimeInMillis()==start.getTimeInMillis()){
+			orderNewService.addTimingTaskNewDunNoticAndSendEmail( o,1);
+		}
+	}
+
+
+	/**
 	 * 如果有不对的数据就校准数据
 	 */
 	private void calibrationDun() {
@@ -234,7 +256,7 @@ public class OrderDunTask {
 			List<TArrearsDun> list3=tArrearsDunMapper.selectStatusAndAmount(2);
 			for (TArrearsDun td : list) {
 				TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(td.getOrderNo());
-				AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
+
 
 				TOrderMid tm=tOrderMidMapper.selectByOrderNo(td.getOrderNo());
 				//如果欠款大于0则需要触发邮件
@@ -243,7 +265,7 @@ public class OrderDunTask {
 					td.setStartTime(date);
 					td.setOrderArrears(tm.getOrderArrears());
 					td.setOrderReceivables(tm.getOrderReceivables());
-					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),a,b);
+					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),b,null);
 					tArrearsDunMapper.updateByPrimaryKeySelective(td);
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					td.setDunStatus(2);
@@ -256,7 +278,6 @@ public class OrderDunTask {
 			for (TArrearsDun ta : list2) {
 				TOrderMid tm=tOrderMidMapper.selectByOrderNo(ta.getOrderNo());
 				TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(ta.getOrderNo());
-				AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 				//如果欠款大于0则需要触发邮件
 				if (tm.getOrderArrears().compareTo(new BigDecimal(0))>0) {
 					ta.setDunStatus(3);
@@ -267,7 +288,7 @@ public class OrderDunTask {
 					ta.setOrderArrears(tm.getOrderArrears());
 					ta.setOrderReceivables(tm.getOrderReceivables());
 					tArrearsDunMapper.insertSelective(ta);
-					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),a,b);
+					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),b,null);
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					ta.setDunStatus(2);
 					ta.setOrderArrears(tm.getOrderArrears());
@@ -291,7 +312,7 @@ public class OrderDunTask {
 					ta.setOrderArrears(tm.getOrderArrears());
 					ta.setOrderReceivables(tm.getOrderReceivables());
 					tArrearsDunMapper.insertSelective(ta);
-					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),a,b);
+					orderNewService.addNotic(NoticeStatus.ORDER_ARREARS_DUN.getCode(),b,null);
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					ta.setDunStatus(2);
 					ta.setOrderReceivables(tm.getOrderReceivables());
@@ -383,7 +404,7 @@ public class OrderDunTask {
 				td.setId(i);
 				tArrearsDunMapper.updateByPrimaryKeySelective(td);
 			}
-			orderNewService.addTimingTaskNewDunNoticAndSendEmail(orderNew, t);
+			orderNewService.addTimingTaskNewDunNoticAndSendEmail( t,0);
 			try {
 				Thread.sleep(2000);
 			} catch (InterruptedException e) {

+ 0 - 1
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -78,7 +78,6 @@ public class ReleaseUserTask {
 				userTmpList = customerService.selectReleaseUserDays(u.getId());
 				for (userDaysBo ub : userTmpList) {
 					String str=null;
-					System.out.println(ub.getName());
 					if (ub.getChannel() == 0) {
 						String shareType="";
 						if(ub.getNewChannel()==0)shareType="私有";

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

@@ -38,7 +38,6 @@ public class AsyncUtils {
 		for (EmailBo emailBo : list) {
 					SendEmailUtil.getInstance().patentSend(emailBo);
 		}
-
 	}
 
 

+ 28 - 29
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -41,11 +41,11 @@ import java.util.regex.Matcher;
 public class ExcelUtils {
 	private Set<Integer> vacantRows = new HashSet<Integer>(); //数据不完整的
 	private final String DEFAULT_MOBILE = "0000-0000000";
-	DecimalFormat df = new DecimalFormat("0");  
+	DecimalFormat df = new DecimalFormat("0");
 	@SuppressWarnings ("resource")
 	public  Set<CustomerExcelBo> parseExcel(String excelPath) throws IOException{
 		InputStream excelFile = new FileInputStream(new File(excelPath));
-		XSSFWorkbook wb = new XSSFWorkbook(excelFile);	
+		XSSFWorkbook wb = new XSSFWorkbook(excelFile);
 		Set<CustomerExcelBo> result = new HashSet<CustomerExcelBo>();
 		XSSFSheet sheet = wb.getSheetAt(0);
 		Iterator<Row> rowIterator = sheet.iterator();
@@ -82,13 +82,13 @@ public class ExcelUtils {
 		}
 		return result;
 	}
-	
+
 	private String checkCustomerType(String customerType,int rowNumber){
 		if(StringUtils.isEmpty(customerType)) {
 			vacantRows.add(rowNumber);
 			return "";
 		}
-		if(customerType.equals("个人客户")) return "0"; 
+		if(customerType.equals("个人客户")) return "0";
 		if(customerType.equals("单位客户")) return "1";
 		vacantRows.add(rowNumber);
 		return "";
@@ -151,19 +151,19 @@ public class ExcelUtils {
 		vacantRows.add(rowNumber);
 		return "";
 	}*/
-	
+
 	private String checkOther(String cellValue,int rowNumber,int maxLength){
 		if(StringUtils.isBlank(cellValue) || cellValue.length() > maxLength){
 			vacantRows.add(rowNumber);
 			return "";
 		}else{
 			return String.valueOf(cellValue).trim();
-		} 
+		}
 	}
 
 	public String checkMobile(String mobile, int rowNumber){
 		mobile = mobile.trim();
-		String mobileRegex = "^1[3|4|5|7|8][0-9]{9}$"; 
+		String mobileRegex = "^1[3|4|5|7|8][0-9]{9}$";
 		String telRegex = "^\\d{3,4}-\\d{7,8}$";
 		if(StringUtils.isBlank(mobile)) return "";
 		if(DEFAULT_MOBILE.equals(mobile)) return mobile;
@@ -173,20 +173,20 @@ public class ExcelUtils {
 		}
 		return mobile;
 	}
-	
+
 	public String getVacantRows(){
 		if(vacantRows.size()>0)
 			return StringUtils.join(vacantRows.toArray(),",")+" 行数据不全或格式有误;";
-		else 
+		else
 			return "";
 	}
-	
-	
-	
+
+
+
 	@SuppressWarnings("resource")
 	public  Set<OrderReportBo> parseOrderExcel(String excelPath) throws IOException{
 		InputStream excelFile = new FileInputStream(new File(excelPath));
-		XSSFWorkbook wb = new XSSFWorkbook(excelFile);	
+		XSSFWorkbook wb = new XSSFWorkbook(excelFile);
 		Set<OrderReportBo> result = new HashSet<OrderReportBo>();
 		XSSFSheet sheet = wb.getSheetAt(0);
 		Iterator<Row> rowIterator = sheet.iterator();
@@ -199,7 +199,7 @@ public class ExcelUtils {
 			currentRow = rowIterator.next();
 			Iterator<Cell> cellIterator = currentRow.iterator();
 			OrderReportBo bo = new OrderReportBo();
-			
+
 			bo.setSaleName(checkEmptyStr(cellIterator.next().getStringCellValue(),rowNumber));
 			//电话
 			Cell cell = cellIterator.next();
@@ -235,18 +235,18 @@ public class ExcelUtils {
 		}
 		return result;
 	}
-	
+
 	private Integer checkOrderType(String OrderType,int rowNumber){
 		if(checkEmpty(OrderType, rowNumber)){
 			return null;
 		}
-		if(OrderType.equals("认证项目")) return 0; 
+		if(OrderType.equals("认证项目")) return 0;
 		if(OrderType.equals("科技项目")) return 1;
 		vacantRows.add(rowNumber);
 		return null;
 	}
 	private Integer checkOrderMonth(String month,int rowNumber){
-		
+
 		if(checkEmpty(month, rowNumber)){
 			return null;
 		}
@@ -276,7 +276,6 @@ public class ExcelUtils {
 				return re;
 			}else{
 				String ym = new SimpleDateFormat("yyyy").format(new Date()) + (m>10?m:"0"+m);
-				System.out.println(ym);
 				return Integer.valueOf(ym);
 			}
 		}else{
@@ -300,11 +299,11 @@ public class ExcelUtils {
 			return str;
 		}
 	}
-	
+
 	//检查表头
-	
 
-	
+
+
 	// 2007 版本以上 最大支持1048576行
     public final static String EXCEL_FILE_2007 = "2007";
     // 2003 版本 最大支持65536 行
@@ -318,7 +317,7 @@ public class ExcelUtils {
      * @param out     输出流
      * @param version 2003 或者 2007,不传时默认生成2003版本
      * @return void
-     * @author 
+     * @author
      * @date 2018-8-2
      */
     public void exportExcel(String title, Collection<T> dataset, OutputStream out, String version) {
@@ -338,7 +337,7 @@ public class ExcelUtils {
      * @param out     输出流
      * @param version 2003 或者 2007,不传时默认生成2003版本
      * @return void
-     * @author 
+     * @author
      * @date 2018-8-2
      */
     public void exportExcel(String title, String[] headers, Collection<T> dataset, OutputStream out, String version) {
@@ -361,7 +360,7 @@ public class ExcelUtils {
      * @param out     与输出设备关联的流对象,可以将EXCEL文档导出到本地文件或者网络中
      * @param pattern 如果有时间数据,设定输出格式。默认为"yyyy-MM-dd hh:mm:ss"
      * @return void
-     * @author 
+     * @author
      * @date 2018-8-2
      */
     @SuppressWarnings({"unchecked", "rawtypes"})
@@ -527,7 +526,7 @@ public class ExcelUtils {
      * @param out     与输出设备关联的流对象,可以将EXCEL文档导出到本地文件或者网络中
      * @param pattern 如果有时间数据,设定输出格式。默认为"yyyy-MM-dd hh:mm:ss"
      * @return void
-     * @author 
+     * @author
      * @date 2018-8-2
      */
     @SuppressWarnings({"unchecked", "rawtypes", "resource"})
@@ -775,7 +774,7 @@ public class ExcelUtils {
         }
         return value.trim();
     }
-    
+
 	public static Date getCellDate(Cell cell) {
 		Date date=new Date();
 		  if (cell != null) {
@@ -793,7 +792,7 @@ public class ExcelUtils {
 
 	}
 
-	
+
     public static Workbook getWorkBook(MultipartFile file) {
         //创建Workbook工作薄对象,表示整个excel
         Workbook workbook = null;
@@ -808,6 +807,6 @@ public class ExcelUtils {
         }
         return workbook;
         }
-    
-      
+
+
 }

+ 0 - 2
src/main/java/com/goafanti/common/utils/ParamUtils.java

@@ -15,10 +15,8 @@ public class ParamUtils {
     public static  <T> String  getParamName(T t,String param){
         Class clazz=t.getClass();
         for (Field f : clazz.getDeclaredFields()) {
-            System.out.println(f.getName());
             if (f.getName().equals(param)){
                 Param filedAnno = f.getAnnotation(Param.class);
-//                System.out.println(filedAnno.name());
                 return filedAnno.name();
             }
         }

+ 0 - 2
src/main/java/com/goafanti/common/utils/WeChatUtils.java

@@ -57,9 +57,7 @@ public class WeChatUtils {
 			map.put("template_id", jgtz);
 			map.put("data",getData(type,date, aname,remarks));
 		}
-		System.out.println("inupt="+JSONObject.toJSONString(map));
 		JSONObject res=HttpUtils.httpPost(url, map);
-		System.out.println("res="+JSONObject.toJSONString(res));
 		if (res.get("errcode")!=null) {
 			return res.getInteger("errcode");
 		}else {

+ 2 - 11
src/main/java/com/goafanti/common/utils/excel/ExcelConstant.java

@@ -3,18 +3,9 @@ package com.goafanti.common.utils.excel;
 import com.goafanti.order.enums.LiquidationNewState;
 
 public class ExcelConstant {
-	
-	public static void main(String[] args) {
-		StringBuffer str=new StringBuffer();
-		for (LiquidationNewState value : LiquidationNewState.values()) {
-			str.append(value.getCode()).append("=").append(value.getDesc()).append(",");
-		}
-		System.out.println(str.substring(0, str.length()-1));
-		
-	}
-	
+
 	public static final String TaskStateStr="0=未分配,1=已分配,2=材料已启动,3=材料已完成,10=未定义";
-	
+
 	public static final String NewProjectStatusStr="0=未启动,1=进行中,2=暂停(客户通知暂停),3=暂停(业务线通知暂停),"
 			+ "4=已提交,5=未推荐,6=已推荐,7=未拟公示,8=已拟公示,28=抽查未备案,9=已备案,10=已下证 ,11=退单(已申报),"
 			+ "12=退单(未申报),13=已答辩,14=未立项,15=已立项,16=前补助,17=后补助,18=立项已拨款,19=已完成/下证,20=已驳回,"

+ 12 - 10
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -8,20 +8,14 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.lang.reflect.Array;
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.net.URL;
 import java.net.URLConnection;
 import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import javax.servlet.http.HttpServletResponse;
@@ -553,7 +547,15 @@ public class NewExcelUtil<T> {
 				String dateFormat = attr.dateFormat();
 				String readConverterExp = attr.readConverterExp();
 				String separator = attr.separator();
-				if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) {
+				String enumsName = attr.enumsName();
+				String methodName="getValueByCode";
+				if (StringUtils.isNotBlank(enumsName)&& StringUtils.isNotNull(value)) {
+					Class<?> clazz=Class.forName(enumsName);
+					Object[] os=clazz.getEnumConstants();
+					Method method=clazz.getDeclaredMethod(methodName,Integer.class);
+					Object s=method.invoke(clazz,value);
+					setCellVo(s.toString(), attr, cell);
+				}else if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) {
 					cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value));
 				} else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) {
 					cell.setCellValue(convertByExp(toStr(value), readConverterExp, separator));

+ 3 - 5
src/main/java/com/goafanti/core/auth/RestClient.java

@@ -17,8 +17,6 @@ public class RestClient {
 	public void whenSecuredRestApiIsConsumed_then200OK() {
 	    RestTemplate restTemplate = new RestTempleteConfig().getRestTemplate();
 	    ResponseEntity<String> entity = restTemplate.exchange(BS_HOST, HttpMethod.GET, null, String.class);
-	    System.out.println(entity.getStatusCode());
-	    System.out.println(entity.getBody());
 	}
 	private HttpHeaders getHeaders(){
 		String plainCredentials="dev:123456";
@@ -27,15 +25,15 @@ public class RestClient {
 		headers.add("Authorization", "Basic " + base64Credentials);
 		return headers;
 	}
- 
+
 	public String sendToBs(String apiUrl,HttpMethod method,LinkedMultiValueMap<String, String> params) {
 		RestTemplate restTemplate = new RestTemplate();
 		HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(params,getHeaders());
 		ResponseEntity<String> response = restTemplate.exchange(BS_HOST + "/" + apiUrl, method,request, String.class);
-		
+
 		return response.getBody();
 	}
-	
+
 //	@Test
 	public void testLogin() {
 		System.out.println(sendToBs("login", HttpMethod.GET, null));

+ 8 - 3
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -872,11 +872,16 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 
-	/** 管理员列表 **/
+	/**
+	 * 管理员列表
+	 * @param adminName 名称
+	 * @param status 0 正常 1锁定 2全部
+	 * @return
+	 */
 	@RequestMapping(value = "/listAdminByName",method = RequestMethod.GET)
-	public Result listAdminByName(String adminName){
+	public Result listAdminByName(String adminName,Integer status){
 		Result res = new Result();
-		if(StringUtils.isNotBlank(adminName))res.setData(adminService.listAdminByName(adminName));
+		if(StringUtils.isNotBlank(adminName))res.setData(adminService.listAdminByName(adminName,status));
 		return res;
 	}
 

+ 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;
+    }
+}

+ 25 - 0
src/main/java/com/goafanti/order/bo/MemberLogBo.java

@@ -0,0 +1,25 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.MemberLog;
+
+public class MemberLogBo  extends MemberLog {
+
+    private String aname;
+    private String createTimes;
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public String getCreateTimes() {
+        return createTimes;
+    }
+
+    public void setCreateTimes(String createTimes) {
+        this.createTimes = createTimes;
+    }
+}

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

@@ -0,0 +1,224 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+import java.math.BigDecimal;
+
+public class OutMemberList {
+    static final int MINWIDTH=7;
+    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=驳回",width = MINWIDTH)
+    private Integer approval;
+    @Excel(name = "订单部门",width = 20)
+    private String depName;
+    @Excel(name = "订单负责人")
+    private String salesmanName;
+    @Excel(name = "财务负责人")
+    private String financeName;
+    @Excel(name = "会员项目")
+    private String projectName;
+    @Excel(name = "项目说明",width = 24)
+    private String taskComment;
+    @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回",width = MINWIDTH)
+    private String status;
+
+    private Integer  deleteSign;
+
+    private BigDecimal totalAmount;
+    private Integer salesType;
+    private String other;
+    private String commodityId;
+    private String commodityName;
+    private Integer memberType;
+    private Integer commodityQuantity;
+
+    @Excel(name = "订单状态" ,width = MINWIDTH)
+    private String deleteSignStr;
+    @Excel(name = "客户类型",width = MINWIDTH)
+    private String bigUser;
+    @Excel(name = "销售类型")
+    private String salesTypeName;
+
+    public String getDeleteSignStr() {
+        return deleteSignStr;
+    }
+
+    public void setDeleteSignStr(String deleteSignStr) {
+        this.deleteSignStr = deleteSignStr;
+    }
+
+    public String getBigUser() {
+        return bigUser;
+    }
+
+    public void setBigUser(String bigUser) {
+        this.bigUser = bigUser;
+    }
+
+    public String getSalesTypeName() {
+        return salesTypeName;
+    }
+
+    public void setSalesTypeName(String salesTypeName) {
+        this.salesTypeName = salesTypeName;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public Integer getSalesType() {
+        return salesType;
+    }
+
+    public void setSalesType(Integer salesType) {
+        this.salesType = salesType;
+    }
+
+    public String getOther() {
+        return other;
+    }
+
+    public void setOther(String other) {
+        this.other = other;
+    }
+
+    public Integer getDeleteSign() {
+        return deleteSign;
+    }
+
+    public void setDeleteSign(Integer deleteSign) {
+        this.deleteSign = deleteSign;
+    }
+
+    public String getCommodityId() {
+        return commodityId;
+    }
+
+    public void setCommodityId(String commodityId) {
+        this.commodityId = commodityId;
+    }
+
+    public String getCommodityName() {
+        return commodityName;
+    }
+
+    public void setCommodityName(String commodityName) {
+        this.commodityName = commodityName;
+    }
+
+    public Integer getMemberType() {
+        return memberType;
+    }
+
+    public void setMemberType(Integer memberType) {
+        this.memberType = memberType;
+    }
+
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    public String getTaskComment() {
+        return taskComment;
+    }
+
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+
+    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 getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}

+ 16 - 6
src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java

@@ -15,10 +15,20 @@ public class OutNewOrderDunBo extends NewOrderDun {
 	private String startDate;
 	private BigDecimal setUpAmount;
 	private String customizeTimes;
-	
+
+	private Integer	memberType;
+
+	public Integer getMemberType() {
+		return memberType;
+	}
+
+	public void setMemberType(Integer memberType) {
+		this.memberType = memberType;
+	}
+
 	public String getDunTypeName() {
-		if(super.getDunType()!=null&&super.getProjectType()!=null) {
-			return NewOrderDunType.getValueByCode(Integer.valueOf(""+super.getProjectType()+super.getDunType()));
+		if(getDunType()!=null&&getProjectType()!=null) {
+			return NewOrderDunType.getValueByCode(Integer.valueOf(""+getProjectType()+getDunType()));
 		}
 		return dunTypeName;
 	}
@@ -46,16 +56,16 @@ public class OutNewOrderDunBo extends NewOrderDun {
 	public String getStartDate() {
 		//会员显示到期时间
 		if(super.getCreateTime()!=null&&super.getEffectiveCount()!=null) {
-			Calendar calendar=Calendar.getInstance();   
+			Calendar calendar=Calendar.getInstance();
 	  		calendar.setTime(super.getCreateTime());
 	  		calendar.add(Calendar.DATE, super.getEffectiveCount()*180);
 	  		return DateUtils.formatDate(calendar.getTime(), AFTConstants.YYYYMMDD);
 		}
 		//财税显示催款时间 大于9则年份+2,小于10年份+1
 		if (super.getDunType()==2&&super.getProjectType()==5) {
-			Calendar calendar=Calendar.getInstance();   
+			Calendar calendar=Calendar.getInstance();
 	  		calendar.setTime(super.getCreateTime());
-	  		int year = calendar.get(Calendar.YEAR);  
+	  		int year = calendar.get(Calendar.YEAR);
 		        //获取月份,0表示1月份
 		        int month = calendar.get(Calendar.MONTH) + 1;
 		        if(month<10)year=year+1;

+ 30 - 10
src/main/java/com/goafanti/order/bo/TOrderTaskBo.java

@@ -8,14 +8,14 @@ import com.goafanti.order.enums.NewProjectStatus;
 
 public class TOrderTaskBo extends TOrderTask{
 	/**
-	 * 
+	 *
 	 */
 	private static final long serialVersionUID = 1L;
 	private String contactsMobile;
 	@Excel(name = "合同编号",sort = 9)
 	private String cname;
 	private Integer cSort;
-	
+
 	@Excel(name = "合同编号",sort = 1)
 	private String contractNo;
 	@Excel(name = "订单负责人",sort = 4)
@@ -28,20 +28,40 @@ public class TOrderTaskBo extends TOrderTask{
 	private String userName;
 	@Excel(name = "订单状态",sort = 6,readConverterExp = "0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项,5=已驳回,6=已退单")
 	private Integer orderStatus;
-	
+
 	private Integer type;
-	
+
 	private BigDecimal price;
-	
+
 	private BigDecimal appropriationRatio;
-	
+
 	private Integer patentType;
 	private String patentTypeName;
 	private Integer patentTransfer;
+	private String email;
+	private String name;
 
 	@Excel(name = "项目状态",sort = 13)
 	private String projectStatusName;
 
+
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
 	public Integer getPatentTransfer() {
 		return patentTransfer;
 	}
@@ -70,8 +90,8 @@ public class TOrderTaskBo extends TOrderTask{
 		super.setProjectStatus(projectStatus);
 		this.projectStatusName=NewProjectStatus.getValueByCode(projectStatus);
 	}
-	
-	
+
+
 	public String getContractNo() {
 		return contractNo;
 	}
@@ -152,6 +172,6 @@ public class TOrderTaskBo extends TOrderTask{
 	public void setPatentTypeName(String patentTypeName) {
 		this.patentTypeName = patentTypeName;
 	}
-	
-	
+
+
 }

+ 32 - 14
src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java

@@ -43,7 +43,7 @@ public class TOrderTaskDetailBo {
 	private Integer ifCertificationFee;
 	private String certificationCorporate;
 	private BigDecimal certificationFee;
-	
+
 	/**
 	 * 任务状态
 	 */
@@ -80,8 +80,8 @@ public class TOrderTaskDetailBo {
 	 * 外包价格
 	 */
 	private String outsourcePrice;
-	
-	
+
+
 	private Integer splitStatus;
 	private String splitSuper;
 	private Integer splitId;
@@ -89,38 +89,56 @@ public class TOrderTaskDetailBo {
 	 * 项目分类
 	 */
 	private Integer bpType;
-	
+
 	/** 官费 */
 	private Integer officialCost;
 	/** 费减 */
 	private Integer costReduction;
-	
+
 	private Integer setUpStatus;
 	private String setUpTime;
 	private Integer spotCheckStatus;
 	private Integer highTechStatus;
-	
+
 	private Integer urgentDay;
 	private Integer ifMaterial;
 	private String specialComment;
 	private Integer rejectCount;
-	
+
 	private Integer certificatesCount;
-	private Integer authorizeCount; 
+	private Integer authorizeCount;
 	private Integer endCount;
 	private Integer acceptCount;
 	private BigDecimal commodityPrice;
 	private Integer	commodityQuantity;
 	private String timeRecord;
-	
+
 	private Integer	checkStatus;
-	
+
 	private Integer patentType;
-	
+
 	@SuppressWarnings("unused")
 	private String patentTypeName;
 
 	private Integer patentTransfer;
+	private Integer processStatus;
+	private String commodityId;
+
+	public String getCommodityId() {
+		return commodityId;
+	}
+
+	public void setCommodityId(String commodityId) {
+		this.commodityId = commodityId;
+	}
+
+	public Integer getProcessStatus() {
+		return processStatus;
+	}
+
+	public void setProcessStatus(Integer processStatus) {
+		this.processStatus = processStatus;
+	}
 
 	public Integer getPatentTransfer() {
 		return patentTransfer;
@@ -196,7 +214,7 @@ public class TOrderTaskDetailBo {
 	public void setRejectCount(Integer rejectCount) {
 		this.rejectCount = rejectCount;
 	}
-	
+
 	public Integer getSplitStatus() {
 		return splitStatus;
 	}
@@ -395,7 +413,7 @@ public class TOrderTaskDetailBo {
 	public void setTaskDate(String taskDate) {
 		this.taskDate = taskDate;
 	}
-	
+
 	public String getUserName() {
 		return userName;
 	}
@@ -546,7 +564,7 @@ public class TOrderTaskDetailBo {
 	public void setPatentType(Integer patentType) {
 		this.patentType = patentType;
 	}
-	
+
 	public String getPatentTypeName() {
 		if (getPatentType()!=null) {
 			return OfficialPatentType.getValueByCode(getPatentType());

+ 73 - 18
src/main/java/com/goafanti/order/bo/outOrderDunListBo.java

@@ -2,47 +2,102 @@ package com.goafanti.order.bo;
 
 import java.math.BigDecimal;
 
+import com.goafanti.common.utils.excel.Excel;
 import com.goafanti.order.enums.NewOrderDunType;
 import com.goafanti.order.enums.OrderDunSubject;
 
+import javax.naming.Name;
+
 public class outOrderDunListBo {
 	private String id;
+	@Excel(name = "合同编号")
 	private String contractNo;
+	@Excel(name = "订单编号")
 	private String orderNo;
+	@Excel(name = "客户名称")
 	private String userName;
+	@Excel(name = "订单负责人")
 	private String salesmanName;
+	@Excel(name = "订单部门")
+	private String depName;
+	@Excel(name = "订单状态",readConverterExp = "0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项")
+	private Integer orderStatus;
+	@Excel(name = "项目名称")
 	private String commodityName;
+	@Excel(name = "项目状态", enumsName = "com.goafanti.order.enums.NewProjectStatus")
 	private Integer projectStatus;
+	@Excel(name = "签单金额")
 	private BigDecimal totalAmount;
-	private Integer liquidationStatus;
+	@Excel(name = "已收款")
 	private BigDecimal settlementAmount;
-	private BigDecimal accountsReceivable;
+	@Excel(name = "未收款")
 	private BigDecimal uncollectedAmount;
-	private String startDate;
-	private String depName;
-	private String signDate;
-	private Integer orderStatus;
+	@Excel(name = "拨款比例")
+	private BigDecimal appropriationRatio;
+	@Excel(name = "结算状态",readConverterExp = "0=首付待付清,1=尾款待付清,2=已付清,3=退款待确认,4=全部退款")
+	private Integer liquidationStatus;
+	@Excel(name = "催收科目")
+	private String dunSubject;
 	private Integer projectType;
-	private Integer dunStatus;
 	private Integer dunType;
-	private String dunSubject;
-	private BigDecimal appropriationRatio;
+	@Excel(name = "应收款")
+	private BigDecimal accountsReceivable;
+	@Excel(name = "催款状态" ,readConverterExp = "0=未启动,1=已启动")
+	private Integer dunStatus;
+	@Excel(name = "启动日期")
+	private String startDate;
+	@Excel(name = "签单日期")
+	private String signDate;
+
+
+
 	private BigDecimal setUpAmount;
 	private String customizeName;
 	private String customizeTimes;
-	
-	public String getId() {
-		return id;
+	@Excel(name = "特批状态")
+	private Integer approval;
+	@Excel(name = "订单状态")
+	private Integer deleteSign;
+	@Excel(name = "会员订单",readConverterExp = "0=否,1=是")
+	private Integer memberType;
+
+	public void setDunSubject(String dunSubject) {
+		this.dunSubject = dunSubject;
 	}
+
 	public String getDunSubject() {
-		//旧催款
-		if(dunSubject!=null)return OrderDunSubject.getValueByCode(Integer.valueOf(dunSubject));
-		//新催款
-		if(getDunType()!=null&&getDunType()!=0&&getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+getProjectType()+getDunType()));
-		if(getDunType()!=null&&getDunType()==0&&getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+getProjectType()+getDunType()))+getCustomizeName();
 		return dunSubject;
 	}
 
+	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;
+	}
+
+
 	public String getCommodityName() {
 		return commodityName;
 	}
@@ -184,6 +239,6 @@ public class outOrderDunListBo {
 	public void setCustomizeName(String customizeName) {
 		this.customizeName = customizeName;
 	}
-	
+
 
 }

+ 20 - 21
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -14,7 +14,7 @@ import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.model.*;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
-import com.goafanti.order.enums.salesTypes;
+import com.goafanti.order.enums.SalesTypes;
 import com.goafanti.order.service.OrderAssistService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -73,7 +73,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型"));
 			return res;
 		}else{
-			if (salesType.equals(salesTypes.qd.getCode()) ){
+			if (salesType.equals(SalesTypes.qd.getCode()) ){
 				if (StringUtils.isBlank(channelId)){
 					res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
 					return res;
@@ -83,7 +83,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 					return res;
 				}
 			}
-			if ((salesType.equals(salesTypes.qt.getCode()) ||salesType.equals(salesTypes.zjs.getCode()))
+			if ((salesType.equals(SalesTypes.qt.getCode()) ||salesType.equals(SalesTypes.zjs.getCode()))
 					&&StringUtils.isBlank(other)){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
 				return res;
@@ -107,6 +107,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError("订单主要任务已存在","订单主要任务已存在"));
 			return res;
 		}
+		t.setProcessStatus(3);
 		return res.data(orderNewService.addOrderTask(t));
 	}
 	/**
@@ -162,16 +163,17 @@ public class AdminNewOrderApiController extends CertifyApiController {
 
 	/**
 	 * 获取订单项目信息
+	 * @param type   分类 0 所有  1通过审核
+	 * @param orderNo 订单编号
 	 */
 	@RequestMapping(value = "/getOrderTask",method = RequestMethod.GET)
-	public Result getOrderTask(String orderNo){
+	public Result getOrderTask(String orderNo,Integer type){
 		Result res = new Result();
 		if(StringUtils.isBlank(orderNo)){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
 			return res;
 		}
-		res.setData(orderNewService.selectOrderTask(orderNo));
-
+		res.setData(orderNewService.selectOrderTask(orderNo,type));
 		return res;
 	}
 	/**
@@ -242,7 +244,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号"));
 			return res;
 		}
-		if (in.getSalesType().equals(salesTypes.qd.getCode()) ){
+		if (in.getSalesType().equals(SalesTypes.qd.getCode()) ){
 			if (StringUtils.isBlank(in.getChannelId())){
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为渠道,渠道客户"));
 				return res;
@@ -252,7 +254,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 				return res;
 			}
 		}
-		if ((in.getSalesType().equals(salesTypes.qt.getCode()) ||in.getSalesType().equals(salesTypes.zjs.getCode()))
+		if ((in.getSalesType().equals(SalesTypes.qt.getCode()) ||in.getSalesType().equals(SalesTypes.zjs.getCode()))
 				&&StringUtils.isBlank(in.getOther())){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","销售类型为转介绍或者其他,请简单描述"));
 			return res;
@@ -365,9 +367,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 memberType,
+								  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,memberType,pageNo, pageSize));
 		return res;
 	}
 
@@ -594,23 +598,18 @@ 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){
-		 Result res = new Result();
- 		try {
- 			orderNewService.exportOrderDunData( name, orderNo,contractNo, starTime, endTime,specially, aid, adminName, depId,newStatus, pageNo, pageSize, response);
-		} catch (Exception e) {
-			res.getError().add(buildError("格式不正确"));
-			return res;
-		}
- 		return res;
+			String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,
+									 Integer pageNo,Integer pageSize){
+		return orderNewService.exportOrderDunData( name, orderNo,contractNo, starTime, endTime,specially, aid, adminName, depId,newStatus
+				, approval, amountStatus, memberType,pageNo, pageSize);
 	}
 	/**
 	 * 	项目列表下载
 	 * @throws IOException
 	 */
 	@RequestMapping(value = "/exportOrderTaskData", method = RequestMethod.GET)
-	public Result exportOrderTaskData(String orderNo,HttpServletResponse response){
-		List<TOrderTaskBo> list=orderNewService.selectOrderTask(orderNo);
+	public Result exportOrderTaskData(String orderNo,Integer type,HttpServletResponse response){
+		List<TOrderTaskBo> list=orderNewService.selectOrderTask(orderNo,type);
 		NewExcelUtil<TOrderTaskBo>excel=new NewExcelUtil<>(TOrderTaskBo.class);
 		 return  excel.exportExcel(list,"订单项目列表",response);
 	}

+ 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

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

@@ -10,7 +10,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
+import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.service.OrderNewService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
@@ -35,6 +37,8 @@ public class OrderProjectApiController extends CertifyApiController {
 
 	@Autowired
 	private OrderProjectService	orderProjectService;
+	@Autowired
+	private OrderNewService orderNewService;
 	@Value(value = "${upload.path}")
 	private String	uploadPath			= null;
 
@@ -480,7 +484,90 @@ 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();
+		if(org.apache.commons.lang3.StringUtils.isBlank(t.getOrderNo())){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		t.setProcessStatus(1);
+		t.setMain(0);
+		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 t
+	 * @return
+	 */
+	@RequestMapping(value = "/updateMemberProject" ,method = RequestMethod.POST)
+	public Result updateMemberProject(TOrderTask t){
+		Result res = new Result();
+		if(t.getId()==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目编号"));
+			return res;
+		}
+		return res.data(orderProjectService.updateMemberProject(t));
+
+	}
+
+	/**
+	 * 会员项目列表
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/memberList" ,method = RequestMethod.GET)
+	public Result memberList(InputMemberList in){
+		Result res = new Result();
+		return res.data(orderProjectService.memberList(in));
+
+	}
+
+	/**
+	 * 会员项目列表
+	 * @return
+	 */
+	@RequestMapping(value = "/memberLog" ,method = RequestMethod.GET)
+	public Result memberLog(Integer id){
+		Result res = new Result();
+		return res.data(orderProjectService.memberLog(id));
+
+	}
+
+	/**
+	 * 会员项目列表
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value = "/memberList/export" ,method = RequestMethod.GET)
+	public Result memberListExport(InputMemberList in){
+
+		return orderProjectService.memberListExport(in);
+
+	}
 
 
 }

+ 4 - 4
src/main/java/com/goafanti/order/enums/LiquidationNewState.java

@@ -12,10 +12,10 @@ public enum LiquidationNewState {
 	ALREADY_PAY(2,"已付清"),
 	/** 退款待确认 **/
 	REBATESQUAN(3,"退款待确认"),
-	FULL_REFUND(3,"全部退款"),
+	FULL_REFUND(4,"全部退款"),
 	/** 无效 **/
 	INVALID(10, "INVALID");
-	
+
 	private LiquidationNewState(Integer code, String desc) {
 		this.code = code;
 		this.desc = desc;
@@ -41,11 +41,11 @@ public enum LiquidationNewState {
             }
         }
         return  null;
-    }	
+    }
 	public static boolean containsType(Integer code) {
 		return status.containsKey(code);
 	}
-	
+
 	private Integer	code;
 	private String	desc;
 	public Integer getCode() {

+ 1 - 0
src/main/java/com/goafanti/order/enums/NewProjectStatus.java

@@ -51,6 +51,7 @@ public enum NewProjectStatus {
 		return INVALID;
 	}
 	public static String getValueByCode(Integer code){
+		if(code==null)return "";
         for(NewProjectStatus orderType:NewProjectStatus.values()){
             if(code.equals(orderType.getCode())){
                 return orderType.getDesc();

+ 13 - 4
src/main/java/com/goafanti/order/enums/salesTypes.java

@@ -3,7 +3,7 @@ package com.goafanti.order.enums;
 import java.util.HashMap;
 import java.util.Map;
 
-public enum salesTypes {
+public enum SalesTypes {
 
     dhxkf(0,"电话新开发"),
     dhzdzy(1,"电话自带资源"),
@@ -17,18 +17,27 @@ public enum salesTypes {
     private Integer code;
     private String desc;
 
-    private salesTypes(Integer code,String desc){
+    private SalesTypes(Integer code, String desc){
         this.code=code;
         this.desc=desc;
     }
-    private static Map<Integer ,salesTypes> map=new HashMap<>();
+    private static Map<Integer , SalesTypes> map=new HashMap<>();
 
     static {
-        for (salesTypes value : salesTypes.values()) {
+        for (SalesTypes value : SalesTypes.values()) {
             map.put(value.code,value);
         }
     }
 
+    public static String getValueByCode(Integer code){
+        for(SalesTypes o:SalesTypes.values()){
+            if(code.equals(o.getCode())){
+                return o.getDesc();
+            }
+        }
+        return  null;
+    }
+
     public Integer getCode() {
         return code;
     }

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

@@ -1,18 +1,17 @@
 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.bo.Result;
 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 +27,8 @@ public interface OrderNewService {
 	 * @param t
 	 */
 	int addOrderTask(TOrderTask t);
+
+	int addMemberProject(TOrderTask t);
 	/**
 	 * 修改项目信息
 	 * @param t
@@ -42,7 +43,7 @@ public interface OrderNewService {
 	 * 项目详情
 	 * @param orderNo
 	 */
-	 List<TOrderTaskBo> selectOrderTask(String orderNo);
+	 List<TOrderTaskBo> selectOrderTask(String orderNo,Integer type);
 	 /**
 	  * 订单提交或保存
 	  * @param t
@@ -90,7 +91,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 memberType,Integer pageNo, Integer pageSize);
+
+	Result 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);
 	/**
 	 * 新增催款记录
 	 */
@@ -141,8 +146,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);
 
@@ -154,7 +158,12 @@ public interface OrderNewService {
 
 	void addNewDunNoticAndSendEmail(String orderNo, OutNewOrderDunBo o);
 
-	void addTimingTaskNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o);
+	/**
+	 *
+	 * @param o
+	 * @param type 0正常催款 1 会员提前2个月催款
+	 */
+	void addTimingTaskNewDunNoticAndSendEmail( OutNewOrderDunBo o,Integer type);
 
 	boolean checkORderDun(String orderNo);
 
@@ -202,13 +211,22 @@ public interface OrderNewService {
 	/**
 	 *  发送邮件
 	 * @param type 消息类型
-	 * @param a  发送人信息
 	 * @param b 订单信息
-	 * @param projectType 项目类型 判断是否是会员
+	 *
 	 */
-	void addNotic(Integer type, AdminListBo a, TOrderNewBo b);
+	void addNotic(Integer type,  TOrderNewBo b,String str);
 
+	/**
+	 *
+	 * @param type 消息类型
+	 * @param b  订单信息
+	 * @param shiroType  0财务 1特批
+	 * @param  result 0审核 1通过
+	 */
+	void addNoticMember(Integer type,  TOrderNewBo b,Integer shiroType,Integer result);
 	Pagination<TOrderNewBo> statisticsOrderList(InputStatisticsOrderList in);
 
 	int updateSalesType(TOrderNew in);
+
+
 }

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

@@ -2,7 +2,10 @@ 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.MemberLog;
+import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
@@ -12,7 +15,7 @@ import com.goafanti.organization.bo.OutPaymentNode;
 public interface OrderProjectService {
 
 	/**
-	 * 
+	 *
 	 * @param taskId
 	 * @param taskReceiverId
 	 * @param remarks
@@ -28,7 +31,7 @@ public interface OrderProjectService {
 	int updateOrderTask(TOrderTaskDetailBo t);
 
 	int addTaskHours(TTaskHours t);
-	
+
 	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
 			Integer pageNo, Integer pageSize);
 
@@ -81,4 +84,16 @@ 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);
+
+	void addMemberLog(Integer id,Integer status ,String remarks);
+
+	List<MemberLogBo> memberLog(Integer id);
 }

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

@@ -10,6 +10,7 @@ import java.util.Map;
 import java.util.UUID;
 
 
+import com.goafanti.order.bo.TOrderTaskBo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -248,12 +249,12 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			bonus.setBonusSubject(BonusSubject.WK.getCode());//12
 			//发放给技术员如果付完款所有参与这个项目任务的人都会有结算奖
 			//获得所有的任务负责人
-			List<TOrderTask> l = taskMapper.getReceiverByOid(billNew.getOrderNo());
+			List<TOrderTaskBo> l = taskMapper.getReceiverByOid(billNew.getOrderNo());
 //			取消没有技术员不能支付全款
 //			if(null == l || l.size() == 0){
 //				return -3;//没有给将任务分给咨询师(技术员)
 //			}
-			for (TOrderTask tOrderTask : l) {
+			for (TOrderTaskBo tOrderTask : l) {
 				if(null != tOrderTask &&null != tOrderTask.getTaskReceiver()){
 					bonus.setTaskId(tOrderTask.getId());//任务id
 					bonus.setGrantTarget(tOrderTask.getTaskReceiver());
@@ -356,8 +357,8 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			//发送站内消息
 			//addNotic(o.getOrderNo(),NoticeStatus.ORDER_REFUND.getCode(),o.getSalesmanId());//给营销员
 			//根据订单编号获得所有的技术员
-			List<TOrderTask> l = taskMapper.getReceiverByOid(o.getOrderNo());
-			for (TOrderTask tOrderTask : l) {
+			List<TOrderTaskBo> l = taskMapper.getReceiverByOid(o.getOrderNo());
+			for (TOrderTaskBo tOrderTask : l) {
 				if(null != tOrderTask && null != tOrderTask.getTaskReceiver()){
 					//addNotic(o.getOrderNo(),NoticeStatus.ORDER_REFUND.getCode(),tOrderTask.getTaskReceiver());//给技术员
 					//发邮件给技术员

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

@@ -124,7 +124,7 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
 
     @Override
     public boolean checkTask(String orderNo) {
-        List<TOrderTaskBo> list =tOrderTaskMapper.selectOrderTask(orderNo);
+        List<TOrderTaskBo> list =tOrderTaskMapper.selectOrderTask(orderNo,0);
         for (TOrderTaskBo bo : list) {
             if (bo.getType()==5&&bo.getProjectStatus()!= NewProjectStatus.YXZ.getCode()){
                 return true;

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

@@ -41,7 +41,7 @@ public class NewOrderDunServiceImpl extends BaseMybatisDao<NewOrderDunMapper> im
 				ib.setEffectiveCount(x);
 			}
 		}else 	newOrderDunMapper.insertSelective(ib);
-		return 0;
+		return 1;
 	}
 
 

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

@@ -431,7 +431,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			if(tOrderTaskBo.getSplitStatus()==2) {
 				tOrderTaskBo.setSplitSuper(map.get(tOrderTaskBo.getSplitSuper()));
 			}
-			tOrderTaskMapper.insertSelectiveGetId(tOrderTaskBo);
+			tOrderTaskBo.setProcessStatus(3);
+			tOrderTaskMapper.insertSelective(tOrderTaskBo);
 			int y=tOrderTaskBo.getId();
 			TTaskMid dtails = tTaskMidMapper.getDtails(tOrderTaskBo.getId());
 			TTaskMid tTaskMid = new TTaskMid(y, new BigDecimal(0));
@@ -695,7 +696,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			if (i<1) userLockReleaseMapper.updateReleaseUser(o.getOrderNo());
 		}
 		//
-		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(nb.getOrderNo());
+		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(nb.getOrderNo(),0);
 		int i=0;
 		for (TOrderTaskBo to : taskBos) {
 			if (to.getTaskStatus()>TaskState.UN_DISTRIBUTION.getCode()&&to.getTaskStatus()<TaskState.INVALID.getCode()) {
@@ -729,7 +730,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			ot.setTaskComment(cd.getTaskComment());
 			ot.setMain(cd.getMain());
 			ot.setTaskStatus(0);
-			tOrderTaskMapper.insertSelectiveGetId(ot);
+			tOrderTaskMapper.insertSelective(ot);
 			cd.setTid(ot.getId());
 			tChangeTaskMapper.updateByPrimaryKeySelective(cd);
 			tChangeDunMapper.updateByCTid(cd.getId(), ot.getId());
@@ -1001,7 +1002,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				List<TOrderNewBo> list=tOrderNewMapper.selectUsedOrderByOrder(orderNo);
 				for (TOrderNewBo t : list) {
 					t.setDunList(newOrderDunService.selectListNewOrderDun(orderNo));
-					t.setTaskList(orderNewService.selectOrderTask(orderNo));
+					t.setTaskList(orderNewService.selectOrderTask(orderNo,0));
 				}
 				return list;
 			}

+ 202 - 88
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -2,7 +2,6 @@ package com.goafanti.order.service.impl;
 
 
 import java.io.IOException;
-import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
 import java.text.ParseException;
@@ -18,22 +17,21 @@ import java.util.UUID;
 
 
 import javax.mail.MessagingException;
-import javax.servlet.http.HttpServletResponse;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.model.*;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.enums.*;
+import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.organization.bo.*;
 import com.goafanti.common.utils.StringUtils;
 import groovy.transform.Synchronized;
-import org.apache.poi.xssf.usermodel.XSSFCell;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.stereotype.Service;
@@ -50,7 +48,6 @@ import com.goafanti.common.enums.OfficialPatentType;
 import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
@@ -130,6 +127,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private BusinessProjectMapper businessProjectMapper;
 	@Autowired
 	private BusinessCategoryMapper businessCategoryMapper;
+	@Autowired
+	private OrderProjectService orderProjectService;
+	@Value(value = "${upload.path}")
+	private String					uploadPath			= null;
 
 	Logger							logger	= LoggerFactory.getLogger(OrderNewServiceImpl.class);
 
@@ -158,7 +159,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setUpdateTime(date);
 		t.setBuyerId(uid);
 		t.setSalesType(salesType);
-		if (salesType==salesTypes.qd.getCode()&&channelId!=null){
+		if (salesType== SalesTypes.qd.getCode()&&channelId!=null){
 			t.setChannelId(channelId);
 		}
 		if (other!=null )t.setOther(other);
@@ -184,7 +185,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if(t.getCommodityPrice()!=null)order.setTotalAmount(order.getTotalAmount());
 		String str=tOrderTaskMapper.selectByidGetCname(t.getCommodityId());
 		t.setCname(str);
-		tOrderTaskMapper.insertSelectiveGetId(t);
+		tOrderTaskMapper.insertSelective(t);
 		TTaskMid tm=new TTaskMid();
 		tm.setTid(t.getId());
 		//判断这个项目是不是高新复审
@@ -210,6 +211,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return 1;
 	}
 
+	@Override
+	public int addMemberProject(TOrderTask t){
+		TOrderNewBo tn = tOrderNewMapper.getSaleIdByOno(t.getOrderNo());
+		addOrderTask( t);
+		orderProjectService.addMemberLog(t.getId(),0,"新增会员项目");
+		addNoticMember(NoticeStatus.MENBER_START.getCode(),tn,null,0);
+		return 1;
+	}
+
 	public void checkOrder(TOrderNew order,TOrderTask t){
 		if(order == null)
 			 throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
@@ -287,8 +297,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	}
 
 	@Override
-	public List<TOrderTaskBo> selectOrderTask(String orderNo) {
-		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
+	public List<TOrderTaskBo> selectOrderTask(String orderNo,Integer type) {
+		if (TokenManager.hasRole(AFTConstants.SALESMAN)||TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)){
+			if (type==null)type=0;
+		}else {
+			if (type==null)type=1;
+		}
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo,type);
 			for (TOrderTaskBo t : list) {
 				if (TokenManager.hasRole(AFTConstants.SALESMAN)&&TokenManager.hasRole(AFTConstants.TECH)) {
 					//如果是双角色不做处理。
@@ -499,6 +514,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
+
 	@Override
 	public TOrderNewBo getOrderNewDetail(String orderNo) {
 		TOrderNewBo tOrder= tOrderNewMapper.getOrderNewDetail(orderNo);
@@ -619,6 +635,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();
@@ -746,27 +764,38 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	public void addNewDunNoticAndSendEmail(String  orderNo, OutNewOrderDunBo o) {
 		AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
-		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(orderNo);
-		addNotic(NoticeStatus.ORDER_DUN.getCode(),a, b);
+		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(o.getOrderNo());
+		addNotic(NoticeStatus.ORDER_DUN.getCode(), b,null);
 		try {
-			NewDunsendEmail(orderNo,o.getId(), a, b);
+			NewDunsendEmail(o.getOrderNo(),o.getId(), a, b);
 		} catch (UnsupportedEncodingException | MessagingException e) {
 			throw new BusinessException(new Error("邮件发送错误。"));
 		}
 	}
 
-	public void addTimingTaskNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o) {
+	public void addTimingTaskNewDunNoticAndSendEmail( OutNewOrderDunBo o,Integer type) {
 		AdminListBo a = adminMapper.getDeptNameByAid("1");
-		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
-		addNotic(NoticeStatus.ORDER_DUN.getCode(),a, b);
+		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(o.getOrderNo());
+		StringBuffer sb=new StringBuffer();
+		Integer noticType=NoticeStatus.ORDER_DUN.getCode();
+		if (type==1){
+			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("】,按时触发应收款欠款,请按时催款,并及时增减项目,以免项目延期等问题。");
+		}
+		addNotic(noticType, b,sb.toString());
 		try {
-			NewDunsendEmail(t2.getOrderNo(),o.getId(), a, b);
+			NewDunsendEmail(o.getOrderNo(),o.getId(), a, b,noticType,sb.toString());
 		} catch (UnsupportedEncodingException | MessagingException e) {
 			throw new BusinessException(new Error("邮件发送错误。"));
 		}
 	}
-
 	public void  NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
+		NewDunsendEmail( orderNo, dunId, a, b, NoticeStatus.ORDER_DUN.getCode(),null);
+	}
+
+	public void  NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b,Integer noticType,String content) throws UnsupportedEncodingException, MessagingException{
 		NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
 		AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
 		String dunTypeName="";
@@ -777,8 +806,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 			//发送驳回邮件
 		if(SendEmailUtil.isEmail(b.getEmail())) {
-	    	 EmailBo bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
+			EmailBo bo =new EmailBo();
+			if (noticType==NoticeStatus.MENBER_DUN.getCode()){
+				bo = new EmailBo("会员提前催收", b.getEmail(), content);
+			}else {
+				bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
 						"", orderNo,b.getContractNo(),new SimpleDateFormat("yyyy-MM-dd").format(ob.getCreateTime()),dunTypeName,a2.getName(),b.getUserName(),1,0);
+			}
+
 				if(StringUtils.isNotBlank(b.getEmail())) {
 					asyncUtils.patentSend(bo);
 				}
@@ -806,7 +841,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;
@@ -819,6 +854,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;
@@ -842,9 +880,22 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		if(i!=null)params.put("shiroType", i);
 		Pagination<outOrderDunListBo> p = (Pagination<outOrderDunListBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
+		List<outOrderDunListBo> list = (List<outOrderDunListBo>) p.getList();
+		for (outOrderDunListBo o : list) {
+			o.setDunSubject(getDunSubject(o));
+		}
 		return p;
 	}
 
+	public String getDunSubject(outOrderDunListBo o) {
+		//旧催款
+		if(o.getDunSubject()!=null)return OrderDunSubject.getValueByCode(Integer.valueOf(o.getDunSubject()));
+		//新催款
+		if(o.getDunType()!=null&&o.getDunType()!=0&&o.getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()));
+		if(o.getDunType()!=null&&o.getDunType()==0&&o.getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()))+o.getCustomizeName();
+		return "";
+	}
+
 	@Override
 	public int createDunLog( String dunId, String dumTime, String remarks, String attUrl) {
 		TDunLog d=new TDunLog();
@@ -931,7 +982,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public boolean checkOrderMain(TOrderTask t) {
-		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(t.getOrderNo());
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(t.getOrderNo(),0);
 		int flag=0;
 		if(t.getMain()==1)flag++;
 		for (TOrderTask t2 : list) {
@@ -1037,7 +1088,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public boolean checkORderTask(String orderNo) {
-		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo,0);
 		for (TOrderTaskBo t : list) {
 			if (t.getMain()==1) {
 				return false;
@@ -1061,66 +1112,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 * @throws IOException
 	 */
 	@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  {
-		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();
-
-    		String[] comment = {"合同编号","订单编号","客户名称","订单负责人","订单部门","订单状态","签单金额","应收款","已收款","拨款比例","结算状态","未收款","项目状态","催收科目","催款状态","催款启动时间","签单时间"};
-    		String fileName ="催款信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
-    		//type 0 变更
-    		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"催款信息");
-    		//根据列表编写文档
-    		XSSFSheet sheet =wb.getSheetAt(0);
-    		for (outOrderDunListBo ob : list) {
-    			//新增一行
-    			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
-    			for (int i = 0; i < comment.length; i++) {
-    				//当前列的只
-    				String o = "";
-    				switch (comment[i]) {
-//    "合同编号","订单编号","客户名称","订单负责人","订单部门","订单状态","项目负责人","签单金额","结算状态","已收款","应收款","项目状态","催收科目","催款启动时间"
-    				case "合同编号": o = ob.getContractNo(); break;
-    				case "订单编号": o = ob.getOrderNo(); break;
-    				case "客户名称": o = ob.getUserName(); break;
-    				case "订单负责人": o = ob.getSalesmanName(); break;
-    				case "订单部门": o = ob.getDepName(); break;
-    				case "订单状态": o = OrderNewState.getValueByCode(ob.getOrderStatus());break;
-    				case "签单金额": o = ob.getTotalAmount().toString(); break;
-    				case "已收款": o = bigToString(ob.getSettlementAmount()); break;
-    				case "未收款": o = bigToString(ob.getUncollectedAmount()); break;
-    				case "拨款比例": o = bigToString(ob.getAppropriationRatio()); break;
-    				case "结算状态": o = LiquidationNewState.getValueByCode(ob.getLiquidationStatus()); break;
-    				case "应收款": o = bigToString(ob.getAccountsReceivable()); break;
-    				case "项目状态": o = NewProjectStatus.getValueByCode(ob.getProjectStatus()); break;
-    				case "催收科目": o = ob.getDunSubject(); break;
-    				case "催款状态": o = ob.getDunStatus()==0?"未启动":"已启动"; break;
-    				case "催款启动时间": o = ob.getStartDate(); break;
-    				case "签单时间": o = ob.getSignDate(); break;
-    				default: o = ""; break;
-    				}
-    				XSSFCell c = r.createCell(i);
-    				c.setCellValue(o);
-    			}
-    		}
-    		//返回名称及参数
-			 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));
-			 response.setContentType("application/octet-stream;charset=utf-8");
-    		 // 返回数据流
-			 wb.write(out);
-			 out.flush();
-			 out.close();
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new BusinessException(new Error("表格生成错误。"));
-		}finally {
-			out.flush();
-			out.close();
-		}
+	public Result 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){
 
+			List<outOrderDunListBo> list=(List<outOrderDunListBo>) dunOrderNewList( name,  orderNo, contractNo, starTime,  endTime,specially,
+					 aid,  adminName, depId,newStatus, approval, amountStatus, memberType, pageNo,  pageSize).getList();
+		NewExcelUtil<outOrderDunListBo> excelUtil = new NewExcelUtil<>(outOrderDunListBo.class);
+		return 	excelUtil.exportExcel(list,"催款截点统计表",uploadPath);
 	}
 
 	private String bigToString (BigDecimal o){
@@ -1137,7 +1136,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				t.getProcessStatus()!=ProcessStatus.YQBFPZXSGLY.getCode()) {
 			return -1;
 		}
-		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo,0);
 		for (TOrderTaskBo task : list) {
 			if (task.getTaskStatus()!=TaskState.CLYWC.getCode()) {
 				return -1;
@@ -1185,21 +1184,133 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 	@Override
-	public void addNotic(Integer type, AdminListBo a, TOrderNewBo b) {
+	public void addNotic(Integer type,  TOrderNewBo b,String str) {
+		String aid=null;
+		StringBuffer sb=new StringBuffer();
+		//预设值 默认发给营销员
+		aid=b.getSalesmanId();
+		if (str==null){
+			if (type==NoticeStatus.ORDER_ARREARS_DUN.getCode()||type==NoticeStatus.PAYMENT_DUN.getCode()||
+					type==NoticeStatus.ORDER_DUN.getCode()||type==NoticeStatus.MENBER_DUN.getCode()){
+				sb=sb.append("客户名称【").append(b.getUserName()).append("】,按时触发应收款欠款,请按时催款,并及时增减项目,以免项目延期等问题。");
+			}
+		}else {
+			sb=sb.append(str);
+		}
+
+		addNotic(type,aid,sb.toString());
+	}
+
+	@Override
+	public void addNoticMember(Integer type,  TOrderNewBo b,Integer shiroType,Integer result) {
 		StringBuffer sb=new StringBuffer();
-		sb=sb.append("客户名称[").append(b.getUserName()).append("],按时触发应收款欠款,请按时催款,并及时增减项目,以免项目延期等问题。");
+		String aid=null;
+		List<Admin>admins=new ArrayList<>();
+		sb.append("客户名称【").append(b.getUserName()).append("】,订单编号【").append(b.getOrderNo()).append("】,");
+		if (type==NoticeStatus.MENBER_START.getCode()){
+			sb=sb.append("发起会员项目,请及时审核");
+			aid=b.getFinanceId();
+		}else if (type==NoticeStatus.MENBER_YES.getCode()){
+			sb=sb.append("会员项目审核");
+			if(shiroType==0){
+				sb=sb.append("财务已通过。");
+				if (result==1) {
+					admins = MemberEnd(b);
+				}else{
+					admins=adminMapper.getAdminRoleList("总裁");
+				}
+			} else if(shiroType==1){
+				sb=sb.append("特批已通过。");
+				admins = MemberEnd(b);
+			}
+		}else if (type==NoticeStatus.MENBER_NO.getCode()){
+			if(shiroType==0){
+				sb=sb.append("财务已驳回。");
+			} else if(shiroType==1){
+				sb=sb.append("特批已驳回。");
+			}
+			aid=b.getSalesmanId();
+		}
+		if (admins!=null&&admins.size()>0){
+			for (Admin admin : admins) {
+				addNotic(type,admin.getId(),sb.toString());
+				sendMemberEmail(type,admin.getId(),sb.toString());
+			}
+		}else {
+			addNotic(type,aid,sb.toString());
+			sendMemberEmail(type,aid,sb.toString());
+		}
+	}
+
+	/**
+	 * 会员项目完成审核调用
+	 * @param b
+	 * @return
+	 */
+	private List<Admin> MemberEnd(TOrderNewBo b) {
+		List<Admin> admins;
+		admins=adminMapper.getAdminRoleList("咨询师管理员");
+		Admin admin = new Admin();
+		admin.setId(b.getSalesmanId());
+		admins.add(admin);
+		pushTOrderNew(b);
+		return admins;
+	}
+
+	/**
+	 * 新建完成会员项目修改订单状态
+	 * @param b
+	 */
+	private void pushTOrderNew(TOrderNewBo b) {
+		List<TOrderTaskBo> l = tOrderTaskMapper.selectOrderTask(b.getOrderNo(), 0);
+		int counts =l.size();
+		int x=0;
+		for (TOrderTaskBo t : l) {
+			if (t.getTaskStatus()>0)x++;
+		}
+		TOrderNew n = new TOrderNew();
+		n.setOrderNo(b.getOrderNo());
+		if (x==0)n.setProcessStatus(4);
+		else if(x<counts)n.setProcessStatus(5);
+		else if(x==counts)n.setProcessStatus(6);
+		tOrderNewMapper.updateByPrimaryKeySelective(n);
+	}
+
+	/**
+	 * 发送邮件使用
+	 * @param type
+	 * @param aid
+	 * @param content
+	 */
+	private void sendMemberEmail(Integer type,String aid,String content) {
+		Admin admin = adminMapper.selectByPrimaryKey(aid);
+		EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), admin.getEmail(),content);
+		if(StringUtils.isNotBlank(admin.getEmail())) {
+			asyncUtils.send(bo);
+		}
+	}
+
+
+	/**
+	 *
+	 * @param type 通知类型
+	 * @param aid 被通知人
+	 * @param str 信息
+	 */
+	public void addNotic(Integer type, String  aid,String str) {
 		Notice n =new Notice();
 		n.setId(UUID.randomUUID().toString());
-		n.setAid(b.getSalesmanId());
+		n.setAid(aid);
 		n.setNoticeType(type);
-		n.setContent(sb.toString());
+		n.setContent(str);
 		n.setReaded(0);//未读
 		asyncUtils.addNotice(n);
 	}
 
 
 
-	public void  sendEmail(String dunId,AdminListBo a,TOrderNewBo b){
+	public void
+	sendEmail(String dunId,AdminListBo a,TOrderNewBo b){
 		LoggerUtils.debug(logger, "======================邮件信息发送===================");
 		String content = "<div>客户名称: "+ b.getUserName() +"</div><div>订单编号: " + b.getOrderNo() + "</div><div>合同编号: " + b.getContractNo() + "</div>";
 		String tite="订单驳回";
@@ -1425,4 +1536,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		return false;
 	}
+
+
+
 }

+ 135 - 43
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -14,8 +14,16 @@ 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.enums.OrderState;
+import com.goafanti.common.model.*;
+import com.goafanti.common.utils.*;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.enums.*;
+import com.goafanti.report.bo.SalesValues;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -25,53 +33,16 @@ 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;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.BusinessProject;
-import com.goafanti.common.model.Notice;
-import com.goafanti.common.model.OrganizationContactBook;
-import com.goafanti.common.model.OrganizationIdentity;
-import com.goafanti.common.model.ProjcetCheckLog;
-import com.goafanti.common.model.TArrearsDun;
-import com.goafanti.common.model.TOrderBonus;
-import com.goafanti.common.model.TOrderLog;
-import com.goafanti.common.model.TOrderMid;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.common.model.TOrderTask;
-import com.goafanti.common.model.TTaskHours;
-import com.goafanti.common.model.TTaskLog;
-import com.goafanti.common.model.TTaskMid;
-import com.goafanti.common.model.TaskAttributionLog;
-import com.goafanti.common.model.TaskHoursCount;
-import com.goafanti.common.model.TaskLog;
-import com.goafanti.common.model.TaskProgress;
-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;
 import com.goafanti.order.bo.InputProjectCheck;
-import com.goafanti.order.enums.BonusSubject;
-import com.goafanti.order.enums.NewOrderDunType;
-import com.goafanti.order.enums.NewProjectStatus;
-import com.goafanti.order.enums.OrderDunProjectType;
-import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.organization.bo.OutPaymentNode;
@@ -136,6 +107,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Autowired
 	private PublicReleaseMapper	publicReleaseMapper;
 	@Autowired
+	private MemberLogMapper memberLogMapper;
+	@Autowired
 	private AsyncUtils	asyncUtils;
 	@Value(value = "${upload.path}")
 	private String 					uploadPath 			= null;
@@ -255,7 +228,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	}
 	public void checkProjiectAllocation(String  orderNo) {
-		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(orderNo,0);
 		TOrderNew tNew=new TOrderNew();
 		tNew.setOrderNo(orderNo);
 		int i=0;
@@ -663,8 +636,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	public void addNoticAndEmail(OutPaymentNode pn,Integer type) {
 		paymentNodeEmailBo pnb=paymentNodeMapper.selectBytidGetEmail(pn.getTid());
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(pnb.getOrderNo());
-		AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
-		orderNewService.addNotic(type,a,b);
+		orderNewService.addNotic(type,b,null);
 		pn.setDunStatus(1);
 		paymentNodeMapper.updateByPrimaryKeySelective(pn);
 		//营销员名称、邮箱、订单编号、客户名称
@@ -687,8 +659,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	private void checkSettlementAward(TOrderNew tn,TOrderTask task) {
 		if(task.getTaskStatus()==TaskState.COMPLETE.getCode()&&tn.getTotalAmount().compareTo(tn.getSettlementAmount())==0) {
-			List<TOrderTask> l = tOrderTaskMapper.getReceiverByOid(tn.getOrderNo());
-			for (TOrderTask tOrderTask : l) {
+			List<TOrderTaskBo> l = tOrderTaskMapper.getReceiverByOid(tn.getOrderNo());
+			for (TOrderTaskBo tOrderTask : l) {
 				if(null != tOrderTask &&null != tOrderTask.getTaskReceiver()){
 					TOrderBonus bonus = new TOrderBonus();
 					bonus.setId(UUID.randomUUID().toString());
@@ -935,7 +907,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				newTask.setCommodityQuantity(Integer.parseInt(string));
 				newTask.setSplitId(i);
 				i++;
-				tOrderTaskMapper.insertSelectiveGetId(newTask);
+				tOrderTaskMapper.insertSelective(newTask);
 				TTaskMid dtails = tTaskMidMapper.getDtails(newTask.getId());
 				TTaskMid tTaskMid = new TTaskMid(newTask.getId(), new BigDecimal(0));
 				tTaskMid.setDispatchProvince(dtails.getDispatchProvince());
@@ -1058,4 +1030,124 @@ 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);
+		for (OutMemberList out : list) {
+			if (out.getSalesType()!=null){
+				StringBuffer str=new StringBuffer();
+				str.append(SalesTypes.getValueByCode(out.getSalesType()));
+				if (out.getSalesType()==SalesTypes.qd.getCode()){
+					str.append("-").append(out.getOther());
+				}
+				out.setSalesTypeName(str.toString());
+			}
+			if (out.getTotalAmount()!=null){
+				StringBuffer str=new StringBuffer();
+				str.append(out.getTotalAmount().compareTo(new BigDecimal(10))>=0?"大客户":"一般客户");
+				out.setBigUser(str.toString());
+			}
+			if (out.getDeleteSign()!=null){
+				StringBuffer str=new StringBuffer();
+				str=str.append(out.getDeleteSign()==0?"正常": out.getDeleteSign()==1?"删除":
+						out.getDeleteSign()==2?"锁定":"未知");
+				out.setDeleteSignStr(str.toString());
+			}
+		}
+		NewExcelUtil<OutMemberList> excelUtil=new NewExcelUtil<>(OutMemberList.class);
+		return excelUtil.exportExcel(list,"会员审核列表",uploadPath);
+	}
+
+
+
+	@Override
+	public int pushExamineMemberProject(InputMenber in) {
+		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(in.getId());
+		Integer status=1;
+		TOrderTask nt=new TOrderTask();
+		nt.setId(task.getId());
+		Integer result=0;
+		Integer notice=NoticeStatus.MENBER_YES.getCode();
+		TOrderNewBo ono = tOrderNewMapper.getSaleIdByOno(task.getOrderNo());
+		// 1=通过 0=驳回
+		if (in.getResult()==1){
+			//0=财务 1=特批
+			if (in.getType()==0){
+				if(task.getProcessStatus()!=1)throw  new BusinessException("审核状态错误");
+				if (task.getMemberType()==1||task.getMemberType()==2){
+					nt.setProcessStatus(2);
+					status=1;
+				}else if (task.getMemberType()==0){
+					nt.setProcessStatus(3);
+					status=3;
+					result=1;
+				}
+			}else if(in.getType()==1){
+				if(task.getProcessStatus()!=2)throw  new BusinessException("审核状态错误");
+				nt.setProcessStatus(3);
+				status=3;
+				result=1;
+			}
+		}else if (in.getResult()==0){
+			status=2;
+			nt.setProcessStatus(4);
+			notice=NoticeStatus.MENBER_NO.getCode();
+		}
+		orderNewService.addNoticMember(notice, ono, in.getType(),result);
+		addMemberLog(in.getId(),status,in.getRemarks());
+		return tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+	}
+
+
+
+	@Override
+	public int updateMemberProject(TOrderTask t) {
+		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		if(task.getProcessStatus()!=4)throw  new BusinessException("审核状态错误,无法提交。");
+		addMemberLog(t.getId(),0,"修改重新发起");
+		t.setProcessStatus(1);
+		TOrderNewBo ono = tOrderNewMapper.getSaleIdByOno(task.getOrderNo());
+		orderNewService.addNoticMember(NoticeStatus.MENBER_START.getCode(), ono, null,0);
+		return orderNewService.updateOrderTask(t);
+	}
+	@Override
+	public void addMemberLog(Integer id,Integer status ,String remarks){
+		MemberLog log = new MemberLog();
+		log.setPid(id);
+		log.setStatus(status);
+		log.setRemarks(remarks);
+		log.setAid(TokenManager.getAdminId());
+		memberLogMapper.insertSelective(log);
+	}
+
+	@Override
+	public List<MemberLogBo> memberLog(Integer id) {
+		return memberLogMapper.memberLog(id);
+	}
+
+
 }

+ 32 - 36
src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java

@@ -10,6 +10,7 @@ import java.util.UUID;
 
 import javax.annotation.Resource;
 
+import com.goafanti.order.bo.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellType;
@@ -50,11 +51,6 @@ import com.goafanti.common.utils.LoggerUtils;
 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.OrderListBo;
-import com.goafanti.order.bo.ReceivablesListBo;
-import com.goafanti.order.bo.TOrderInvoiceBo;
-import com.goafanti.order.bo.TOrderNewBo;
-import com.goafanti.order.bo.TemporaryReceivablesBo;
 import com.goafanti.order.enums.ApprovalNewState;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.LiquidationNewState;
@@ -83,15 +79,15 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 	private TOrderTaskMapper tOrderTaskMapper;
 	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
-	
+
 	@Resource
 	private FundManageOrderService fundManageOrderService;
 	@Resource
 	private OrderInvoiceService	orderInvoiceService;
-	
+
 	@Resource
 	private OrderBillService	orderBillService;
-	
+
 	@Override
 	public int addReceivables(TemporaryReceivablesBo t) {
 		t.setAid(TokenManager.getAdminId());
@@ -130,7 +126,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		if(list.size()>99)throw new BusinessException(new Error("数量过大,建议不超过99。"));
 		List<TOrderBillNew> listBull=new ArrayList<>();
 		for (TemporaryReceivables tr : list) {
-			TOrderBillNew tbn=new TOrderBillNew(); 
+			TOrderBillNew tbn=new TOrderBillNew();
 			//获取已收款
 			BigDecimal bill = tOrderBillNewMapper.getAmountByOid(tr.getOrderNo());
 			//获取总金额
@@ -178,8 +174,8 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 				bonus.setBonusSubject(BonusSubject.WK.getCode());//12
 				//发放给技术员如果付完款所有参与这个项目任务的人都会有结算奖
 				//获得所有的任务负责人
-				List<TOrderTask> l = tOrderTaskMapper.getReceiverByOid(tr.getOrderNo());
-				for (TOrderTask tOrderTask : l) {
+				List<TOrderTaskBo> l = tOrderTaskMapper.getReceiverByOid(tr.getOrderNo());
+				for (TOrderTaskBo tOrderTask : l) {
 					if(null != tOrderTask &&null != tOrderTask.getTaskReceiver()){
 						bonus.setTaskId(tOrderTask.getId());//任务id
 						bonus.setGrantTarget(tOrderTask.getTaskReceiver());
@@ -196,7 +192,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 					tr.setStatus(0);
 					temporaryReceivablesMapper.updateByPrimaryKeySelective(tr);
 				}
-				addOrderLog(tr.getOrderNo(), OrderLogProcess.CWQK.getCode());	
+				addOrderLog(tr.getOrderNo(), OrderLogProcess.CWQK.getCode());
 			}else if (count.compareTo(t.getTotalAmount()) == -1) {//小于总额
 				//如果订单流水小于总金额
 				if(bd.compareTo(t.getFirstAmount()) == 0 || bd.compareTo(t.getFirstAmount()) == 1){//首付完成
@@ -212,10 +208,10 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 						bonus.setBonusSubject(BonusSubject.SF.getCode());//11
 					}
 					lstaus = 1;
-					
+
 					addOrderLog(tr.getOrderNo(), OrderLogProcess.CWSF.getCode());
 				}
-				
+
 			}
 			if(tr.getStatus()==2) {
 				tr.setStatus(0);
@@ -255,7 +251,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 					bonus.setGrantType(0);
 					tOrderBonusMapper.insertSelective(bonus);
 			}
-				
+
 				listBull.add(tbn);
 		}
 		if(!listBull.isEmpty()) {
@@ -273,7 +269,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		tl.setProcess(code);
 		tl.setAid(TokenManager.getAdminId());
 		tOrderLogMapper.insertSelective(tl);
-		
+
 	}
 	@SuppressWarnings("unchecked")
 	@Override
@@ -293,7 +289,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		if(StringUtils.isNotBlank(TokenManager.getAdminId()))parameter.put("aid", TokenManager.getAdminId());
 		Pagination<ReceivablesListBo> p=(Pagination<ReceivablesListBo>) findPage("selectReceivablesList", "selectReceivablesCount", parameter, pageNo, pageSize);
 		List<ReceivablesListBo> list=(List<ReceivablesListBo>) p.getList();
-		
+
 		for (ReceivablesListBo r : list) {
 			//设置导入信息数据是否有问题判断
 			// InptStatus 0 正常 1内容不完整 2订单未能匹配 3名称不匹配
@@ -310,7 +306,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		}
 		return p;
 	}
-	
+
 	@Override
 	public Map<String, Object> getCountlistReceivables(ReceivablesListBo rl, Integer status, String adminName,
 			String adminDepId, String orderDepId) {
@@ -330,10 +326,10 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		map.put("amount",new BigDecimal(temporaryReceivablesMapper.getCountlistReceivablesAmount(parameter)).stripTrailingZeros() );
 		return map;
 	}
-	
-	
-	
-	
+
+
+
+
 	@Override
 	public void batchListReceivables(MultipartFile file) {
 		 //获得Workbook工作薄对象
@@ -346,7 +342,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
     		if(sheet == null){
     			return;
     		}
-    		
+
     		//获得当前sheet的开始行
     		int firstRowNum = sheet.getFirstRowNum();
     		//获得当前sheet的结束行
@@ -429,15 +425,15 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
         	temporaryReceivablesMapper.insertBatch(list);
         	//计算重复的单
         	temporaryReceivablesMapper.updateRepeatOrderNo(TokenManager.getAdminId());
-        
+
     }
-      	
-        
-		
-		
-		
+
+
+
+
+
 		/**
-		 * 
+		 *
 		 * @param comment
 		 * @param fileName
 		 * @param list
@@ -445,7 +441,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		 * @return
 		 */
 		public static XSSFWorkbook exportTemplateInfoS(String[] comment,String fileName,List<?> list,Integer type){
-			 
+
 			//map 数据 ,comment表头 (列名称)
 			//1,创建一个workbook,对应的是一个excel文件
 			XSSFWorkbook wb = new XSSFWorkbook();
@@ -481,10 +477,10 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 				addSettlementMyBillList(comment, list, sheet);
 				break;
 			}
-			
+
 			return wb;
 		}
-		
+
 		@SuppressWarnings("unchecked")
 		private static void addSettlementMyBillList(String[] comment, List<?> list, XSSFSheet sheet) {
 			for (TOrderBillNew ob : (List<TOrderBillNew>)list) {
@@ -505,7 +501,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 					case "付款方": o = ob.getPayerName(); break;
 					case "流水科目": o = TransactionSubject.getValueByCode(ob.getTransactionSubject()); break;
 					case "平台流水号": o = ob.getBillNo(); break;
-					case "收款类型": 
+					case "收款类型":
 						if(ob.getType()==0) {
 							o = "手工收款"; break;
 						}else if(ob.getType()==1) {
@@ -556,7 +552,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 					//当前列的只
 					String o = "";
 					switch (comment[i]) {
-//					"订单编号", "合同编号","客户名称","订单部门","订单负责人","签单日期","下单日期", 
+//					"订单编号", "合同编号","客户名称","订单部门","订单负责人","签单日期","下单日期",
 //					"签单金额(万元)", "已开票金额(万元)", "已收金额(万元)","最近收款(万元)","结算状态","订单流程","是否特批"}
 					case "订单编号": o = ob.getOrderNo().toString(); break;
 					case "合同编号": o = ob.getContractNo(); break;
@@ -583,6 +579,6 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 			}
 		}
 
-		
+
 
 }

+ 45 - 46
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -36,10 +36,10 @@ import com.goafanti.organization.service.ThirdPartyCompanyService;
 @RestController
 @RequestMapping("/api/admin/company")
 public class ThirdPartyCompanyApiController extends BaseApiController{
-	
+
 	@Resource
 	private ThirdPartyCompanyService thirdPartyCompanyService;
-	
+
 	/**
 	 * 新增第三方机构
 	 * @param t
@@ -65,7 +65,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		}
 			if (calculation==1) {
 				thirdPartyCompanyService.calculationUnitPrice(t);
-				
+
 			}else if (calculation==2) {
 				thirdPartyCompanyService.calculationPatentUnitPrice(t);
 			}
@@ -83,8 +83,8 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.addCompany(t,calculation,type));
 		return res;
 	}
-	
-	
+
+
 	/**
 	 * 修改第三方机构
 	 * @param t
@@ -119,7 +119,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updateCompany(t,calculation));
 		return res;
 	}
-	
+
 	/**
 	 * 删除第三方机构
 	 * @param t
@@ -150,8 +150,8 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectCompany(tid));
 		return res;
 	}
-	
-	
+
+
 	/**
 	 * 模糊查询机构列表
 	 * @param type 类型 0软著 1其他 2专利
@@ -163,7 +163,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectVague(name,type));
 		return res;
 	}
-	
+
 	/**
 	 * 新增付款节点
 	 * @param t
@@ -191,7 +191,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.addPaymentNode(p));
 		return res;
 	}
-	
+
 	/**
 	 * 删除付款节点
 	 * @param t
@@ -216,7 +216,6 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 	public Result updatePaymentNode(@Valid InputPaymentNode p,BindingResult bindingResult) {
 		Result res =new Result();
 		if (bindingResult.hasErrors()) {
-			System.out.println(ThirdPartyError.getValueByCode(bindingResult.getFieldError().getField()));
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
             		ThirdPartyError.getValueByCode(bindingResult.getFieldError().getField())));
             return res;
@@ -239,7 +238,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updatePaymentNode(p));
 		return res;
 	}
-	
+
 	/**
 	 * 付款节点列表
 	 * @param t
@@ -255,7 +254,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectPaymentNode(tid));
 		return res;
 	}
-	
+
 	/**
 	 * 新增付款
 	 * @param t
@@ -315,7 +314,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updateOrderPayment(p));
 		return res;
 	}
-	
+
 	/**
 	 * 付款详情
 	 * @param t
@@ -331,7 +330,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.OrderPaymentDetails(id));
 		return res;
 	}
-	
+
 	/**
 	 * 付款列表
 	 * @param t
@@ -347,7 +346,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectOrderPayment(id));
 		return res;
 	}
-	
+
 	/**
 	 * 付款日志
 	 * @param t
@@ -387,7 +386,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.addfinancialPayment(f));
 		return res;
 	}
-	
+
 	/**
 	 * 删除财务付款
 	 * @param t
@@ -418,7 +417,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectfinancialPayment(id));
 		return res;
 	}
-	
+
 	/**
 	 * 付款列表
 	 * @param t
@@ -430,7 +429,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectPaymentList(i));
 		return res;
 	}
-	
+
 	/**
 	 * 节点应收款列表
 	 * @param t
@@ -442,7 +441,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.selectPaymentList(i));
 		return res;
 	}
-	
+
 	/**
 	 *  新增软著价格表
 	 * @param t
@@ -463,7 +462,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.insertSoftWritingPrice(s));
 		return res;
 	}
-	
+
 
 	/**
 	 *  修改软著价格表
@@ -517,7 +516,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.deleteSoftWritingPrice(id));
 		return res;
 	}
-	
+
 	/**
 	 *  批量确认付款
 	 * @param t
@@ -533,7 +532,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updateGroupPayment(ids));
 		return res;
 	}
-	
+
 	/**
 	 *  	新增官费信息
 	 * @param t
@@ -553,7 +552,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.addOfficialFeePrice(o));
 		return res;
 	}
-	
+
 
 	/**
 	 *  	修改官费信息
@@ -591,12 +590,12 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
 				return res;
 		}
-		
-		
+
+
 		res.data(thirdPartyCompanyService.deleteOfficialFeePrice(id));
 		return res;
 	}
-	
+
 	/**
 	 * 	 官费列表
 	 * @param t
@@ -608,9 +607,9 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.listOfficialFeePrice(type,patentType, pageSize, pageNo));
 		return res;
 	}
-	
-	
-	
+
+
+
 	/**
 	 *  	新增专利信息
 	 * @param t
@@ -627,7 +626,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.addpatentPrice(p));
 		return res;
 	}
-	
+
 
 	/**
 	 *  	修改专利信息
@@ -646,7 +645,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 			return res;
 	}
 	if(p.getCompanyName()!=null)p.setCid(thirdPartyCompanyService.pushSelectByCid(p.getCompanyName(),2));
-		
+
 		res.data(thirdPartyCompanyService.updatepatentPrice(p));
 		return res;
 	}
@@ -662,12 +661,12 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
 				return res;
 		}
-		
-		
+
+
 		res.data(thirdPartyCompanyService.deletepatentPrice(id));
 		return res;
 	}
-	
+
 	/**
 	 * 	 专利列表
 	 * @param t
@@ -679,22 +678,22 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.listpatentPrice(name));
 		return res;
 	}
-	
-	
+
+
 	/**
 	 * 	导出付款审核表
 	 * @throws IOException
-	 * type 0财务 1专利管理员 
+	 * type 0财务 1专利管理员
 	 */
 	@RequestMapping(value = "/exportPaymentList", method = RequestMethod.GET)
 	public Result exportPaymentList2(HttpServletResponse response,InputPaymentList ip,Integer type){
 		return thirdPartyCompanyService.exportPaymentList(response,ip,type);
-		
+
 	}
-	
+
 	/**
 	 * 	审核
-	 *  
+	 *
 	 */
 	@RequestMapping(value = "/paymentExamine", method = RequestMethod.POST)
 	public Result paymentExamine(PaymentLog in,String pids){
@@ -704,9 +703,9 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		}
 		res.data(thirdPartyCompanyService.pushPaymentExamine(in,pids));
 		return res;
-		
+
 	}
-	
+
 
     /**
 	 * 	查询第三方是否发起
@@ -721,7 +720,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.checkThirdParty(id));
 		return res;
 	}
-	
+
 	/**
 	 * 	查询第三方是否发起
 	 *  type 0检查 1删除
@@ -736,7 +735,7 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.updateCheck(id,type));
 		return res;
 	}
-	
+
 	/**
 	 * 	查询第三方是否发起
 	 */
@@ -750,5 +749,5 @@ public class ThirdPartyCompanyApiController extends BaseApiController{
 		res.data(thirdPartyCompanyService.checkNode(id));
 		return res;
 	}
-	
+
 }

+ 12 - 13
src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java

@@ -82,37 +82,37 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	private TaskAttributionLogMapper	taskAttributionLogMapper;
 	@Autowired
 	private TOrderLogMapper	tOrderLogMapper;
-	
-	
+
+
 	@Override
 	public Pagination<RoleBo> findRoles(RoleBo role, Integer pageNo, Integer pageSize) {
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 		Map<String,Object> params =disposeParams(role);
 		@SuppressWarnings("unchecked")
-		Pagination<RoleBo> p=(Pagination<RoleBo>)findPage("selectRoleList","selectRoleCount",params,pageNo,pageSize);		
+		Pagination<RoleBo> p=(Pagination<RoleBo>)findPage("selectRoleList","selectRoleCount",params,pageNo,pageSize);
 		@SuppressWarnings("unchecked")
 		List<RoleBo> list=(List<RoleBo>) p.getList();
 		for(RoleBo i:list){
 			if(i.getCreateTime()!=null){
 				i.setCreateTimez(sdf.format(i.getCreateTime()));
 			}
-			
+
 		}
 		return p;
 	}
 	private Map<String,Object> disposeParams(RoleBo role){
-		Map<String,Object> params = new HashMap<String, Object>();			
-		if(StringUtils.isNotBlank(role.getRoleName())) params.put("roleName", role.getRoleName());		
+		Map<String,Object> params = new HashMap<String, Object>();
+		if(StringUtils.isNotBlank(role.getRoleName())) params.put("roleName", role.getRoleName());
 		return params;
-		
+
 	}
-	
+
 	@Override
 	public Set<String> findRoleByUserId(String userId) {
 		return roleMapper.findRoleByUserId(userId);
 	}
 
-	
+
 
 	@Override
 	public int insert(List<Role> records) {
@@ -175,7 +175,7 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 			TokenManager.clearUserAuthByUserId(ids.toArray(new String[ids.size()]));
 		}
 		record.getId();
-		record.setCreater("管理员");		
+		record.setCreater("管理员");
 		record.setCreateTime(now);
 		return roleMapper.insert(record);
 	}
@@ -204,7 +204,7 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 		}
 		return 1;
 	}
-	
+
 	@Override
 	public int updatedimission(String aid, String transferId) {
 		List<Integer> list=roleResourcesMapper.selectAdminRoleResources(aid);
@@ -222,7 +222,6 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 				userMapper.updateDimissionTransfer(aid,transferId);
 			}
 			if (s==roleResources.QDYW.getCode()) {
-				System.out.println("\n\n业务转交");
 				userTransferLogMapper.insertUserLockLog(aid,transferId,date);
 				patentNewMapper.updateAdmin(aid,transferId);
 				roleResourcesMapper.updateLockRelease("1",aid,transferId);//将业务锁转给指定人
@@ -261,5 +260,5 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	public List<RoleResources> ResourcesDetail(String rid) {
 		return roleResourcesMapper.selectByRid(rid);
 	}
-	
+
 }

+ 15 - 16
src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

@@ -84,7 +84,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 	private TOrderMapper	tOrderMapper;
 	@Autowired
 	AdminMapper		adminMapper;
-	
+
 	@Value(value = "${accessKey}")
 	private String					accessKey			= null;
 
@@ -376,18 +376,18 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 
 	@Override
 	public ProjectDetailBo selectTechProjectDetail(String contractId,Integer buyerType) {
-		
+
 		return techProjectMapper.selectTechProjectDetail(contractId,buyerType);
 	}
 
 	@Override
 	public List<TaskListBo> selectProjectTask(String contractId) {
-		
+
 		return techProjectMapper.selectProjectTask(contractId);
 	}
 
 	@Override
-	public int addProjectTask(String contractId,String commodityId,String commodityName, Integer commodityQuantity, 
+	public int addProjectTask(String contractId,String commodityId,String commodityName, Integer commodityQuantity,
 			String commodityMode, String taskComment) {
 		for(int i=0;i<commodityQuantity;i++){
 			ContractTask task = new ContractTask();
@@ -405,7 +405,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			task.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 			contractTaskMapper.insert(task);
 			//项目任务日志流转
-			Admin a=adminMapper.selectAdminName(AFTConstants.CONSULTANT_MANAGER); 
+			Admin a=adminMapper.selectAdminName(AFTConstants.CONSULTANT_MANAGER);
 			ContractTaskLog c=new ContractTaskLog();
 			c.setId(UUID.randomUUID().toString());
 			c.setContractTaskId(task.getId());
@@ -420,7 +420,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 
 	@Override
 	public TaskDetailBo selectProjectTaskDetail(String taskId) {
-		
+
 		return contractTaskMapper.selectProjectTaskDetail(taskId);
 	}
 
@@ -443,7 +443,6 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		String mobile = "";
 		if (null!=tb&&tb.getOrderNo()!=null) {
 			ServiceOrderDetailBo t=tOrderMapper.selectServiceOrderDetail(tb.getOrderNo());
-			System.out.println(t.getSalesmanId());
 			if (null!=t&&t.getSalesmanId()!=null) {
 				ad=adminMapper.selectByPrimaryKey(t.getSalesmanId());
 				if(null!=ad&&null!=ad.getContactMobile()){
@@ -460,7 +459,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			mobile=mobile+","+a.getContactMobile();
 				}
 			}
-		String paramString = "{\"number\":\"" + tb.getOrderNo() 
+		String paramString = "{\"number\":\"" + tb.getOrderNo()
 		+ "\",\"operator\":\"" + TokenManager.getAdminToken().getName()
 		+ "\",\"time\":\"" +   sdf.format(new Date())
 		+ "\",\"name\":\"" +  tb.getBuyerName()
@@ -536,7 +535,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		if(contract != null){
 			contract.setPrincipal(projectReceiveId);
 			contract.setUpdateTime(new Date());
-			return contractMapper.updateByPrimaryKeySelective(contract); 
+			return contractMapper.updateByPrimaryKeySelective(contract);
 		}
 		return 0;
 	}
@@ -599,7 +598,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 					TOrder tb=tOrderMapper.selectByPrimaryKey(t.getOrderNo());
 					if (null!=tb&&tb.getSalesmanId()!=null) {
 						Admin ad=adminMapper.selectByPrimaryKey(tb.getSalesmanId());
-					if (null!=ad&&null!=ad.getContactMobile()){	
+					if (null!=ad&&null!=ad.getContactMobile()){
 						Matcher s1 = p.matcher(ad.getContactMobile());
 						if(s1.matches()){
 							 mobile=ad.getContactMobile();
@@ -615,7 +614,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			}
 			sendMessage(t.getOrderNo(),mobile,OrderFlowState.RWPD.getDesc());
 			return setTaskDistribution(task.getContractId());
-			
+
 		}
 		return 0;
 	}
@@ -624,10 +623,10 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 		String userName=tOrderMapper.selectByUserName(orderNo);
 		//String message=noticeType.getDesc() + ": 订单编号-" + tOrder.getOrderNo() + ",变更内容:"+noticeComment+",操作人-" + TokenManager.getAdminToken().getName();
-		String paramString = "{\"number\":\"" + orderNo 
+		String paramString = "{\"number\":\"" + orderNo
 		+ "\",\"operator\":\"" + TokenManager.getAdminToken().getName()
 		+ "\",\"name\":\"" +  userName
-		+ "\",\"time\":\"" +  sdf.format(new Date()) 
+		+ "\",\"time\":\"" +  sdf.format(new Date())
 		+ "\",\"type\":\"" +  type +
 		"\"}";
 		MobileMessageUtils.sendMessage(mobileRemindCodeTemplate, paramString, mobile, accessKey, accessSecret);
@@ -662,7 +661,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		}
 		return (Pagination<ProjectListBo>)findPage("salesmanListProjectByPage", "salesmanListProjectCount", params, pageNo, pageSize);
 	}
-	
+
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<TaskListBo> selectProjectTask(String projectNo, String buyerName, String taskReceiverId, String taskReceiverName,
@@ -683,8 +682,8 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		if(StringUtils.isNotBlank(deleteSign)) params.put("deleteSign", deleteSign);
 		if(StringUtils.isNotBlank(publishStatus)) params.put("publishStatus", publishStatus);
 		if(taskStatus != null) params.put("taskStatus", taskStatus);
-		params.put("taskReceiver", TokenManager.getAdminId()); 
+		params.put("taskReceiver", TokenManager.getAdminId());
 		return (Pagination<TaskListBo>)findPage("selectProjectTaskByPage", "selectProjectTaskCount", params, pageNo, pageSize);
 	}
-	
+
 }

+ 2 - 3
src/main/java/com/goafanti/user/service/impl/UserInterestServiceImpl.java

@@ -82,7 +82,6 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize) {
-		System.out.println(industry);
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -92,7 +91,7 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 		}
 		Map<String, Object> params =new HashMap<String, Object>();
 		if (StringUtils.isNotBlank( industry)) {
-			params.put("industry",industry); 
+			params.put("industry",industry);
 		}
 		Pagination<UserIdentityBo> p=(Pagination<UserIdentityBo>) findPage("findUserCareerListByPage",
 				"findUserCareerCount",params,
@@ -105,5 +104,5 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 		return p;
 	}
 
-	
+
 }

+ 2 - 2
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -88,9 +88,9 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
-	public Result publicReleaseClockIn(Integer id,String photoUrl){
+	public Result publicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ){
 		Result res =new Result();
-		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl));
+		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl,clockIn,clockInRemarks));
 		return res;
 	}
 	/**

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

@@ -26,7 +26,7 @@ public interface PublicReleaseService {
 
 	int updatePublicRelease(InputPublicRelease in);
 
-	int pushPublicReleaseClockIn(Integer id,String photoUrl);
+	int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks );
 
 	OutPublicRelease dtails(Integer id);
 

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

@@ -350,12 +350,14 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 
 	@Override
-	public int pushPublicReleaseClockIn(Integer id,String photoUrl) {
+	public int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ) {
+		if(clockIn==null)clockIn=1;
 		PublicRelease p=new PublicRelease();
 		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
 		String aid=TokenManager.getAdminId();
 		p.setId(id);
-		p.setClockIn(1);
+		p.setClockIn(clockIn);
+		p.setClockInRemarks(clockInRemarks);
 		p.setPhotoUrl(photoUrl);
 		p.setClockInTime(new Date());
 		String str="";
@@ -372,7 +374,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			String ufid=UUID.randomUUID().toString();
 			p.setUfid(ufid);
 			customerService.addFollow(fbb,ufid,use.getMainStatus());
-			str="公出人员打卡";
+			if (clockIn==1)str="公出人员打卡";
+			else if(clockIn==2)str="公出人员异常打卡";
 		}else {
 			str="刷新打卡";
 		}
@@ -528,12 +531,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			throw new BusinessException("转换异常");
 		}
 		List<Integer> is=publicReleaseMapper.checkTime(TokenManager.getAdminId(),in.getReleaseStart(),in.getReleaseEnd());
-		is.forEach(System.out::println);
-		System.out.println(in.getId());
 		if (is.size()>1) {
 			return true;
 		}else  if(is.size()==1){
-			System.out.println(is.get(0));
 			if (in.getId()!=null && !in.getId().equals(is.get(0))){
 				return true;
 			}

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

@@ -46,7 +46,7 @@ user_remind_days=15
 user_channel_days=90
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.17
+static.host=//static.jishutao.com/1.2.21
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.05
 #static.host=http://172.16.1.187/prod/1.2.05

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

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