anderx 3 years ago
parent
commit
f2941c5431

+ 62 - 56
src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml

@@ -28,7 +28,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 28 13:36:56 CST 2021.
       This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     -->
-    id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id, 
+    id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
     new_time, remarks, create_time, tech_satisfaction, business_satisfaction
     new_time, remarks, create_time, tech_satisfaction, business_satisfaction
   </sql>
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -37,7 +37,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 28 13:36:56 CST 2021.
       This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     -->
-    select 
+    select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from user_service
     from user_service
     where id = #{id,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
@@ -57,15 +57,15 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Fri May 28 13:36:56 CST 2021.
       This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     -->
-    insert into user_service (id, `uid`, aid, 
-      add_wechat, wechat, renewal, 
-      renewal_time, sign_project, sign_project_id, 
-      new_time, remarks, create_time, 
+    insert into user_service (id, `uid`, aid,
+      add_wechat, wechat, renewal,
+      renewal_time, sign_project, sign_project_id,
+      new_time, remarks, create_time,
       tech_satisfaction, business_satisfaction)
       tech_satisfaction, business_satisfaction)
-    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
-      #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER}, 
-      #{renewalTime,jdbcType=TIMESTAMP}, #{signProject,jdbcType=VARCHAR}, #{signProjectId,jdbcType=VARCHAR}, 
-      #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
+      #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER},
+      #{renewalTime,jdbcType=TIMESTAMP}, #{signProject,jdbcType=VARCHAR}, #{signProjectId,jdbcType=VARCHAR},
+      #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
       #{techSatisfaction,jdbcType=INTEGER}, #{businessSatisfaction,jdbcType=INTEGER})
       #{techSatisfaction,jdbcType=INTEGER}, #{businessSatisfaction,jdbcType=INTEGER})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
@@ -239,8 +239,8 @@
   <select id="selectByUid" resultType="java.lang.Integer">
   <select id="selectByUid" resultType="java.lang.Integer">
   select id from user_service where uid= #{uid}
   select id from user_service where uid= #{uid}
   </select>
   </select>
-  
-  
+
+
    <resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
    <resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
       <result column="orderNo" property="orderNo" />
       <result column="orderNo" property="orderNo" />
       <result column="contractNo" property="contractNo" />
       <result column="contractNo" property="contractNo" />
@@ -267,8 +267,8 @@
 		receiver_name receiverName ,certificate_number  certificateNumber
 		receiver_name receiverName ,certificate_number  certificateNumber
 		from t_order_task where split_status in (0,1) and order_no = #{orderNo}
 		from t_order_task where split_status in (0,1) and order_no = #{orderNo}
     </select>
     </select>
-  
-  
+
+
   <select id="OrderUseServiceList" resultMap="userService">
   <select id="OrderUseServiceList" resultMap="userService">
 select a.order_no orderNo,a.contract_no contractNo,b.dep_name depName ,a.buyer_id uid,a.create_time ,b.buyer_name userName,c.new_time ,
 select a.order_no orderNo,a.contract_no contractNo,b.dep_name depName ,a.buyer_id uid,a.create_time ,b.buyer_name userName,c.new_time ,
 date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as orderTimes, date_format(c.new_time,'%Y-%m-%d %H:%i:%S') as newTimes,
 date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as orderTimes, date_format(c.new_time,'%Y-%m-%d %H:%i:%S') as newTimes,
@@ -276,56 +276,62 @@ date_format(c.renewal_time,'%Y-%m-%d') as renewalTimes, date_format(a.sign_time,
 d.name adminName,c.add_wechat addWechat,c.wechat ,c.renewal ,c.renewal_time ,c.sign_project signProject ,c.remarks,
 d.name adminName,c.add_wechat addWechat,c.wechat ,c.renewal ,c.renewal_time ,c.sign_project signProject ,c.remarks,
 c.tech_satisfaction techSatisfaction, c.business_satisfaction businessSatisfaction
 c.tech_satisfaction techSatisfaction, c.business_satisfaction businessSatisfaction
 from t_order_new a
 from t_order_new a
-left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid 
-left join admin d on c.aid =d.id  
+left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid
+left join admin d on c.aid =d.id
 where a.delete_sign in(0,2,3)
 where a.delete_sign in(0,2,3)
-<if test="userName != null">
-and b.buyer_name like CONCAT('%', #{userName},'%') 
-</if>
-<if test="depId != null">
-and a.order_dep = #{depId}
-</if>
-<if test="addWechat != null">
-and c.add_wechat = #{addWechat}
-</if>
-<if test="renewal != null">
-and c.renewal = #{renewal}
-</if>
-<if test="startFollowTimes != null">
-and c.new_time  BETWEEN #{startFollowTimes} and #{endFollowTimes}
-</if>
-<if test="startSignTimes != null">
-and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
-</if>
+  <if test="userName != null">
+  and b.buyer_name like CONCAT('%', #{userName},'%')
+  </if>
+  <if test="deps != null">
+  and a.order_dep in
+    <foreach close=")" collection="deps" item="depId" open="(" separator=",">
+      #{depId}
+    </foreach>
+  </if>
+  <if test="addWechat != null">
+  and c.add_wechat = #{addWechat}
+  </if>
+  <if test="renewal != null">
+  and c.renewal = #{renewal}
+  </if>
+  <if test="startFollowTimes != null">
+  and c.new_time  BETWEEN #{startFollowTimes} and #{endFollowTimes}
+  </if>
+  <if test="startSignTimes != null">
+  and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
+  </if>
 order by c.new_time,a.create_time
 order by c.new_time,a.create_time
   <if test="page_sql != null">
   <if test="page_sql != null">
     		${page_sql}
     		${page_sql}
    </if>
    </if>
  </select>
  </select>
- 
+
  <select id="OrderUseServiceCount" resultType="java.lang.Integer">
  <select id="OrderUseServiceCount" resultType="java.lang.Integer">
   select count(*)
   select count(*)
 from t_order_new a
 from t_order_new a
-left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid 
-left join admin d on c.aid =d.id 
+left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid
+left join admin d on c.aid =d.id
 where a.delete_sign in(0,2,3)
 where a.delete_sign in(0,2,3)
-<if test="userName != null">
-and b.buyer_name like CONCAT('%', #{userName},'%') 
-</if>
-<if test="depId != null">
-and a.order_dep = #{depId}
-</if>
-<if test="addWechat != null">
-and c.add_wechat = #{addWechat}
-</if>
-<if test="renewal != null">
-and c.renewal = #{renewal}
-</if>
-<if test="startFollowTimes != null">
-and c.new_time  BETWEEN #{startFollowTimes} and #{endFollowTimes}
-</if>
-<if test="startSignTimes != null">
-and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
-</if>
+    <if test="userName != null">
+    and b.buyer_name like CONCAT('%', #{userName},'%')
+    </if>
+   <if test="deps != null">
+     and a.order_dep in
+     <foreach close=")" collection="deps" item="depId" open="(" separator=",">
+       #{depId}
+     </foreach>
+   </if>
+    <if test="addWechat != null">
+    and c.add_wechat = #{addWechat}
+    </if>
+    <if test="renewal != null">
+    and c.renewal = #{renewal}
+    </if>
+    <if test="startFollowTimes != null">
+    and c.new_time  BETWEEN #{startFollowTimes} and #{endFollowTimes}
+    </if>
+    <if test="startSignTimes != null">
+    and a.create_time BETWEEN #{startSignTimes} and #{endSignTimes}
+    </if>
  </select>
  </select>
-</mapper>
+</mapper>

+ 11 - 8
src/main/java/com/goafanti/user/bo/InputListOrderUserService.java

@@ -4,7 +4,7 @@ public class InputListOrderUserService {
 //	a)客户名称/关键字:可根据客户名称或名称关键字搜索客户信息,系统默认显示全部。
 //	a)客户名称/关键字:可根据客户名称或名称关键字搜索客户信息,系统默认显示全部。
 	private String userName;
 	private String userName;
 //	b)订单部门:可根据订单部门搜索,系统默认显示全部。
 //	b)订单部门:可根据订单部门搜索,系统默认显示全部。
-	private String depId;
+	private String deps;
 //	c)是否已添微信:可根据“是”“否”来搜索
 //	c)是否已添微信:可根据“是”“否”来搜索
 	private Integer addWechat;
 	private Integer addWechat;
 //	d)续签情况:按续签情况搜索,续签分为以下七个类型,系统默认显示全部。可按不同续签状态搜索。
 //	d)续签情况:按续签情况搜索,续签分为以下七个类型,系统默认显示全部。可按不同续签状态搜索。
@@ -30,12 +30,15 @@ public class InputListOrderUserService {
 	public void setUserName(String userName) {
 	public void setUserName(String userName) {
 		this.userName = userName;
 		this.userName = userName;
 	}
 	}
-	public String getDepId() {
-		return depId;
+
+	public String getDeps() {
+		return deps;
 	}
 	}
-	public void setDepId(String depId) {
-		this.depId = depId;
+
+	public void setDeps(String deps) {
+		this.deps = deps;
 	}
 	}
+
 	public Integer getAddWechat() {
 	public Integer getAddWechat() {
 		return addWechat;
 		return addWechat;
 	}
 	}
@@ -84,7 +87,7 @@ public class InputListOrderUserService {
 	public void setEndFollowTimes(String endFollowTimes) {
 	public void setEndFollowTimes(String endFollowTimes) {
 		this.endFollowTimes = endFollowTimes;
 		this.endFollowTimes = endFollowTimes;
 	}
 	}
-	
-	
-	
+
+
+
 }
 }

+ 11 - 8
src/main/java/com/goafanti/user/service/impl/UserServiceServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
+import com.goafanti.admin.service.DepartmentService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -32,12 +33,14 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 	private UserServiceMapper userServiceMapper;
 	private UserServiceMapper userServiceMapper;
 	@Autowired
 	@Autowired
 	private UserServiceFollowMapper userServiceFollowMapper;
 	private UserServiceFollowMapper userServiceFollowMapper;
-	
+	@Autowired
+	private DepartmentService departmentService;
+
 	@Override
 	@Override
 	public int addUseService(InputUserServiceFollow us) {
 	public int addUseService(InputUserServiceFollow us) {
 		us.setAid(TokenManager.getAdminId());
 		us.setAid(TokenManager.getAdminId());
 		if (StringUtils.isNotBlank(us.getRenewalTimes())) {
 		if (StringUtils.isNotBlank(us.getRenewalTimes())) {
-			us.setRenewalTime(DateUtils.StringToDate(us.getRenewalTimes(), AFTConstants.YYYYMMDD));	
+			us.setRenewalTime(DateUtils.StringToDate(us.getRenewalTimes(), AFTConstants.YYYYMMDD));
 		}
 		}
 		Date date=new Date();
 		Date date=new Date();
 		us.setCreateTime(date);
 		us.setCreateTime(date);
@@ -74,7 +77,7 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 	private Map<String, Object> setParams(InputListOrderUserService i) {
 	private Map<String, Object> setParams(InputListOrderUserService i) {
 		Map<String, Object>map =new HashMap<String, Object>();
 		Map<String, Object>map =new HashMap<String, Object>();
 		if(i.getUserName()!=null)map.put("userName", i.getUserName());
 		if(i.getUserName()!=null)map.put("userName", i.getUserName());
-		if(i.getDepId()!=null)map.put("depId", i.getDepId());
+		if(i.getDeps()!=null)map.put("deps", departmentService.parseArray(i.getDeps()));
 		if(i.getStartFollowTimes()!=null)map.put("startFollowTimes", i.getStartFollowTimes());
 		if(i.getStartFollowTimes()!=null)map.put("startFollowTimes", i.getStartFollowTimes());
 		if(i.getEndFollowTimes()!=null)map.put("endFollowTimes", i.getEndFollowTimes()+" 23:59:59");
 		if(i.getEndFollowTimes()!=null)map.put("endFollowTimes", i.getEndFollowTimes()+" 23:59:59");
 		if(i.getStartSignTimes()!=null)map.put("startSignTimes", i.getStartSignTimes());
 		if(i.getStartSignTimes()!=null)map.put("startSignTimes", i.getStartSignTimes());
@@ -107,28 +110,28 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 					projects.append("无");
 					projects.append("无");
 				}
 				}
 				projects.append("/");
 				projects.append("/");
-				
+
 				if (StringUtils.isNotBlank(o.getReceiverName())) {
 				if (StringUtils.isNotBlank(o.getReceiverName())) {
 					consultants.append(o.getReceiverName());
 					consultants.append(o.getReceiverName());
 				} else {
 				} else {
 					consultants.append("无");
 					consultants.append("无");
 				}
 				}
 				consultants.append("/");
 				consultants.append("/");
-				
+
 				if (o.getDeclarationBatch() != null) {
 				if (o.getDeclarationBatch() != null) {
 					declareBatchs.append(o.getDeclarationBatch());
 					declareBatchs.append(o.getDeclarationBatch());
 				} else {
 				} else {
 					declareBatchs.append("无");
 					declareBatchs.append("无");
 				}
 				}
 				declareBatchs.append("/");
 				declareBatchs.append("/");
-				
+
 				if (StringUtils.isNotBlank(o.getCertificateNumber())) {
 				if (StringUtils.isNotBlank(o.getCertificateNumber())) {
 					certificationNos.append(o.getCertificateNumber());
 					certificationNos.append(o.getCertificateNumber());
 				} else {
 				} else {
 					certificationNos.append("无");
 					certificationNos.append("无");
 				}
 				}
 				certificationNos.append("/");
 				certificationNos.append("/");
-				
+
 			}
 			}
 			if(projects.length()>1)ou.setProjects(projects.substring(0, projects.length()-1));
 			if(projects.length()>1)ou.setProjects(projects.substring(0, projects.length()-1));
 			if(consultants.length()>1)ou.setConsultants(consultants.substring(0, consultants.length()-1));
 			if(consultants.length()>1)ou.setConsultants(consultants.substring(0, consultants.length()-1));
@@ -137,4 +140,4 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		}
 		}
 	}
 	}
 
 
-}
+}

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

@@ -46,7 +46,7 @@ user_remind_days=15
 user_channel_days=90
 user_channel_days=90
 
 
 avatar.host=//static.jishutao.com
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.37
+static.host=//static.jishutao.com/1.2.38
 #avatar.host=//172.16.0.255:3000
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.27
 #static.host=//172.16.0.255:3000/1.2.27
 #static.host=http://172.16.1.187/prod/1.2.25
 #static.host=http://172.16.1.187/prod/1.2.25

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

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