Browse Source

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

anderx 1 year ago
parent
commit
ff265531d8
33 changed files with 1531 additions and 958 deletions
  1. 46 0
      src/main/java/com/goafanti/admin/bo/AdminCustomerBo.java
  2. 30 0
      src/main/java/com/goafanti/admin/bo/DepCountBo.java
  3. 3 0
      src/main/java/com/goafanti/admin/service/AdminService.java
  4. 51 1
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  5. 2 3
      src/main/java/com/goafanti/common/dao/UserArchivesMapper.java
  6. 2 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  7. 85 38
      src/main/java/com/goafanti/common/dao/UserServiceMapper.java
  8. 83 28
      src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml
  9. 55 41
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  10. 483 331
      src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml
  11. 51 15
      src/main/java/com/goafanti/common/model/UserArchives.java
  12. 199 357
      src/main/java/com/goafanti/common/model/UserService.java
  13. 110 3
      src/main/java/com/goafanti/common/utils/HttpUtils.java
  14. 9 0
      src/main/java/com/goafanti/customer/bo/InputAddCustomer.java
  15. 83 83
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  16. 27 0
      src/main/java/com/goafanti/customer/controller/UserOutboundApiController.java
  17. 2 0
      src/main/java/com/goafanti/customer/service/CustomerService.java
  18. 5 0
      src/main/java/com/goafanti/customer/service/UserOutboundService.java
  19. 7 1
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  20. 4 0
      src/main/java/com/goafanti/customer/service/impl/UserArchivesServiceImpl.java
  21. 44 0
      src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java
  22. 0 1
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java
  23. 11 4
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  24. 1 5
      src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java
  25. 28 0
      src/main/java/com/goafanti/user/bo/InputListOrderUserService.java
  26. 12 1
      src/main/java/com/goafanti/user/bo/InputUserServiceFollow.java
  27. 27 5
      src/main/java/com/goafanti/user/bo/OutOrderUserService.java
  28. 22 10
      src/main/java/com/goafanti/user/controller/UserServiceApiController.java
  29. 3 3
      src/main/java/com/goafanti/user/service/UserServiceService.java
  30. 9 9
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  31. 34 16
      src/main/java/com/goafanti/user/service/impl/UserServiceServiceImpl.java
  32. 2 2
      src/main/resources/props/config_local.properties
  33. 1 1
      src/main/resources/props/config_test.properties

+ 46 - 0
src/main/java/com/goafanti/admin/bo/AdminCustomerBo.java

@@ -1,29 +1,75 @@
 package com.goafanti.admin.bo;
 
 
+import com.goafanti.common.utils.excel.Excel;
+
 public class AdminCustomerBo {
 	private String aid;
+	@Excel( name = "名称")
 	private String aName;
 	private String depId;
+	@Excel( name = "部门")
 	private String depName;
 	/** 私有数 */
+	@Excel( name = "私有数",width = 12)
 	private Integer userCount;
 	/** 渠道数 */
+	@Excel( name = "渠道数",width = 12)
 	private Integer channelCount;
 	/** 签单数 */
+	@Excel( name = "签单数",width = 12)
 	private Integer signCount;
 	/** 私有新增数 */
+	@Excel( name = "私有新增数",width = 12)
 	private Integer newCount;
 	/** 渠道新增数 */
+	@Excel( name = "渠道新增数",width = 12)
 	private Integer channelNewCount;
 	/** 私有面谈数 */
+	@Excel( name = "私有面谈数",width = 12)
 	private Integer completeCount;
 	/** 渠道面谈数 */
+	@Excel( name = "渠道面谈数",width = 12)
 	private Integer channelCompleteCount;
 	/** 私有领取数 */
+	@Excel( name = "私有领取数",width = 12)
 	private Integer receiveCount;
 	/** 私有转交数 */
+	@Excel( name = "私有转交数",width = 12)
 	private Integer transferCount;
+	/** 一般客戶 */
+	@Excel( name = "一般客户",width = 12)
+	private Integer generalCount;
+	/** 私有客戶 */
+	@Excel( name = "私有客户",width = 12)
+	private Integer intentionCount;
+	/** 重点客户 */
+	@Excel( name = "重点客户",width = 12)
+	private Integer keynoteCount;
+
+	public Integer getGeneralCount() {
+		return generalCount;
+	}
+
+	public void setGeneralCount(Integer generalCount) {
+		this.generalCount = generalCount;
+	}
+
+	public Integer getIntentionCount() {
+		return intentionCount;
+	}
+
+	public void setIntentionCount(Integer intentionCount) {
+		this.intentionCount = intentionCount;
+	}
+
+	public Integer getKeynoteCount() {
+		return keynoteCount;
+	}
+
+	public void setKeynoteCount(Integer keynoteCount) {
+		this.keynoteCount = keynoteCount;
+	}
 
 	public Integer getTransferCount() {
 		return transferCount;

+ 30 - 0
src/main/java/com/goafanti/admin/bo/DepCountBo.java

@@ -16,9 +16,39 @@ public class DepCountBo {
 	private Integer transferCount;
 	private Integer channelNewCount;
 	private Integer channelCompleteCount;
+	/** 一般客戶 */
+	private Integer generalCount;
+	/** 私有客戶 */
+	private Integer intentionCount;
+	/** 重点客户 */
+	private Integer keynoteCount;
 	private List<DepCountBo> list;
 	private List<AdminCustomerBo> aList;
 
+	public Integer getGeneralCount() {
+		return generalCount;
+	}
+
+	public void setGeneralCount(Integer generalCount) {
+		this.generalCount = generalCount;
+	}
+
+	public Integer getIntentionCount() {
+		return intentionCount;
+	}
+
+	public void setIntentionCount(Integer intentionCount) {
+		this.intentionCount = intentionCount;
+	}
+
+	public Integer getKeynoteCount() {
+		return keynoteCount;
+	}
+
+	public void setKeynoteCount(Integer keynoteCount) {
+		this.keynoteCount = keynoteCount;
+	}
+
 	public Integer getTransferCount() {
 		return transferCount;
 	}

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

@@ -1,6 +1,7 @@
 package com.goafanti.admin.service;
 
 import com.goafanti.admin.bo.*;
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.model.Admin;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -86,4 +87,6 @@ public interface AdminService {
 
 
     Object pushStatistics() ;
+
+	Result selectAllUserExport(String depId, String startTime, String endTime, String aName);
 }

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

@@ -4,6 +4,7 @@ import com.goafanti.admin.bo.*;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.admin.service.NewAdminService;
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
 import com.goafanti.common.error.BusinessException;
@@ -11,6 +12,7 @@ import com.goafanti.common.model.*;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -18,6 +20,7 @@ import com.goafanti.customer.bo.BusinessListBo;
 import com.goafanti.organization.bo.OrganizationListOut;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -60,6 +63,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	@Autowired
 	private FinanceCountMapper financeCountMapper;
 
+	@Value(value = "${upload.path}")
+	private String uploadPath = null;
+
 
 
 
@@ -445,6 +451,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 						admin.setChannelNewCount(user.getChannelNewCount());
 						admin.setReceiveCount(user.getReceiveCount());
 						admin.setTransferCount(user.getTransferCount());
+						admin.setIntentionCount(user.getIntentionCount());
+						admin.setKeynoteCount(user.getKeynoteCount());
+						admin.setGeneralCount(user.getGeneralCount());
 						break;
 					}
 				}
@@ -471,6 +480,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		if (admin.getCompleteCount()==null) admin.setCompleteCount(0);
 		if (admin.getChannelCompleteCount()==null) admin.setChannelCompleteCount(0);
 		if (admin.getTransferCount()==null)admin.setTransferCount(0);
+		if (admin.getIntentionCount()==null)admin.setIntentionCount(0);
+		if (admin.getKeynoteCount()==null)admin.setKeynoteCount(0);
+		if (admin.getGeneralCount()==null)admin.setGeneralCount(0);
 	}
 
 	//迭代获取所有部门与部门员工并计算出部门数量
@@ -493,7 +505,8 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	 * @param ab
 	 */
 	public void sumCount(DepCountBo ab) {
-		int completeCount=0,receiveCount=0,userCount=0,signCount=0,channelCount=0,newCount=0,channelNewCount=0,channelCompleteCount=0,transferCount=0;
+		int completeCount=0,receiveCount=0,userCount=0,signCount=0,channelCount=0,newCount=0,channelNewCount=0,
+				channelCompleteCount=0,transferCount=0,intentionCount=0,keynoteCount=0,generalCount=0;
 		if (ab.getList()!=null&&!ab.getList().isEmpty()) {
 			for (DepCountBo a : ab.getList()) {
 				if (a.getCompleteCount()!=null&& a.getCompleteCount()!=0) completeCount+=a.getCompleteCount();
@@ -505,6 +518,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getChannelNewCount()!=null&& a.getChannelNewCount()!=0) channelNewCount+=a.getChannelNewCount();
 				if (a.getChannelCompleteCount()!=null&& a.getChannelCompleteCount()!=0) channelCompleteCount+=a.getChannelCompleteCount();
 				if (a.getTransferCount()!=null&& a.getTransferCount()!=0)transferCount+=a.getTransferCount();
+				if (a.getIntentionCount()!=null&& a.getIntentionCount()!=0) intentionCount+=a.getIntentionCount();
+				if (a.getKeynoteCount()!=null&& a.getKeynoteCount()!=0) keynoteCount+=a.getKeynoteCount();
+				if (a.getGeneralCount()!=null&& a.getGeneralCount()!=0) generalCount=a.getGeneralCount();
 			}
 		}
 		if (ab.getaList()!=null&&!ab.getaList().isEmpty()) {
@@ -518,6 +534,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getChannelNewCount()!=null&& a.getChannelNewCount()!=0) channelNewCount+=a.getChannelNewCount();
 				if (a.getChannelCompleteCount()!=null&& a.getChannelCompleteCount()!=0) channelCompleteCount+=a.getChannelCompleteCount();
 				if (a.getTransferCount()!=null&& a.getTransferCount()!=0)transferCount+=a.getTransferCount();
+				if (a.getIntentionCount()!=null&& a.getIntentionCount()!=0) intentionCount+=a.getIntentionCount();
+				if (a.getKeynoteCount()!=null&& a.getKeynoteCount()!=0) keynoteCount+=a.getKeynoteCount();
+				if (a.getGeneralCount()!=null&& a.getGeneralCount()!=0) generalCount=a.getGeneralCount();
 			}
 		}
 		ab.setCompleteCount(completeCount);
@@ -529,6 +548,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		ab.setChannelNewCount(channelNewCount);
 		ab.setChannelCompleteCount(channelCompleteCount);
 		ab.setTransferCount(transferCount);
+		ab.setIntentionCount(intentionCount);
+		ab.setKeynoteCount(keynoteCount);
+		ab.setGeneralCount(generalCount);
 
 	}
 
@@ -691,6 +713,34 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		return 1;
 	}
 
+	@Override
+	public Result selectAllUserExport(String depId, String startTime, String endTime, String aName) {
+		String endTimeStr=endTime+" 23:59:59";
+		List<Department> depIds=new ArrayList<>();
+		//总裁助力不查看老员工
+		Integer seniorstaff = null;
+		if (TokenManager.hasRole(AFTConstants.CED_ASSISTANT)){
+			seniorstaff=0;
+		}
+		OrganizationListOut oo=departmentMapper.selectAllById(depId);
+		if(TokenManager.hasRole(AFTConstants.OPERATION_MANAGER)){
+			List<String> myShiroDep = departmentService.selectMyDeps();
+			if (!myShiroDep.contains(depId))throw new BusinessException("无权查看此部门信息");
+		}
+		depIds =departmentService.selectSubordinateDeps(depId);
+		Department department = new Department();
+		department.setId(depId);
+		depIds.add(department);
+		List<AdminCustomerBo> list =null;
+		//原sql计算
+//		list=departmentMapper.AlldepCount(depIds,startTime,  endTime);
+		//新java计算
+		list=AllDepCount(depIds,startTime,endTimeStr,seniorstaff);
+		NewExcelUtil excel=new NewExcelUtil(AdminCustomerBo.class);
+		String sheetName=String.format("部门统计表_%s~%s",startTime,endTime);
+		return excel.exportExcel(list,sheetName,uploadPath);
+	}
+
 	/**
 	 *
 	 * @param list

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

@@ -10,7 +10,7 @@ import java.util.List;
  * 客户档案表(UserArchives)表数据库访问层
  *
  * @author makejava
- * @since 2024-08-12 10:38:57
+ * @since 2024-11-07 11:26:46
  */
 public interface UserArchivesMapper {
 
@@ -22,13 +22,12 @@ public interface UserArchivesMapper {
      */
     UserArchives queryById(Integer id);
 
-    
 
     /**
      * 查询指定行数据
      *
      * @param userArchives 查询条件
-     * @param pageable         分页对象
+     * @param pageable     分页对象
      * @return 对象列表
      */
     List<UserArchives> findUserArchivesList(UserArchives userArchives, @Param("pageable") Pageable pageable);

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

@@ -256,4 +256,6 @@ public interface UserMapper {
     void updateUserShareType(List<LockingReleaseBo> newList);
 
     List<LockingReleaseBo > selectSignReleaseUser(String id);
+
+    int selectUserLevel(String aid);
 }

+ 85 - 38
src/main/java/com/goafanti/common/dao/UserServiceMapper.java

@@ -1,44 +1,91 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserService;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
+import java.util.List;
+
+/**
+ * 客服信息表(UserService)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-11-11 17:01:53
+ */
 public interface UserServiceMapper {
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	int insert(UserService record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	int insertSelective(UserService record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	UserService selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	int updateByPrimaryKeySelective(UserService record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	int updateByPrimaryKey(UserService record);
-
-	Integer selectByUid(String uid);
-}
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserService queryById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param userService 查询条件
+     * @param pageable    分页对象
+     * @return 对象列表
+     */
+    List<UserService> findUserServiceList(UserService userService, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param userService 查询条件
+     * @return 总行数
+     */
+    int findUserServiceCount(UserService userService);
+
+    /**
+     * 新增数据
+     *
+     * @param userService 实例对象
+     * @return 影响行数
+     */
+    int insert(UserService userService);
+
+    int insertSelective(UserService userService);
+
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserService> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<UserService> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserService> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<UserService> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param userService 实例对象
+     * @return 影响行数
+     */
+    int update(UserService userService);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+
+    Integer selectByUid(String uid);
+
+}
+

+ 83 - 28
src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml

@@ -18,16 +18,19 @@
         <result property="enterpriseCount" column="enterprise_count" jdbcType="INTEGER"/>
         <result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
         <result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="awardsTime" column="awards_time" jdbcType="TIMESTAMP"/>
+        <result property="awardsStatus" column="awards_status" jdbcType="INTEGER"/>
     </resultMap>
-    
+
     <sql id="UserArchivesAllSql">
-id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution        
+        id, uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time, awards_time, awards_status
     </sql>
 
     <!--查询单个-->
     <select id="queryById" resultMap="UserArchivesMap">
         select
-          <include refid="UserArchivesAllSql"/>
+        <include refid="UserArchivesAllSql"/>
         from user_archives
         where id = #{id}
     </select>
@@ -35,7 +38,7 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
     <!--查询指定行数据-->
     <select id="findUserArchivesList" resultMap="UserArchivesMap">
         select
-          <include refid="UserArchivesAllSql"/>
+        <include refid="UserArchivesAllSql"/>
 
         from user_archives
         <where>
@@ -84,9 +87,18 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
             <if test="interviewDistribution != null and interviewDistribution != ''">
                 and interview_distribution = #{interviewDistribution}
             </if>
+            <if test="updateTime != null">
+                and update_time = #{updateTime}
+            </if>
+            <if test="awardsTime != null">
+                and awards_time = #{awardsTime}
+            </if>
+            <if test="awardsStatus != null">
+                and awards_status = #{awardsStatus}
+            </if>
         </where>
         <if test="page_sql != null">
-    		${page_sql}
+            ${page_sql}
         </if>
     </select>
 
@@ -140,44 +152,76 @@ id, uid, patent_count, invention_patent_count, utility_model_count, appearance_p
             <if test="interviewDistribution != null and interviewDistribution != ''">
                 and interview_distribution = #{interviewDistribution}
             </if>
+            <if test="updateTime != null">
+                and update_time = #{updateTime}
+            </if>
+            <if test="awardsTime != null">
+                and awards_time = #{awardsTime}
+            </if>
+            <if test="awardsStatus != null">
+                and awards_status = #{awardsStatus}
+            </if>
         </where>
     </select>
 
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
-        values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount}, #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas}, #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution})
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
+                                  appearance_patent_count, software_works_count, other_count, financial_data,
+                                  early_communication, interview_ideas, create_time, enterprise_count,
+                                  channel_indicators, interview_distribution, update_time, awards_time, awards_status)
+        values (#{uid}, #{patentCount}, #{inventionPatentCount}, #{utilityModelCount}, #{appearancePatentCount},
+                #{softwareWorksCount}, #{otherCount}, #{financialData}, #{earlyCommunication}, #{interviewIdeas},
+                #{createTime}, #{enterpriseCount}, #{channelIndicators}, #{interviewDistribution}, #{updateTime},
+                #{awardsTime}, #{awardsStatus})
     </insert>
 
-    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
+    <insert id="insertBatch">
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
+        appearance_patent_count, software_works_count, other_count, financial_data, early_communication,
+        interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
+        awards_time, awards_status)
         values
         <foreach collection="entities" item="entity" separator=",">
-        (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
+            (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount},
+            #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount},
+            #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime},
+            #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
+            #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
         </foreach>
     </insert>
 
     <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count, appearance_patent_count, software_works_count, other_count, financial_data, early_communication, interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution)
+        insert into user_archives(uid, patent_count, invention_patent_count, utility_model_count,
+        appearance_patent_count, software_works_count, other_count, financial_data, early_communication,
+        interview_ideas, create_time, enterprise_count, channel_indicators, interview_distribution, update_time,
+        awards_time, awards_status)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount}, #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount}, #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime}, #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution})
+            (#{entity.uid}, #{entity.patentCount}, #{entity.inventionPatentCount}, #{entity.utilityModelCount},
+            #{entity.appearancePatentCount}, #{entity.softwareWorksCount}, #{entity.otherCount},
+            #{entity.financialData}, #{entity.earlyCommunication}, #{entity.interviewIdeas}, #{entity.createTime},
+            #{entity.enterpriseCount}, #{entity.channelIndicators}, #{entity.interviewDistribution},
+            #{entity.updateTime}, #{entity.awardsTime}, #{entity.awardsStatus})
         </foreach>
         on duplicate key update
-uid = values(uid),
-patent_count = values(patent_count),
-invention_patent_count = values(invention_patent_count),
-utility_model_count = values(utility_model_count),
-appearance_patent_count = values(appearance_patent_count),
-software_works_count = values(software_works_count),
-other_count = values(other_count),
-financial_data = values(financial_data),
-early_communication = values(early_communication),
-interview_ideas = values(interview_ideas),
-create_time = values(create_time),
-enterprise_count = values(enterprise_count),
-channel_indicators = values(channel_indicators),
-interview_distribution = values(interview_distribution)
+        uid = values(uid),
+        patent_count = values(patent_count),
+        invention_patent_count = values(invention_patent_count),
+        utility_model_count = values(utility_model_count),
+        appearance_patent_count = values(appearance_patent_count),
+        software_works_count = values(software_works_count),
+        other_count = values(other_count),
+        financial_data = values(financial_data),
+        early_communication = values(early_communication),
+        interview_ideas = values(interview_ideas),
+        create_time = values(create_time),
+        enterprise_count = values(enterprise_count),
+        channel_indicators = values(channel_indicators),
+        interview_distribution = values(interview_distribution),
+        update_time = values(update_time),
+        awards_time = values(awards_time),
+        awards_status = values(awards_status)
     </insert>
 
     <!--通过主键修改数据-->
@@ -226,13 +270,24 @@ interview_distribution = values(interview_distribution)
             <if test="interviewDistribution != null and interviewDistribution != ''">
                 interview_distribution = #{interviewDistribution},
             </if>
+            <if test="updateTime != null">
+                update_time = #{updateTime},
+            </if>
+            <if test="awardsTime != null">
+                awards_time = #{awardsTime},
+            </if>
+            <if test="awardsStatus != null">
+                awards_status = #{awardsStatus},
+            </if>
         </set>
         where id = #{id}
     </update>
 
     <!--通过主键删除-->
     <delete id="deleteById">
-        delete from user_archives where id = #{id}
+        delete
+        from user_archives
+        where id = #{id}
     </delete>
 
     <select id="queryByUid" resultMap="UserArchivesMap">
@@ -245,7 +300,7 @@ interview_distribution = values(interview_distribution)
     <select id="selectUserArchivesList" resultType="com.goafanti.customer.bo.OutSelectUserArchives">
         select a.id , a.nickname ,d1.name as  province ,d2.name as  city ,d3.name area ,a.sign_bills signBills,
         a.share_type as shareType ,d.channel_type as channelType ,e.enterprise_count as enterpriseCount,
-        c.name contactName,f.name adminName,e.channel_indicators as channelIndicators,
+        c.name contactName,f.name adminName,e.channel_indicators as channelIndicators,a.update_time as updateTime,
         e.interview_ideas as interviewIdeas ,b.intended_project as intendedProject,
         e.interview_distribution as interviewDistribution, g.name depName,
         ic.name as  industry ,b.business_scope as businessScope ,e.financial_data as financialData,

+ 55 - 41
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -103,25 +103,27 @@
 		left join district_glossory dg2 on b.city = dg2.id
 		left join district_glossory dg3 on b.area = dg3.id
 		left join industry_category c on b.industry = c.id
-		left join admin d on t0.aid = d.id where 1=1
-		<if test="name != null and name != ''">
-			and t0.identify_name like concat('%',#{name},'%')
-		</if>
-		<if test="startDate != null and startDate != ''">
-			and t0.transfer_time &gt; #{startDate}
-		</if>
-		<if test="endDate != null and endDate != ''">
-			and t0.transfer_time &lt; #{endDate}
-		</if>
-		<if test="province != null">
-			and b.province = #{province,jdbcType=INTEGER}
-		</if>
-		<if test="city != null">
-			and b.city = #{city,jdbcType=INTEGER}
-		</if>
-		<if test="area != null">
-			and b.area = #{area,jdbcType=INTEGER}
-		</if>
+		left join admin d on t0.aid = d.id
+		<where>
+			<if test="name != null and name != ''">
+				and t0.identify_name like concat('%',#{name},'%')
+			</if>
+			<if test="startDate != null and startDate != ''">
+				and t0.transfer_time &gt; #{startDate}
+			</if>
+			<if test="endDate != null and endDate != ''">
+				and t0.transfer_time &lt; #{endDate}
+			</if>
+			<if test="province != null">
+				and b.province = #{province,jdbcType=INTEGER}
+			</if>
+			<if test="city != null">
+				and b.city = #{city,jdbcType=INTEGER}
+			</if>
+			<if test="area != null">
+				and b.area = #{area,jdbcType=INTEGER}
+			</if>
+		</where>
 		 order by orderTime
 		 <if test="page_sql != null">
     		${page_sql}
@@ -131,25 +133,27 @@
 		select count(0)
 		from
 			(select id,aid,type,share_type,transfer_time,identify_name,society_tag from user where aid = #{aid} and type = 0 and share_type = 0 and status != 1)t0
-		left join user_identity b on t0.id = b.uid where 1=1
-		<if test="name != null and name != ''">
-			and t0.identify_name like concat('%',#{name},'%')
-		</if>
-		<if test="startDate != null and startDate != ''">
-			and t0.transfer_time &gt; #{startDate}
-		</if>
-		<if test="endDate != null and endDate != ''">
-			and t0.transfer_time &lt; #{endDate}
-		</if>
-		<if test="province != null">
-			and b.province = #{province,jdbcType=INTEGER}
-		</if>
-		<if test="city != null">
-			and b.city = #{city,jdbcType=INTEGER}
-		</if>
-		<if test="area != null">
-			and b.area = #{area,jdbcType=INTEGER}
-		</if>
+		left join user_identity b on t0.id = b.uid
+		 <where>
+			 <if test="name != null and name != ''">
+				 and t0.identify_name like concat('%',#{name},'%')
+			 </if>
+			 <if test="startDate != null and startDate != ''">
+				 and t0.transfer_time &gt; #{startDate}
+			 </if>
+			 <if test="endDate != null and endDate != ''">
+				 and t0.transfer_time &lt; #{endDate}
+			 </if>
+			 <if test="province != null">
+				 and b.province = #{province,jdbcType=INTEGER}
+			 </if>
+			 <if test="city != null">
+				 and b.city = #{city,jdbcType=INTEGER}
+			 </if>
+			 <if test="area != null">
+				 and b.area = #{area,jdbcType=INTEGER}
+			 </if>
+		 </where>
 	</select>
 	<select id="selectPublicPersonalCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
 		select
@@ -2328,7 +2332,11 @@ inner join(
 		sum(if(share_type=0 and source =1 and channel=0,1,0))newCount,
 		sum(if(share_type=0 and source =3 and channel=0,1,0))transferCount,
 		sum(if(share_type=0 and source =1 and channel=1,1,0))channelNewCount,
-		sum(if(share_type=0 and source =2 and channel=0,1,0))receiveCount from `user` where `type` =1 and new_channel=0
+		sum(if(share_type=0 and source =2 and channel=0,1,0))receiveCount,
+		sum(if(share_type=0 and `level` =0,1,0))generalCount,
+		sum(if(share_type=0 and `level` =1,1,0))intentionCount,
+		sum(if(share_type=0 and `level` =2,1,0))keynoteCount
+		from `user` where `type` =1 and new_channel=0   and source in(1,2,3)
 		<if test="startTime != null and endTime != null">
 			and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
 		</if>
@@ -2362,7 +2370,7 @@ inner join(
 	</select>
 
 	<select id="selectByaidAndDate" resultType="com.goafanti.common.model.AdminUserCount">
-		SELECT aid,dateTime,sum(privateCount)privateCount,sum(channelCount)channelCount,sum(signCount)signCount
+		SELECT aid,dateTime,sum(privateCount)as privateCount,sum(channelCount) as channelCount,sum(signCount)as signCount
 		from ( select aid,DATE_FORMAT(a.transfer_time , '%Y-%m-%d') dateTime,
 					  if(share_type=0 and new_channel=0,1,0) privateCount,
 					  if(share_type=0 and new_channel=1,1,0)channelCount, if(share_type=2,1,0)signCount
@@ -2371,7 +2379,7 @@ inner join(
 		    )x group by aid,dateTime
 	</select>
 	<select id="selectListByaidAndDate" resultType="com.goafanti.common.model.AdminUserCount">
-		SELECT aid,dateTime,sum(privateCount)privateCount,sum(channelCount)channelCount,sum(signCount)signCount
+		SELECT aid,dateTime,sum(privateCount)as privateCount,sum(channelCount)as channelCount,sum(signCount)as signCount
 		from ( select aid,DATE_FORMAT(a.transfer_time , '%Y-%m-%d') dateTime,
 		if(share_type=0 and new_channel=0,1,0) privateCount,
 		if(share_type=0 and new_channel=1,1,0)channelCount, if(share_type=2,1,0)signCount
@@ -2508,4 +2516,10 @@ inner join(
 			and a.level = #{level}
 		</if>
 	</select>
+	<select id="selectUserLevel" resultType="java.lang.Integer">
+		select sum(level is null) sums
+		from user a
+		where a.type= 1 and a.source in(1,2,3) and a.share_type = 0 and a.new_channel=0
+		and aid = #{aid}
+	</select>
 </mapper>

+ 483 - 331
src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml

@@ -1,343 +1,495 @@
 <?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.UserServiceMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserService">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="uid" jdbcType="VARCHAR" property="uid" />
-    <result column="aid" jdbcType="VARCHAR" property="aid" />
-    <result column="add_wechat" jdbcType="INTEGER" property="addWechat" />
-    <result column="wechat" jdbcType="VARCHAR" property="wechat" />
-    <result column="renewal" jdbcType="INTEGER" property="renewal" />
-    <result column="renewal_time" jdbcType="TIMESTAMP" property="renewalTime" />
-    <result column="sign_project" jdbcType="VARCHAR" property="signProject" />
-    <result column="sign_project_id" jdbcType="VARCHAR" property="signProjectId" />
-    <result column="new_time" jdbcType="TIMESTAMP" property="newTime" />
-    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="tech_satisfaction" jdbcType="INTEGER" property="techSatisfaction" />
-    <result column="business_satisfaction" jdbcType="INTEGER" property="businessSatisfaction" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      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,
-    new_time, remarks, create_time, tech_satisfaction, business_satisfaction
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    select
-    <include refid="Base_Column_List" />
-    from user_service
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    delete from user_service
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.UserService">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      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,
-      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},
-      #{techSatisfaction,jdbcType=INTEGER}, #{businessSatisfaction,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    insert into user_service
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="uid != null">
-        `uid`,
-      </if>
-      <if test="aid != null">
-        aid,
-      </if>
-      <if test="addWechat != null">
-        add_wechat,
-      </if>
-      <if test="wechat != null">
-        wechat,
-      </if>
-      <if test="renewal != null">
-        renewal,
-      </if>
-      <if test="renewalTime != null">
-        renewal_time,
-      </if>
-      <if test="signProject != null">
-        sign_project,
-      </if>
-      <if test="signProjectId != null">
-        sign_project_id,
-      </if>
-      <if test="newTime != null">
-        new_time,
-      </if>
-      <if test="remarks != null">
-        remarks,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-      <if test="techSatisfaction != null">
-        tech_satisfaction,
-      </if>
-      <if test="businessSatisfaction != null">
-        business_satisfaction,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="uid != null">
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="aid != null">
-        #{aid,jdbcType=VARCHAR},
-      </if>
-      <if test="addWechat != null">
-        #{addWechat,jdbcType=INTEGER},
-      </if>
-      <if test="wechat != null">
-        #{wechat,jdbcType=VARCHAR},
-      </if>
-      <if test="renewal != null">
-        #{renewal,jdbcType=INTEGER},
-      </if>
-      <if test="renewalTime != null">
-        #{renewalTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="signProject != null">
-        #{signProject,jdbcType=VARCHAR},
-      </if>
-      <if test="signProjectId != null">
-        #{signProjectId,jdbcType=VARCHAR},
-      </if>
-      <if test="newTime != null">
-        #{newTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="remarks != null">
-        #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="techSatisfaction != null">
-        #{techSatisfaction,jdbcType=INTEGER},
-      </if>
-      <if test="businessSatisfaction != null">
-        #{businessSatisfaction,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserService">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    update user_service
-    <set>
-      <if test="uid != null">
-        `uid` = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="aid != null">
-        aid = #{aid,jdbcType=VARCHAR},
-      </if>
-      <if test="addWechat != null">
-        add_wechat = #{addWechat,jdbcType=INTEGER},
-      </if>
-      <if test="wechat != null">
-        wechat = #{wechat,jdbcType=VARCHAR},
-      </if>
-      <if test="renewal != null">
-        renewal = #{renewal,jdbcType=INTEGER},
-      </if>
-      <if test="renewalTime != null">
-        renewal_time = #{renewalTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="signProject != null">
-        sign_project = #{signProject,jdbcType=VARCHAR},
-      </if>
-      <if test="signProjectId != null">
-        sign_project_id = #{signProjectId,jdbcType=VARCHAR},
-      </if>
-      <if test="newTime != null">
-        new_time = #{newTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="remarks != null">
-        remarks = #{remarks,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="techSatisfaction != null">
-        tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
-      </if>
-      <if test="businessSatisfaction != null">
-        business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserService">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri May 28 13:36:56 CST 2021.
-    -->
-    update user_service
-    set `uid` = #{uid,jdbcType=VARCHAR},
-      aid = #{aid,jdbcType=VARCHAR},
-      add_wechat = #{addWechat,jdbcType=INTEGER},
-      wechat = #{wechat,jdbcType=VARCHAR},
-      renewal = #{renewal,jdbcType=INTEGER},
-      renewal_time = #{renewalTime,jdbcType=TIMESTAMP},
-      sign_project = #{signProject,jdbcType=VARCHAR},
-      sign_project_id = #{signProjectId,jdbcType=VARCHAR},
-      new_time = #{newTime,jdbcType=TIMESTAMP},
-      remarks = #{remarks,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
-      business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <select id="selectByUid" resultType="java.lang.Integer">
-  select id from user_service where uid= #{uid}
-  </select>
 
+    <resultMap type="com.goafanti.common.model.UserService" id="UserServiceMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="uid" column="uid" jdbcType="VARCHAR"/>
+        <result property="aid" column="aid" jdbcType="VARCHAR"/>
+        <result property="addWechat" column="add_wechat" jdbcType="INTEGER"/>
+        <result property="wechat" column="wechat" jdbcType="VARCHAR"/>
+        <result property="renewal" column="renewal" jdbcType="INTEGER"/>
+        <result property="renewalTime" column="renewal_time" jdbcType="TIMESTAMP"/>
+        <result property="signProject" column="sign_project" jdbcType="VARCHAR"/>
+        <result property="signProjectId" column="sign_project_id" jdbcType="VARCHAR"/>
+        <result property="newTime" column="new_time" jdbcType="TIMESTAMP"/>
+        <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="techSatisfaction" column="tech_satisfaction" jdbcType="INTEGER"/>
+        <result property="businessSatisfaction" column="business_satisfaction" jdbcType="INTEGER"/>
+        <result property="addGroupChat" column="add_group_chat" jdbcType="INTEGER"/>
+        <result property="addGroupChatTime" column="add_group_chat_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="UserServiceAllSql">
+        id, uid, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id, new_time, remarks, create_time, tech_satisfaction, business_satisfaction, add_group_chat, add_group_chat_time
+    </sql>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="UserServiceMap">
+        select
+        <include refid="UserServiceAllSql"/>
+        from user_service
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findUserServiceList" resultMap="UserServiceMap">
+        select
+        <include refid="UserServiceAllSql"/>
+
+        from user_service
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="addWechat != null">
+                and add_wechat = #{addWechat}
+            </if>
+            <if test="wechat != null and wechat != ''">
+                and wechat = #{wechat}
+            </if>
+            <if test="renewal != null">
+                and renewal = #{renewal}
+            </if>
+            <if test="renewalTime != null">
+                and renewal_time = #{renewalTime}
+            </if>
+            <if test="signProject != null and signProject != ''">
+                and sign_project = #{signProject}
+            </if>
+            <if test="signProjectId != null and signProjectId != ''">
+                and sign_project_id = #{signProjectId}
+            </if>
+            <if test="newTime != null">
+                and new_time = #{newTime}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                and remarks = #{remarks}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="techSatisfaction != null">
+                and tech_satisfaction = #{techSatisfaction}
+            </if>
+            <if test="businessSatisfaction != null">
+                and business_satisfaction = #{businessSatisfaction}
+            </if>
+            <if test="addGroupChat != null">
+                and add_group_chat = #{addGroupChat}
+            </if>
+            <if test="addGroupChatTime != null">
+                and add_group_chat_time = #{addGroupChatTime}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findUserServiceCount" resultType="java.lang.Integer">
+        select count(1)
+        from user_service
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="addWechat != null">
+                and add_wechat = #{addWechat}
+            </if>
+            <if test="wechat != null and wechat != ''">
+                and wechat = #{wechat}
+            </if>
+            <if test="renewal != null">
+                and renewal = #{renewal}
+            </if>
+            <if test="renewalTime != null">
+                and renewal_time = #{renewalTime}
+            </if>
+            <if test="signProject != null and signProject != ''">
+                and sign_project = #{signProject}
+            </if>
+            <if test="signProjectId != null and signProjectId != ''">
+                and sign_project_id = #{signProjectId}
+            </if>
+            <if test="newTime != null">
+                and new_time = #{newTime}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                and remarks = #{remarks}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="techSatisfaction != null">
+                and tech_satisfaction = #{techSatisfaction}
+            </if>
+            <if test="businessSatisfaction != null">
+                and business_satisfaction = #{businessSatisfaction}
+            </if>
+            <if test="addGroupChat != null">
+                and add_group_chat = #{addGroupChat}
+            </if>
+            <if test="addGroupChatTime != null">
+                and add_group_chat_time = #{addGroupChatTime}
+            </if>
+        </where>
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into user_service(uid, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
+                                 new_time, remarks, create_time, tech_satisfaction, business_satisfaction,
+                                 add_group_chat, add_group_chat_time)
+        values (#{uid}, #{aid}, #{addWechat}, #{wechat}, #{renewal}, #{renewalTime}, #{signProject}, #{signProjectId},
+                #{newTime}, #{remarks}, #{createTime}, #{techSatisfaction}, #{businessSatisfaction}, #{addGroupChat},
+                #{addGroupChatTime})
+    </insert>
+
+    <insert id="insertBatch">
+        insert into user_service(uid, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
+        new_time, remarks, create_time, tech_satisfaction, business_satisfaction, add_group_chat, add_group_chat_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.uid}, #{entity.aid}, #{entity.addWechat}, #{entity.wechat}, #{entity.renewal},
+            #{entity.renewalTime}, #{entity.signProject}, #{entity.signProjectId}, #{entity.newTime}, #{entity.remarks},
+            #{entity.createTime}, #{entity.techSatisfaction}, #{entity.businessSatisfaction}, #{entity.addGroupChat},
+            #{entity.addGroupChatTime})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_service(uid, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id,
+        new_time, remarks, create_time, tech_satisfaction, business_satisfaction, add_group_chat, add_group_chat_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.uid}, #{entity.aid}, #{entity.addWechat}, #{entity.wechat}, #{entity.renewal},
+            #{entity.renewalTime}, #{entity.signProject}, #{entity.signProjectId}, #{entity.newTime}, #{entity.remarks},
+            #{entity.createTime}, #{entity.techSatisfaction}, #{entity.businessSatisfaction}, #{entity.addGroupChat},
+            #{entity.addGroupChatTime})
+        </foreach>
+        on duplicate key update
+        uid = values(uid),
+        aid = values(aid),
+        add_wechat = values(add_wechat),
+        wechat = values(wechat),
+        renewal = values(renewal),
+        renewal_time = values(renewal_time),
+        sign_project = values(sign_project),
+        sign_project_id = values(sign_project_id),
+        new_time = values(new_time),
+        remarks = values(remarks),
+        create_time = values(create_time),
+        tech_satisfaction = values(tech_satisfaction),
+        business_satisfaction = values(business_satisfaction),
+        add_group_chat = values(add_group_chat),
+        add_group_chat_time = values(add_group_chat_time)
+    </insert>
 
-   <resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
-      <result column="orderNo" property="orderNo" />
-      <result column="contractNo" property="contractNo" />
-      <result column="depName" property="depName" />
-      <result column="userName" property="userName" />
-      <result column="uid" property="uid" />
-      <result column="signTimes" property="signTimes" />
-      <result column="orderTimes" property="orderTimes" />
-      <result column="newTimes" property="newTimes" />
-      <result column="adminName" property="adminName" />
-      <result column="addWechat" property="addWechat" />
-      <result column="wechat" property="wechat" />
-      <result column="deleteSign" property="deleteSign" />
-      <result column="renewal" property="renewal" />
-      <result column="signProject" property="signProject" />
-      <result column="remarks" property="remarks" />
-      <result column="renewalTimes" property="renewalTimes" />
-      <result column="techSatisfaction" property="techSatisfaction" />
-      <result column="businessSatisfaction" property="businessSatisfaction" />
-      <association column="orderNo" javaType="java.util.ArrayList" property="list" select="getTask" />
+    <!--通过主键修改数据-->
+    <update id="update">
+        update user_service
+        <set>
+            <if test="uid != null and uid != ''">
+                uid = #{uid},
+            </if>
+            <if test="aid != null and aid != ''">
+                aid = #{aid},
+            </if>
+            <if test="addWechat != null">
+                add_wechat = #{addWechat},
+            </if>
+            <if test="wechat != null and wechat != ''">
+                wechat = #{wechat},
+            </if>
+            <if test="renewal != null">
+                renewal = #{renewal},
+            </if>
+            <if test="renewalTime != null">
+                renewal_time = #{renewalTime},
+            </if>
+            <if test="signProject != null and signProject != ''">
+                sign_project = #{signProject},
+            </if>
+            <if test="signProjectId != null and signProjectId != ''">
+                sign_project_id = #{signProjectId},
+            </if>
+            <if test="newTime != null">
+                new_time = #{newTime},
+            </if>
+            <if test="remarks != null and remarks != ''">
+                remarks = #{remarks},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime},
+            </if>
+            <if test="techSatisfaction != null">
+                tech_satisfaction = #{techSatisfaction},
+            </if>
+            <if test="businessSatisfaction != null">
+                business_satisfaction = #{businessSatisfaction},
+            </if>
+            <if test="addGroupChat != null">
+                add_group_chat = #{addGroupChat},
+            </if>
+            <if test="addGroupChatTime != null">
+                add_group_chat_time = #{addGroupChatTime},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from user_service
+        where id = #{id}
+    </delete>
+    <!--部分新增-->
+    <insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+          This element was generated on Fri May 28 13:36:56 CST 2021.
+        -->
+        insert into user_service
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="uid != null">
+                `uid`,
+            </if>
+            <if test="aid != null">
+                aid,
+            </if>
+            <if test="addWechat != null">
+                add_wechat,
+            </if>
+            <if test="wechat != null">
+                wechat,
+            </if>
+            <if test="renewal != null">
+                renewal,
+            </if>
+            <if test="renewalTime != null">
+                renewal_time,
+            </if>
+            <if test="signProject != null">
+                sign_project,
+            </if>
+            <if test="signProjectId != null">
+                sign_project_id,
+            </if>
+            <if test="newTime != null">
+                new_time,
+            </if>
+            <if test="remarks != null">
+                remarks,
+            </if>
+            <if test="createTime != null">
+                create_time,
+            </if>
+            <if test="techSatisfaction != null">
+                tech_satisfaction,
+            </if>
+            <if test="businessSatisfaction != null">
+                business_satisfaction,
+            </if>
+            <if test="addGroupChat != null">
+                add_group_chat,
+            </if>
+            <if test="addGroupChatTime != null">
+                add_group_chat_time,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="uid != null">
+                #{uid,jdbcType=VARCHAR},
+            </if>
+            <if test="aid != null">
+                #{aid,jdbcType=VARCHAR},
+            </if>
+            <if test="addWechat != null">
+                #{addWechat,jdbcType=INTEGER},
+            </if>
+            <if test="wechat != null">
+                #{wechat,jdbcType=VARCHAR},
+            </if>
+            <if test="renewal != null">
+                #{renewal,jdbcType=INTEGER},
+            </if>
+            <if test="renewalTime != null">
+                #{renewalTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="signProject != null">
+                #{signProject,jdbcType=VARCHAR},
+            </if>
+            <if test="signProjectId != null">
+                #{signProjectId,jdbcType=VARCHAR},
+            </if>
+            <if test="newTime != null">
+                #{newTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="remarks != null">
+                #{remarks,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="techSatisfaction != null">
+                #{techSatisfaction,jdbcType=INTEGER},
+            </if>
+            <if test="businessSatisfaction != null">
+                #{businessSatisfaction,jdbcType=INTEGER},
+            </if>
+            <if test="addGroupChat != null">
+                #{addGroupChat,jdbcType=INTEGER},
+            </if>
+            <if test="addGroupChatTime != null">
+                #{addGroupChatTime},
+            </if>
+        </trim>
+    </insert>
+
+    <select id="selectByUid" resultType="java.lang.Integer">
+        select id from user_service where uid= #{uid}
+    </select>
+
+
+
+    <resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
+        <result column="orderNo" property="orderNo" />
+        <result column="contractNo" property="contractNo" />
+        <result column="depName" property="depName" />
+        <result column="userName" property="userName" />
+        <result column="uid" property="uid" />
+        <result column="signTimes" property="signTimes" />
+        <result column="orderTimes" property="orderTimes" />
+        <result column="newTimes" property="newTimes" />
+        <result column="adminName" property="adminName" />
+        <result column="addWechat" property="addWechat" />
+        <result column="wechat" property="wechat" />
+        <result column="deleteSign" property="deleteSign" />
+        <result column="renewal" property="renewal" />
+        <result column="signProject" property="signProject" />
+        <result column="remarks" property="remarks" />
+        <result column="renewalTimes" property="renewalTimes" />
+        <result column="techSatisfaction" property="techSatisfaction" />
+        <result column="businessSatisfaction" property="businessSatisfaction" />
+        <result column="add_group_chat" property="addGroupChat" />
+        <result column="add_group_chat_time" property="addGroupChatTime" />
+        <association column="orderNo" javaType="java.util.ArrayList" property="list" select="getTask" />
     </resultMap>
+
     <select id="getTask" resultType="com.goafanti.user.bo.OrderProject">
-    	select id,commodity_name commodityName ,declaration_batch declarationBatch ,
-		receiver_name receiverName ,certificate_number  certificateNumber
-		from t_order_task where split_status in (0,1) and order_no = #{orderNo}
+        select id,commodity_name commodityName ,declaration_batch declarationBatch ,
+               receiver_name receiverName ,certificate_number  certificateNumber
+        from t_order_task where split_status in (0,1) and order_no = #{orderNo}
     </select>
 
 
-  <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 ,
-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(c.renewal_time,'%Y-%m-%d') as renewalTimes, date_format(a.sign_time,'%Y-%m-%d') as signTimes,a.delete_sign deleteSign ,
-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
-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
-where a.delete_sign in(0,2,3)
-    <if test="contractNo!=null">
-  and  a.contract_no like CONCAT('%', #{contractNo},'%')
-    </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
-  <if test="page_sql != null">
-    		${page_sql}
-   </if>
- </select>
+    <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 ,
+        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,c.add_group_chat,
+        c.add_group_chat_time ,
+        date_format(c.renewal_time,'%Y-%m-%d') as renewalTimes, date_format(a.sign_time,'%Y-%m-%d') as signTimes,a.delete_sign deleteSign ,
+        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
+        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
+        where a.delete_sign in(0,2,3)
+        <if test="contractNo!=null">
+            and  a.contract_no like CONCAT('%', #{contractNo},'%')
+        </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>
+        <if test="addGroupChat != null">
+            and c.add_group_chat = #{addGroupChat}
+        </if>
+        <if test="addGroupChatTimeStart != null">
+            and c.add_group_chat_time BETWEEN #{addGroupChatTimeStart} and #{addGroupChatTimeEnd}
+        </if>
+        order by c.new_time,a.create_time
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <select id="OrderUseServiceCount" resultType="java.lang.Integer">
+        select count(*)
+        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
+        where a.delete_sign in(0,2,3)
+        <if test="contractNo!=null">
+            and a.contract_no like CONCAT('%', #{contractNo},'%')
+        </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>
+        <if test="addGroupChat != null">
+            and c.add_group_chat = #{addGroupChat}
+        </if>
+        <if test="addGroupChatTimeStart != null">
+            and c.add_group_chat_time BETWEEN #{addGroupChatTimeStart} and #{addGroupChatTimeEnd}
+        </if>
+    </select>
 
- <select id="OrderUseServiceCount" resultType="java.lang.Integer">
-  select count(*)
-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
-where a.delete_sign in(0,2,3)
-   <if test="contractNo!=null">
-     and a.contract_no like CONCAT('%', #{contractNo},'%')
-   </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>
 </mapper>
+

+ 51 - 15
src/main/java/com/goafanti/common/model/UserArchives.java

@@ -10,66 +10,78 @@ import java.util.Date;
  * 客户档案表(UserArchives)实体类
  *
  * @author makejava
- * @since 2024-08-12 10:38:57
+ * @since 2024-11-07 11:26:46
  */
 public class UserArchives implements Serializable {
-    private static final long serialVersionUID = -61985340141600786L;
+    private static final long serialVersionUID = 430576271799432429L;
 
     private Integer id;
 
     private String uid;
-/**
+    /**
      * 专利数
      */
     private Integer patentCount;
-/**
+    /**
      * 发明专利数
      */
     private Integer inventionPatentCount;
-/**
+    /**
      * 实用新型数
      */
     private Integer utilityModelCount;
-/**
+    /**
      * 外观专利数
      */
     private Integer appearancePatentCount;
-/**
+    /**
      * 软著数
      */
     private Integer softwareWorksCount;
-/**
+    /**
      * 其他数
      */
     private Integer otherCount;
-/**
+    /**
      * 财务数据
      */
     private String financialData;
-/**
+    /**
      * 前期沟通
      */
     private String earlyCommunication;
-/**
+    /**
      * 面谈思路
      */
     private String interviewIdeas;
-/**
+    /**
      * 创建时间
      */
     private Date createTime;
-/**
+    /**
      * 企业数
      */
     private Integer enterpriseCount;
-/**
+    /**
      * 渠道考核指标
      */
     private String channelIndicators;
-/**
+    /**
      * 我方主要面谈及分工
      */
     private String interviewDistribution;
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+    /**
+     * 获奖时间
+     */
+    private Date awardsTime;
+    /**
+     * 获奖状态 0=未参评,1=已参评,2=已获奖
+     */
+    private Integer awardsStatus;
 
 
     public Integer getId() {
@@ -193,5 +205,29 @@ public class UserArchives implements Serializable {
         this.interviewDistribution = interviewDistribution;
     }
 
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getAwardsTime() {
+        return awardsTime;
+    }
+
+    public void setAwardsTime(Date awardsTime) {
+        this.awardsTime = awardsTime;
+    }
+
+    public Integer getAwardsStatus() {
+        return awardsStatus;
+    }
+
+    public void setAwardsStatus(Integer awardsStatus) {
+        this.awardsStatus = awardsStatus;
+    }
+
 }
 

+ 199 - 357
src/main/java/com/goafanti/common/model/UserService.java

@@ -3,362 +3,204 @@ package com.goafanti.common.model;
 import java.io.Serializable;
 import java.util.Date;
 
+
+/**
+ * 客服信息表(UserService)实体类
+ *
+ * @author makejava
+ * @since 2024-11-11 17:01:54
+ */
 public class UserService implements Serializable {
+    private static final long serialVersionUID = -85623933226950055L;
+
+    private Integer id;
+
+    private String uid;
+    /**
+     * 操作人
+     */
+    private String aid;
+    /**
+     * 添加微信 0否 1是
+     */
+    private Integer addWechat;
+    /**
+     * 微信
+     */
+    private String wechat;
+    /**
+     * 续签状态 0=未联系上当前联系人,1=企业已签其他机构,2=企业自己申报,3=企业不打算申报/注销,4=得续签,未报价,5=待续签,已报价,6已续签/复审、续签时间、续签项目
+     */
+    private Integer renewal;
+    /**
+     * 续签时间
+     */
+    private Date renewalTime;
+    /**
+     * 已签项目
+     */
+    private String signProject;
+    /**
+     * 已签项目编号
+     */
+    private String signProjectId;
+    /**
+     * 最新更新时间
+     */
+    private Date newTime;
+    /**
+     * 备注
+     */
+    private String remarks;
+    /**
+     * 操作时间
+     */
+    private Date createTime;
+    /**
+     * 技术端满意度
+     */
+    private Integer techSatisfaction;
+    /**
+     * 业务端满意度
+     */
+    private Integer businessSatisfaction;
+    /**
+     * 入群 0=否,1=是
+     */
+    private Integer addGroupChat;
+    /**
+     * 入群时间
+     */
+    private Date addGroupChatTime;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getAddWechat() {
+        return addWechat;
+    }
+
+    public void setAddWechat(Integer addWechat) {
+        this.addWechat = addWechat;
+    }
+
+    public String getWechat() {
+        return wechat;
+    }
+
+    public void setWechat(String wechat) {
+        this.wechat = wechat;
+    }
+
+    public Integer getRenewal() {
+        return renewal;
+    }
+
+    public void setRenewal(Integer renewal) {
+        this.renewal = renewal;
+    }
+
+    public Date getRenewalTime() {
+        return renewalTime;
+    }
+
+    public void setRenewalTime(Date renewalTime) {
+        this.renewalTime = renewalTime;
+    }
+
+    public String getSignProject() {
+        return signProject;
+    }
+
+    public void setSignProject(String signProject) {
+        this.signProject = signProject;
+    }
+
+    public String getSignProjectId() {
+        return signProjectId;
+    }
+
+    public void setSignProjectId(String signProjectId) {
+        this.signProjectId = signProjectId;
+    }
+
+    public Date getNewTime() {
+        return newTime;
+    }
+
+    public void setNewTime(Date newTime) {
+        this.newTime = newTime;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks == null ? null : remarks.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getTechSatisfaction() {
+        return techSatisfaction;
+    }
+
+    public void setTechSatisfaction(Integer techSatisfaction) {
+        this.techSatisfaction = techSatisfaction;
+    }
+
+    public Integer getBusinessSatisfaction() {
+        return businessSatisfaction;
+    }
+
+    public void setBusinessSatisfaction(Integer businessSatisfaction) {
+        this.businessSatisfaction = businessSatisfaction;
+    }
+
+    public Integer getAddGroupChat() {
+        return addGroupChat;
+    }
+
+    public void setAddGroupChat(Integer addGroupChat) {
+        this.addGroupChat = addGroupChat;
+    }
+
+    public Date getAddGroupChatTime() {
+        return addGroupChatTime;
+    }
+
+    public void setAddGroupChatTime(Date addGroupChatTime) {
+        this.addGroupChatTime = addGroupChatTime;
+    }
+
+}
 
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.uid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String uid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.aid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String aid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.add_wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Integer addWechat;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String wechat;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.renewal
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Integer renewal;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.renewal_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Date renewalTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.sign_project
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String signProject;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.sign_project_id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String signProjectId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.new_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Date newTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.remarks
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private String remarks;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.create_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.tech_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Integer techSatisfaction;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.business_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private Integer businessSatisfaction;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.id
-	 * @return  the value of user_service.id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.id
-	 * @param id  the value for user_service.id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.uid
-	 * @return  the value of user_service.uid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getUid() {
-		return uid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.uid
-	 * @param uid  the value for user_service.uid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setUid(String uid) {
-		this.uid = uid == null ? null : uid.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.aid
-	 * @return  the value of user_service.aid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getAid() {
-		return aid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.aid
-	 * @param aid  the value for user_service.aid
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setAid(String aid) {
-		this.aid = aid == null ? null : aid.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.add_wechat
-	 * @return  the value of user_service.add_wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Integer getAddWechat() {
-		return addWechat;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.add_wechat
-	 * @param addWechat  the value for user_service.add_wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setAddWechat(Integer addWechat) {
-		this.addWechat = addWechat;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.wechat
-	 * @return  the value of user_service.wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getWechat() {
-		return wechat;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.wechat
-	 * @param wechat  the value for user_service.wechat
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setWechat(String wechat) {
-		this.wechat = wechat == null ? null : wechat.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.renewal
-	 * @return  the value of user_service.renewal
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Integer getRenewal() {
-		return renewal;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.renewal
-	 * @param renewal  the value for user_service.renewal
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setRenewal(Integer renewal) {
-		this.renewal = renewal;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.renewal_time
-	 * @return  the value of user_service.renewal_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Date getRenewalTime() {
-		return renewalTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.renewal_time
-	 * @param renewalTime  the value for user_service.renewal_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setRenewalTime(Date renewalTime) {
-		this.renewalTime = renewalTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.sign_project
-	 * @return  the value of user_service.sign_project
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getSignProject() {
-		return signProject;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.sign_project
-	 * @param signProject  the value for user_service.sign_project
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setSignProject(String signProject) {
-		this.signProject = signProject == null ? null : signProject.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.sign_project_id
-	 * @return  the value of user_service.sign_project_id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getSignProjectId() {
-		return signProjectId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.sign_project_id
-	 * @param signProjectId  the value for user_service.sign_project_id
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setSignProjectId(String signProjectId) {
-		this.signProjectId = signProjectId == null ? null : signProjectId.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.new_time
-	 * @return  the value of user_service.new_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Date getNewTime() {
-		return newTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.new_time
-	 * @param newTime  the value for user_service.new_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setNewTime(Date newTime) {
-		this.newTime = newTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.remarks
-	 * @return  the value of user_service.remarks
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public String getRemarks() {
-		return remarks;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.remarks
-	 * @param remarks  the value for user_service.remarks
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setRemarks(String remarks) {
-		this.remarks = remarks == null ? null : remarks.trim();
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.create_time
-	 * @return  the value of user_service.create_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.create_time
-	 * @param createTime  the value for user_service.create_time
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.tech_satisfaction
-	 * @return  the value of user_service.tech_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Integer getTechSatisfaction() {
-		return techSatisfaction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.tech_satisfaction
-	 * @param techSatisfaction  the value for user_service.tech_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setTechSatisfaction(Integer techSatisfaction) {
-		this.techSatisfaction = techSatisfaction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.business_satisfaction
-	 * @return  the value of user_service.business_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public Integer getBusinessSatisfaction() {
-		return businessSatisfaction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.business_satisfaction
-	 * @param businessSatisfaction  the value for user_service.business_satisfaction
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	public void setBusinessSatisfaction(Integer businessSatisfaction) {
-		this.businessSatisfaction = businessSatisfaction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
-	 */
-	@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(", uid=").append(uid);
-		sb.append(", aid=").append(aid);
-		sb.append(", addWechat=").append(addWechat);
-		sb.append(", wechat=").append(wechat);
-		sb.append(", renewal=").append(renewal);
-		sb.append(", renewalTime=").append(renewalTime);
-		sb.append(", signProject=").append(signProject);
-		sb.append(", signProjectId=").append(signProjectId);
-		sb.append(", newTime=").append(newTime);
-		sb.append(", remarks=").append(remarks);
-		sb.append(", createTime=").append(createTime);
-		sb.append(", techSatisfaction=").append(techSatisfaction);
-		sb.append(", businessSatisfaction=").append(businessSatisfaction);
-		sb.append(", serialVersionUID=").append(serialVersionUID);
-		sb.append("]");
-		return sb.toString();
-	}
-}

+ 110 - 3
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.ParseException;
-import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
@@ -13,15 +12,122 @@ import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.util.EntityUtils;
 
-import java.io.IOException;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.*;
+import java.net.URL;
 import java.net.UnknownHostException;
 import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
 import java.util.Map;
 import java.util.Set;
 
 public class HttpUtils {
 
+	/**
+	 * 发送https请求
+	 *
+	 * @param url           url
+	 * @param requestMethod 请求方式
+	 * @param param         请求参数
+	 * @return 返回值
+	 */
+	public String sendHttpsRequest(String url, String requestMethod, Map<String,Object> param) {
+		StringBuilder result = new StringBuilder();
+		try {
+			SSLContext sc = SSLContext.getInstance("SSL");
+			sc.init(null, new TrustManager[]{
+					new X509TrustManager() {
+						@Override
+						public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+						}
+
+						@Override
+						public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+						}
+
+						@Override
+						public X509Certificate[] getAcceptedIssuers() {
+							return new X509Certificate[0];
+						}
+					}
+			}, new SecureRandom());
+			URL console = new URL(url);
+			HttpsURLConnection conn = (HttpsURLConnection) console.openConnection();
+			// GET/POST
+			conn.setRequestMethod(requestMethod);
+			conn.setRequestProperty("Content-Type", "application/json");
+			conn.setDoOutput(true);
+			conn.setDoInput(true);
+			// 设置证书忽略相关操作
+			conn.setSSLSocketFactory(sc.getSocketFactory());
+			if (null != param) {
+				OutputStream outputStream = conn.getOutputStream();
+				// 注意编码格式
+				outputStream.write(JSON.toJSONString(param).getBytes(StandardCharsets.UTF_8));
+				outputStream.close();
+			}
+
+
+			conn.setHostnameVerifier((s, sslSession) -> true);
+			conn.connect();
+			InputStream is = conn.getInputStream();
+			BufferedReader br = new BufferedReader(new InputStreamReader(is,StandardCharsets.UTF_8));
+			String ret = "";
+			while ((ret = br.readLine()) != null) {
+				if (!ret.trim().isEmpty()) {
+					result.append(ret);
+				}
+			}
+			conn.disconnect();
+			br.close();
+		} catch (NoSuchAlgorithmException | KeyManagementException | IOException e) {
+			e.printStackTrace();
+		}
+        return result.toString();
+	}
+
+	// http协议访问方法
+//	public String sendHttpRequest(String url, String requestMethod, String param) {
+//		StringBuilder result = new StringBuilder();
+//		try {
+//			URL console = new URL(url);
+//			HttpURLConnection conn = (HttpURLConnection) console.openConnection();
+//			// GET/POST
+//			conn.setRequestMethod(requestMethod);
+//			conn.setRequestProperty("Content-Type", "application/json");
+//			conn.setDoOutput(true);
+//			conn.setDoInput(true);
+//			if (null != param) {
+//				OutputStream outputStream = conn.getOutputStream();
+//				// 注意编码格式
+//				outputStream.write(param.getBytes("UTF-8"));
+//				outputStream.close();
+//			}
+//
+//			conn.connect();
+//			InputStream is = conn.getInputStream();
+//			BufferedReader br = new BufferedReader(new InputStreamReader(is));
+//			String ret = "";
+//			while ((ret = br.readLine()) != null) {
+//				if (ret != null && !ret.trim().equals("")) {
+//					result.append(new String(ret.getBytes("utf-8"), "utf-8"));
+//				}
+//			}
+//			conn.disconnect();
+//			br.close();
+//		} catch (IOException ioException) {
+//			ioException.printStackTrace();
+//		}
+//		return result.toString();
+//	}
+
 
 
 	 public static JSONObject httpGet(String url) {
@@ -102,4 +208,5 @@ public class HttpUtils {
 	}
 
 
+
 }

+ 9 - 0
src/main/java/com/goafanti/customer/bo/InputAddCustomer.java

@@ -22,6 +22,7 @@ public class InputAddCustomer {
     private Integer city;
 
     private Integer area;
+    private Integer level;
     private Integer source;
     private String societyTag;
     private String orgCode;
@@ -50,6 +51,14 @@ public class InputAddCustomer {
     private Integer   channelType;
 
 
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
     public String getOrgCode() {
         return orgCode;
     }

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

@@ -185,7 +185,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	}
 	/**
 	 * 私有单位客户导出xls
-	 * @throws IOException
 	 */
 	@RequestMapping(value = "/privateUnitCustomerOutXls" , method = RequestMethod.GET)
 	public Result privateUnitCustomerOutXls(CustomerListIn cli ,Integer sort,Integer sortType,Integer pageNo, Integer pageSize,HttpServletResponse response) throws IOException{
@@ -306,9 +305,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * 客户查询
 	 * @param name  查询名称
 	 * @param type  分类 0默认 1小程序App
-	 * @param pageNo
-	 * @param pageSize
-	 * @return
 	 */
 	@RequestMapping(value = "/getUserByNames",method = RequestMethod.GET)
 	public Result getUserByName(String name,Integer type,Integer pageNo,Integer pageSize){
@@ -325,8 +321,7 @@ public class AdminCustomerApiController extends BaseApiController{
 
 
 	/** 添加客户基本信息
-	 * @throws Exception
-	 * @throws NumberFormatException **/
+	 * **/
 	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
 	public Result addCustomer(InputAddCustomer in) {
 		Result res = new Result();
@@ -531,7 +526,7 @@ public class AdminCustomerApiController extends BaseApiController{
 			for (int idx = 0; idx < ja.size(); idx++) {
 				userBusiness = ja.getJSONObject(idx).toJavaObject(BusinessListBo.class);
 				for(BusinessListBo ub:list){
-					if(ub.getBusinessProjectId() == userBusiness.getBusinessProjectId()){
+					if(Objects.equals(ub.getBusinessProjectId(), userBusiness.getBusinessProjectId())){
 						res.getError().add(new com.goafanti.common.bo.Error("业务类型重复,请检查后重新提交!"));
 						return res;
 					}
@@ -648,7 +643,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * 领取客户
 	 * @param uid 客户编号
 	 * @param oldAid 原来的客户归属人
-	 * @return
 	 */
 	@RequestMapping(value = "/receiveCustomer", method = RequestMethod.GET)
 	public Result receiveCustomer(String uid, String oldAid) {
@@ -685,8 +679,6 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/**
 	 * 领取为渠道
-	 * @param uid
-	 * @return
 	 */
 	@RequestMapping(value = "/receiveAsChannel",method=RequestMethod.POST)
 	public Result receiveAsChannel(String uid){
@@ -701,8 +693,6 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/**
 	 * 上传excel文档
-	 * @param req
-	 * @return
 	 */
 	@RequestMapping(value = "/uploadExcel",method = RequestMethod.POST)
 	public Result uploadExcel(HttpServletRequest req){
@@ -722,12 +712,12 @@ public class AdminCustomerApiController extends BaseApiController{
 				Set<Integer> existRows = new TreeSet<Integer>(); //数据库已存在
 				Set<Integer> filterRows = new TreeSet<Integer>(); //过滤提示
 				customerService.checkCustomer(boSet,existRows,filterRows);
-				if(existRows.size()>0){
+				if(!existRows.isEmpty()){
 					errorMessage = StringUtils.join(existRows.toArray(),",")+ " 行客户业务已存在;";
 					res.getError().add(new Error(errorMessage));
 					return res;
 				}
-				if(filterRows.size()>0){
+				if(!filterRows.isEmpty()){
 					errorMessage = StringUtils.join(filterRows.toArray(),",")+ " 行已经被系统过滤;";
 					res.getError().add(new Error(errorMessage));
 					return res;
@@ -770,9 +760,6 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/**
 	 * 转为公共客户 释放客户
-	 * @param uid
-	 * @param aid
-	 * @return
 	 */
 	@RequestMapping(value = "/transferToPublic", method = RequestMethod.GET)
 	public Result transferToPublic(String uid,String aid){
@@ -800,8 +787,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param depNo 部门编号
 	 * @param pageNo 页码
 	 * @param pageSize 页数
-	 * @return
-	 * @throws ParseException
 	 */
 	@RequestMapping(value = "/customerStatistics",method = RequestMethod.GET)
 	public Result customerStatistics(String startDate,String endDate,String timeSpan,String depNo,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
@@ -813,17 +798,23 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(StringUtils.isNotBlank(endDate)) eDate = format.parse(endDate);
 		if(StringUtils.isBlank(startDate)&&StringUtils.isBlank(endDate)){
 			Date date = new Date();
-			if(timeSpan.equals(DateUtils.DAY_SPAN)){
-				sDate = DateUtils.getYesterday();
-			}else if(timeSpan.equals(DateUtils.WEEK_SPAN)){
-				sDate = DateUtils.getLastDayOfLastWeek(date);
-			}else if(timeSpan.equals(DateUtils.MONTH_SPAN)){
-				sDate = DateUtils.getLastDayOfLastMonth(date);
-			}else if(timeSpan.equals(DateUtils.QUARTER_SPAN)){
-				sDate = DateUtils.getLastDayOfLastQuarter(date);
-			}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
-				sDate = DateUtils.getLastDayOfLastYear(date);
-			}
+            switch (timeSpan) {
+                case DateUtils.DAY_SPAN:
+                    sDate = DateUtils.getYesterday();
+                    break;
+                case DateUtils.WEEK_SPAN:
+                    sDate = DateUtils.getLastDayOfLastWeek(date);
+                    break;
+                case DateUtils.MONTH_SPAN:
+                    sDate = DateUtils.getLastDayOfLastMonth(date);
+                    break;
+                case DateUtils.QUARTER_SPAN:
+                    sDate = DateUtils.getLastDayOfLastQuarter(date);
+                    break;
+                case DateUtils.YEAR_SPAN:
+                    sDate = DateUtils.getLastDayOfLastYear(date);
+                    break;
+            }
 		}
 		res.setData(customerService.customerStatistics(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
 		return res;
@@ -838,8 +829,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param businessGlossoryId 业务编号
 	 * @param pageNo 页码
 	 * @param pageSize 页数
-	 * @return
-	 * @throws ParseException
 	 */
 	@RequestMapping(value = "/businessStatistic", method = RequestMethod.GET)
 	public Result businessStatistic(String startDate,String endDate,String timeSpan,String depNo,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
@@ -851,17 +840,23 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(StringUtils.isNotBlank(endDate)) eDate = format.parse(endDate);
 		if(StringUtils.isBlank(startDate)&&StringUtils.isBlank(endDate)){
 			Date date = new Date();
-			if(timeSpan.equals(DateUtils.DAY_SPAN)){
-				sDate = DateUtils.getYesterday();
-			}else if(timeSpan.equals(DateUtils.WEEK_SPAN)){
-				sDate = DateUtils.getLastDayOfLastWeek(date);
-			}else if(timeSpan.equals(DateUtils.MONTH_SPAN)){
-				sDate = DateUtils.getLastDayOfLastMonth(date);
-			}else if(timeSpan.equals(DateUtils.QUARTER_SPAN)){
-				sDate = DateUtils.getLastDayOfLastQuarter(date);
-			}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
-				sDate = DateUtils.getLastDayOfLastYear(date);
-			}
+            switch (timeSpan) {
+                case DateUtils.DAY_SPAN:
+                    sDate = DateUtils.getYesterday();
+                    break;
+                case DateUtils.WEEK_SPAN:
+                    sDate = DateUtils.getLastDayOfLastWeek(date);
+                    break;
+                case DateUtils.MONTH_SPAN:
+                    sDate = DateUtils.getLastDayOfLastMonth(date);
+                    break;
+                case DateUtils.QUARTER_SPAN:
+                    sDate = DateUtils.getLastDayOfLastQuarter(date);
+                    break;
+                case DateUtils.YEAR_SPAN:
+                    sDate = DateUtils.getLastDayOfLastYear(date);
+                    break;
+            }
 		}
 		res.setData(customerService.businessStatistic(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
 		return res;
@@ -875,8 +870,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param depNo 部门编号
 	 * @param pageNo 页码
 	 * @param pageSize 页数
-	 * @return
-	 * @throws ParseException
 	 */
 
 	@RequestMapping(value = "/followStatistic",method = RequestMethod.GET)
@@ -889,17 +882,23 @@ public class AdminCustomerApiController extends BaseApiController{
 		if(StringUtils.isNotBlank(endDate)) eDate = format.parse(endDate);
 		if(StringUtils.isBlank(startDate)&&StringUtils.isBlank(endDate)){
 			Date date = new Date();
-			if(timeSpan.equals(DateUtils.DAY_SPAN)){
-				sDate = DateUtils.getYesterday();
-			}else if(timeSpan.equals(DateUtils.WEEK_SPAN)){
-				sDate = DateUtils.getLastDayOfLastWeek(date);
-			}else if(timeSpan.equals(DateUtils.MONTH_SPAN)){
-				sDate = DateUtils.getLastDayOfLastMonth(date);
-			}else if(timeSpan.equals(DateUtils.QUARTER_SPAN)){
-				sDate = DateUtils.getLastDayOfLastQuarter(date);
-			}else if(timeSpan.equals(DateUtils.YEAR_SPAN)){
-				sDate = DateUtils.getLastDayOfLastYear(date);
-			}
+            switch (timeSpan) {
+                case DateUtils.DAY_SPAN:
+                    sDate = DateUtils.getYesterday();
+                    break;
+                case DateUtils.WEEK_SPAN:
+                    sDate = DateUtils.getLastDayOfLastWeek(date);
+                    break;
+                case DateUtils.MONTH_SPAN:
+                    sDate = DateUtils.getLastDayOfLastMonth(date);
+                    break;
+                case DateUtils.QUARTER_SPAN:
+                    sDate = DateUtils.getLastDayOfLastQuarter(date);
+                    break;
+                case DateUtils.YEAR_SPAN:
+                    sDate = DateUtils.getLastDayOfLastYear(date);
+                    break;
+            }
 		}
 		res.setData(customerService.followStatistic(sDate, eDate, depNo, pageNo, pageSize));
 		return res;
@@ -909,7 +908,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * 管理员列表
 	 * @param adminName 名称
 	 * @param status 0 正常 1锁定 2全部
-	 * @return
 	 */
 	@RequestMapping(value = "/listAdminByName",method = RequestMethod.GET)
 	public Result listAdminByName(String adminName,Integer status){
@@ -922,11 +920,8 @@ public class AdminCustomerApiController extends BaseApiController{
 	/**
 	 * 客户转交 私有客户转交,签单客户转交
 	 * @param uid 用户编号
-	 * @param aid
 	 * @param operatorType 3私有 4签单
-	 * @param oldAid
 	 * @param data 资料同步转移 0无 1资料转交 2订单转交 3全部转交
-	 * @return
 	 */
 	@RequestMapping(value = "/transferToOther", method = RequestMethod.GET)
 	public Result transferToOther(String uid,String aid,Integer operatorType,Integer data,String oldAid){
@@ -938,7 +933,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		//默认为私有转交,4为签单转交
 		if (operatorType==null) operatorType=AFTConstants.USER_TRANSFER_TO_OTHER;
 		//转交,对方不是客服营销员才需要判断最大限制
-		if (operatorType ==AFTConstants.USER_TRANSFER_TO_OTHER&&(!customerService.checkAid(aid,Integer.valueOf(AFTConstants.CUSTOMER_SERVICE_SALESMAN)))){
+		if (operatorType.equals(AFTConstants.USER_TRANSFER_TO_OTHER) &&(!customerService.checkAid(aid,Integer.valueOf(AFTConstants.CUSTOMER_SERVICE_SALESMAN)))){
 			if (customerService.checkMax(uid,aid)){
 				res.getError().add(buildError("","对方私有客户已达最大限制"));
 				return res;
@@ -953,7 +948,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	/**
 	   *   客户转交记录
 	 * @param uid 客户编号
-	 * @return
 	 */
 	@RequestMapping(value = "/transferList", method = RequestMethod.GET)
 	public Result transferList(String uid){
@@ -1323,12 +1317,9 @@ public class AdminCustomerApiController extends BaseApiController{
 	/**
 	 * 企业项目申报材料上传
 	 *
-	 * @param req
-	 * @param uid
-	 * @return
 	 */
 	@RequestMapping(value = "/upload", method = RequestMethod.POST)
-	public Result cognizanceFile(HttpServletRequest req, String uid, String id, String sign) {
+	public Result cognizanceFile(HttpServletRequest req, String uid, String sign) {
 		Result res = new Result();
 		AttachmentType attachmentType = AttachmentType.getField(sign);
 		if (attachmentType == AttachmentType.ORGANIZATION_APPLICATION) {
@@ -1341,10 +1332,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		/**
 	 *  企业项目申报材料预览授权
 	 *
-	 * @param id
-	 * @param sign
-	 * @return
-	 */
+         */
 	@RequestMapping(value = "/techProject", method = RequestMethod.GET)
 	public Result previewTechProject(String id, String sign) {
 		Result res = new Result();
@@ -1364,12 +1352,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	}
 	/**
 	 * 查看营销员客户统计
-	 * @param depId
-	 * @param startTime
-	 * @param endTime
-	 * @param pageSize
-	 * @param pageNo
-	 * @return
 	 */
 	@RequestMapping(value = "/selectAdminCustomerStatistics", method = RequestMethod.GET)
 	public Result selectAdminCustomerstatistics(String depId, String startTime,String endTime, Integer pageSize, Integer pageNo) {
@@ -1383,7 +1365,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param depId 部门编号
 	 * @param startTime 开始时间
 	 * @param endTime	结束时间
-	 * @return
 	 */
 	@RequestMapping(value = "/selectAllUser", method = RequestMethod.GET)
 	public Result selectAllUser(String depId, String startTime,String endTime,String aName ) {
@@ -1391,6 +1372,19 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.data(adminService.selectAllUser( depId,  startTime, endTime, aName));
 		return res;
 	}
+
+
+	/**
+	 * 查看客户统计导出
+	 * @param depId 部门编号
+	 * @param startTime 开始时间
+	 * @param endTime	结束时间
+	 */
+	@RequestMapping(value = "/selectAllUser/export", method = RequestMethod.GET)
+	public Result selectAllUserExport(String depId, String startTime,String endTime,String aName ) {
+
+		return adminService.selectAllUserExport( depId,  startTime, endTime, aName);
+	}
 	/**
 	 * 查看客户日期内新增客户
 	 * @param type 0私有 1渠道 2签单 3私有新增 4渠道新增 5私有面谈 6渠道面谈 7私有领取 8 私有转交
@@ -1407,7 +1401,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param inputId 	业务转移客户id(接收者)
 	 * @param uid		被转移的客户
 	 * @param pid		呗转移的业务
-	 * @return
 	 */
 	@RequestMapping(value = "/privateBusinessTransfer", method = RequestMethod.POST)
 	public Result privateBusinessTransfer(String inputId,String uid,String pid ) {
@@ -1450,7 +1443,6 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param receiveId 接受者
 	 * @param remarks	备注
 	 * @param type	0 分配 1转交 2回退
-	 * @return
 	 */
 	@RequestMapping(value = "/channelCustomerDeliver", method = RequestMethod.POST)
 	public Result channelCustomerDeliver(String userIds ,String receiveId,String remarks,Integer type){
@@ -1482,10 +1474,8 @@ public class AdminCustomerApiController extends BaseApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,null,"uid或者名称"));
 			return res;
 		}
-		if (userName!=null){
-			userName=userName.trim();
-		}
-		if(customerService.checkUserName(uid,userName)){
+        userName = userName.trim();
+        if(customerService.checkUserName(uid,userName)){
 			res.getError().add(buildError(ErrorConstants.CUSTOMER_ALREADY_EXIST,null,"["+userName+"]"));
 			return res;
 		}
@@ -1668,4 +1658,14 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.setData(customerService.getPublicReleaseList(id));
 		return res;
 	}
+
+	/**
+	 * 客户标签未标记统计
+	 */
+	@GetMapping("/selectUserLevel")
+	public Result selectUserLevel() {
+		Result res = new Result();
+		res.setData(customerService.selectUserLevel());
+		return res;
+	}
 }

+ 27 - 0
src/main/java/com/goafanti/customer/controller/UserOutboundApiController.java

@@ -0,0 +1,27 @@
+package com.goafanti.customer.controller;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.customer.service.UserOutboundService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+
+@RestController
+@RequestMapping("/api/admin/userOutbound")
+public class UserOutboundApiController  extends BaseApiController {
+
+    @Resource
+    private UserOutboundService userOutboundService;
+    /**
+     * 客户外呼查询
+     *
+     */
+    @PostMapping("/checkUser")
+    public Result checkUser(Integer type) {
+        return new Result<>().data(this.userOutboundService.checkUser(type));
+    }
+}

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

@@ -597,4 +597,6 @@ public interface CustomerService {
 	Object getPublicReleaseList(String id);
 
 	void updateUserShareType(List<LockingReleaseBo> newList);
+
+	Object selectUserLevel();
 }

+ 5 - 0
src/main/java/com/goafanti/customer/service/UserOutboundService.java

@@ -0,0 +1,5 @@
+package com.goafanti.customer.service;
+
+public interface UserOutboundService {
+    Object checkUser(Integer type);
+}

+ 7 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -351,6 +351,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 //		user.setAid("1");
 		user.setType(in.getType());
 		user.setLvl(UserLevel.CERTIFIED.getCode());
+		user.setLevel(in.getLevel());
 		user.setSocietyTag(in.getSocietyTag());
 		user.setCreateTime(now);
 		user.setTransferTime(now);
@@ -3139,8 +3140,13 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	}
 
+    @Override
+    public Object selectUserLevel() {
+		return userMapper.selectUserLevel(TokenManager.getAdminId());
+    }
+
 
-	private List<InputExcelUser> pushUserName(List<InputExcelUser> list) {
+    private List<InputExcelUser> pushUserName(List<InputExcelUser> list) {
 		List<InputExcelUser> res=new ArrayList<>();
 		List<InputExcelUser> list2=new ArrayList<>();
 		int i = 0;

+ 4 - 0
src/main/java/com/goafanti/customer/service/impl/UserArchivesServiceImpl.java

@@ -141,6 +141,9 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
                 userArchives.setPatentCount(count);
             }
             if(userArchives.getPatentCount()==null)userArchives.setPatentCount(0);
+            Date date = new Date();
+            userArchives.setCreateTime(date);
+            userArchives.setUpdateTime(date);
             this.userArchivesMapper.insert(userArchives);
         }
         return userArchives;
@@ -177,6 +180,7 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
             return insert(userArchives);
         }else {
             addUserLog( userArchives);
+            userArchives.setUpdateTime(new Date());
             this.userArchivesMapper.update(userArchives);
             return this.queryById(userArchives.getId());
         }

+ 44 - 0
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -0,0 +1,44 @@
+package com.goafanti.customer.service.impl;
+
+import com.goafanti.common.dao.UserArchivesMapper;
+import com.goafanti.common.utils.HttpUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.customer.service.UserOutboundService;
+import org.apache.shiro.crypto.hash.SimpleHash;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Service("userOutboundService")
+public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper> implements UserOutboundService {
+    static final String customer="C322";
+    static final String seq="20241101";
+    static final String pwd="084332D02CCF7B42461F34155AC8754F";
+    static final String version= "2.0.6";
+    static final String default_url ="https://webmc.zb-sx.cn:1443";
+
+    @Override
+    public Object checkUser(Integer type) {
+        String url= default_url +"/openapi/"+version+"/getClientInfo";
+        Map<String,Object> param=new HashMap<>();
+        Map<String,Object> authentication=new HashMap<>();
+        authentication.put("customer","C322");
+        long timeMillis = System.currentTimeMillis();
+        authentication.put("timestamp",timeMillis);
+        authentication.put("seq",seq);
+        String digestSource=customer+"@"+timeMillis+"@"+seq+"@"+pwd;
+//        System.out.println("digestSource="+digestSource);
+        String md5 = new SimpleHash("MD5", digestSource).toHex();
+//        System.out.println("md5="+md5);
+        authentication.put("digest",md5);
+        param.put("authentication",authentication);
+        Map<String,Object> request=new HashMap<>();
+        request.put("type",type);
+        param.put("request",request);
+        HttpUtils httpUtils=new HttpUtils();
+        String s = httpUtils.sendHttpsRequest(url, "POST", param);
+        System.out.println(s);
+        return null;
+    }
+}

+ 0 - 1
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -1805,7 +1805,6 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 if(StringUtils.isNotBlank(in.getAid()))param.put("aid",in.getAid());
             }else if (TokenManager.hasRole(AFTConstants.FINANCE)){
                 //0 设置为财务查看
-
                 param.put("auditor",TokenManager.getAdminId());
                 //如果是空设置为
                 if (in.getProcessStatus()==null)in.setProcessStatus(2);

+ 11 - 4
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1416,13 +1416,13 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	public int pushExamineMemberProject(InputMenber in) {
 		TOrderTask task=tOrderTaskMapper.queryById(in.getId());
 		String aid=TokenManager.getAdminId();
-		Integer status=1;
+		int status=1;
 		boolean appFlag=false;
 		//是否财务审核加复审
 		boolean flag=false;
 		TOrderTask nt=new TOrderTask();
 		nt.setId(task.getId());
-		Integer result=0;
+		int result=0;
 		Integer notice=NoticeStatus.MENBER_YES.getCode();
 		TOrderNewBo ono = tOrderNewMapper.getSaleIdByOno(task.getOrderNo());
 		TTaskMember tTaskMember = tTaskMemberMapper.selectByTid(in.getId());
@@ -1432,7 +1432,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			if (in.getType()==0){
 				if(task.getProcessStatus()!=1)throw  new BusinessException("审核状态错误");
 				List<TOrderExamine> list = tOrderExamineMapper.selectByTid(task.getId());
-				list.stream().forEach(e ->{
+				list.forEach(e ->{
 					if (e.getAid().equals(aid)){
 						TOrderExamine te=new TOrderExamine();
 						te.setId(e.getId());
@@ -1718,7 +1718,14 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				if (result==1) {
 					admins = MemberEnd(b);
 				}else{
-					admins=adminMapper.getAdminRoleTypeList(AFTConstants.CED);
+					//通知总裁改成特批审核人
+					//admins=adminMapper.getAdminRoleTypeList(AFTConstants.CED);
+					Department department = tOrderNewMapper.selectDepByOrderNo(b.getOrderNo());
+					//部门设置无需特批的情况下直接完成,否则走正常流程
+					if (department.getApproval()==1){
+
+						admins.add(adminMapper.selectByPrimaryKey(department.getApprovalAid()));
+					}
 				}
 			} else if(shiroType==1){
 				sb=sb.append("特批已通过。");

+ 1 - 5
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -441,12 +441,8 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		//切换财务审核与财务复审
 		if (in.getExpenseFinanceId()!=null&&!in.getExpenseFinanceId().equals(useDep.getExpenseFinanceId())){
 			//如果新的财务审核人与旧财务审核人不一致,切换审核人
-			adminMapper.updateDepExpenseFinance(in.getId(),in.getExpenseFinanceId());
-		}
-
-		if (in.getExpenseFinanceId()!=null&&!in.getExpenseFinanceId().equals(useDep.getExpenseFinanceId())){
 			dep.setExpenseFinanceId(in.getExpenseFinanceId());
-			departmentMapper.updateExpenseFinanceNotExamine(in.getExpenseFinanceId(), useDep.getExpenseFinanceId());
+			adminMapper.updateDepExpenseFinance(in.getId(),in.getExpenseFinanceId());
 		}
 		if (updateFinance){
 			aids.add(in.getFinanceId());

+ 28 - 0
src/main/java/com/goafanti/user/bo/InputListOrderUserService.java

@@ -23,9 +23,37 @@ public class InputListOrderUserService {
 	private String startSignTimes;
 	private String endSignTimes;
 	private String contractNo;
+	private Integer addGroupChat;
+	private String addGroupChatTimeStart;
+	private String addGroupChatTimeEnd;
 	private Integer pageSize;
 	private Integer pageNo;
 
+
+	public String getAddGroupChatTimeStart() {
+		return addGroupChatTimeStart;
+	}
+
+	public void setAddGroupChatTimeStart(String addGroupChatTimeStart) {
+		this.addGroupChatTimeStart = addGroupChatTimeStart;
+	}
+
+	public String getAddGroupChatTimeEnd() {
+		return addGroupChatTimeEnd;
+	}
+
+	public void setAddGroupChatTimeEnd(String addGroupChatTimeEnd) {
+		this.addGroupChatTimeEnd = addGroupChatTimeEnd;
+	}
+
+	public Integer getAddGroupChat() {
+		return addGroupChat;
+	}
+
+	public void setAddGroupChat(Integer addGroupChat) {
+		this.addGroupChat = addGroupChat;
+	}
+
 	public String getContractNo() {
 		return contractNo;
 	}

+ 12 - 1
src/main/java/com/goafanti/user/bo/InputUserServiceFollow.java

@@ -8,10 +8,21 @@ public class InputUserServiceFollow extends UserServiceFollow{
 	 * 
 	 */
 	private static final long serialVersionUID = 1L;
-	
+
+	/**
+	 * 是否加群 0=否,1=是
+	 */
+	private Integer addGroupChat;
 	
 	private String renewalTimes;
 
+	public Integer getAddGroupChat() {
+		return addGroupChat;
+	}
+
+	public void setAddGroupChat(Integer addGroupChat) {
+		this.addGroupChat = addGroupChat;
+	}
 
 	public String getRenewalTimes() {
 		return renewalTimes;

+ 27 - 5
src/main/java/com/goafanti/user/bo/OutOrderUserService.java

@@ -1,9 +1,11 @@
 package com.goafanti.user.bo;
 
-import java.util.List;
-
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.goafanti.common.utils.excel.Excel;
 
+import java.util.Date;
+import java.util.List;
+
 
 public class OutOrderUserService {
 	@Excel(name = "订单编号")
@@ -49,11 +51,31 @@ public class OutOrderUserService {
 	private Integer techSatisfaction;
 	@Excel(name = "业务端满意度",readConverterExp = "0=已投诉,1=不满意,2=一般满意,3=非常满意")
 	private Integer businessSatisfaction;
+	@Excel(name = "是否入群",readConverterExp = "0=否,1=是")
+	private Integer addGroupChat;
+	@Excel(name = "入群时间")
+	private Date addGroupChatTime;
 	private String uid;
 	private List<OrderProject> list;
-	
-	
-	
+
+	@JsonFormat(pattern = "yyyy-MM-dd" ,timezone = "GMT+8")
+	public Date getAddGroupChatTime() {
+		return addGroupChatTime;
+	}
+
+	public void setAddGroupChatTime(Date addGroupChatTime) {
+		this.addGroupChatTime = addGroupChatTime;
+	}
+
+	public Integer getAddGroupChat() {
+		if (addGroupChat==null)return 0;
+		return addGroupChat;
+	}
+
+	public void setAddGroupChat(Integer addGroupChat) {
+		this.addGroupChat = addGroupChat;
+	}
+
 	public Integer getTechSatisfaction() {
 		return techSatisfaction;
 	}

+ 22 - 10
src/main/java/com/goafanti/user/controller/UserServiceApiController.java

@@ -1,15 +1,5 @@
 package com.goafanti.user.controller;
 
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
@@ -18,6 +8,13 @@ import com.goafanti.user.bo.InputListOrderUserService;
 import com.goafanti.user.bo.InputUserServiceFollow;
 import com.goafanti.user.bo.OutOrderUserService;
 import com.goafanti.user.service.UserServiceService;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
 
 @RestController
 @RequestMapping(value = "/api/admin")
@@ -41,6 +38,21 @@ public class UserServiceApiController extends BaseApiController {
 		return res;
 	}
 
+	/**
+	 * 修改用户是否入群
+	 * @param us
+	 * @return
+	 */
+	@RequestMapping(value = "/updateUseService",method = RequestMethod.POST)
+	public Result updateUseService(InputUserServiceFollow us) {
+		Result res =new Result();
+		if(us.getUid()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "用户编号"));
+		}
+		res.data(userServiceService.updateUseService(us));
+		return res;
+	}
+
 
 	@RequestMapping(value = "/listUseServiceFollow",method = RequestMethod.GET)
 	public Result listUseServiceFollow(String uid) {

+ 3 - 3
src/main/java/com/goafanti/user/service/UserServiceService.java

@@ -1,13 +1,13 @@
 package com.goafanti.user.service;
 
-import java.util.List;
-
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.InputListOrderUserService;
 import com.goafanti.user.bo.InputUserServiceFollow;
 import com.goafanti.user.bo.OutOrderUserService;
 import com.goafanti.user.bo.OutUserServiceFollow;
 
+import java.util.List;
+
 public interface UserServiceService {
 
 	int addUseService(InputUserServiceFollow us);
@@ -22,5 +22,5 @@ public interface UserServiceService {
 	List<OutOrderUserService> listOrderUseServiceGetList(InputListOrderUserService i);
 
 
-
+	int updateUseService(InputUserServiceFollow us);
 }

+ 9 - 9
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -112,7 +112,6 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		return userMapper.selectUserDownLoadBoByUserId(id);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<OrgListBo> selectUserByAid(Integer number, String mobile, Integer auditStatus, String auditName,
 			String email, String aid, String startCreateTime, String endCreateTime, Integer type, Integer pageNo,
@@ -120,17 +119,20 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		Map<String, Object> params = new HashMap<>();
 
 		if (StringUtils.isNotBlank(startCreateTime)) {
-			try {
-				params.put("startCreateTime", DateUtils.parseDate(startCreateTime, AFTConstants.YYYYMMDD));
-			} catch (ParseException e) {
-			}
-		}
+            try {
+                params.put("startCreateTime", DateUtils.parseDate(startCreateTime, AFTConstants.YYYYMMDD));
+            } catch (ParseException e) {
+                throw new RuntimeException(e);
+            }
+
+        }
 
 		if (StringUtils.isNotBlank(endCreateTime)) {
 			try {
 				params.put("endCreateTime",
 						DateUtils.addDays(DateUtils.parseDate(endCreateTime, AFTConstants.YYYYMMDD), 1));
 			} catch (ParseException e) {
+				throw new RuntimeException(e);
 			}
 		}
 
@@ -231,7 +233,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 
 	private Map<String, String> disposeAchievementUserOwner(List<UserNames> list) {
 		Map<String, String> map = new HashMap<>();
-		if (null != list && list.size() > 0) {
+		if (null != list && !list.isEmpty()) {
 			for (UserNames u : list) {
 				map.put(u.getUid(), u.getUsername() + " " + u.getMobile());
 			}
@@ -259,7 +261,6 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		return userMapper.findOrgPartnerDetail(uid);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<StarListBo> listStar(Integer number, String engagedField, String username,
 			String professionalTitle, String workUnit, Integer pNo, Integer pSize) {
@@ -295,7 +296,6 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		return (Pagination<StarListBo>) findPage("findStarListByPage", "findStarCount", params, pNo, pSize);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<StarAndExpertListBo> listStarAndExpert(Integer number, String engagedField, String username,
 			String professionalTitle, String workUnit, Integer pNo, Integer pSize) {

+ 34 - 16
src/main/java/com/goafanti/user/service/impl/UserServiceServiceImpl.java

@@ -13,9 +13,9 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.*;
 import com.goafanti.user.service.UserServiceService;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -24,11 +24,11 @@ import java.util.Map;
 @Service
 public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> implements UserServiceService {
 
-	@Autowired
+	@Resource
 	private UserServiceMapper userServiceMapper;
-	@Autowired
+	@Resource
 	private UserServiceFollowMapper userServiceFollowMapper;
-	@Autowired
+	@Resource
 	private DepartmentService departmentService;
 
 	@Override
@@ -49,7 +49,7 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		}else {
 			u.setId(id);
 			u.setCreateTime(null);
-			userServiceMapper.updateByPrimaryKeySelective(u);
+			userServiceMapper.update(u);
 		}
 		return 1;
 	}
@@ -59,7 +59,6 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		return userServiceFollowMapper.listUseServiceFollow(uid);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<OutOrderUserService> listOrderUseService(InputListOrderUserService i) {
 		Map<String, Object> map = setParams(i);
@@ -70,7 +69,7 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 	}
 
 	private Map<String, Object> setParams(InputListOrderUserService i) {
-		Map<String, Object>map =new HashMap<String, Object>();
+		Map<String, Object>map =new HashMap<>();
 		if(i.getUserName()!=null)map.put("userName", i.getUserName());
 		if(i.getDeps()!=null)map.put("deps", departmentService.parseArray(i.getDeps()));
 		if(i.getStartFollowTimes()!=null)map.put("startFollowTimes", i.getStartFollowTimes());
@@ -80,10 +79,12 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		if(i.getAddWechat()!=null)map.put("addWechat", i.getAddWechat());
 		if(i.getRenewal()!=null)map.put("renewal", i.getRenewal());
 		if (i.getContractNo()!=null)map.put("contractNo", i.getContractNo());
+		if (i.getAddGroupChat()!=null)map.put("addGroupChat", i.getAddGroupChat());
+		if (i.getAddGroupChatTimeStart()!=null)map.put("addGroupChatTimeStart", i.getAddGroupChatTimeStart());
+		if (i.getAddGroupChatTimeEnd()!=null)map.put("addGroupChatTimeEnd", i.getAddGroupChatTimeEnd()+" 23:59:59");
 		return map;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public List<OutOrderUserService> listOrderUseServiceGetList(InputListOrderUserService i) {
 		Map<String, Object> map = setParams(i);
@@ -93,12 +94,33 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		return list;
 	}
 
+	@Override
+	public int updateUseService(InputUserServiceFollow us) {
+		UserService update =new UserService();
+		Integer id=userServiceMapper.selectByUid(us.getUid());
+		update.setUid(us.getUid());
+		update.setAddGroupChat(us.getAddGroupChat());
+		Date date = new Date();
+		if (update.getAddGroupChat()==1){
+			update.setAddGroupChatTime(date);
+		}
+		if (id==null) {
+			update.setCreateTime(date);
+			update.setNewTime(date);
+			userServiceMapper.insertSelective(update);
+		}else {
+			update.setId(id);
+			userServiceMapper.update(update);
+		}
+		return 1;
+	}
+
 	private void setOrderUserService(List<OutOrderUserService> list) {
 		for (OutOrderUserService ou: list) {
-			StringBuffer projects=new StringBuffer();
-			StringBuffer consultants=new StringBuffer();
-			StringBuffer declareBatchs=new StringBuffer();
-			StringBuffer certificationNos=new StringBuffer();
+			StringBuilder projects=new StringBuilder();
+			StringBuilder consultants=new StringBuilder();
+			StringBuilder declareBatchs=new StringBuilder();
+			StringBuilder certificationNos=new StringBuilder();
 			for (OrderProject o : ou.getList()) {
 				if (StringUtils.isNotBlank(o.getCommodityName())) {
 					projects.append(o.getCommodityName());
@@ -106,28 +128,24 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 					projects.append("无");
 				}
 				projects.append("/");
-
 				if (StringUtils.isNotBlank(o.getReceiverName())) {
 					consultants.append(o.getReceiverName());
 				} else {
 					consultants.append("无");
 				}
 				consultants.append("/");
-
 				if (o.getDeclarationBatch() != null) {
 					declareBatchs.append(o.getDeclarationBatch());
 				} else {
 					declareBatchs.append("无");
 				}
 				declareBatchs.append("/");
-
 				if (StringUtils.isNotBlank(o.getCertificateNumber())) {
 					certificationNos.append(o.getCertificateNumber());
 				} else {
 					certificationNos.append("无");
 				}
 				certificationNos.append("/");
-
 			}
 			if(projects.length()>1)ou.setProjects(projects.substring(0, projects.length()-1));
 			if(consultants.length()>1)ou.setConsultants(consultants.substring(0, consultants.length()-1));

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

@@ -1,8 +1,8 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-static.host=//static.jishutao.com/1.3.26
-#static.host=//172.16.1.187/1.3.26
+#static.host=//static.jishutao.com/1.3.27
+static.host=//172.16.1.187/1.3.27
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20240430?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false

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

@@ -1,5 +1,5 @@
 dev.name=test
-static.host=//static.jishutao.com/1.3.26
+static.host=//static.jishutao.com/1.3.27
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 jdbc.url=jdbc:mysql://127.0.0.1:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false