瀏覽代碼

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

anderx 3 年之前
父節點
當前提交
f222cbf34b
共有 32 個文件被更改,包括 604 次插入158 次删除
  1. 9 0
      src/main/java/com/goafanti/common/bo/OrderOperator.java
  2. 3 1
      src/main/java/com/goafanti/common/controller/BaseController.java
  3. 2 0
      src/main/java/com/goafanti/common/dao/TOrderHighTechMapper.java
  4. 1 0
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  5. 7 1
      src/main/java/com/goafanti/common/mapper/TOrderHighTechMapper.xml
  6. 187 122
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  7. 28 2
      src/main/java/com/goafanti/common/model/TOrderTask.java
  8. 7 0
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  9. 2 0
      src/main/java/com/goafanti/customer/service/CustomerService.java
  10. 33 8
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  11. 13 0
      src/main/java/com/goafanti/order/bo/InputProjectStatistics.java
  12. 19 0
      src/main/java/com/goafanti/order/bo/OutProjectStatistics.java
  13. 18 0
      src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java
  14. 24 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsAudit.java
  15. 25 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsCommon.java
  16. 24 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsDoubleSoft.java
  17. 10 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsHighTech.java
  18. 24 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsMember.java
  19. 24 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsPatent.java
  20. 25 0
      src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsSoftwareWorks.java
  21. 4 0
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  22. 46 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  23. 8 3
      src/main/java/com/goafanti/order/enums/NewProjectStatus.java
  24. 1 0
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  25. 2 0
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  26. 4 0
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  27. 43 0
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  28. 1 0
      src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java
  29. 0 11
      src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java
  30. 2 2
      src/main/resources/props/config_local.properties
  31. 1 1
      src/main/resources/props/config_test.properties
  32. 7 7
      src/main/resources/props/error.properties

+ 9 - 0
src/main/java/com/goafanti/common/bo/OrderOperator.java

@@ -11,6 +11,15 @@ public class OrderOperator {
 	private String financeName;
 	private String techName;
 	private String buyerName;
+	private String projectName;
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
 
 	public String getBuyerName() {
 		return buyerName;

+ 3 - 1
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -60,9 +60,11 @@ public class BaseController {
 		String msg = (String) errorResource.getProperty(key);
 		if (StringUtils.isEmpty(msg)) {
 				msg = message;
+		}else {
+			return new Error(MessageFormat.format( msg, message));
 		}
 		if (StringUtils.isEmpty(msg)) {
-				msg = key;
+			msg = key;
 		}
 		return new Error(key, msg);
 	}

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

@@ -16,4 +16,6 @@ public interface TOrderHighTechMapper {
     int updateByPrimaryKey(TOrderHighTech record);
 
     int updateByOrder(TOrderHighTech tighTech);
+
+    void deleteByOrderNo(String orderNo);
 }

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

@@ -79,6 +79,7 @@ public enum NoticeStatus {
 	AMB_INVEST_YES(70,"阿米巴投资通过"),
 	AMB_INVEST_NO(71,"阿米巴投资拒绝"),
 	PUBLIC_OTHERS_USER(72,"公出他人企业"),
+	COMPLETES_PROJECT(73,"项目完成通知"),
 	OTHER(0, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

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

@@ -26,7 +26,8 @@
     delete from t_order_high_tech
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderHighTech" useGeneratedKeys="true">
+
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderHighTech" useGeneratedKeys="true">
     insert into t_order_high_tech (order_no, knowledge_services, audit_services,
       add_deduction_services, knowledge_other, audit_other,
       add_deduction_other, create_time)
@@ -144,4 +145,9 @@
     create_time = #{createTime,jdbcType=TIMESTAMP}
     where order_no = #{orderNo,jdbcType=VARCHAR}
   </update>
+
+  <delete id="deleteByOrderNo">
+    delete from t_order_high_tech
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </delete>
 </mapper>

+ 187 - 122
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -65,6 +65,8 @@
     <result column="process_status" jdbcType="INTEGER" property="processStatus" />
     <result column="member_type" jdbcType="INTEGER" property="memberType" />
     <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
+    <result column="satisfaction_degree" jdbcType="INTEGER" property="satisfactionDegree" />
+    <result column="satisfaction_degree_url" jdbcType="VARCHAR" property="satisfactionDegreeUrl" />
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
@@ -77,7 +79,7 @@
     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, process_status,
-    member_type, picture_url
+    member_type, picture_url, satisfaction_degree, satisfaction_degree_url
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -89,12 +91,11 @@
     delete from t_order_task
     where id = #{id,jdbcType=INTEGER}
   </delete>
-
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
-    insert into t_order_task (id, order_no, main,
-      super_id, commodity_id, commodity_name,
-      commodity_quantity, commodity_mode, commodity_price,
-      task_status, task_distribution_time, task_allocator,
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
+    insert into t_order_task (order_no, main, super_id,
+      commodity_id, commodity_name, commodity_quantity,
+      commodity_mode, commodity_price, task_status,
+      task_distribution_time, task_allocator,
       task_receiver, task_comment, task_start_time,
       task_end_time, attachment_url, project_status,
       accept_time, review_time, publicity_time,
@@ -111,12 +112,13 @@
       special_comment, if_certification_fee, certification_fee,
       certification_corporate, time_record, if_publicity,
       check_status, patent_type, pubicity_url,
-      process_status, member_type, picture_url
+      process_status, member_type, picture_url,
+      satisfaction_degree, satisfaction_degree_url
       )
-    values (#{id,jdbcType=INTEGER}, #{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}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
+    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},
+      #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
       #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
       #{taskEndTime,jdbcType=TIMESTAMP}, #{attachmentUrl,jdbcType=VARCHAR}, #{projectStatus,jdbcType=INTEGER},
       #{acceptTime,jdbcType=DATE}, #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE},
@@ -133,16 +135,13 @@
       #{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},
-      #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}
+      #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR},
+      #{satisfactionDegree,jdbcType=INTEGER}, #{satisfactionDegreeUrl,jdbcType=VARCHAR}
       )
   </insert>
-
   <insert id="insertSelective" 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>
@@ -329,11 +328,14 @@
       <if test="pictureUrl != null">
         picture_url,
       </if>
+      <if test="satisfactionDegree != null">
+        satisfaction_degree,
+      </if>
+      <if test="satisfactionDegreeUrl != null">
+        satisfaction_degree_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="orderNo != null">
         #{orderNo,jdbcType=VARCHAR},
       </if>
@@ -520,6 +522,12 @@
       <if test="pictureUrl != null">
         #{pictureUrl,jdbcType=VARCHAR},
       </if>
+      <if test="satisfactionDegree != null">
+        #{satisfactionDegree,jdbcType=INTEGER},
+      </if>
+      <if test="satisfactionDegreeUrl != null">
+        #{satisfactionDegreeUrl,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
@@ -711,6 +719,12 @@
       <if test="pictureUrl != null">
         picture_url = #{pictureUrl,jdbcType=VARCHAR},
       </if>
+      <if test="satisfactionDegree != null">
+        satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
+      </if>
+      <if test="satisfactionDegreeUrl != null">
+        satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -777,11 +791,12 @@
       pubicity_url = #{pubicityUrl,jdbcType=VARCHAR},
       process_status = #{processStatus,jdbcType=INTEGER},
       member_type = #{memberType,jdbcType=INTEGER},
-      picture_url = #{pictureUrl,jdbcType=VARCHAR}
+      picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
+      satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
-
   <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,
@@ -800,9 +815,9 @@
     left join admin d on a.task_receiver=d.id left join t_task_member j on a.id =j.tid
     left join t_task_mid ttm on a.id=ttm.tid
     where a.super_id is null and a.split_status in(0,1)
-      <if test="orderNo != null">
+    <if test="orderNo != null">
       and a.order_no= #{orderNo,jdbcType=VARCHAR}
-      </if>
+    </if>
     <if test="type == 1">
       and a.process_status in(0,3)
     </if>
@@ -915,16 +930,16 @@
 
   <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
     select  count(*) from t_order_task a
-        left join t_order_new e on a.order_no=e.order_no
+    left join t_order_new e on a.order_no=e.order_no
     <if test="cid != null">
       left join business_project b on a.commodity_id=b.id
       left join business_category c on b.cid=c.id
     </if>
     <if test="name != null">
-        left join user f on e.buyer_id=f.id
+      left join user f on e.buyer_id=f.id
     </if>
     <if test="outsourceStatus !=null">
-    left join t_order_outsource l on a.id=l.tid
+      left join t_order_outsource l on a.id=l.tid
     </if>
     where e.delete_sign in (0,2,3)  and e.order_status in (2,4)
     and a.outsource= #{outsource,jdbcType=INTEGER}
@@ -1000,7 +1015,8 @@
       a.if_certification_fee ifCertificationFee , a.certification_corporate certificationCorporate ,a.certification_fee certificationFee ,a.time_record timeRecord,
       a.cost_reduction costReduction,  a.official_cost officialCost,a.set_up_status setUpStatus ,date_format(a.set_up_time,'%Y-%m-%d') setUpTime ,a.high_tech_status highTechStatus ,
       a.spot_check_status spotCheckStatus , a.special_comment specialComment ,ttm.certificates_count certificatesCount ,ttm.reject_count rejectCount ,a.check_status checkStatus,
-      ttm.authorize_count authorizeCount ,ttm.end_count endCount,ttm.accept_count acceptCount,a.commodity_price  commodityPrice,a.commodity_quantity commodityQuantity
+      ttm.authorize_count authorizeCount ,ttm.end_count endCount,ttm.accept_count acceptCount,a.commodity_price  commodityPrice,a.commodity_quantity commodityQuantity,
+      a.satisfaction_degree satisfactionDegree,a.satisfaction_degree_url satisfactionDegreeUrl
     from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
                         left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no
                         left join department h on e.order_dep=h.id left join user f on e.buyer_id=f.id LEFT JOIN t_task_mid ttm ON a.id=ttm.tid
@@ -1032,7 +1048,7 @@
     <if test="name != null">
       and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
     </if>
-      <if test="thchId != null">
+    <if test="thchId != null">
       and a.task_receiver = #{thchId,jdbcType=VARCHAR}
     </if>
 
@@ -1191,7 +1207,7 @@
     update t_order_task a left join t_change_task b on a.id =b.tid
     left join (select * from admin where id= #{transferId,jdbcType=VARCHAR})c on 1=1
     set a.task_allocator= #{aid,jdbcType=VARCHAR},a.task_receiver= c.id,
-        a.receiver_name=c.name,b.receiver_name=c.name
+    a.receiver_name=c.name,b.receiver_name=c.name
     <if test="type==0">
       ,a.consultant_id=c.id
     </if>
@@ -1239,16 +1255,16 @@
 
   <select id="splitProjectList" resultType="com.goafanti.order.bo.TOrderTaskListBo">
     select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.project_status as projectStatus,d.contact_mobile receiverMobile,
-            e.contract_no contractNo,a.task_receiver taskReceiver, a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
-            a.commodity_quantity as commodityQuantity,e.approval,l.refund_status outsourceStatus, ifnull(i.alreadyNumber,0) as alreadyNumber,a.task_comment taskComment ,
-            f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper,a.member_type memberType,
-            date_format(a.split_time,'%Y-%m-%d %H:%i:%S') splitTimes,ad.name splitAname,a.split_id splitId,a.patent_type  patentType,a.picture_url pictureUrl,
-            ttm.service_life serviceLife,ttm.service_year serviceYear ,ttm.year_sum yearSum ,ttm.contract_term contractTerm,a.process_status processStatus
+    e.contract_no contractNo,a.task_receiver taskReceiver, a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
+    a.commodity_quantity as commodityQuantity,e.approval,l.refund_status outsourceStatus, ifnull(i.alreadyNumber,0) as alreadyNumber,a.task_comment taskComment ,
+    f.nickname as userName,h.name as depName, j.name as outsourceName ,ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper,a.member_type memberType,
+    date_format(a.split_time,'%Y-%m-%d %H:%i:%S') splitTimes,ad.name splitAname,a.split_id splitId,a.patent_type  patentType,a.picture_url pictureUrl,
+    ttm.service_life serviceLife,ttm.service_year serviceYear ,ttm.year_sum yearSum ,ttm.contract_term contractTerm,a.process_status processStatus
     from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
     left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
     left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber
-        from task_progress group by task_id) i on a.id=i.task_id  left join (select order_no,max(name)as name
-        from outsource_organization group by order_no) j on a.order_no=j.order_no left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid
+    from task_progress group by task_id) i on a.id=i.task_id  left join (select order_no,max(name)as name
+    from outsource_organization group by order_no) j on a.order_no=j.order_no left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid
     left join t_order_outsource l on a.id=l.tid left join admin ad on ad.id=a.split_aid left join t_task_member ttm on a.id=ttm.tid
     where  e.order_status  in (0,1,2,3,4,5)
     and split_status =2 and a.split_super= #{tid}
@@ -1266,7 +1282,7 @@
   </update>
   <select id="getLockId" resultType="java.lang.String">
     select id from user_lock_release a left join (select commodity_id  from t_order_task
-        where order_no = #{orderNo} GROUP by commodity_id ) b on a.business_project_id =b.commodity_id
+                                                  where order_no = #{orderNo} GROUP by commodity_id ) b on a.business_project_id =b.commodity_id
     where a.`type` =1 and a.aid = #{aid} and a.uid = #{uid}
   </select>
 
@@ -1282,7 +1298,7 @@
     date_format(tp.accept_time, '%Y-%m-%d ' ) acceptTime , date_format(tp.authorize_time, '%Y-%m-%d ' )  authorizeTime, ttm.reject_count rejectCount ,
     tm.service_life serviceLife,tm.service_year serviceyear, tm.year_sum yearsum,tm.contract_term contractTerm, a.commodity_price commodityPrice ,
     a.special_comment specialComment,a.task_comment taskComment,ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,
-    e.service_type serviceType,e.service_project serviceProject
+    e.service_type serviceType,e.service_project serviceProject, a.form_retrieve formRetrieve  ,a.satisfaction_degree satisfactionDegree
     from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id
     left join district_glossory d on c.province=d.id left join task_progress tp  on a.id=tp.task_id left join t_task_member tm on a.id=tm.tid
     left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
@@ -1335,6 +1351,31 @@
     <if test="projectId !=null">
       and a.commodity_id = #{projectId}
     </if>
+    <if test="sdStatus !=null">
+      <if test="sdStatus==0">
+        and a.form_retrieve=0
+      </if>
+      <if test="sdStatus==1">
+        and a.form_retrieve=1
+      </if>
+      <if test="sdStatus==2">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=0
+      </if>
+      <if test="sdStatus==3">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=1
+      </if>
+      <if test="sdStatus==4">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=2
+      </if>
+      <if test="sdStatus==5">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=3
+      </if>
+    </if>
+
     <if test="deps != null">
       and b.order_dep in
       <foreach close=")" collection="deps" item="dep" open="(" separator=",">
@@ -1467,6 +1508,30 @@
     <if test="projectStatus !=null">
       and bp.cid= #{projectStatus}
     </if>
+    <if test="sdStatus !=null">
+      <if test="sdStatus==0">
+        and a.form_retrieve=0
+      </if>
+      <if test="sdStatus==1">
+        and a.form_retrieve=1
+      </if>
+      <if test="sdStatus==2">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=0
+      </if>
+      <if test="sdStatus==3">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=1
+      </if>
+      <if test="sdStatus==4">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=2
+      </if>
+      <if test="sdStatus==5">
+        and a.form_retrieve=2
+        and a.satisfaction_degree=3
+      </if>
+    </if>
     <if test="taskProjectStatus !=null">
       and a.project_status= #{taskProjectStatus}
     </if>
@@ -1506,38 +1571,38 @@
     z.setUpCount,z.spotCheckCount,z.failCount,z.certificatesCount,z.acceptCount,z.endCount,z.authorizeCount,
     z.rejectCount,z.applyCount,z.amountCount,z.costAmount,z.profit
     from ( select  y.dispatch_province, y.cid, y.duty_dep, sum(y.dispatch_count)distributeCount,
-      sum(y.stock_count)stockCount, sum(y.complete_count)completeCount,sum(y.promulgate_count)publicityCount,
-      sum(y.set_up_count)setUpCount,sum(y.spot_check_count)spotCheckCount,sum(y.fail_count)failCount,
-      sum(y.certificates_count)certificatesCount,sum(y.accept_count)acceptCount,sum(y.end_count)endCount,
-      sum(y.authorize_count)authorizeCount,sum(y.reject_count)rejectCount, sum(y.apply_count)applyCount,
-      sum(y.commodity_price)amountCount,sum(y.cost_amount)costAmount, sum(y.commodity_price-y.cost_amount)profit
-      from(select b.dispatch_province, bp.cid, b.duty_dep,
-        b.stock_count,b.dispatch_count,b.promulgate_count, b.complete_count,b.set_up_count ,b.spot_check_count ,
-        b.fail_count ,b.certificates_count,     b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
-        a.commodity_price ,b.cost_amount, a.task_distribution_time     from t_order_task a
-        left join t_task_mid b on a.id=b.tid     left join business_project bp on a.commodity_id =bp.id
+    sum(y.stock_count)stockCount, sum(y.complete_count)completeCount,sum(y.promulgate_count)publicityCount,
+    sum(y.set_up_count)setUpCount,sum(y.spot_check_count)spotCheckCount,sum(y.fail_count)failCount,
+    sum(y.certificates_count)certificatesCount,sum(y.accept_count)acceptCount,sum(y.end_count)endCount,
+    sum(y.authorize_count)authorizeCount,sum(y.reject_count)rejectCount, sum(y.apply_count)applyCount,
+    sum(y.commodity_price)amountCount,sum(y.cost_amount)costAmount, sum(y.commodity_price-y.cost_amount)profit
+    from(select b.dispatch_province, bp.cid, b.duty_dep,
+    b.stock_count,b.dispatch_count,b.promulgate_count, b.complete_count,b.set_up_count ,b.spot_check_count ,
+    b.fail_count ,b.certificates_count,     b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
+    a.commodity_price ,b.cost_amount, a.task_distribution_time     from t_order_task a
+    left join t_task_mid b on a.id=b.tid     left join business_project bp on a.commodity_id =bp.id
     left join t_order_new ton on a.order_no =ton .order_no
     where a.task_status in(1,2,3)  and ton.delete_sign in (0,2)
     <if test="projectId !=null">
-    and a.commodity_id = #{projectId}
+      and a.commodity_id = #{projectId}
     </if>
     <if test="province !=null">
-    and b.dispatch_province = #{province}
+      and b.dispatch_province = #{province}
     </if>
     <if test="thchDeps !=null">
-    and b.duty_dep in
+      and b.duty_dep in
       <foreach close=")" collection="thchDeps" item="depId" open="(" separator=",">
         #{depId}
       </foreach>
     </if>
     <if test="projectType !=null">
-    and bp.`type` = #{projectType}
+      and bp.`type` = #{projectType}
     </if>
     <if test="projectStatus !=null">
-    and bp.cid= #{projectStatus}
+      and bp.cid= #{projectStatus}
     </if>
     <if test="startDate != null and endDate != null">
-    and a.task_distribution_time  between #{startDate} and #{endDate}
+      and a.task_distribution_time  between #{startDate} and #{endDate}
     </if>
     )y
     group by   y.dispatch_province, y.cid, y.duty_dep  )z
@@ -1770,7 +1835,7 @@
 
   <select id="selectAidByParam" resultType="com.goafanti.common.bo.OrderOperator">
     select a.id tid,b.order_no orderNo ,b.salesman_id salesmanId,b.finance_id financeId ,a.task_receiver techId,
-    b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName
+    b.salesman_name salesmanName ,b.finance_name financeName ,d.name techName,b.buyer_name buyerName,a.commodity_name projectName
     from t_order_task a left join t_order_mid b on a.order_no=b.order_no
     left join admin d on a.task_receiver=d.id
     where 1=1
@@ -1783,7 +1848,7 @@
     select a.id,a.order_no orderNo,a.official_cost officialCost,a.cost_reduction costReduction ,a.commodity_quantity quantity ,a.patent_type patentType,
            b.patent_name_type projectType, c.amount officialAmount,c.proportion85,b.patent_type outPatentType,d.type
     from t_order_task a left join t_order_outsource b on a.id=b.tid left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
-    left join business_project d on a.commodity_id=d.id
+                        left join business_project d on a.commodity_id=d.id
     where a.id= #{tid}
   </select>
   <select id="highNewRetrialStatistics" resultType="com.goafanti.order.bo.OutHighNewRetrialStatistics">
@@ -1855,7 +1920,7 @@
     where  b.delete_sign in (0,2)
     and a.process_status in (1,2,3,4)
     <if test="shiroType ==1">
-        and b.salesman_id = #{aid}
+      and b.salesman_id = #{aid}
     </if>
     <if test="shiroType ==2">
       and d.finance_id  = #{aid}
@@ -1864,9 +1929,9 @@
     <if test="orderNo != null">
       and a.order_no = #{orderNo}
     </if>
-      <if test="userName != null">
+    <if test="userName != null">
       and c.buyer_name like concat('%',#{userName},'%')
-      </if>
+    </if>
     <if test="deps != null">
       and b.order_dep in
       <foreach close=")" collection="deps" item="dep" open="(" separator=",">
@@ -1913,70 +1978,70 @@
   </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 a.process_status in (1,2,3,4)
-      <if test="shiroType ==1">
-        and b.salesman_id = #{aid}
-      </if>
-      <if test="shiroType ==2">
-        and d.finance_id  = #{aid}
-      </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="deps != null">
-        and b.order_dep in
-        <foreach close=")" collection="deps" item="dep" open="(" separator=",">
-          #{dep}
-        </foreach>
-      </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 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 a.process_status in (1,2,3,4)
+    <if test="shiroType ==1">
+      and b.salesman_id = #{aid}
+    </if>
+    <if test="shiroType ==2">
+      and d.finance_id  = #{aid}
+    </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="deps != null">
+      and b.order_dep in
+      <foreach close=")" collection="deps" item="dep" open="(" separator=",">
+        #{dep}
+      </foreach>
+    </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>
   <select id="selectByAid" resultType="com.goafanti.common.model.TChangeTask">
     select b.id,b.cid from t_order_task a
-    left join t_change_task b on a.id=b.tid
-    left join new_order_change noc on b.cid =noc.id
+                             left join t_change_task b on a.id=b.tid
+                             left join new_order_change noc on b.cid =noc.id
     where b.id is not null and  noc.process_state &lt; 4 and noc.status in (0,1,2)
-    and a.task_receiver = #{aid}
+      and a.task_receiver = #{aid}
   </select>
   <select id="getSplitCount" resultType="java.lang.Integer">
     select count(*) from t_order_task
@@ -1999,7 +2064,7 @@
       and c.salesman_id =#{aid}
     </if>
     <if test="shiro ==2">
-    and c.order_dep  in
+      and c.order_dep  in
       <foreach close=")" collection="deps" item="dep" open="(" separator=",">
         #{dep}
       </foreach>
@@ -2061,7 +2126,7 @@
       and c.salesman_id =#{aid}
     </if>
     <if test="shiro ==2">
-        and c.order_dep  in
+      and c.order_dep  in
       <foreach close=")" collection="deps" item="dep" open="(" separator=",">
         #{dep}
       </foreach>

+ 28 - 2
src/main/java/com/goafanti/common/model/TOrderTask.java

@@ -130,7 +130,7 @@ public class TOrderTask implements Serializable {
     private Integer status;
 
     /**
-     * 满意度表格回收 0否 1是 2其他
+     * 满意度表格回收 0未发送 1已发送,未回收 2已回收  3其他
      */
     private Integer formRetrieve;
 
@@ -310,7 +310,7 @@ public class TOrderTask implements Serializable {
     private String pubicityUrl;
 
     /**
-     * 流程状态 0=驳回,1=财务审核,2=特批审核,3=通过
+     * 流程状态 0=普通,1=财务审核,2=特批审核,3=通过,4=驳回
      */
     private Integer processStatus;
 
@@ -324,6 +324,16 @@ public class TOrderTask implements Serializable {
      */
     private String pictureUrl;
 
+    /**
+     * 满意度 0非常满意 1满意 2一般 3不满意
+     */
+    private Integer satisfactionDegree;
+
+    /**
+     * 满意度附件地址
+     */
+    private String satisfactionDegreeUrl;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -829,4 +839,20 @@ public class TOrderTask implements Serializable {
     public void setPictureUrl(String pictureUrl) {
         this.pictureUrl = pictureUrl;
     }
+
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    public String getSatisfactionDegreeUrl() {
+        return satisfactionDegreeUrl;
+    }
+
+    public void setSatisfactionDegreeUrl(String satisfactionDegreeUrl) {
+        this.satisfactionDegreeUrl = satisfactionDegreeUrl;
+    }
 }

+ 7 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1559,4 +1559,11 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.data(customerService.updateuserBusinessScope(id,businessScope));
 		return res;
 	}
+
+	@RequestMapping(value = "/queryUserMax",method = RequestMethod.GET)
+	public Result queryUserMax(){
+		Result res =new Result();
+		res.setData(customerService.queryUserMax());
+		return res;
+	}
 }

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

@@ -554,4 +554,6 @@ public interface CustomerService {
     int pushReceiveAsChannel(String uid);
 
     boolean checkOrgCode(String orgCode);
+
+    Integer queryUserMax();
 }

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

@@ -1377,6 +1377,31 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return false;
 	}
 
+	@Override
+	public Integer queryUserMax() {
+		String aid=TokenManager.getAdminId();
+		int limitmax = 0;
+		int mymax = userMapper.checkUserMax(aid);
+		List<String > roles=adminMapper.getAdminRoleListByAid(aid);
+		for (String role : roles) {
+			if (role.equals(AFTConstants.SALESMAN_DIRECTOR)){
+				if(limitmax<YXZJ_MAX)limitmax = YXZJ_MAX;
+				continue;
+			} else if (role.equals(AFTConstants.SALESMAN_MANAGER)){
+				if(limitmax<YXJL_MAX)limitmax = YXJL_MAX;
+				continue;
+			} else if (role.equals(AFTConstants.SALESMAN)){
+				if(limitmax<YXY_MAX)limitmax = YXY_MAX;
+				continue;
+			}
+		}
+		if (mymax==limitmax){
+			return 1;
+		}else {
+			return 0;
+		}
+	}
+
 
 	/**
 	 * 处理中间表
@@ -2253,7 +2278,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		}else {
 			x=1;
 		}
-		int y = 0;
+		int limitmax = 0;
 		int i = userMapper.checkUserMax(aid);
 		if (uid !=null){
 			User user =userMapper.selectByPrimaryKey(uid);
@@ -2265,18 +2290,18 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		List<String > roles=adminMapper.getAdminRoleListByAid(aid);
 		for (String role : roles) {
 			if (role.equals(AFTConstants.SALESMAN_DIRECTOR)){
-				y = YXZJ_MAX;
-				break;
+				if(limitmax<YXZJ_MAX)limitmax = YXZJ_MAX;
+				continue;
 			} else if (role.equals(AFTConstants.SALESMAN_MANAGER)){
-				y = YXJL_MAX;
-				break;
+				if(limitmax<YXJL_MAX)limitmax = YXJL_MAX;
+				continue;
 			} else if (role.equals(AFTConstants.SALESMAN)){
-				y = YXY_MAX;
-				break;
+				if(limitmax<YXY_MAX)limitmax = YXY_MAX;
+				continue;
 			}
 		}
 		i+=x;
-		if (i >= y) {
+		if (i >= limitmax) {
 			return true;
 		}
 		return false;

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

@@ -34,6 +34,19 @@ public class InputProjectStatistics {
 	private Integer screen;
 
 	private Integer taskProjectStatus;
+	/**
+	 * 满意度状态
+	 * 0未发放 1已发放 2已回收(非常满意) 3已回收(满意) 4已回收(一般) 5已回收(不满意)
+	 */
+	private Integer sdStatus;
+
+	public Integer getSdStatus() {
+		return sdStatus;
+	}
+
+	public void setSdStatus(Integer sdStatus) {
+		this.sdStatus = sdStatus;
+	}
 
 	public Integer getTaskProjectStatus() {
 		return taskProjectStatus;

+ 19 - 0
src/main/java/com/goafanti/order/bo/OutProjectStatistics.java

@@ -19,6 +19,8 @@ public class OutProjectStatistics {
 	private String techName;
 	private String techDepName;
 	private Integer projectStatus;
+	private Integer formRetrieve;
+	private Integer satisfactionDegree;
 
 
 
@@ -74,6 +76,23 @@ public class OutProjectStatistics {
 	private BigDecimal lastYearCapital;
 	private BigDecimal lastYearIncome;
 
+
+	public Integer getFormRetrieve() {
+		return formRetrieve;
+	}
+
+	public void setFormRetrieve(Integer formRetrieve) {
+		this.formRetrieve = formRetrieve;
+	}
+
+	public Integer getSatisfactionDegree() {
+		return satisfactionDegree;
+	}
+
+	public void setSatisfactionDegree(Integer satisfactionDegree) {
+		this.satisfactionDegree = satisfactionDegree;
+	}
+
 	public String getServiceType() {
 		return serviceType;
 	}

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

@@ -125,6 +125,24 @@ public class TOrderTaskDetailBo {
 	private Integer processStatus;
 	private String commodityId;
 
+	private Integer satisfactionDegree;
+	private String satisfactionDegreeUrl;
+
+	public Integer getSatisfactionDegree() {
+		return satisfactionDegree;
+	}
+
+	public void setSatisfactionDegree(Integer satisfactionDegree) {
+		this.satisfactionDegree = satisfactionDegree;
+	}
+
+	public String getSatisfactionDegreeUrl() {
+		return satisfactionDegreeUrl;
+	}
+
+	public void setSatisfactionDegreeUrl(String satisfactionDegreeUrl) {
+		this.satisfactionDegreeUrl = satisfactionDegreeUrl;
+	}
 
 	public Integer getDeleteSign() {
 		return deleteSign;

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

@@ -51,6 +51,11 @@ public class OutProjectStatisticsAudit extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
+
 
     private Integer  setUpStatus;
     private String setUpTime;
@@ -74,6 +79,25 @@ public class OutProjectStatisticsAudit extends OutProjectStatistics {
 
     private Integer	certificatesCount;
 
+    @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
 
     @Override
     public String getServiceType() {

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

@@ -45,6 +45,30 @@ public class OutProjectStatisticsCommon extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
+
+    @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
 
     private Integer  setUpStatus;
     private String setUpTime;
@@ -69,6 +93,7 @@ public class OutProjectStatisticsCommon extends OutProjectStatistics {
     private Integer	certificatesCount;
 
 
+
     @Override
     public String getServiceType() {
         return serviceType;

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

@@ -47,8 +47,30 @@ public class OutProjectStatisticsDoubleSoft extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
 
+    @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
 
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
 
     private Integer  setUpStatus;
     private String setUpTime;
@@ -71,6 +93,8 @@ public class OutProjectStatisticsDoubleSoft extends OutProjectStatistics {
 
     private Integer	certificatesCount;
 
+
+
     @Override
     public String getServiceType() {
         return serviceType;

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

@@ -63,6 +63,8 @@ public class OutProjectStatisticsHighTech extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表")
+    private String formRetrieveName;
 
 
 
@@ -81,6 +83,14 @@ public class OutProjectStatisticsHighTech extends OutProjectStatistics {
 
     private Integer	certificatesCount;
 
+    public String getFormRetrieveName() {
+        return formRetrieveName;
+    }
+
+    public void setFormRetrieveName(String formRetrieveName) {
+        this.formRetrieveName = formRetrieveName;
+    }
+
     @Override
     public String getServiceType() {
         return serviceType;

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

@@ -45,6 +45,10 @@ public class OutProjectStatisticsMember extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
 
     private Integer  setUpStatus;
     private String setUpTime;
@@ -77,6 +81,26 @@ public class OutProjectStatisticsMember extends OutProjectStatistics {
     private String contractTerm;
 
     @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    @Override
     public String getServiceType() {
         return serviceType;
     }

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

@@ -61,6 +61,10 @@ public class OutProjectStatisticsPatent extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
 
 
     private Integer  setUpStatus;
@@ -76,6 +80,26 @@ public class OutProjectStatisticsPatent extends OutProjectStatistics {
     private Integer	certificatesCount;
 
     @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    @Override
     public String getServiceType() {
         return serviceType;
     }

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

@@ -59,6 +59,10 @@ public class OutProjectStatisticsSoftwareWorks extends OutProjectStatistics {
     private String	taskComment;
     @Excel(name = "订单说明")
     private String orderRemarks;
+    @Excel(name = "满意度调查表",readConverterExp = "0=未发送,1=已发送-未回收,2=已回收,3=其他")
+    private Integer formRetrieve;
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
 
     private Integer  setUpStatus;
     private String setUpTime;
@@ -74,6 +78,27 @@ public class OutProjectStatisticsSoftwareWorks extends OutProjectStatistics {
     private Integer	certificatesCount;
 
     @Override
+    public Integer getFormRetrieve() {
+        return formRetrieve;
+    }
+
+    @Override
+    public void setFormRetrieve(Integer formRetrieve) {
+        this.formRetrieve = formRetrieve;
+    }
+
+    @Override
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    @Override
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+
+    @Override
     public String getServiceType() {
         return serviceType;
     }

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

@@ -211,6 +211,10 @@ public class AdminNewOrderApiController extends CertifyApiController {
 			return res;
 		}
 		if (isSubmit == 1) {
+			if (StringUtils.isBlank(t.getContacts())||StringUtils.isBlank(t.getContactMobile())){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "联系人与电话"));
+				return res;
+			}
 			if (orderNewService.checkORderTask(t.getOrderNo())) {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "主项目"));
 				return res;

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

@@ -756,4 +756,50 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(handleFile(res, "/projectStopFile/", false, req, sign));
 		return res;
 	}
+
+
+	/** 文件上传 **/
+	@RequestMapping(value = "/upload/satisfactionDegree", method = RequestMethod.POST)
+	public Result uploadsatisfactionDegree(HttpServletRequest req,String sign,Integer id){
+		Result res = new Result();
+		String path="/satisfactionDegree/"+id+"/";
+		res.setData(handleFile(res, path, false, req, sign));
+		return res;
+	}
+
+	@RequestMapping(value="/updateSatisfactionDegree",method = RequestMethod.POST)
+	public Result updateSatisfactionDegree(Integer id,Integer formRetrieve,Integer satisfactionDegree,String satisfactionDegreeUrl){
+		Result res=new Result();
+		if (id ==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目编号"));
+			return res;
+		}
+		if (formRetrieve ==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"满意度回收状态"));
+			return res;
+		}
+		if (formRetrieve==2){
+			if (satisfactionDegree ==null){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"满意度"));
+				return res;
+			}
+			if (StringUtils.isBlank(satisfactionDegreeUrl)){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"满意度附件"));
+				return res;
+			}
+		}
+		if (formRetrieve==4){
+			if (StringUtils.isBlank(satisfactionDegreeUrl)){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"满意度附件"));
+				return res;
+			}
+		}
+		res.setData(orderProjectService.updateSatisfactionDegree( id, formRetrieve, satisfactionDegree, satisfactionDegreeUrl));
+		return res;
+
+
+	}
+
+
+
 }

+ 8 - 3
src/main/java/com/goafanti/order/enums/NewProjectStatus.java

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

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

@@ -147,4 +147,5 @@ public interface OrderProjectService {
 	Object pushExamineProjectStop(InputTaskStopLog in);
 
 
+    Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
 }

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

@@ -181,8 +181,10 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			if (type==OrderChangeType.CB.getCode()||type==OrderChangeType.JXMBG.getCode()){
 				Integer receiverType=null;
 				if (t.getTaskReceiver()!=null){
+					//等于咨询师 做咨询新增
 					if (t.getTaskReceiver().equals(t.getConsultantId())) {
 						receiverType=0;
+						//等于经理做经理新增
 					}else if  (t.getTaskReceiver().equals(t.getManagerId())){
 						receiverType=1;
 					}

+ 4 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -469,6 +469,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			if(i==0){
 				tOrderHighTechMapper.insertSelective(tighTech);
 			}
+		}else {
+			tOrderHighTechMapper.deleteByOrderNo(t.getOrderNo());
 		}
 		//订单提交
 		if (isSubmit==1) {
@@ -540,6 +542,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				Admin finance = adminMapper.selectByPrimaryKey(dep.getFinanceId());
 				str=str.append(finance.getName()).append(",");
 			}
+
+
 			if (str.length()>0)t.setExamineName(str.substring(0,str.length()-1));
 			TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
 			pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t.getApproval());

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

@@ -13,6 +13,7 @@ import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.common.bo.*;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.dao.*;
+import com.goafanti.common.enums.NoticeTypes;
 import com.goafanti.common.model.*;
 import com.goafanti.common.utils.*;
 import com.goafanti.common.utils.excel.NewExcelUtil;
@@ -20,6 +21,7 @@ import com.goafanti.order.bo.*;
 import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.order.enums.*;
 import com.goafanti.order.service.OrderChangeService;
+import com.goafanti.organization.bo.ProjectTypePuls;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -543,6 +545,12 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 					t.setIfPublicity(1);
 					taskMid.setPromulgateCount(task2.getCommodityQuantity());
 				}
+			}else if (b.getProjectStatus().equals(NewProjectStatus.YWCXZ.getCode())||b.getProjectStatus().equals(NewProjectStatus.YXZ.getCode())||
+					b.getProjectStatus().equals(NewProjectStatus.D1NWC.getCode())||b.getProjectStatus().equals(NewProjectStatus.D2NWC.getCode())||
+					b.getProjectStatus().equals(NewProjectStatus.D3NWC.getCode())||b.getProjectStatus().equals(NewProjectStatus.QBWC.getCode())
+			){
+				//完成时通知客服
+				completeSendCustomerService(b.getTid());
 			}
 			//大于3计做已完成 不计做库存
 			if (b.getProjectStatus()>3){
@@ -561,6 +569,25 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return 1;
 	}
 
+	private void completeSendCustomerService(Integer id) {
+		OrderOperator orderOperator = tOrderTaskMapper.selectAidByParam(id);
+		String content=String.format("[%s]企业[%s]项目已完成,订单编号[%s]。",orderOperator.getBuyerName(),orderOperator.getProjectName(),orderOperator.getOrderNo());
+		List<Admin> list =adminMapper.getAdminRoleTypeList(AFTConstants.CUSTOMER_SERVICE);
+		List<Notice> notices=new ArrayList<>();
+		for (Admin admin : list) {
+			Notice notice=new Notice();
+			notice.setId(UUID.randomUUID().toString());
+			notice.setNoticeType(NoticeStatus.COMPLETES_PROJECT.getCode());
+			notice.setType(NoticeTypes.getType(NoticeStatus.COMPLETES_PROJECT.getCode()));
+			notice.setAid(admin.getId());
+			notice.setCreateTime(new Date());
+			notice.setContent(content);
+			notice.setReaded(0);
+			notices.add(notice);
+		}
+		asyncUtils.addNoticeBatch(notices);
+	}
+
 
 	/**
 	 * 推动项目日志
@@ -1621,9 +1648,25 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return taskStopMapper.updateByPrimaryKeySelective(t);
 	}
 
+
+
 	private void examineProjectSotpAddNotice(TOrderTask task,Integer status,Integer sotpType) {
 		asyncUtils.addProjectSotpNotic(status,sotpType,null,task);
 	}
 
 
+	@Override
+	public Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl) {
+		TOrderTask in=new TOrderTask();
+		in.setId(id);
+		in.setFormRetrieve(formRetrieve);
+		if(formRetrieve==2){
+			if(satisfactionDegree!=null)in.setSatisfactionDegree(satisfactionDegree);
+			in.setSatisfactionDegreeUrl(satisfactionDegreeUrl);
+		}else if (formRetrieve==4){
+			in.setSatisfactionDegreeUrl(satisfactionDegreeUrl);
+		}
+		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
+	}
+
 }

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

@@ -92,6 +92,7 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		if(ps.getProvince()!=null)	params.put("province", ps.getProvince());
 		if(ps.getProjectId()!=null) params.put("projectId", ps.getProjectId());
 		if(ps.getScreen()!=null) params.put("screen", ps.getScreen());
+		if (ps.getSdStatus()!=null)params.put("sdStatus",ps.getSdStatus());
 		if(ps.getPageNo()!=null)pageNo=ps.getPageNo();
 		if(ps.getPageSize()!=null)pageSize=ps.getPageSize();
 		Pagination<OutProjectStatistics> p = (Pagination<OutProjectStatistics>)findPage("selectProjectStatisticsListByPage",

+ 0 - 11
src/main/java/com/goafanti/permission/service/impl/NewRoleServiceImpl.java

@@ -53,12 +53,8 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	@Autowired
 	private OrganizationContactBookMapper	organizationContactBookMapper;
 	@Autowired
-	private TOrderTaskMapper	tOrderTaskMapper;
-	@Autowired
 	private TOrderNewMapper	tOrderNewMapper;
 	@Autowired
-	private TTaskLogMapper	tTaskLogMapper;
-	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
 	@Autowired
 	private OrderExamineMapper	orderExamineMapper;
@@ -67,16 +63,9 @@ public class NewRoleServiceImpl extends BaseMybatisDao<RoleMapper> implements Ne
 	@Autowired
 	private AdminMapper	adminMapper;
 	@Autowired
-	private TaskAttributionLogMapper	taskAttributionLogMapper;
-	@Autowired
 	private TOrderLogMapper	tOrderLogMapper;
 	@Autowired
 	private AsyncUtils asyncUtils;
-	@Autowired
-	private NewOrderChangeMapper newOrderChangeMapper;
-
-	@Autowired
-	private OrderChangeService	orderChangeService;
 
 
 	@Override

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

@@ -52,11 +52,11 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.65
+static.host=//static.jishutao.com/1.2.66
 rd.static.host=//static.jishutao.com/RD/1.0.00
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.62
-#static.host=http://172.16.1.187/prod/1.2.25
+#static.host=http://172.16.1.187/prod/1.2.66
 
 wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7

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

@@ -49,7 +49,7 @@ yxjl_max=100
 
 amb.maxLvl=6
 
-static.host=//static.jishutao.com/1.2.65
+static.host=//static.jishutao.com/1.2.66
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 rd.static.host=//static.jishutao.com/RD/1.0.00

+ 7 - 7
src/main/resources/props/error.properties

@@ -4,7 +4,7 @@ org.apache.shiro.authc.LockedAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7E
 org.apache.shiro.authc.DisabledAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
 org.apache.shiro.authc.ExcessiveAttemptsException=\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8D26\u53F7\u6682\u65F6\u88AB\u9501\u5B9A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002
 org.apache.shiro.session.ExpiredSessionException=\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
-org.springframework.dao.DataIntegrityViolationException=\u670D\u52A1\u5668\u6253\u4E86\u4E2A\u76F9\u513F\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
+org.springframework.dao.DataIntegrityViolationException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
 org.springframework.jdbc.BadSqlGrammarException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
 java.text.ParseException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
 java.lang.IllegalArgumentException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
@@ -24,13 +24,13 @@ PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
 
 PARAM_EMPTY_ERROR={0}\u5FC5\u987B\u6307\u5B9A\u3002
 
-PARAM_BEING_ERROR={0}\u5df2\u5b58\u5728\u0021
+PARAM_BEING_ERROR={0}\u5DF2\u5B58\u5728!
 
 PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4\u3002
 
-DECIMAL_PARAM_MAX_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\uFF0C\u6700\u5927\u503c{value}
+DECIMAL_PARAM_MAX_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\uFF0C\u6700\u5927\u503C{value}
 
-DECIMAL_PARAM_MIN_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\uFF0C\u6700\u5c0f\u503c{value}
+DECIMAL_PARAM_MIN_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\uFF0C\u6700\u5C0F\u503C{value}
 
 PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
 
@@ -122,14 +122,14 @@ ORDER_CAN_NOT_MODIFY = \u5F53\u524D\u8BA2\u5355{0}\u4E0D\u80FD\u4FEE\u6539
 
 ORDER_ALREADY_FREEZE = \u8BE5\u8BA2\u5355{0}\u5DF2\u7ECF\u51BB\u7ED3
 
-ORDER_ALREADY_REVOKE = \u8BA2\u5355{0}\u5DF2\u7ECF\u9501\u5b9a
+ORDER_ALREADY_REVOKE = \u8BA2\u5355{0}\u5DF2\u7ECF\u9501\u5B9A
 
 ORDER_NOT_EXIST = \u8BA2\u5355{0}\u4E0D\u5B58\u5728
 
-CUSTOM_EREXCESS= \u5ba2\u6237\u9886\u53d6\u8d85\u989d\u002c\u6bcf\u5929\u6700\u591a{0}\u4e2a
+CUSTOM_EREXCESS= \u5BA2\u6237\u9886\u53D6\u8D85\u989D,\u6BCF\u5929\u6700\u591A{0}\u4E2A
 
 PAY_BEYOND_SIGN = \u652F\u4ED8\u91D1\u989D\u8D85\u8FC7\u5408\u540C\u4EF7\u683C
 
 REFUND_BEYOND_SIGN = \u9000\u6B3E\u91D1\u989D\u8D85\u8FC7\u5408\u540C\u4EF7\u683C
 
-BILL_ALREADY_EXPIRE = \u8BE5\u6D41\u6C34\u5DF2\u8FC7\u671F
+BILL_ALREADY_EXPIRE = \u8BE5\u6D41\u6C34\u5DF2\u8FC7\u671F