Browse Source

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

anderx 1 year ago
parent
commit
42af4b22a8
85 changed files with 5486 additions and 995 deletions
  1. 16 0
      src/main/java/com/goafanti/admin/bo/AdminPublicReviewerBo.java
  2. 16 2
      src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java
  3. 5 4
      src/main/java/com/goafanti/admin/service/NewAdminService.java
  4. 61 12
      src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java
  5. 12 6
      src/main/java/com/goafanti/common/bo/EmailBo.java
  6. 1 1
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  7. 88 0
      src/main/java/com/goafanti/common/dao/AdminPublicReviewerMapper.java
  8. 2 0
      src/main/java/com/goafanti/common/dao/ExpenseAccountExamineMapper.java
  9. 5 0
      src/main/java/com/goafanti/common/dao/ExpenseAccountMapper.java
  10. 2 2
      src/main/java/com/goafanti/common/dao/OrganizationContactBookMapper.java
  11. 93 0
      src/main/java/com/goafanti/common/dao/PublicAssistAdviceMapper.java
  12. 1 0
      src/main/java/com/goafanti/common/dao/PublicReleaseDetailsMapper.java
  13. 4 4
      src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java
  14. 87 8
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  15. 87 0
      src/main/java/com/goafanti/common/dao/UserArchivesMapper.java
  16. 1 1
      src/main/java/com/goafanti/common/dao/UserFollowMapper.java
  17. 86 0
      src/main/java/com/goafanti/common/dao/UserLimitCheckMapper.java
  18. 3 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  19. 87 0
      src/main/java/com/goafanti/common/dao/UserSuperEvaluateMapper.java
  20. 9 0
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  21. 129 0
      src/main/java/com/goafanti/common/mapper/AdminPublicReviewerMapper.xml
  22. 1 0
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  23. 6 0
      src/main/java/com/goafanti/common/mapper/ExpenseAccountExamineMapper.xml
  24. 18 2
      src/main/java/com/goafanti/common/mapper/ExpenseAccountMapper.xml
  25. 7 3
      src/main/java/com/goafanti/common/mapper/OrganizationContactBookMapper.xml
  26. 150 0
      src/main/java/com/goafanti/common/mapper/PublicAssistAdviceMapper.xml
  27. 7 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseDetailsMapper.xml
  28. 760 394
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  29. 1 1
      src/main/java/com/goafanti/common/mapper/RestrictProjectMapper.xml
  30. 245 0
      src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml
  31. 4 2
      src/main/java/com/goafanti/common/mapper/UserFollowMapper.xml
  32. 124 0
      src/main/java/com/goafanti/common/mapper/UserLimitCheckMapper.xml
  33. 121 1
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  34. 1 1
      src/main/java/com/goafanti/common/mapper/UserNamesMapper.xml
  35. 109 0
      src/main/java/com/goafanti/common/mapper/UserSuperEvaluateMapper.xml
  36. 79 0
      src/main/java/com/goafanti/common/model/AdminPublicReviewer.java
  37. 7 0
      src/main/java/com/goafanti/common/model/OrderYearMaxDuration.java
  38. 91 0
      src/main/java/com/goafanti/common/model/PublicAssistAdvice.java
  39. 22 286
      src/main/java/com/goafanti/common/model/PublicRelease.java
  40. 197 0
      src/main/java/com/goafanti/common/model/UserArchives.java
  41. 62 0
      src/main/java/com/goafanti/common/model/UserLimitCheck.java
  42. 8 0
      src/main/java/com/goafanti/common/model/UserMid.java
  43. 77 0
      src/main/java/com/goafanti/common/model/UserSuperEvaluate.java
  44. 1 1
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  45. 2 2
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  46. 38 26
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  47. 7 1
      src/main/java/com/goafanti/common/utils/DateUtils.java
  48. 49 1
      src/main/java/com/goafanti/common/utils/WeChatUtils.java
  49. 94 0
      src/main/java/com/goafanti/customer/bo/InputUserData.java
  50. 39 0
      src/main/java/com/goafanti/customer/bo/MyUserDetailsBo.java
  51. 37 0
      src/main/java/com/goafanti/customer/bo/OutChannelListBo.java
  52. 16 0
      src/main/java/com/goafanti/customer/bo/OutUserSuperEvaluate.java
  53. 248 0
      src/main/java/com/goafanti/customer/bo/PublicReleaseListBo.java
  54. 63 0
      src/main/java/com/goafanti/customer/bo/SelectMyUserBo.java
  55. 138 0
      src/main/java/com/goafanti/customer/bo/SelectMyUserOut.java
  56. 100 0
      src/main/java/com/goafanti/customer/bo/UserArchivesDetails.java
  57. 49 11
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  58. 121 0
      src/main/java/com/goafanti/customer/controller/UserArchivesController.java
  59. 92 0
      src/main/java/com/goafanti/customer/controller/UserSuperEvaluateController.java
  60. 7 2
      src/main/java/com/goafanti/customer/service/CustomerService.java
  61. 54 0
      src/main/java/com/goafanti/customer/service/UserArchivesService.java
  62. 55 0
      src/main/java/com/goafanti/customer/service/UserSuperEvaluateService.java
  63. 122 77
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  64. 204 0
      src/main/java/com/goafanti/customer/service/impl/UserArchivesServiceImpl.java
  65. 86 0
      src/main/java/com/goafanti/customer/service/impl/UserSuperEvaluateServiceImpl.java
  66. 8 0
      src/main/java/com/goafanti/expenseAccount/bo/MainExpenseAccount.java
  67. 2 2
      src/main/java/com/goafanti/expenseAccount/controller/ExpenseAccountController.java
  68. 37 10
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java
  69. 3 3
      src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java
  70. 1 1
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  71. 1 5
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  72. 16 2
      src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java
  73. 1 2
      src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java
  74. 24 0
      src/main/java/com/goafanti/test/controller/TestController.java
  75. 4 2
      src/main/java/com/goafanti/weChat/bo/InputPublicReleaseList.java
  76. 10 0
      src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java
  77. 28 0
      src/main/java/com/goafanti/weChat/bo/OutPublicReleaseList.java
  78. 85 17
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  79. 89 0
      src/main/java/com/goafanti/weChat/controller/PublicAssistAdviceController.java
  80. 48 0
      src/main/java/com/goafanti/weChat/controller/service/PublicAssistAdviceService.java
  81. 82 0
      src/main/java/com/goafanti/weChat/controller/service/impl/PublicAssistAdviceServiceImpl.java
  82. 12 8
      src/main/java/com/goafanti/weChat/service/PublicReleaseService.java
  83. 519 90
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  84. 1 1
      src/main/resources/props/config_local.properties
  85. 1 1
      src/main/resources/props/config_test.properties

+ 16 - 0
src/main/java/com/goafanti/admin/bo/AdminPublicReviewerBo.java

@@ -0,0 +1,16 @@
+package com.goafanti.admin.bo;
+
+import com.goafanti.common.model.AdminPublicReviewer;
+
+public class AdminPublicReviewerBo extends AdminPublicReviewer {
+
+    private String reviewerName;
+
+    public String getReviewerName() {
+        return reviewerName;
+    }
+
+    public void setReviewerName(String reviewerName) {
+        this.reviewerName = reviewerName;
+    }
+}

+ 16 - 2
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -120,7 +120,8 @@ public class AdminSuperviserApiController extends CertifyApiController {
 	 * 修改管理员信息
 	 */
 	@RequestMapping(value = "/updateAdmin", method = RequestMethod.POST)
-	public Result updateAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data) {
+	public Result updateAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data,
+							  String publicReviewerIds,String assistReviewerIds) {
 		Result res = new Result();
 		JSONObject jo = (JSONObject) JSON.parse(data);
 		List<String> roles = new ArrayList<String>();
@@ -173,7 +174,7 @@ public class AdminSuperviserApiController extends CertifyApiController {
 			if (!useAdmin.getStatus().equals(ad.getStatus())&&!ad.getStatus().equals("0")){
 				redisUtil.deleteAid(aa.getId());
 			}
-			res.setData(newAdminService.updateByPrimaryKeySelective(ad,useAdmin, roles));
+			res.setData(newAdminService.updateByPrimaryKeySelective(ad,useAdmin, roles,publicReviewerIds,assistReviewerIds));
 		}
 		return res;
 	}
@@ -319,6 +320,19 @@ public class AdminSuperviserApiController extends CertifyApiController {
 		res.setData(newAdminService.selectAllByid(id));
 		return res;
 	}
+
+	/**
+	 * 公出审核列表
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/publicReviewer", method = RequestMethod.GET)
+	public Result publicReviewer(String id){
+		Result res = new Result();
+		res.setData(newAdminService.publicReviewer(id));
+		return res;
+	}
+
 	/**删除用户**/
 	@RequestMapping(value = "/deleteById", method = RequestMethod.POST)
 	public Result deleteById(String id){

+ 5 - 4
src/main/java/com/goafanti/admin/service/NewAdminService.java

@@ -1,13 +1,13 @@
 package com.goafanti.admin.service;
 
-import java.util.List;
-import java.util.Map;
-
 import com.goafanti.admin.bo.AdminDetail;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.model.Admin;
 import com.goafanti.core.mybatis.page.Pagination;
 
+import java.util.List;
+import java.util.Map;
+
 public interface NewAdminService {
 	Pagination<AdminListBo> listAdmin(AdminListBo alb,String rid,String roleName, Integer pageNo, Integer pageSize);
 
@@ -19,7 +19,7 @@ public interface NewAdminService {
 
 	int insert(Admin ad);
 
-	int updateByPrimaryKeySelective(Admin ad,Admin useAdmin, List<String> roleIds );
+	int updateByPrimaryKeySelective(Admin ad,Admin useAdmin, List<String> roleIds ,String publicReviewerIds,String assistReviewerIds);
 
 	int updateByPrimaryKey(Admin a);
 
@@ -71,4 +71,5 @@ public interface NewAdminService {
 
 	void pushRolesName(AdminListBo i);
 
+	Object publicReviewer(String id);
 }

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

@@ -2,38 +2,39 @@ package com.goafanti.admin.service.impl;
 
 import com.goafanti.admin.bo.AdminDetail;
 import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.admin.bo.AdminPublicReviewerBo;
 import com.goafanti.admin.service.NewAdminService;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.AmbSystem;
-import com.goafanti.common.model.Role;
-import com.goafanti.common.model.UserRole;
+import com.goafanti.common.model.*;
 import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements NewAdminService {
-	@Autowired
+	@Resource
 	private AdminMapper			adminMapper;
-	@Autowired
+	@Resource
 	private UserRoleMapper		userRoleMapper;
-	@Autowired
+	@Resource
 	private AdminLocationMapper	adminLocationMapper;
-	@Autowired
+	@Resource
 	private AmbSystemMapper	ambSystemMapper;
-	@Autowired
+	@Resource
 	private RoleMapper	roleMapper;
-	@Autowired
+	@Resource
 	private AsyncUtils asyncUtils;
+	@Resource
+	private AdminPublicReviewerMapper adminPublicReviewerMapper;
 
 	@Override
 	public Pagination<AdminListBo> listAdmin(AdminListBo alb, String rid,String roleName,Integer pageNo, Integer pageSize) {
@@ -72,6 +73,17 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 	}
 
 	@Override
+	public Object publicReviewer(String id) {
+		List<AdminPublicReviewerBo> list = adminPublicReviewerMapper.selectByAid(id);
+		List<AdminPublicReviewerBo> collect = list.stream().filter(e -> e.getType() == 0).collect(Collectors.toList());
+		List<AdminPublicReviewerBo> collect2 = list.stream().filter(e -> e.getType() == 1).collect(Collectors.toList());
+		Map<String, Object> map = new HashMap<>();
+			map.put("publicReviewer", collect);
+			map.put("assistReviewer", collect2);
+		return map;
+	}
+
+	@Override
 	public List<Admin> selectAllAdmin() {
 		return adminMapper.selectAllAdmin(null);
 	}
@@ -93,7 +105,7 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 
 	@SuppressWarnings("unused")
 	@Override
-	public int updateByPrimaryKeySelective(Admin ad,Admin useAdmin, List<String> roleIds) {
+	public int updateByPrimaryKeySelective(Admin ad,Admin useAdmin, List<String> roleIds,String publicReviewerIds,String assistReviewerIds) {
 		Map<String, Object> params = new HashMap<>();
 		params.put("uid", ad.getId());
 		params.put("roles", roleIds);
@@ -110,6 +122,9 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		int count=adminMapper.updateByPrimaryKey(ad);
 		//
 		asyncUtils.pushRoleUpdateExamine(ad,useAdmin,roleIds,useRole);
+		//修改公出审核人
+		if(publicReviewerIds!=null)updatePublicReviewer(ad.getId(),publicReviewerIds,0);
+		if(assistReviewerIds!=null)updatePublicReviewer(ad.getId(),assistReviewerIds,1);
 		pushAmbRole(ad);
 		if (count>0&&ad.getAmbId()!=null){
 			//进行巴人数计算
@@ -122,7 +137,41 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		return count;
 	}
 
+	private void updatePublicReviewer(String aid ,String reviewerIds,Integer type) {
+		String[] split = reviewerIds.split(",");
+		List<AdminPublicReviewerBo> list = adminPublicReviewerMapper.selectByAid(aid);
+		if (type==0)list=list.stream().filter(e -> e.getType() == 0).collect(Collectors.toList());
+		else list=list.stream().filter(e -> e.getType() == 1).collect(Collectors.toList());
+		//
+		for (AdminPublicReviewerBo e : list) {
+			boolean flag = false;
+			for (String s : split) {
+				if (e.getReviewerId().equals(s)){
+					flag = true;
+				}
+			}
+			if (!flag){
+				adminPublicReviewerMapper.deleteById(e.getId());
+			}
+		}
+		for (String s : split) {
+			boolean flag = false;
+			for (AdminPublicReviewerBo e : list) {
+				if (e.getReviewerId().equals(s)){
+					flag = true;
+				}
+			}
+			if (!flag&&StringUtils.isNotBlank(s)){
+				AdminPublicReviewer adminPublicReviewer = new AdminPublicReviewer();
+				adminPublicReviewer.setAid(aid);
+				adminPublicReviewer.setReviewerId(s);
+				adminPublicReviewer.setType(type);
+				adminPublicReviewer.setCreateTime(new Date());
+				adminPublicReviewerMapper.insert(adminPublicReviewer);
+			}
+		}
 
+	}
 
 
 	private int sumType(List<String > roleIds) {

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

@@ -59,7 +59,6 @@ public class EmailBo {
 	 * @param amount
 	 * @param date
 	 */
-
 	public  EmailBo(String subject, String address, String addressee,
 			String deptname, String sender,String patentName,String patentNo,String amount,Date date) {
 		this.subject = subject;
@@ -99,8 +98,8 @@ public class EmailBo {
 		this.deptname = deptname;
 		this.sender = sender;
 		if(type==0)this.content = setGeneralFormat();
-		if(type==1)this.content=setDunFormat( addressee, sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,0);
-		if(type==2)this.content=setDunFormat( addressee, sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,1);
+		if(type==1)this.content=setDunFormat(  sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,0);
+		if(type==2)this.content=setDunFormat(  sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,1);
 	}
 
 	/**
@@ -121,8 +120,14 @@ public class EmailBo {
 		this.content = setGeneralFormat();
 	}
 
-	public  EmailBo(String subject, String address, String deptname, String sender,
-			 String orderNo,String adminName) {
+	/**
+	 *
+	 * @param subject
+	 * @param address
+	 * @param deptname
+	 * @param sender
+	 */
+	public  EmailBo(String subject, String address, String deptname, String sender) {
 		this.subject = subject;
 		this.address = address;
 		this.addressee = "";
@@ -133,6 +138,7 @@ public class EmailBo {
 	}
 
 	/**
+	 * 标准模版
 	 * 最新通用模版
 	 * @param subject 标题
 	 * @param address 邮件地址
@@ -203,7 +209,7 @@ public class EmailBo {
 	}
 
 
-	public String setDunFormat(String addressee,String sender,String deptname,String orderNo,String contractNo,String date ,String dunStatusName,String adminName,
+	public String setDunFormat(String sender,String deptname,String orderNo,String contractNo,String date ,String dunStatusName,String adminName,
 			String userName,int i) {
 		String str1 = "",str2= "",str3= "";
 		if (i==0) str1="催收时间";str2="催收科目";str3="催收状态";

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

@@ -216,5 +216,5 @@ public interface AdminMapper {
     BigDecimal selectFinanceReceivablesCount(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
 
-
+    void updateDepExpenseFinance(@Param("id") String id, @Param("expenseFinanceId") String expenseFinanceId);
 }

+ 88 - 0
src/main/java/com/goafanti/common/dao/AdminPublicReviewerMapper.java

@@ -0,0 +1,88 @@
+package com.goafanti.common.dao;
+import com.goafanti.admin.bo.AdminPublicReviewerBo;
+import com.goafanti.common.model.AdminPublicReviewer;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 管理员公出审核人表(AdminPublicReviewer)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-07-09 14:28:07
+ */
+public interface AdminPublicReviewerMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    AdminPublicReviewer queryById(Integer id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param adminPublicReviewer 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<AdminPublicReviewer> findAdminPublicReviewerList(AdminPublicReviewer adminPublicReviewer, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param adminPublicReviewer 查询条件
+     * @return 总行数
+     */
+    int findAdminPublicReviewerCount(AdminPublicReviewer adminPublicReviewer);
+
+    /**
+     * 新增数据
+     *
+     * @param adminPublicReviewer 实例对象
+     * @return 影响行数
+     */
+    int insert(AdminPublicReviewer adminPublicReviewer);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<AdminPublicReviewer> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<AdminPublicReviewer> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<AdminPublicReviewer> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<AdminPublicReviewer> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param adminPublicReviewer 实例对象
+     * @return 影响行数
+     */
+    int update(AdminPublicReviewer adminPublicReviewer);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    List<AdminPublicReviewerBo> selectByAid(String aid);
+
+}
+

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

@@ -43,4 +43,6 @@ public interface ExpenseAccountExamineMapper {
     void deleteByEaid(Integer id);
 
     Integer selectYesByParam(@Param("id") Integer id, @Param("aid") String aid);
+
+    void updateExamine(@Param("managerId") String managerId, @Param("useId") String useId);
 }

+ 5 - 0
src/main/java/com/goafanti/common/dao/ExpenseAccountMapper.java

@@ -8,6 +8,7 @@ import com.goafanti.expenseAccount.bo.OutExpenseAccount;
 import com.goafanti.expenseAccount.bo.OutMyEAStatistics;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 public interface ExpenseAccountMapper {
@@ -76,4 +77,8 @@ public interface ExpenseAccountMapper {
     void updateRemoveOrderNo(ExpenseAccount ea);
 
     List<ExpenseAccount> selectByOrderNo(String orderNo);
+
+    List<BigDecimal> getOrderNoNotCountAmount(String orderNo);
+
+    List<BigDecimal> getUidNotCountAmount(String uid);
 }

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

@@ -3,9 +3,9 @@ package com.goafanti.common.dao;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationContactBookExample;
 import com.goafanti.user.bo.InputUserChannel;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface OrganizationContactBookMapper {
 
@@ -77,7 +77,7 @@ public interface OrganizationContactBookMapper {
 	 */
 	int updateByPrimaryKey(OrganizationContactBook record);
 
-	int checkContacts(@Param("uid")String uid,@Param("mobile")String mobile,@Param("aid")String aid);
+	Integer checkContacts(@Param("uid")String uid,@Param("mobile")String mobile,@Param("aid")String aid);
 
 	int updateMainContact(@Param("ocbId")String ocbId);
 	

+ 93 - 0
src/main/java/com/goafanti/common/dao/PublicAssistAdviceMapper.java

@@ -0,0 +1,93 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicAssistAdvice;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 公出协单意见表(PublicAssistAdvice)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-07-12 09:21:26
+ */
+public interface PublicAssistAdviceMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicAssistAdvice queryById(Integer id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param publicAssistAdvice 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<PublicAssistAdvice> findPublicAssistAdviceList(PublicAssistAdvice publicAssistAdvice, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param publicAssistAdvice 查询条件
+     * @return 总行数
+     */
+    int findPublicAssistAdviceCount(PublicAssistAdvice publicAssistAdvice);
+
+    /**
+     * 新增数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicAssistAdvice publicAssistAdvice);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicAssistAdvice> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<PublicAssistAdvice> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicAssistAdvice> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicAssistAdvice> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 影响行数
+     */
+    int update(PublicAssistAdvice publicAssistAdvice);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    /**
+     * 通过主键查询数据
+     * @param id 公出编号
+     * @param type 0 协单的公出意见 1 业务公出的协单意见
+     * @return
+     */
+    List<PublicAssistAdvice> selectList(@Param("id") Integer id, @Param("type") Integer type);
+}
+

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

@@ -29,4 +29,5 @@ public interface PublicReleaseDetailsMapper {
 
     void updateDistrictByPrid(InputPublicRelease in);
 
+    String selectUserAdminByPrid(Integer id);
 }

+ 4 - 4
src/main/java/com/goafanti/common/dao/PublicReleaseLogMapper.java

@@ -1,11 +1,10 @@
 package com.goafanti.common.dao;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-
 import com.goafanti.common.model.PublicReleaseLog;
 import com.goafanti.weChat.bo.outPublicReleaseLog;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface PublicReleaseLogMapper {
 
@@ -54,4 +53,5 @@ public interface PublicReleaseLogMapper {
 	List<outPublicReleaseLog> listPublicReleaseLog(@Param ("id")Integer id,@Param ("ufid")String ufid);
 
 
+
 }

+ 87 - 8
src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java

@@ -3,26 +3,90 @@ package com.goafanti.common.dao;
 import com.goafanti.admin.bo.OutFinanceCount;
 import com.goafanti.common.model.OutPublicReleaseCount;
 import com.goafanti.common.model.PublicRelease;
+import com.goafanti.common.model.PublicReleaseDetails;
+import com.goafanti.customer.bo.MyUserDetailsBo;
 import com.goafanti.weChat.bo.*;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.util.Date;
 import java.util.List;
 
+/**
+ * 公出表(PublicRelease)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-08-07 09:49:48
+ */
 public interface PublicReleaseMapper {
 
-    int deleteByPrimaryKey(Integer id);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicRelease queryById(Integer id);
 
-    int insert(PublicRelease record);
 
-    int insertSelective(PublicRelease record);
+    /**
+     * 查询指定行数据
+     *
+     * @param publicRelease 查询条件
+     * @param pageable      分页对象
+     * @return 对象列表
+     */
+    List<PublicRelease> findPublicReleaseList(PublicRelease publicRelease, @Param("pageable") Pageable pageable);
 
-    PublicRelease selectByPrimaryKey(Integer id);
+    /**
+     * 统计总行数
+     *
+     * @param publicRelease 查询条件
+     * @return 总行数
+     */
+    int findPublicReleaseCount(PublicRelease publicRelease);
 
-    int updateByPrimaryKeySelective(PublicRelease record);
+    /**
+     * 新增数据
+     *
+     * @param publicRelease 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicRelease publicRelease);
+    int insertSelective(PublicRelease publicRelease);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicRelease> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<PublicRelease> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicRelease> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicRelease> entities);
 
-    int updateByPrimaryKey(PublicRelease record);
+    /**
+     * 修改数据
+     *
+     * @param publicRelease 实例对象
+     * @return 影响行数
+     */
+    int update(PublicRelease publicRelease);
 
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
 
     OutPublicRelease selectDtails(@Param("id") Integer id);
 
@@ -40,7 +104,7 @@ public interface PublicReleaseMapper {
 
     void updateSignByAidAndUid(@Param("uid") String buyerId, @Param("aid") String salesmanId);
 
-    List<OutPublicReleaseCount > getTimeUserFollow(@Param("date")Date date, @Param("now")Date now);
+    List<OutPublicReleaseCount> getTimeUserFollow(@Param("date")Date date, @Param("now")Date now);
 
     List<OutPublicRelease> publicByOrder(String orderNo);
 
@@ -62,5 +126,20 @@ public interface PublicReleaseMapper {
 
     List<PublicRelease>  selectAll();
 
-    List<releaseAndExpenseCountOut > releaseAndExpenseCount(InputreleaseAndExpenseCount in);
+    List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
+
+    PublicRelease selectSonIdByMain(Integer id);
+
+    int selectCountByAssistUnaudited(String aid);
+
+    int selectCountByUnaudited(String aid);
+
+    int selectCountByOtherUnaudited(String aid);
+
+    List<MyUserDetailsBo> selectByUid(String id);
+
+    List<PublicRelease> selectByMainIdAndReviewer(@Param("id") Integer id, @Param("reviewerId") String reviewerId);
+
+    List<PublicReleaseDetails> selectDetailsByPrid(Integer prid);
 }
+

+ 87 - 0
src/main/java/com/goafanti/common/dao/UserArchivesMapper.java

@@ -0,0 +1,87 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.UserArchives;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 客户档案表(UserArchives)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-08-12 10:38:57
+ */
+public interface UserArchivesMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserArchives queryById(Integer id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param userArchives 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<UserArchives> findUserArchivesList(UserArchives userArchives, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param userArchives 查询条件
+     * @return 总行数
+     */
+    int findUserArchivesCount(UserArchives userArchives);
+
+    /**
+     * 新增数据
+     *
+     * @param userArchives 实例对象
+     * @return 影响行数
+     */
+    int insert(UserArchives userArchives);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserArchives> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<UserArchives> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserArchives> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<UserArchives> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param userArchives 实例对象
+     * @return 影响行数
+     */
+    int update(UserArchives userArchives);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    UserArchives queryByUid(String id);
+}
+

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

@@ -22,7 +22,7 @@ public interface UserFollowMapper {
 
 	int pushUserGuidance(@Param("id")String id, @Param("guidance")Integer guidance);
 
-	List<UserFollow> selectbyUid(@Param("uid")String uid, @Param("aid")String aid);
+	List<UserFollow> selectByUidAndUid(@Param("uid")String uid, @Param("aid")String aid);
 
 
     Integer selectByaidAndDate(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);

+ 86 - 0
src/main/java/com/goafanti/common/dao/UserLimitCheckMapper.java

@@ -0,0 +1,86 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.UserLimitCheck;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 客户分享查询表(UserLimitCheck)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-07-29 15:00:05
+ */
+public interface UserLimitCheckMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserLimitCheck queryById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param userLimitCheck 查询条件
+     * @param pageable       分页对象
+     * @return 对象列表
+     */
+    List<UserLimitCheck> findUserLimitCheckList(UserLimitCheck userLimitCheck, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param userLimitCheck 查询条件
+     * @return 总行数
+     */
+    int findUserLimitCheckCount(UserLimitCheck userLimitCheck);
+
+    /**
+     * 新增数据
+     *
+     * @param userLimitCheck 实例对象
+     * @return 影响行数
+     */
+    int insert(UserLimitCheck userLimitCheck);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserLimitCheck> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<UserLimitCheck> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserLimitCheck> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<UserLimitCheck> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param userLimitCheck 实例对象
+     * @return 影响行数
+     */
+    int update(UserLimitCheck userLimitCheck);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    UserLimitCheck selectByUid(String uid);
+}
+

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

@@ -249,4 +249,7 @@ public interface UserMapper {
 
     int getCountRestrictProject(@Param("uid") String uid, @Param("aid") String aid);
 
+    UserArchivesDetails selectUser(String id);
+
+    List<PublicReleaseListBo> getPublicReleaseList(String uid);
 }

+ 87 - 0
src/main/java/com/goafanti/common/dao/UserSuperEvaluateMapper.java

@@ -0,0 +1,87 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.UserSuperEvaluate;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+
+/**
+ * 客户上级评价(UserSuperEvaluate)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-07-17 08:51:36
+ */
+public interface UserSuperEvaluateMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserSuperEvaluate queryById(Integer id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param userSuperEvaluate 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<UserSuperEvaluate> findUserSuperEvaluateList(UserSuperEvaluate userSuperEvaluate, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param userSuperEvaluate 查询条件
+     * @return 总行数
+     */
+    int findUserSuperEvaluateCount(UserSuperEvaluate userSuperEvaluate);
+
+    /**
+     * 新增数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 影响行数
+     */
+    int insert(UserSuperEvaluate userSuperEvaluate);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserSuperEvaluate> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<UserSuperEvaluate> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<UserSuperEvaluate> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<UserSuperEvaluate> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 影响行数
+     */
+    int update(UserSuperEvaluate userSuperEvaluate);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+
+}
+

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

@@ -798,6 +798,7 @@
     </update>
 
 
+
     <!--  用户是为正常的 -->
     <select id="getCountById" parameterType="java.lang.String" resultType="java.lang.Integer">
         select count(a.id)  from admin a
@@ -1342,4 +1343,12 @@
         where a.id= #{aid}
     </select>
 
+    <update id="updateDepExpenseFinance">
+        update expense_account a left join expense_account_examine b on a.id=b.eaid
+        left join admin c on c.id= #{expenseFinanceId}
+        set b.auditor =c.id ,b.auditorName =c.name
+        where a.process_status in (0,1,2,3) and a.status =1 and b.process_status =3 and b.status =0
+        and a.apply_dep = #{id}
+    </update>
+
 </mapper>

+ 129 - 0
src/main/java/com/goafanti/common/mapper/AdminPublicReviewerMapper.xml

@@ -0,0 +1,129 @@
+<?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.AdminPublicReviewerMapper">
+
+    <resultMap type="com.goafanti.common.model.AdminPublicReviewer" id="AdminPublicReviewerMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="aid" column="aid" jdbcType="VARCHAR"/>
+        <result property="type" column="type" jdbcType="INTEGER"/>
+        <result property="reviewerId" column="reviewer_id" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="AdminPublicReviewerMap">
+        select
+id, aid, type, reviewer_id, create_time
+        from admin_public_reviewer
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findAdminPublicReviewerList" resultMap="AdminPublicReviewerMap">
+        select
+id, aid, type, reviewer_id, create_time
+        from admin_public_reviewer
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="type != null">
+                and type = #{type}
+            </if>
+            <if test="reviewerId != null and reviewerId != ''">
+                and reviewer_id = #{reviewerId}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+        limit #{pageable.offset}, #{pageable.pageSize}
+    </select>
+
+    <!--统计总行数-->
+    <select id="findAdminPublicReviewerCount" resultType="java.lang.Integer">
+        select count(1)
+        from admin_public_reviewer
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="type != null">
+                and type = #{type}
+            </if>
+            <if test="reviewerId != null and reviewerId != ''">
+                and reviewer_id = #{reviewerId}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into admin_public_reviewer(aid, type, reviewer_id, create_time)
+        values (#{aid}, #{type}, #{reviewerId}, #{createTime})
+    </insert>
+
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into admin_public_reviewer(aid, type, reviewer_id, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+        (#{entity.aid}, #{entity.type}, #{entity.reviewerId}, #{entity.createTime})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into admin_public_reviewer(aid, type, reviewer_id, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.aid}, #{entity.type}, #{entity.reviewerId}, #{entity.createTime})
+        </foreach>
+        on duplicate key update
+aid = values(aid),
+type = values(type),
+reviewer_id = values(reviewer_id),
+create_time = values(create_time)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update admin_public_reviewer
+        <set>
+            <if test="aid != null and aid != ''">
+                aid = #{aid},
+            </if>
+            <if test="type != null">
+                type = #{type},
+            </if>
+            <if test="reviewerId != null and reviewerId != ''">
+                reviewer_id = #{reviewerId},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete from admin_public_reviewer where id = #{id}
+    </delete>
+    <select id="selectByAid"  resultType="com.goafanti.admin.bo.AdminPublicReviewerBo">
+        select
+            a.id, a.aid, a.reviewer_id as reviewerId, a.create_time as createTime,a.type,
+            b.name as reviewerName
+        from admin_public_reviewer a left join admin b on a.reviewer_id=b.id
+        where aid = #{aid}
+    </select>
+
+</mapper>
+

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

@@ -466,6 +466,7 @@
         </if>
         and a.delete_sign=0 and a.status=0
         and a.bname like concat('%',#{businessName},'%')
+        order by CONVERT(bname USING gbk) COLLATE gbk_chinese_ci;
     </select>
 
 

+ 6 - 0
src/main/java/com/goafanti/common/mapper/ExpenseAccountExamineMapper.xml

@@ -135,6 +135,7 @@
     </if>
   </update>
 
+
   <select id="selectByEaidAndProcessStatus" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
@@ -162,4 +163,9 @@
     where status =1 and auditor = #{aid}
       and eaid = #{id}
   </select>
+  <update id="updateExamine">
+    update expense_account_examine a ,admin b
+    set a.auditor =b.id ,a.auditorName =b.name
+    where a.process_status =2 and a.auditor = #{useId} and b.id = #{managerId}
+  </update>
 </mapper>

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

@@ -746,7 +746,7 @@
     select b.id,b.check_no,b.total_amount,b.amount,b.aname,b.apply_dep,b.pay_dep,b.real_amount,b.type_other ,b.aid,b.create_time ,
            date_format(b.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,b.examine_name, dep.name applyDepName,dep2.name payDepName,
            b.remarks,b.eaaid ,eap.name ,eap.bank ,eap.accounts ,b.status,b.process_status,
-           c.id sonId,c.total_amount sonTotalAmount,c.settlement_amount sonSettlementAmount,c.amount sonAmount, c.`type` sonType,c.type_other sonTypeOther,
+           c.id sonId,c.total_amount sonTotalAmount,c.settlement_amount sonSettlementAmount,c.amount sonAmount, c.`type` sonType,c.type_other sonTypeOther,c.prid,
            c.user_names ,c.release_start ,c.release_end , c.district_name districtName,c.user_names userNames,c.secondary_type ,c.secondary_type_other,c.attachment_url,
            c.duration,pr.plan,c.real_amount sonRealAmount,o.order_no,o.contract_no,pr.type publicReleaseType,tm.bid_type bidType,
            c.debit_id debitId, debit.real_amount DebitRealAmount ,debit.settlement_amount DebitSettlementAmount,debit.liquidation_status DebitliquidationStatus,
@@ -1123,6 +1123,22 @@
   select
   <include refid="Base_Column_List" />
   from expense_account
-  where expense_main=0 and status=2    and order_no=#{orderNo}
+  where expense_main=0 and status in(1,2,3)   and order_no=#{orderNo}
+  </select>
+    <select id="getOrderNoNotCountAmount" resultType="java.math.BigDecimal">
+      SELECT  d.real_amount
+      from t_order_new a left join public_release_details b on a.buyer_id =b.uid
+                         left join public_release c on b.prid =c.id
+                         left join expense_account d on c.id =d.prid
+      where a.order_no = #{orderNo}
+        and c.status in (1,2) and d.status in (1,2) and d.order_no is null
+    </select>
+  <select id="getUidNotCountAmount" resultType="java.math.BigDecimal">
+    SELECT  d.real_amount
+    from  public_release_details b
+                       left join public_release c on b.prid =c.id
+                       left join expense_account d on c.id =d.prid
+    where b.uid= #{uid}
+      and c.status in (1,2) and d.status in (1,2) and d.order_no is null
   </select>
 </mapper>

+ 7 - 3
src/main/java/com/goafanti/common/mapper/OrganizationContactBookMapper.xml

@@ -446,10 +446,14 @@
 			count( 0 )
 		from
 			organization_contact_book
-		where
-			aid = #{aid,jdbcType=VARCHAR}
-			and uid = #{uid,jdbcType=VARCHAR}
+		where aid = #{aid,jdbcType=VARCHAR}
+		  <if test="mobile != null">
 			and mobile = #{mobile,jdbcType=VARCHAR}
+		</if>
+		  <if test="uid != null">
+			and uid = #{uid,jdbcType=VARCHAR}
+		  </if>
+
   </select>
   
   <update id="updateSubContact">

+ 150 - 0
src/main/java/com/goafanti/common/mapper/PublicAssistAdviceMapper.xml

@@ -0,0 +1,150 @@
+<?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.PublicAssistAdviceMapper">
+
+    <resultMap type="com.goafanti.common.model.PublicAssistAdvice" id="PublicAssistAdviceMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="prid" column="prid" jdbcType="INTEGER"/>
+        <result property="aid" column="aid" jdbcType="VARCHAR"/>
+        <result property="aname" column="aname" jdbcType="VARCHAR"/>
+        <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="PublicAssistAdviceMap">
+        select
+id, prid, aid, aname, remarks, create_time
+        from public_assist_advice
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findPublicAssistAdviceList" resultMap="PublicAssistAdviceMap">
+        select
+id, prid, aid, aname, remarks, create_time
+        from public_assist_advice
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="aname != null and aname != ''">
+                and aname = #{aname}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                and remarks = #{remarks}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+        limit #{pageable.offset}, #{pageable.pageSize}
+    </select>
+
+    <!--统计总行数-->
+    <select id="findPublicAssistAdviceCount" resultType="java.lang.Integer">
+        select count(1)
+        from public_assist_advice
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="aname != null and aname != ''">
+                and aname = #{aname}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                and remarks = #{remarks}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+    </select>
+
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into public_assist_advice(prid, aid, aname, remarks)
+        values (#{prid}, #{aid}, #{aname}, #{remarks})
+    </insert>
+
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_assist_advice(prid, aid, aname, remarks, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+        (#{entity.prid}, #{entity.aid}, #{entity.aname}, #{entity.remarks}, #{entity.createTime})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_assist_advice(prid, aid, aname, remarks, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.aid}, #{entity.aname}, #{entity.remarks}, #{entity.createTime})
+        </foreach>
+        on duplicate key update
+prid = values(prid),
+aid = values(aid),
+aname = values(aname),
+remarks = values(remarks),
+create_time = values(create_time)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update public_assist_advice
+        <set>
+            <if test="prid != null">
+                prid = #{prid},
+            </if>
+            <if test="aid != null and aid != ''">
+                aid = #{aid},
+            </if>
+            <if test="aname != null and aname != ''">
+                aname = #{aname},
+            </if>
+            <if test="remarks != null and remarks != ''">
+                remarks = #{remarks},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete from public_assist_advice where id = #{id}
+    </delete>
+
+
+    <select id="selectList" resultType="com.goafanti.common.model.PublicAssistAdvice">
+        select
+        a.id, a.prid, a.aid, a.aname, a.remarks, a.create_time as createTime
+        from  public_assist_advice a
+        <if test="type ==0">
+       left join public_release b on a.prid=b.id
+        where  b.id = #{id}
+        </if>
+        <if test="type ==1">
+        left  join public_release b on a.prid=b.id
+        left join public_release c on  b.main_id=c.id
+        where  c.id = #{id}
+        </if>
+    </select>
+
+</mapper>
+

+ 7 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseDetailsMapper.xml

@@ -216,6 +216,13 @@
         from public_release_details a left join user b on a.uid=b.id
         where prid = #{id,jdbcType=INTEGER} and uid =#{uid}
     </select>
+    <select id="selectUserAdminByPrid" resultType="java.lang.String">
+        select
+            GROUP_CONCAT(DISTINCT c.name)name
+        from public_release_details a left join user b on a.uid=b.id
+                                      left join admin c on b.aid =c.id
+        where a.prid = #{id}
+    </select>
 
     <update id="updateDistrictByPrid">
         update public_release_details

File diff suppressed because it is too large
+ 760 - 394
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml


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

@@ -180,7 +180,7 @@
                c.nickname userName ,d.name adminName,b.create_time createTime,b.uid,b.aid
         from  restrict_project b left join business_project a on b.pid =a.id
                  left join user c on b.uid=c.id left join admin d on b.aid=d.id
-        where  b.aid= #{aid,jdbcType=VARCHAR}
+        where  b.aid= #{aid,jdbcType=VARCHAR} and b.type in (1,2)
     </select>
     <select id="selectByParam" resultMap="BaseResultMap">
         select

+ 245 - 0
src/main/java/com/goafanti/common/mapper/UserArchivesMapper.xml

@@ -0,0 +1,245 @@
+<?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.UserArchivesMapper">
+
+    <resultMap type="com.goafanti.common.model.UserArchives" id="UserArchivesMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="uid" column="uid" jdbcType="VARCHAR"/>
+        <result property="patentCount" column="patent_count" jdbcType="INTEGER"/>
+        <result property="inventionPatentCount" column="invention_patent_count" jdbcType="INTEGER"/>
+        <result property="utilityModelCount" column="utility_model_count" jdbcType="INTEGER"/>
+        <result property="appearancePatentCount" column="appearance_patent_count" jdbcType="INTEGER"/>
+        <result property="softwareWorksCount" column="software_works_count" jdbcType="INTEGER"/>
+        <result property="otherCount" column="other_count" jdbcType="INTEGER"/>
+        <result property="financialData" column="financial_data" jdbcType="VARCHAR"/>
+        <result property="earlyCommunication" column="early_communication" jdbcType="VARCHAR"/>
+        <result property="interviewIdeas" column="interview_ideas" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="enterpriseCount" column="enterprise_count" jdbcType="INTEGER"/>
+        <result property="channelIndicators" column="channel_indicators" jdbcType="VARCHAR"/>
+        <result property="interviewDistribution" column="interview_distribution" jdbcType="VARCHAR"/>
+    </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        
+    </sql>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="UserArchivesMap">
+        select
+          <include refid="UserArchivesAllSql"/>
+        from user_archives
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findUserArchivesList" resultMap="UserArchivesMap">
+        select
+          <include refid="UserArchivesAllSql"/>
+
+        from user_archives
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="patentCount != null">
+                and patent_count = #{patentCount}
+            </if>
+            <if test="inventionPatentCount != null">
+                and invention_patent_count = #{inventionPatentCount}
+            </if>
+            <if test="utilityModelCount != null">
+                and utility_model_count = #{utilityModelCount}
+            </if>
+            <if test="appearancePatentCount != null">
+                and appearance_patent_count = #{appearancePatentCount}
+            </if>
+            <if test="softwareWorksCount != null">
+                and software_works_count = #{softwareWorksCount}
+            </if>
+            <if test="otherCount != null">
+                and other_count = #{otherCount}
+            </if>
+            <if test="financialData != null and financialData != ''">
+                and financial_data = #{financialData}
+            </if>
+            <if test="earlyCommunication != null and earlyCommunication != ''">
+                and early_communication = #{earlyCommunication}
+            </if>
+            <if test="interviewIdeas != null and interviewIdeas != ''">
+                and interview_ideas = #{interviewIdeas}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="enterpriseCount != null">
+                and enterprise_count = #{enterpriseCount}
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                and channel_indicators = #{channelIndicators}
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                and interview_distribution = #{interviewDistribution}
+            </if>
+        </where>
+        <if test="page_sql != null">
+    		${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findUserArchivesCount" resultType="java.lang.Integer">
+        select count(1)
+        from user_archives
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="patentCount != null">
+                and patent_count = #{patentCount}
+            </if>
+            <if test="inventionPatentCount != null">
+                and invention_patent_count = #{inventionPatentCount}
+            </if>
+            <if test="utilityModelCount != null">
+                and utility_model_count = #{utilityModelCount}
+            </if>
+            <if test="appearancePatentCount != null">
+                and appearance_patent_count = #{appearancePatentCount}
+            </if>
+            <if test="softwareWorksCount != null">
+                and software_works_count = #{softwareWorksCount}
+            </if>
+            <if test="otherCount != null">
+                and other_count = #{otherCount}
+            </if>
+            <if test="financialData != null and financialData != ''">
+                and financial_data = #{financialData}
+            </if>
+            <if test="earlyCommunication != null and earlyCommunication != ''">
+                and early_communication = #{earlyCommunication}
+            </if>
+            <if test="interviewIdeas != null and interviewIdeas != ''">
+                and interview_ideas = #{interviewIdeas}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="enterpriseCount != null">
+                and enterprise_count = #{enterpriseCount}
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                and channel_indicators = #{channelIndicators}
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                and interview_distribution = #{interviewDistribution}
+            </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>
+
+    <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)
+        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})
+        </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)
+        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})
+        </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)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update user_archives
+        <set>
+            <if test="uid != null and uid != ''">
+                uid = #{uid},
+            </if>
+            <if test="patentCount != null">
+                patent_count = #{patentCount},
+            </if>
+            <if test="inventionPatentCount != null">
+                invention_patent_count = #{inventionPatentCount},
+            </if>
+            <if test="utilityModelCount != null">
+                utility_model_count = #{utilityModelCount},
+            </if>
+            <if test="appearancePatentCount != null">
+                appearance_patent_count = #{appearancePatentCount},
+            </if>
+            <if test="softwareWorksCount != null">
+                software_works_count = #{softwareWorksCount},
+            </if>
+            <if test="otherCount != null">
+                other_count = #{otherCount},
+            </if>
+            <if test="financialData != null and financialData != ''">
+                financial_data = #{financialData},
+            </if>
+            <if test="earlyCommunication != null and earlyCommunication != ''">
+                early_communication = #{earlyCommunication},
+            </if>
+            <if test="interviewIdeas != null and interviewIdeas != ''">
+                interview_ideas = #{interviewIdeas},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime},
+            </if>
+            <if test="enterpriseCount != null">
+                enterprise_count = #{enterpriseCount},
+            </if>
+            <if test="channelIndicators != null and channelIndicators != ''">
+                channel_indicators = #{channelIndicators},
+            </if>
+            <if test="interviewDistribution != null and interviewDistribution != ''">
+                interview_distribution = #{interviewDistribution},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete from user_archives where id = #{id}
+    </delete>
+
+    <select id="queryByUid" resultMap="UserArchivesMap">
+        select
+        <include refid="UserArchivesAllSql"/>
+        from user_archives
+        where uid = #{id}
+    </select>
+</mapper>
+

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

@@ -206,13 +206,15 @@
         set a.guidance= #{guidance}
         where a.id=b.uid and b.id= #{id}
     </update>
-    <select id="selectbyUid" resultMap="BaseResultMap">
+    <select id="selectByUidAndUid" resultMap="BaseResultMap">
 
         select
         <include refid="Base_Column_List" />
         from user_follow a
         where a.uid= #{uid}
-        and a.aid= #{aid}
+          <if test="aid !=null">
+              and a.aid= #{aid}
+          </if>
     </select>
 
 

+ 124 - 0
src/main/java/com/goafanti/common/mapper/UserLimitCheckMapper.xml

@@ -0,0 +1,124 @@
+<?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.UserLimitCheckMapper">
+
+    <resultMap type="com.goafanti.common.model.UserLimitCheck" id="UserLimitCheckMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="uid" column="uid" jdbcType="VARCHAR"/>
+        <result property="checkTime" column="check_time" jdbcType="TIMESTAMP"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="UserLimitCheckAllSql">
+        id, uid, check_time, create_time
+    </sql>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="UserLimitCheckMap">
+        select
+        <include refid="UserLimitCheckAllSql"/>
+        from user_limit_check
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findUserLimitCheckList" resultMap="UserLimitCheckMap">
+        select
+        <include refid="UserLimitCheckAllSql"/>
+
+        from user_limit_check
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="checkTime != null">
+                and check_time = #{checkTime}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findUserLimitCheckCount" resultType="java.lang.Integer">
+        select count(1)
+        from user_limit_check
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="checkTime != null">
+                and check_time = #{checkTime}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+        </where>
+    </select>
+    <select id="selectByUid"  resultMap="UserLimitCheckMap">
+        select
+        <include refid="UserLimitCheckAllSql"/>
+        from user_limit_check
+        where uid = #{uid}
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into user_limit_check(uid, check_time)
+        values (#{uid}, #{checkTime})
+    </insert>
+
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_limit_check(uid, check_time, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.uid}, #{entity.checkTime}, #{entity.createTime})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_limit_check(uid, check_time, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.uid}, #{entity.checkTime}, #{entity.createTime})
+        </foreach>
+        on duplicate key update
+        uid = values(uid),
+        check_time = values(check_time),
+        create_time = values(create_time)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update user_limit_check
+        <set>
+            <if test="uid != null and uid != ''">
+                uid = #{uid},
+            </if>
+            <if test="checkTime != null">
+                check_time = #{checkTime},
+            </if>
+
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from user_limit_check
+        where id = #{id}
+    </delete>
+
+</mapper>
+

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

@@ -2243,12 +2243,16 @@ inner join(
 		date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
 		date_format(um.last_follow_time,'%Y-%m-%d %H:%i:%S') lastFollowTime ,
 		if(a.transfer_time &lt; um.last_follow_time,um.last_follow_time,a.transfer_time) as orderTime,
-		um.channel_type type
+		um.channel_type type,d.intended_project intendedProject,
+		ua.enterprise_count as enterpriseCount,
+		ua.channel_indicators channelIndicators,
+		ua.interview_distribution as interviewDistribution
 		from user a left join admin b on a.aid=b.id left join organization_identity d on a.id = d.uid
 		left join district_glossory dg1 on d.location_province = dg1.id
 		left join district_glossory dg2 on d.location_city = dg2.id
 		left join district_glossory dg3 on d.location_area = dg3.id
 		left join user_mid um on um.aid=a.aid and um.uid=a.id
+		left join user_archives ua on ua.uid=a.id
 		where a.type= 1   and a.source in(1,2,3)  and a.new_channel=1
 		<if test=" shareType !=null ">
 			and a.share_type = #{shareType}
@@ -2388,4 +2392,120 @@ inner join(
 		  and a.aid = #{aid}
 		and b.id= #{uid}
 	</select>
+    <select id="selectUser" resultType="com.goafanti.customer.bo.UserArchivesDetails">
+		select a.id               uid,
+			   b.industry        ,
+			   c.name             industryName,
+			   b.org_code         orgCode,
+			   b.business_scope   businessScope,
+			   b.intended_project intendedProject,
+			   a.nickname,
+			   a.new_channel     newChannel,
+			   d.channel_type    channelType
+		from `user` a
+				 left join organization_identity b on a.id = b.uid
+				 left join industry_category c  on b.industry =c.id
+				left join user_mid d on a.id=d.uid
+		where a.type = 1
+		  and a.id = #{id}
+	</select>
+	<select id="getPublicReleaseList" resultType="com.goafanti.customer.bo.PublicReleaseListBo">
+		select a.prid prdId,a.uid,a.ufid,
+			   date_format(b.release_start, '%Y-%m-%d ') releaseStarts,
+			   a.duration,
+			   c.name                                    aname,
+			   b.assist,
+			   b.assistant_name                          assistantName,
+			   b.assist_aid_name                         assistAidName,
+			   b.remarks,
+			   b.supplement,
+			   b.plan,
+			   b.next_plan                               nextPlan,
+			   b.expected_effect                         expectedEffect,
+			   b.assistant_aid                           assistantAid,
+			   e.follow_name  as                         followName,
+			   e.follow_dep   as                         followDep,
+			   e.`result`,
+			   e.contact_type as                         contactType,
+			   e.create_time                             followTime,
+			   e.follow_count as                         followCount
+		from public_release_details a left join public_release b on a.prid =b.id
+	  left join admin c on b.aid =c.id left join `user` d on a.uid =d.id
+	  left join user_follow e on a.ufid =e.id
+		where b.status =2 and b.`type` in (0,1,2)
+		and a.uid = #{id}
+		order by b.create_time desc
+	</select>
+
+	<select id="selectMyUserList" resultType="com.goafanti.customer.bo.SelectMyUserOut">
+		SELECT a.id,a.nickname ,a.share_type as shareType,a.new_channel as newChannel,a.sign_bills as signBills,
+		       a.sign_time as signTime,d.name as adminName ,b.org_code as orgCode,b.location_province as locationProvince,
+		       b.location_city as locationCity,b.location_area as locationArea,e.name as locationProvinceName,
+		       f.name as locationCityName,g.name as locationAreaName
+		from `user` a left join organization_identity b on a.id=b.uid left join user_mid c on a.id =c.uid
+					  left join admin d on a.aid=d.id
+		    left join district_glossory e on b.location_province=e.id
+		    left join district_glossory f on b.location_city=f.id
+		    left join district_glossory g on b.location_area=g.id
+		<if test="type==1">
+		inner join (SELECT b.uid
+			from public_release a left join public_release_details b on a.id=b.prid
+			where aid= #{aid} and status =2
+			group by b.uid )t0 on a.id=t0.uid
+		</if>
+		where a.`type` =1 and a.status =0
+		<if test="type==0">
+		and a.aid = #{aid}
+		and a.share_type in (0,2,4)
+		</if>
+		<if test="name != null">
+			and a.nickname like concat('%',#{name},'%')
+		</if>
+		<if test="shareType !=null and shareType !=4">
+			and a.share_type = #{shareType}
+		</if>
+		<if test="shareType ==0">
+			and a.new_channel = 0
+		</if>
+		<if test="shareType ==4">
+			and a.new_channel = 1
+		</if>
+		<if test="level !=null">
+			and a.level = #{level}
+		</if>
+		order by a.create_time desc
+		<if test="page_sql != null">
+			${page_sql}
+		</if>
+	</select>
+	<select id="selectMyUserCount" resultType="integer">
+		SELECT count(*)
+		from `user` a
+	<if test="type==1">
+		inner join (SELECT b.uid
+		from public_release a left join public_release_details b on a.id=b.prid
+		where aid= #{aid} and status =2
+		group by b.uid )t0 on a.id=t0.uid
+	</if>
+		where a.`type` =1 and a.status =0
+		<if test="type==0">
+		and a.share_type in (0,2,4)
+		and a.aid = #{aid}
+		</if>
+		<if test="name != null">
+			and a.nickname like concat('%',#{name},'%')
+		</if>
+		<if test="shareType !=null and shareType !=4">
+			and a.share_type = #{shareType}
+		</if>
+		<if test="shareType ==0">
+			and a.new_channel = 0
+		</if>
+		<if test="shareType ==4">
+			and a.new_channel = 1
+		</if>
+		<if test="level !=null">
+			and a.level = #{level}
+		</if>
+	</select>
 </mapper>

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

@@ -131,7 +131,7 @@
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateAddUserName">
-  update `user`  set nickname=concat(#{userName},'[',username ,']'),username = #{userName}
+  update `user`  set nickname=#{userName},username = #{userName}
 	where id= #{uid};
   </update>
   <select id="getUserList" resultType="com.goafanti.customer.bo.UserNamesListBo">

+ 109 - 0
src/main/java/com/goafanti/common/mapper/UserSuperEvaluateMapper.xml

@@ -0,0 +1,109 @@
+<?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.UserSuperEvaluateMapper">
+
+    <resultMap type="com.goafanti.common.model.UserSuperEvaluate" id="UserSuperEvaluateMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="uid" column="uid" jdbcType="VARCHAR"/>
+        <result property="aid" column="aid" jdbcType="VARCHAR"/>
+        <result property="content" column="content" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+    
+    <sql id="UserSuperEvaluateAllSql">
+id, uid, aid, content, create_time        
+    </sql>
+
+    <!--查询单个-->
+    <select id="queryById" resultMap="UserSuperEvaluateMap">
+        select
+          <include refid="UserSuperEvaluateAllSql"/>
+        from user_super_evaluate
+        where id = #{id}
+    </select>
+
+    <!--查询指定行数据-->
+    <select id="findUserSuperEvaluateList" resultType="com.goafanti.customer.bo.OutUserSuperEvaluate">
+        select
+          a.id, a.uid, a.aid, a.content, a.create_time as createTime,b.name adminName
+        from user_super_evaluate a left join admin b  on a.aid=b.id
+        where 1=1
+            <if test="uid != null and uid != ''">
+                and a.uid = #{uid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and a.aid = #{aid}
+            </if>
+            order by a.create_time desc
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findUserSuperEvaluateCount" resultType="java.lang.Integer">
+        select count(1)
+        from user_super_evaluate
+        where 1=1
+        <if test="uid != null and uid != ''">
+            and uid = #{uid}
+        </if>
+        <if test="aid != null and aid != ''">
+            and aid = #{aid}
+        </if>
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into user_super_evaluate(uid, aid, content)
+        values (#{uid}, #{aid}, #{content})
+    </insert>
+
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_super_evaluate(uid, aid, content, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+        (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_super_evaluate(uid, aid, content, create_time)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime})
+        </foreach>
+        on duplicate key update
+uid = values(uid),
+aid = values(aid),
+content = values(content),
+create_time = values(create_time)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update user_super_evaluate
+        <set>
+            <if test="uid != null and uid != ''">
+                uid = #{uid},
+            </if>
+            <if test="aid != null and aid != ''">
+                aid = #{aid},
+            </if>
+            <if test="content != null and content != ''">
+                content = #{content},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete from user_super_evaluate where id = #{id}
+    </delete>
+
+</mapper>
+

+ 79 - 0
src/main/java/com/goafanti/common/model/AdminPublicReviewer.java

@@ -0,0 +1,79 @@
+package com.goafanti.common.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 管理员公出审核人表(AdminPublicReviewer)实体类
+ *
+ * @author makejava
+ * @since 2024-07-09 14:28:07
+ */
+public class AdminPublicReviewer implements Serializable {
+    private static final long serialVersionUID = -18188164635821727L;
+
+    private Integer id;
+/**
+     * 人员编号
+     */
+    private String aid;
+/**
+     * 0=公出审核人列表,1=协单审核人
+     */
+    private Integer type;
+/**
+     * 审核人编号
+     */
+    private String reviewerId;
+/**
+     * 创建时间
+     */
+    private Date createTime;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getReviewerId() {
+        return reviewerId;
+    }
+
+    public void setReviewerId(String reviewerId) {
+        this.reviewerId = reviewerId;
+    }
+
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+}
+

+ 7 - 0
src/main/java/com/goafanti/common/model/OrderYearMaxDuration.java

@@ -44,6 +44,13 @@ public class OrderYearMaxDuration implements Serializable {
     public OrderYearMaxDuration() {
     }
 
+    public OrderYearMaxDuration(String orderNo, Integer year, Integer status, BigDecimal maxDuration) {
+        this.orderNo = orderNo;
+        this.year = year;
+        this.status = status;
+        this.maxDuration = maxDuration;
+    }
+
     public OrderYearMaxDuration(String orderNo) {
         this.orderNo = orderNo;
     }

+ 91 - 0
src/main/java/com/goafanti/common/model/PublicAssistAdvice.java

@@ -0,0 +1,91 @@
+package com.goafanti.common.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 公出协单意见表(PublicAssistAdvice)实体类
+ *
+ * @author makejava
+ * @since 2024-07-12 09:21:26
+ */
+public class PublicAssistAdvice implements Serializable {
+    private static final long serialVersionUID = -51499592786363889L;
+
+    private Integer id;
+/**
+     * 公出编号
+     */
+    private Integer prid;
+/**
+     * 协单意见人
+     */
+    private String aid;
+/**
+     * 协单意见人名称
+     */
+    private String aname;
+/**
+     * 审核人编号
+     */
+    private String remarks;
+/**
+     * 创建时间
+     */
+    private Date createTime;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getPrid() {
+        return prid;
+    }
+
+    public void setPrid(Integer prid) {
+        this.prid = prid;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+}
+

+ 22 - 286
src/main/java/com/goafanti/common/model/PublicRelease.java

@@ -3,770 +3,506 @@ package com.goafanti.common.model;
 import java.io.Serializable;
 import java.util.Date;
 
+
 /**
- * 公出表
- * @TableName public_release
+ * 公出表(PublicRelease)实体类
+ *
+ * @author makejava
+ * @since 2024-08-07 09:44:55
  */
 public class PublicRelease implements Serializable {
-    /**
-     * 
-     */
-    private Integer id;
+    private static final long serialVersionUID = 315905429186420690L;
 
+    private Integer id;
     /**
      * 公出人
      */
     private String aid;
-
     /**
      * 公出开始时间
      */
     private Date releaseStart;
-
     /**
      * 公出结束时间
      */
     private Date releaseEnd;
-
     /**
      * 公出目标
      */
     private String remarks;
-
     /**
      * 附件
      */
     private String annexUrl;
-
     /**
      * 状态 0驳回 1发起 2同意 3 撤销 4技术驳回
      */
     private Integer status;
-
     /**
      * 发起时间
      */
     private Date createTime;
-
     /**
      * 项目编号
      */
     private String pid;
-
     /**
      * 项目名称
      */
     private String pname;
-
     /**
      * 时长
      */
     private Double duration;
-
     /**
      * 有效日期
      */
     private String validDate;
-
     /**
      * 本次总结
      */
     private String supplement;
-
     /**
      * 审核信息
      */
     private String auditInfo;
-
     /**
      * 公出计划
      */
     private String plan;
-
     /**
      * 预计效果
      */
     private String expectedEffect;
-
     /**
      * 下次计划
      */
     private String nextPlan;
-
     /**
      * 分类 0业务 1技术 2行政 3 技术协单 4 技术助手
      */
     private Integer type;
-
     /**
      * 订单编号
      */
     private String orderNo;
-
     /**
      * 修改时间
      */
     private Date updateTime;
-
     /**
      * 修改状态 0=否 1=是
      */
     private Integer updateStatus;
-
     /**
      * 0否 1主公出 2协助公出
      */
     private Integer assist;
-
     /**
      * 协单人员
      */
     private String assistAid;
-
     /**
      * 协单人员
      */
     private String assistAidName;
-
     /**
      * 主要公出编号
      */
     private Integer mainId;
-
     /**
      * 主要公出发起人
      */
     private String mainName;
-
     /**
      * 驳回人员
      */
     private String rejectName;
-
     /**
      * 协单助手
      */
     private String assistantAid;
-
     /**
      * 协单助手名称
      */
     private String assistantName;
-
     /**
      * 再次公出
      */
     private Integer publicAgain;
-
     /**
      * 审核时间
      */
     private Date auditTime;
-
     /**
      * 客户类型 0新客户 1老客户
      */
     private String newUser;
-
     /**
      * 签单数
      */
     private String signSum;
-
     /**
      * 公司名称
      */
     private String userNames;
-
     /**
      * 公出对象 0企业 1园区
      */
     private Integer objectType;
-
     /**
      * 公出分类 0不含他人客户 1待审核 2已审核
      */
     private Integer publicType;
-
     /**
      * 公出企业地址
      */
     private String districtName;
-
     /**
      * 打卡状态 0未打卡 1已打卡 2异常打卡(冗余)
      */
     private Integer clockIn;
-
     /**
      * 0无需审核 1需要审核 2营销审核通过 3营销审核驳回
      */
     private Integer techStartProcess;
-
     /**
      * 公出企业地址
      */
     private String addressName;
-
-    private static final long serialVersionUID = 1L;
-
     /**
-     * 
+     * 协单审核 0非协单 1协单未审核 2协单部分审核 3协单完全审核 4协单驳回
      */
+    private Integer assistProcess;
+
+
     public Integer getId() {
         return id;
     }
 
-    /**
-     * 
-     */
     public void setId(Integer id) {
         this.id = id;
     }
 
-    /**
-     * 公出人
-     */
     public String getAid() {
         return aid;
     }
 
-    /**
-     * 公出人
-     */
     public void setAid(String aid) {
         this.aid = aid;
     }
 
-    /**
-     * 公出开始时间
-     */
     public Date getReleaseStart() {
         return releaseStart;
     }
 
-    /**
-     * 公出开始时间
-     */
     public void setReleaseStart(Date releaseStart) {
         this.releaseStart = releaseStart;
     }
 
-    /**
-     * 公出结束时间
-     */
     public Date getReleaseEnd() {
         return releaseEnd;
     }
 
-    /**
-     * 公出结束时间
-     */
     public void setReleaseEnd(Date releaseEnd) {
         this.releaseEnd = releaseEnd;
     }
 
-    /**
-     * 公出目标
-     */
     public String getRemarks() {
         return remarks;
     }
 
-    /**
-     * 公出目标
-     */
     public void setRemarks(String remarks) {
         this.remarks = remarks;
     }
 
-    /**
-     * 附件
-     */
     public String getAnnexUrl() {
         return annexUrl;
     }
 
-    /**
-     * 附件
-     */
     public void setAnnexUrl(String annexUrl) {
         this.annexUrl = annexUrl;
     }
 
-    /**
-     * 状态 0驳回 1发起 2同意 3 撤销 4技术驳回
-     */
     public Integer getStatus() {
         return status;
     }
 
-    /**
-     * 状态 0驳回 1发起 2同意 3 撤销 4技术驳回
-     */
     public void setStatus(Integer status) {
         this.status = status;
     }
 
-    /**
-     * 发起时间
-     */
     public Date getCreateTime() {
         return createTime;
     }
 
-    /**
-     * 发起时间
-     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
-    /**
-     * 项目编号
-     */
     public String getPid() {
         return pid;
     }
 
-    /**
-     * 项目编号
-     */
     public void setPid(String pid) {
         this.pid = pid;
     }
 
-    /**
-     * 项目名称
-     */
     public String getPname() {
         return pname;
     }
 
-    /**
-     * 项目名称
-     */
     public void setPname(String pname) {
         this.pname = pname;
     }
 
-    /**
-     * 时长
-     */
     public Double getDuration() {
         return duration;
     }
 
-    /**
-     * 时长
-     */
     public void setDuration(Double duration) {
         this.duration = duration;
     }
 
-    /**
-     * 有效日期
-     */
     public String getValidDate() {
         return validDate;
     }
 
-    /**
-     * 有效日期
-     */
     public void setValidDate(String validDate) {
         this.validDate = validDate;
     }
 
-    /**
-     * 本次总结
-     */
     public String getSupplement() {
         return supplement;
     }
 
-    /**
-     * 本次总结
-     */
     public void setSupplement(String supplement) {
         this.supplement = supplement;
     }
 
-    /**
-     * 审核信息
-     */
     public String getAuditInfo() {
         return auditInfo;
     }
 
-    /**
-     * 审核信息
-     */
     public void setAuditInfo(String auditInfo) {
         this.auditInfo = auditInfo;
     }
 
-    /**
-     * 公出计划
-     */
     public String getPlan() {
         return plan;
     }
 
-    /**
-     * 公出计划
-     */
     public void setPlan(String plan) {
         this.plan = plan;
     }
 
-    /**
-     * 预计效果
-     */
     public String getExpectedEffect() {
         return expectedEffect;
     }
 
-    /**
-     * 预计效果
-     */
     public void setExpectedEffect(String expectedEffect) {
         this.expectedEffect = expectedEffect;
     }
 
-    /**
-     * 下次计划
-     */
     public String getNextPlan() {
         return nextPlan;
     }
 
-    /**
-     * 下次计划
-     */
     public void setNextPlan(String nextPlan) {
         this.nextPlan = nextPlan;
     }
 
-    /**
-     * 分类 0业务 1技术 2行政 3 技术协单 4 技术助手
-     */
     public Integer getType() {
         return type;
     }
 
-    /**
-     * 分类 0业务 1技术 2行政 3 技术协单 4 技术助手
-     */
     public void setType(Integer type) {
         this.type = type;
     }
 
-    /**
-     * 订单编号
-     */
     public String getOrderNo() {
         return orderNo;
     }
 
-    /**
-     * 订单编号
-     */
     public void setOrderNo(String orderNo) {
         this.orderNo = orderNo;
     }
 
-    /**
-     * 修改时间
-     */
     public Date getUpdateTime() {
         return updateTime;
     }
 
-    /**
-     * 修改时间
-     */
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
 
-    /**
-     * 修改状态 0=否 1=是
-     */
     public Integer getUpdateStatus() {
         return updateStatus;
     }
 
-    /**
-     * 修改状态 0=否 1=是
-     */
     public void setUpdateStatus(Integer updateStatus) {
         this.updateStatus = updateStatus;
     }
 
-    /**
-     * 0否 1主公出 2协助公出
-     */
     public Integer getAssist() {
         return assist;
     }
 
-    /**
-     * 0否 1主公出 2协助公出
-     */
     public void setAssist(Integer assist) {
         this.assist = assist;
     }
 
-    /**
-     * 协单人员
-     */
     public String getAssistAid() {
         return assistAid;
     }
 
-    /**
-     * 协单人员
-     */
     public void setAssistAid(String assistAid) {
         this.assistAid = assistAid;
     }
 
-    /**
-     * 协单人员
-     */
     public String getAssistAidName() {
         return assistAidName;
     }
 
-    /**
-     * 协单人员
-     */
     public void setAssistAidName(String assistAidName) {
         this.assistAidName = assistAidName;
     }
 
-    /**
-     * 主要公出编号
-     */
     public Integer getMainId() {
         return mainId;
     }
 
-    /**
-     * 主要公出编号
-     */
     public void setMainId(Integer mainId) {
         this.mainId = mainId;
     }
 
-    /**
-     * 主要公出发起人
-     */
     public String getMainName() {
         return mainName;
     }
 
-    /**
-     * 主要公出发起人
-     */
     public void setMainName(String mainName) {
         this.mainName = mainName;
     }
 
-    /**
-     * 驳回人员
-     */
     public String getRejectName() {
         return rejectName;
     }
 
-    /**
-     * 驳回人员
-     */
     public void setRejectName(String rejectName) {
         this.rejectName = rejectName;
     }
 
-    /**
-     * 协单助手
-     */
     public String getAssistantAid() {
         return assistantAid;
     }
 
-    /**
-     * 协单助手
-     */
     public void setAssistantAid(String assistantAid) {
         this.assistantAid = assistantAid;
     }
 
-    /**
-     * 协单助手名称
-     */
     public String getAssistantName() {
         return assistantName;
     }
 
-    /**
-     * 协单助手名称
-     */
     public void setAssistantName(String assistantName) {
         this.assistantName = assistantName;
     }
 
-    /**
-     * 再次公出
-     */
     public Integer getPublicAgain() {
         return publicAgain;
     }
 
-    /**
-     * 再次公出
-     */
     public void setPublicAgain(Integer publicAgain) {
         this.publicAgain = publicAgain;
     }
 
-    /**
-     * 审核时间
-     */
     public Date getAuditTime() {
         return auditTime;
     }
 
-    /**
-     * 审核时间
-     */
     public void setAuditTime(Date auditTime) {
         this.auditTime = auditTime;
     }
 
-    /**
-     * 客户类型 0新客户 1老客户
-     */
     public String getNewUser() {
         return newUser;
     }
 
-    /**
-     * 客户类型 0新客户 1老客户
-     */
     public void setNewUser(String newUser) {
         this.newUser = newUser;
     }
 
-    /**
-     * 签单数
-     */
     public String getSignSum() {
         return signSum;
     }
 
-    /**
-     * 签单数
-     */
     public void setSignSum(String signSum) {
         this.signSum = signSum;
     }
 
-    /**
-     * 公司名称
-     */
     public String getUserNames() {
         return userNames;
     }
 
-    /**
-     * 公司名称
-     */
     public void setUserNames(String userNames) {
         this.userNames = userNames;
     }
 
-    /**
-     * 公出对象 0企业 1园区
-     */
     public Integer getObjectType() {
         return objectType;
     }
 
-    /**
-     * 公出对象 0企业 1园区
-     */
     public void setObjectType(Integer objectType) {
         this.objectType = objectType;
     }
 
-    /**
-     * 公出分类 0不含他人客户 1待审核 2已审核
-     */
     public Integer getPublicType() {
         return publicType;
     }
 
-    /**
-     * 公出分类 0不含他人客户 1待审核 2已审核
-     */
     public void setPublicType(Integer publicType) {
         this.publicType = publicType;
     }
 
-    /**
-     * 公出企业地址
-     */
     public String getDistrictName() {
         return districtName;
     }
 
-    /**
-     * 公出企业地址
-     */
     public void setDistrictName(String districtName) {
         this.districtName = districtName;
     }
 
-    /**
-     * 打卡状态 0未打卡 1已打卡 2异常打卡(冗余)
-     */
     public Integer getClockIn() {
         return clockIn;
     }
 
-    /**
-     * 打卡状态 0未打卡 1已打卡 2异常打卡(冗余)
-     */
     public void setClockIn(Integer clockIn) {
         this.clockIn = clockIn;
     }
 
-    /**
-     * 0无需审核 1需要审核 2营销审核通过 3营销审核驳回
-     */
     public Integer getTechStartProcess() {
         return techStartProcess;
     }
 
-    /**
-     * 0无需审核 1需要审核 2营销审核通过 3营销审核驳回
-     */
     public void setTechStartProcess(Integer techStartProcess) {
         this.techStartProcess = techStartProcess;
     }
 
-    /**
-     * 公出企业地址
-     */
     public String getAddressName() {
         return addressName;
     }
 
-    /**
-     * 公出企业地址
-     */
     public void setAddressName(String addressName) {
         this.addressName = addressName;
     }
-}
+
+    public Integer getAssistProcess() {
+        return assistProcess;
+    }
+
+    public void setAssistProcess(Integer assistProcess) {
+        this.assistProcess = assistProcess;
+    }
+
+}
+

+ 197 - 0
src/main/java/com/goafanti/common/model/UserArchives.java

@@ -0,0 +1,197 @@
+package com.goafanti.common.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 客户档案表(UserArchives)实体类
+ *
+ * @author makejava
+ * @since 2024-08-12 10:38:57
+ */
+public class UserArchives implements Serializable {
+    private static final long serialVersionUID = -61985340141600786L;
+
+    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;
+
+
+    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 Integer getPatentCount() {
+        return patentCount;
+    }
+
+    public void setPatentCount(Integer patentCount) {
+        this.patentCount = patentCount;
+    }
+
+    public Integer getInventionPatentCount() {
+        return inventionPatentCount;
+    }
+
+    public void setInventionPatentCount(Integer inventionPatentCount) {
+        this.inventionPatentCount = inventionPatentCount;
+    }
+
+    public Integer getUtilityModelCount() {
+        return utilityModelCount;
+    }
+
+    public void setUtilityModelCount(Integer utilityModelCount) {
+        this.utilityModelCount = utilityModelCount;
+    }
+
+    public Integer getAppearancePatentCount() {
+        return appearancePatentCount;
+    }
+
+    public void setAppearancePatentCount(Integer appearancePatentCount) {
+        this.appearancePatentCount = appearancePatentCount;
+    }
+
+    public Integer getSoftwareWorksCount() {
+        return softwareWorksCount;
+    }
+
+    public void setSoftwareWorksCount(Integer softwareWorksCount) {
+        this.softwareWorksCount = softwareWorksCount;
+    }
+
+    public Integer getOtherCount() {
+        return otherCount;
+    }
+
+    public void setOtherCount(Integer otherCount) {
+        this.otherCount = otherCount;
+    }
+
+    public String getFinancialData() {
+        return financialData;
+    }
+
+    public void setFinancialData(String financialData) {
+        this.financialData = financialData;
+    }
+
+    public String getEarlyCommunication() {
+        return earlyCommunication;
+    }
+
+    public void setEarlyCommunication(String earlyCommunication) {
+        this.earlyCommunication = earlyCommunication;
+    }
+
+    public String getInterviewIdeas() {
+        return interviewIdeas;
+    }
+
+    public void setInterviewIdeas(String interviewIdeas) {
+        this.interviewIdeas = interviewIdeas;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getEnterpriseCount() {
+        return enterpriseCount;
+    }
+
+    public void setEnterpriseCount(Integer enterpriseCount) {
+        this.enterpriseCount = enterpriseCount;
+    }
+
+    public String getChannelIndicators() {
+        return channelIndicators;
+    }
+
+    public void setChannelIndicators(String channelIndicators) {
+        this.channelIndicators = channelIndicators;
+    }
+
+    public String getInterviewDistribution() {
+        return interviewDistribution;
+    }
+
+    public void setInterviewDistribution(String interviewDistribution) {
+        this.interviewDistribution = interviewDistribution;
+    }
+
+}
+

+ 62 - 0
src/main/java/com/goafanti/common/model/UserLimitCheck.java

@@ -0,0 +1,62 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 客户分享查询表(UserLimitCheck)实体类
+ *
+ * @author makejava
+ * @since 2024-07-29 15:00:05
+ */
+public class UserLimitCheck implements Serializable {
+    private static final long serialVersionUID = -73811202530017257L;
+
+    private Integer id;
+
+    private String uid;
+    /**
+     * 最后时间
+     */
+    private Date checkTime;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+
+    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 Date getCheckTime() {
+        return checkTime;
+    }
+
+    public void setCheckTime(Date checkTime) {
+        this.checkTime = checkTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+}
+

+ 8 - 0
src/main/java/com/goafanti/common/model/UserMid.java

@@ -136,6 +136,14 @@ public class UserMid implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    public UserMid(String uid, Integer channelType) {
+        this.uid = uid;
+        this.channelType = channelType;
+    }
+
+    public UserMid() {
+    }
+
     public Integer getId() {
         return id;
     }

+ 77 - 0
src/main/java/com/goafanti/common/model/UserSuperEvaluate.java

@@ -0,0 +1,77 @@
+package com.goafanti.common.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 客户上级评价(UserSuperEvaluate)实体类
+ *
+ * @author makejava
+ * @since 2024-07-17 08:51:36
+ */
+public class UserSuperEvaluate implements Serializable {
+    private static final long serialVersionUID = 929784712765516591L;
+
+    private Integer id;
+
+    private String uid;
+/**
+     * 评价人
+     */
+    private String aid;
+/**
+     * 面谈思路
+     */
+    private String content;
+/**
+     * 创建时间
+     */
+    private Date createTime;
+
+
+    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 String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+}
+

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

@@ -160,7 +160,7 @@ public class OrderDunTask {
 			//校准
 			calibrationDun();
 	} catch (Exception e) {
-  			EmailBo emailBo = new EmailBo( "催款处理失败",  AFTConstants.ADMIN_EMAIL,  "超管", "平台",  "系统", devName+"催款处理失败");
+  			EmailBo emailBo = new EmailBo( "催款处理失败",  AFTConstants.ADMIN_EMAIL, "平台",  "超管");
   			asyncUtils.send(emailBo);
 			LoggerUtils.error(getClass(), "===================新催款的信息处理失败======================", e);
 		}

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

@@ -190,7 +190,7 @@ public class ReleaseUserTask {
 		List<Notice> ln = new ArrayList<>();
 		List<userDaysBo> userChannelList = new ArrayList<userDaysBo>();
 		for (User u : userList) {
-			if (StringUtils.isNotBlank(u.getId())&&!AFTConstants.CAOJIN_AID.equals(u.getId())) {
+			if (StringUtils.isNotBlank(u.getId())&&AFTConstants.CAOJIN_AID.equals(u.getId())) {
 				List<userDaysBo> userTmpList  = customerService.selectReleaseUserDays(u.getId());
 				for (userDaysBo ub : userTmpList) {
 					String str=null;
@@ -268,7 +268,7 @@ public class ReleaseUserTask {
 			Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
 					NoticeStatus.TASK_PATENT_ERROR.getCode(), "==============客户释放失败================",null);
 			addNotice(n);
-			EmailBo emailBo = new EmailBo("释放客户失败", AFTConstants.ADMIN_EMAIL, "超管", "平台", "系统", devName+"释放客户失败");
+			EmailBo emailBo = new EmailBo("释放客户失败", AFTConstants.ADMIN_EMAIL, "平台", "超管");
 			asyncUtils.send(emailBo);
 			LoggerUtils.error(getClass(), "====================客户释放失败=================");
 			LoggerUtils.error(getClass(), "客户释放失败", e);

+ 38 - 26
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -19,10 +19,10 @@ import com.goafanti.order.enums.OrderChangeProcess;
 import com.goafanti.order.enums.OrderChangeType;
 import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.organization.bo.OrganizationListOut;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import javax.mail.MessagingException;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
@@ -33,42 +33,44 @@ import java.util.UUID;
 @Component
 @Async
 public class AsyncUtils {
-	@Autowired
+	@Resource
 	private NoticeMapper noticeMapper;
-	@Autowired
+	@Resource
 	private AdminMapper adminMapper;
-	@Autowired
+	@Resource
 	private TOrderNewMapper tOrderNewMapper;
-	@Autowired
+	@Resource
 	private TOrderTaskMapper tOrderTaskMapper;
-	@Autowired
+	@Resource
 	private NewOrderChangeMapper newOrderChangeMapper;
-	@Autowired
+	@Resource
 	private OrderExamineMapper orderExamineMapper;
-	@Autowired
+	@Resource
 	private TaskAttributionLogMapper taskAttributionLogMapper;
-	@Autowired
+	@Resource
 	private TTaskLogMapper tTaskLogMapper;
-	@Autowired
+	@Resource
 	private DepartmentMapper departmentMapper;
-	@Autowired
+	@Resource
 	private OrderChangeLogMapper orderChangeLogMapper;
-	@Autowired
+	@Resource
 	private TOrderMidMapper tOrderMidMapper;
-	@Autowired
+	@Resource
 	private RoleMapper roleMapper;
-	@Autowired
+	@Resource
 	private ExpenseAccountMapper expenseAccountMapper;
-	@Autowired
+	@Resource
 	private TOrderInvoiceMapper tOrderInvoiceMapper;
-	@Autowired
+	@Resource
 	private TTaskMemberMapper tTaskMemberMapper;
-	@Autowired
+	@Resource
 	private TOrderPaymentMapper tOrderPaymentMapper;
-	@Autowired
+	@Resource
 	private AdminUserCountMapper adminUserCountMapper;
-	@Autowired
+	@Resource
 	private FinanceCountMapper financeCountMapper;
+	@Resource
+	private WeChatUtils weChatUtils;
 
 
 
@@ -138,20 +140,20 @@ public class AsyncUtils {
 				SendEmailUtil.getInstance().send(emailBo);
 				LoggerUtils.debug(getClass(),String.format("=============发送邮件==>%s===>%s",emailBo.getSubject(),emailBo.getAddress()));
 			}
-		} catch (MessagingException e) {
-			e.printStackTrace();
-		} catch (UnsupportedEncodingException e) {
+		} catch (MessagingException | UnsupportedEncodingException e) {
 			e.printStackTrace();
 		}
 	}
 
 
+	/**
+	 * 发送邮件
+	 * @param bo 邮件信息
+	 */
 	public void send(EmailBo bo){
 		try {
-
 			if (bo.getAddress()==null){
-				LoggerUtils.debug(getClass(),String.format("====================" +
-						"邮件发送失败,发送地址={%s}",bo.getAddress()));
+				LoggerUtils.debug(getClass(),"邮件发送失败,发送地址不纯在");
 			}else {
 				SendEmailUtil.getInstance().send(bo);
 				LoggerUtils.debug(getClass(),String.format("====================" +
@@ -193,6 +195,10 @@ public class AsyncUtils {
 		addNoticAndEmail(n);
 	}
 
+
+
+
+
 	public void addNoticAndEmail(Notice n) {
 		n.setType(NoticeTypes.getType(n.getNoticeType()));
 		AdminListBo a = adminMapper.getDeptNameByAid(n.getAid());
@@ -636,7 +642,7 @@ public class AsyncUtils {
 					updateOrderAndChangeExamine(usead, roleType);
 				}
 			}else if (roleType.equals(AFTConstants.SALESMAN)){
-				if (!ad.getManagerId().equals(usead.getManagerId())){
+				if (ad.getManagerId()!=null&&usead.getManagerId()!=null&&!ad.getManagerId().equals(usead.getManagerId())){
 					updateOrderAndChangeExamine(ad, roleType);
 				}
 			}else {
@@ -825,4 +831,10 @@ public class AsyncUtils {
 			}
 		}
 	}
+
+
+	public void sendWeChat( String publicCarbonCopy,Integer id, String name, String startTime, String endTime, String typeName, String plan) {
+		Admin admin = adminMapper.selectByPrimaryKey(publicCarbonCopy);
+		weChatUtils.addSendCopyNotice(admin.getOpenId(), id, name, startTime, endTime, typeName, plan);
+	}
 }

+ 7 - 1
src/main/java/com/goafanti/common/utils/DateUtils.java

@@ -25,7 +25,8 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 	private static String[] parsePatterns = {
 			"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
 			"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
-			"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+			"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM",
+			"yyyy年MM月dd日", "yyyy年MM月dd日 HH:mm:ss", "yyyy年MM月dd日 HH:mm", "yyyy年MM月",};
 
 	/**
 	 * Determines how two dates compare up to no more than the specified most
@@ -421,6 +422,11 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 		return format.format(date);
 	}
 
+	public static String formatDateChineseYYYYMMddHH(Date date) {
+		SimpleDateFormat format = new SimpleDateFormat(parsePatterns[14]);
+		return format.format(date);
+	}
+
 	/**
 	 * 解析日期
 	 * @param source

+ 49 - 1
src/main/java/com/goafanti/common/utils/WeChatUtils.java

@@ -51,6 +51,7 @@ public class WeChatUtils {
 	 * 公出审核结果通知
 	 */
 	private static final String EXPENSE_RELEASE_EXAMINE_RESULT="rRPWzRcGY8BGwlk0xyjwR1RKdv3iRFXaU3bcK1300gw";
+	private static final String PUBLIC_RELEASE_SEND_COPY="UGlNqF1VQsxYh6iVKrDuw_EkhrDNU6TXv4snGw4xze8";
 
 
 	/**
@@ -88,10 +89,57 @@ public class WeChatUtils {
 
 	}
 
+
+	/**
+	 * 推送微信订阅信息,跳转为公出信息
+	 * @param openid 发送对象微信openid
+	 * @param id 公出id
+	 * @param name 发起者名称
+	 * @param startTime 开始时间
+	 * @param endTime 结束时间
+	 * @param typeName 类型名称
+	 * @param plan 抄送说明
+	 */
+	public Integer addSendCopyNotice(String openid ,Integer id,String name, String startTime, String endTime, String typeName, String plan) {
+		Map<String, Object> map=new HashMap<String, Object>();
+		String accessToken=getAccessToken();
+		String url=send_url.replace("ACCESS_TOKEN", accessToken);
+		map.put("access_token", accessToken);
+		map.put("touser", openid);
+		map.put("page", "pages/egressDetails/index?id="+id);
+		map.put("miniprogram_state", wxState);
+		map.put("template_id", PUBLIC_RELEASE_SEND_COPY);
+		map.put("data",getSendCopyData(name, startTime, endTime, typeName, plan));
+		return SendHttpPost(map, url);
+
+	}
+
+	private Object getSendCopyData(String name, String startTime, String endTime, String typeName, String plan) {
+		Map<String, Object> we=new HashMap<String, Object>();
+		if (plan.length()>20)plan=plan.substring(0,17)+"...";
+		Map<String, Object> v1=new HashMap<String, Object>();
+		v1.put("value",name);
+		we.put("thing1", v1);
+		Map<String, Object> v2=new HashMap<String, Object>();
+		v2.put("value", typeName);
+		we.put("thing2", v2);
+		Map<String, Object> v3=new HashMap<String, Object>();
+		v3.put("value", plan);
+		we.put("thing3", v3);
+		Map<String, Object> v4=new HashMap<String, Object>();
+		v4.put("value", startTime);
+		we.put("time4", v4);
+		Map<String, Object> v5=new HashMap<String, Object>();
+		v5.put("value", endTime);
+		we.put("time5", v5);
+		return we;
+	}
+
 	private Integer SendHttpPost(Map<String, Object> map, String url) {
 		JSONObject res=HttpUtils.httpPost(url, map);
 		if (res.get("errcode")!=null) {
-			LoggerUtils.error(this.getClass(),String.format("errcode={%s}",res.getInteger("errcode").toString()));
+			LoggerUtils.error(this.getClass(),String.format("================errcode={%s}",res));
+			LoggerUtils.error(this.getClass(),String.format("================data={%s}",map.get("data")));
 			return res.getInteger("errcode");
 		}else {
 			return 1;

+ 94 - 0
src/main/java/com/goafanti/customer/bo/InputUserData.java

@@ -0,0 +1,94 @@
+package com.goafanti.customer.bo;
+
+public class InputUserData {
+   private String uid;
+   private Integer province;
+   private Integer city;
+   private Integer area;
+   private String businessScope;
+   private String intendedProject;
+   private String introduction;
+   private Integer channelType;
+   private String orgCode;
+   private Integer industry;
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public Integer getCity() {
+        return city;
+    }
+
+    public void setCity(Integer city) {
+        this.city = city;
+    }
+
+    public Integer getArea() {
+        return area;
+    }
+
+    public void setArea(Integer area) {
+        this.area = area;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public String getIntroduction() {
+        return introduction;
+    }
+
+    public void setIntroduction(String introduction) {
+        this.introduction = introduction;
+    }
+
+    public Integer getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(Integer channelType) {
+        this.channelType = channelType;
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+
+    public Integer getIndustry() {
+        return industry;
+    }
+
+    public void setIndustry(Integer industry) {
+        this.industry = industry;
+    }
+}

+ 39 - 0
src/main/java/com/goafanti/customer/bo/MyUserDetailsBo.java

@@ -0,0 +1,39 @@
+package com.goafanti.customer.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+public class MyUserDetailsBo {
+
+    private String id;
+
+    private Date releaseStart;
+
+    private String aname;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    public Date getReleaseStart() {
+        return releaseStart;
+    }
+
+    public void setReleaseStart(Date releaseStart) {
+        this.releaseStart = releaseStart;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+}

+ 37 - 0
src/main/java/com/goafanti/customer/bo/OutChannelListBo.java

@@ -33,6 +33,43 @@ public class OutChannelListBo {
     private String lastFollowTime;
     /*剩余天数*/
     private String RemainingDays;
+    private String intendedProject;
+
+    private Integer enterpriseCount;
+    private String channelIndicators;
+    private String interviewDistribution;
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public Integer getEnterpriseCount() {
+        return enterpriseCount;
+    }
+
+    public void setEnterpriseCount(Integer enterpriseCount) {
+        this.enterpriseCount = enterpriseCount;
+    }
+
+    public String getChannelIndicators() {
+        return channelIndicators;
+    }
+
+    public void setChannelIndicators(String channelIndicators) {
+        this.channelIndicators = channelIndicators;
+    }
+
+    public String getInterviewDistribution() {
+        return interviewDistribution;
+    }
+
+    public void setInterviewDistribution(String interviewDistribution) {
+        this.interviewDistribution = interviewDistribution;
+    }
 
     public String getIntroduction() {
         return introduction;

+ 16 - 0
src/main/java/com/goafanti/customer/bo/OutUserSuperEvaluate.java

@@ -0,0 +1,16 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.UserSuperEvaluate;
+
+public class OutUserSuperEvaluate extends UserSuperEvaluate {
+
+    private String adminName;
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+}

+ 248 - 0
src/main/java/com/goafanti/customer/bo/PublicReleaseListBo.java

@@ -0,0 +1,248 @@
+package com.goafanti.customer.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+public class PublicReleaseListBo {
+
+    private Integer prdId;
+    private String uid;
+    private String ufid;
+    /**
+     * 公出时间
+     */
+    private String releaseStarts;
+    /**
+     * 公出时长
+     */
+    private String duration;
+    /**
+     * 公出发起人
+     */
+    private String aname;
+    private Integer assist;
+    /**
+     * 协单人
+     */
+    private String assistAidName;
+    /**
+     * 协单助手
+     */
+    private String assistantName;
+    /**
+     * 公出备注
+     */
+    private String remarks;
+    /**
+     * 公出补充
+     */
+    private String supplement;
+    /**
+     * 公出计划
+     */
+    private String plan;
+    /**
+     * 下次计划
+     */
+    private String nextPlan;
+
+    /**
+     * 预计效果
+     */
+    private String expectedEffect;
+    private String assistantAid;
+    /**
+     * 跟进人
+     */
+    private String followName;
+    /**
+     * 跟进部门
+     */
+    private String followDep;
+    /**
+     * 跟进结果
+     */
+    private String result;
+    /**
+     * 联系类型  0外出 1.电话 2.QQ 3.微信4邮件 5公出打卡 6来访面谈
+     */
+    private Integer contactType;
+    /**
+     * 跟进时间
+     */
+    private Date followTime;
+    /**
+     * 跟进次数
+     */
+    private Integer followCount;
+
+    public Integer getPrdId() {
+        return prdId;
+    }
+
+    public void setPrdId(Integer prdId) {
+        this.prdId = prdId;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getUfid() {
+        return ufid;
+    }
+
+    public void setUfid(String ufid) {
+        this.ufid = ufid;
+    }
+
+    public String getReleaseStarts() {
+        return releaseStarts;
+    }
+
+    public void setReleaseStarts(String releaseStarts) {
+        this.releaseStarts = releaseStarts;
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public void setDuration(String duration) {
+        this.duration = duration;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public Integer getAssist() {
+        return assist;
+    }
+
+    public void setAssist(Integer assist) {
+        this.assist = assist;
+    }
+
+    public String getAssistantName() {
+        return assistantName;
+    }
+
+    public void setAssistantName(String assistantName) {
+        this.assistantName = assistantName;
+    }
+
+    public String getAssistAidName() {
+        return assistAidName;
+    }
+
+    public void setAssistAidName(String assistAidName) {
+        this.assistAidName = assistAidName;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public String getSupplement() {
+        return supplement;
+    }
+
+    public void setSupplement(String supplement) {
+        this.supplement = supplement;
+    }
+
+    public String getPlan() {
+        return plan;
+    }
+
+    public void setPlan(String plan) {
+        this.plan = plan;
+    }
+
+    public String getNextPlan() {
+        return nextPlan;
+    }
+
+    public void setNextPlan(String nextPlan) {
+        this.nextPlan = nextPlan;
+    }
+
+    public String getExpectedEffect() {
+        return expectedEffect;
+    }
+
+    public void setExpectedEffect(String expectedEffect) {
+        this.expectedEffect = expectedEffect;
+    }
+
+    public String getAssistantAid() {
+        return assistantAid;
+    }
+
+    public void setAssistantAid(String assistantAid) {
+        this.assistantAid = assistantAid;
+    }
+
+    public String getFollowName() {
+        return followName;
+    }
+
+    public void setFollowName(String followName) {
+        this.followName = followName;
+    }
+
+    public String getFollowDep() {
+        return followDep;
+    }
+
+    public void setFollowDep(String followDep) {
+        this.followDep = followDep;
+    }
+
+    public String getResult() {
+        return result;
+    }
+
+    public void setResult(String result) {
+        this.result = result;
+    }
+
+    public Integer getContactType() {
+        return contactType;
+    }
+
+    public void setContactType(Integer contactType) {
+        this.contactType = contactType;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    public Date getFollowTime() {
+        return followTime;
+    }
+
+    public void setFollowTime(Date followTime) {
+        this.followTime = followTime;
+    }
+
+    public Integer getFollowCount() {
+        return followCount;
+    }
+
+    public void setFollowCount(Integer followCount) {
+        this.followCount = followCount;
+    }
+}

+ 63 - 0
src/main/java/com/goafanti/customer/bo/SelectMyUserBo.java

@@ -0,0 +1,63 @@
+package com.goafanti.customer.bo;
+
+public class SelectMyUserBo {
+
+    /**
+     *  0=所有,1=公出过的企业
+     */
+    private Integer type;
+    private Integer level;
+
+    private Integer shareType;
+    private String name;
+    private Integer pageNo;
+    private Integer pageSize;
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+}

+ 138 - 0
src/main/java/com/goafanti/customer/bo/SelectMyUserOut.java

@@ -0,0 +1,138 @@
+package com.goafanti.customer.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+public class SelectMyUserOut {
+
+    private String id;
+    private String nickname;
+    private Integer shareType;
+    private Integer newChannel;
+    private Integer signBills;
+    private Date signTime;
+    private String adminName;
+    private String orgCode;
+
+    private Integer locationProvince;
+    private Integer locationCity;
+    private Integer locationArea;
+    private String locationProvinceName;
+    private String locationCityName;
+    private String locationAreaName;
+
+    public Integer getLocationProvince() {
+        return locationProvince;
+    }
+
+    public void setLocationProvince(Integer locationProvince) {
+        this.locationProvince = locationProvince;
+    }
+
+    public Integer getLocationCity() {
+        return locationCity;
+    }
+
+    public void setLocationCity(Integer locationCity) {
+        this.locationCity = locationCity;
+    }
+
+    public Integer getLocationArea() {
+        return locationArea;
+    }
+
+    public void setLocationArea(Integer locationArea) {
+        this.locationArea = locationArea;
+    }
+
+    public String getLocationProvinceName() {
+        return locationProvinceName;
+    }
+
+    public void setLocationProvinceName(String locationProvinceName) {
+        this.locationProvinceName = locationProvinceName;
+    }
+
+    public String getLocationCityName() {
+        return locationCityName;
+    }
+
+    public void setLocationCityName(String locationCityName) {
+        this.locationCityName = locationCityName;
+    }
+
+    public String getLocationAreaName() {
+        return locationAreaName;
+    }
+
+    public void setLocationAreaName(String locationAreaName) {
+        this.locationAreaName = locationAreaName;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+
+    public Integer getShareType() {
+        return shareType;
+    }
+
+    public void setShareType(Integer shareType) {
+        this.shareType = shareType;
+    }
+
+    public Integer getNewChannel() {
+        return newChannel;
+    }
+
+    public void setNewChannel(Integer newChannel) {
+        this.newChannel = newChannel;
+    }
+
+    public Integer getSignBills() {
+        return signBills;
+    }
+
+    public void setSignBills(Integer signBills) {
+        this.signBills = signBills;
+    }
+
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
+    public Date getSignTime() {
+        return signTime;
+    }
+
+    public void setSignTime(Date signTime) {
+        this.signTime = signTime;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+}

+ 100 - 0
src/main/java/com/goafanti/customer/bo/UserArchivesDetails.java

@@ -0,0 +1,100 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.model.OrganizationContactBook;
+import com.goafanti.common.model.UserArchives;
+
+import java.util.List;
+
+public class UserArchivesDetails extends UserArchives {
+    private String industryName;
+    private Integer industry;
+    private String orgCode;
+    private String businessScope;
+    private String intendedProject;
+    private String nickname;
+    private Integer myUser;
+    private Integer newChannel;
+    private Integer channelType;
+
+    public Integer getNewChannel() {
+        return newChannel;
+    }
+
+    public void setNewChannel(Integer newChannel) {
+        this.newChannel = newChannel;
+    }
+
+    public Integer getChannelType() {
+        return channelType;
+    }
+
+    public void setChannelType(Integer channelType) {
+        this.channelType = channelType;
+    }
+
+    public Integer getMyUser() {
+        return myUser;
+    }
+
+    public void setMyUser(Integer myUser) {
+        this.myUser = myUser;
+    }
+
+    List<OrganizationContactBook> contactList;
+
+    public Integer getIndustry() {
+        return industry;
+    }
+
+    public void setIndustry(Integer industry) {
+        this.industry = industry;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getIndustryName() {
+        return industryName;
+    }
+
+    public void setIndustryName(String industryName) {
+        this.industryName = industryName;
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public List<OrganizationContactBook> getContactList() {
+        return contactList;
+    }
+
+    public void setContactList(List<OrganizationContactBook> contactList) {
+        this.contactList = contactList;
+    }
+}

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

@@ -19,14 +19,12 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.customer.bo.*;
 import com.goafanti.customer.service.CustomerService;
+import com.goafanti.customer.service.UserArchivesService;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -54,6 +52,8 @@ public class AdminCustomerApiController extends BaseApiController{
 	private Integer USER_RECEIVE_MAX = null;
 	@Resource
 	private AdminService adminService;
+	@Resource
+	private UserArchivesService userArchivesService;
 
 	@Value(value = "${aesSecretKey}")
 	private String							secretKey	= null;
@@ -1116,7 +1116,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	public Result addOneContact(OrganizationContactBook ocb){
 		Result res = new Result();
 		if(StringUtils.isBlank(ocb.getUid())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,""));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"客户编号"));
 			return res;
 		}
 		if(StringUtils.isBlank(ocb.getName()) || StringUtils.isBlank(ocb.getMobile())){
@@ -1501,17 +1501,16 @@ public class AdminCustomerApiController extends BaseApiController{
 
 	/** 修改客户关键资料 **/
 	@RequestMapping(value = "/updateUserDate", method = RequestMethod.POST)
-	public Result updateUserDate(String uid,Integer province,Integer city,Integer area,String businessScope,String intendedProject,String introduction
-	,Integer channelType,String orgCode){
+	public Result updateUserDate(InputUserData in ){
 		Result res = new Result();
-		if (orgCode!=null){
-			orgCode=orgCode.trim();
-			if (customerService.checkOrgCode(orgCode)){
+		if (in.getOrgCode()!=null){
+			in.setOrgCode(in.getOrgCode().trim());
+			if (customerService.checkOrgCode(in.getOrgCode())){
 				res.getError().add(buildError("","统一信用代码已存在"));
 				return res;
 			}
 		}
-		res.data(customerService.updateUserDate(uid, province, city, area, businessScope, intendedProject,introduction,channelType,orgCode));
+		res.data(customerService.updateUserDate(in));
 		return res;
 	}
 
@@ -1620,4 +1619,43 @@ public class AdminCustomerApiController extends BaseApiController{
 
 		return customerService.importExcel(file);
 	}
+
+	/**
+	 * 获取我的客户列表
+	 * @param in
+	 * @return
+	 */
+	@GetMapping("/selectMyUser")
+	public Result<Pagination<SelectMyUserOut>> selectMyUser(SelectMyUserBo in ){
+		Result res = new Result();
+		res.data(customerService.selectMyUser(in));
+		return res;
+	}
+
+	/**
+	 * 获取我的客户信息
+	 * @param id
+	 * @return
+	 */
+	@GetMapping("/selectMyUserDetails")
+	public Result<Pagination<SelectMyUserOut>> selectMyUserDetails(String id ){
+		Result res = new Result();
+		res.data(customerService.selectMyUserDetails(id));
+		return res;
+	}
+
+
+	/**
+	 * 客户公出情况
+	 */
+	@GetMapping("/getPublicReleaseList")
+	public Result<List<PublicReleaseListBo>> getPublicReleaseList(String id) {
+		Result res = new Result();
+		if (userArchivesService.checkPermission(id)){
+			res.error(buildError("查看超时,请要分享人重新分享。"));
+			return res;
+		}
+		res.setData(customerService.getPublicReleaseList(id));
+		return res;
+	}
 }

+ 121 - 0
src/main/java/com/goafanti/customer/controller/UserArchivesController.java

@@ -0,0 +1,121 @@
+package com.goafanti.customer.controller;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.model.UserArchives;
+import com.goafanti.customer.service.UserArchivesService;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
+/**
+ * 客户档案表(UserArchives)表控制层
+ *
+ * @author makejava
+ * @since 2024-07-12 11:52:01
+ */
+@RestController
+@RequestMapping("/api/admin/userArchives")
+public class UserArchivesController  extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private UserArchivesService userArchivesService;
+
+
+    /**
+     * 新增数据
+     *
+     * @param userArchives 实体
+     * @return 新增结果
+     */
+    @PostMapping("/add")
+    public Result add(UserArchives userArchives) {
+        return new Result<>().data(this.userArchivesService.insert(userArchives));
+    }
+    
+    
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/get")
+    public Result<UserArchives> queryById( Integer id) {
+        return new Result<>().data(this.userArchivesService.queryById(id));
+    }
+
+
+
+    /**
+     * 编辑用户档案数据
+     *
+     * @param userArchives 实体
+     * @return 编辑结果
+     */
+    @PostMapping("/update")
+    public Result edit(UserArchives userArchives,Integer channelType) {
+        return new Result<>().data(this.userArchivesService.update(userArchives,channelType));
+    }
+
+    /**
+     * 删除数据
+     *
+     * @param id 主键
+     * @return 删除是否成功
+     */
+    @GetMapping("/delete")
+    public Result deleteById(Integer id) {
+        return new Result<>().data(this.userArchivesService.deleteById(id));
+    }
+    
+        /**
+     * 列表查询
+     * @param in 参数
+     */
+    @GetMapping("/list")
+    public Result<UserArchives> list(UserArchives in, Integer pageNo, Integer pageSize) {
+        return new Result<>().data(this.userArchivesService.list(in,  pageNo,  pageSize));
+    }
+
+    /**
+     * 查询企业档案
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/queryByUid")
+    public Result<UserArchives> queryByUid( String id) {
+        return new Result<>().data(this.userArchivesService.queryByUid(id));
+    }
+
+
+    /**
+     * 微信查询查询企业其他信息与档案信息
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/queryByUidAll")
+    public Result queryByUidAll( String id) {
+        Result res = new Result<>();
+        if (userArchivesService.checkPermission(id)){
+            res.error(buildError("查看超时,请要分享人重新分享。"));
+            return res;
+        }
+        res.data(this.userArchivesService.queryByUidAll(id));
+        return res;
+    }
+
+
+
+
+
+
+}
+

+ 92 - 0
src/main/java/com/goafanti/customer/controller/UserSuperEvaluateController.java

@@ -0,0 +1,92 @@
+package com.goafanti.customer.controller;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.model.UserSuperEvaluate;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.customer.service.UserSuperEvaluateService;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
+/**
+ * 客户上级评价(UserSuperEvaluate)表控制层
+ *
+ * @author makejava
+ * @since 2024-07-17 08:51:36
+ */
+@RestController
+@RequestMapping("/api/admin/userSuperEvaluate")
+public class UserSuperEvaluateController extends BaseApiController{
+    /**
+     * 服务对象
+     */
+    @Resource
+    private UserSuperEvaluateService userSuperEvaluateService;
+
+
+    /**
+     * 新增数据
+     *
+     * @param userSuperEvaluate 实体
+     * @return 新增结果
+     */
+    @PostMapping("/add")
+    public Result add(UserSuperEvaluate userSuperEvaluate) {
+        return new Result<>().data(this.userSuperEvaluateService.insert(userSuperEvaluate));
+    }
+    
+    
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/get")
+    public Result<UserSuperEvaluate> queryById( Integer id) {
+        return new Result<>().data(this.userSuperEvaluateService.queryById(id));
+    }
+
+
+
+    /**
+     * 编辑数据
+     *
+     * @param userSuperEvaluate 实体
+     * @return 编辑结果
+     */
+    @PostMapping("/update")
+    public Result edit(UserSuperEvaluate userSuperEvaluate) {
+        return new Result<>().data(this.userSuperEvaluateService.update(userSuperEvaluate));
+    }
+
+    /**
+     * 删除数据
+     *
+     * @param id 主键
+     * @return 删除是否成功
+     */
+    @GetMapping("/delete")
+    public Result deleteById(Integer id) {
+        return new Result<>().data(this.userSuperEvaluateService.deleteById(id));
+    }
+    
+        /**
+     * 列表查询
+     * @param in 参数
+     * @return
+     */
+    @GetMapping("/list")
+    public Result list(UserSuperEvaluate in , Integer pageNo, Integer pageSize) {
+        if (StringUtils.isBlank(in.getUid())){
+            return new Result<>().error(buildError("客户选择不能为空"));
+        }
+        return new Result<>().data(this.userSuperEvaluateService.list(in,  pageNo,  pageSize));
+    }
+
+}
+

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

@@ -540,8 +540,7 @@ public interface CustomerService {
 
 	boolean checkData(String uid, String aid);
 
-    int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,
-					   String introduction,Integer channelType,String orgCode);
+    int updateUserDate(InputUserData in );
 
 	Pagination<OutChannelListBo> channelUserList(InputChannelListBo in);
 
@@ -591,4 +590,10 @@ public interface CustomerService {
 
 	Object getRestrictCustomerByName(String name);
 
+    Object selectMyUser(SelectMyUserBo in);
+
+	Object selectMyUserDetails(String id);
+	UserArchivesDetails selectUserByUid(String id);
+
+	Object getPublicReleaseList(String id);
 }

+ 54 - 0
src/main/java/com/goafanti/customer/service/UserArchivesService.java

@@ -0,0 +1,54 @@
+package com.goafanti.customer.service;
+
+import com.goafanti.common.model.UserArchives;
+
+/**
+ * 客户档案表(UserArchives)表服务接口
+ *
+ * @author makejava
+ * @since 2024-07-12 11:52:01
+ */
+public interface UserArchivesService {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserArchives queryById(Integer id);
+
+    
+
+    /**
+     * 新增数据
+     *
+     * @param userArchives 实例对象
+     * @return 实例对象
+     */
+    UserArchives insert(UserArchives userArchives);
+
+    /**
+     * 修改数据
+     *
+     * @param userArchives 实例对象
+     * @return 实例对象
+     */
+    UserArchives update(UserArchives userArchives,Integer channelType);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    boolean deleteById(Integer id);
+
+    Object list(UserArchives in, Integer pageNo, Integer pageSize);
+
+    Object queryByUid(String id);
+
+    Object queryByUidAll(String id);
+
+    boolean checkPermission(String id);
+}

+ 55 - 0
src/main/java/com/goafanti/customer/service/UserSuperEvaluateService.java

@@ -0,0 +1,55 @@
+package com.goafanti.customer.service;
+
+import com.goafanti.common.model.UserSuperEvaluate;
+
+/**
+ * 客户上级评价(UserSuperEvaluate)表服务接口
+ *
+ * @author makejava
+ * @since 2024-07-17 08:51:36
+ */
+public interface UserSuperEvaluateService {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserSuperEvaluate queryById(Integer id);
+
+    
+
+    /**
+     * 新增数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 实例对象
+     */
+    UserSuperEvaluate insert(UserSuperEvaluate userSuperEvaluate);
+
+    /**
+     * 修改数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 实例对象
+     */
+    UserSuperEvaluate update(UserSuperEvaluate userSuperEvaluate);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    boolean deleteById(Integer id);
+    
+    /**
+     * 列表数据
+     *
+     * @param in 参数
+     * @return 是否成功
+     */
+    Object list(UserSuperEvaluate  in, Integer pageNo, Integer pageSize);
+
+}

+ 122 - 77
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -24,7 +24,6 @@ import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.ibatis.builder.BuilderException;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,13 +41,13 @@ import java.util.*;
 
 @Service
 public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements CustomerService {
-	@Autowired
+	@Resource
 	private UserMapper userMapper;
-	@Autowired
+	@Resource
 	private UserIdentityMapper userIdentityMapper;
-	@Autowired
+	@Resource
 	private OrganizationIdentityMapper organizationIdentityMapper;
-	@Autowired
+	@Resource
 	private OrganizationContactBookMapper organizationContactBookMapper;
 	@Resource(name = "passwordUtil")
 	private PasswordUtil passwordUtil;
@@ -108,13 +107,13 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private PublicReleaseLogMapper publicReleaseLogMapper;
 	@Resource
 	private PublicReleaseMapper publicReleaseMapper;
-	@Autowired
+	@Resource
 	private SystemWebSocketHandler systemWebSocketHandler;
-	@Autowired
+	@Resource
 	private AdminUserCountMapper adminUserCountMapper;
-	@Autowired
+	@Resource
 	private RestrictProjectMapper restrictProjectMapper;
-	@Autowired
+	@Resource
 	private	AsyncUtils asyncUtils;
 
 
@@ -123,7 +122,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Value(value = "${upload.path}")
 	private String uploadPath = null;
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listPrivatePersonalCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
@@ -138,40 +136,33 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return list;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
 		Map<String, Object> params = disposeParams(cli);
-		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPublicPersonalCustomerList",
+        return (Pagination<CustomerListOut>) findPage("selectPublicPersonalCustomerList",
 				"selectPublicPersonalCustomerCount", params, pageNo, pageSize);
-		return list;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
 		Map<String, Object> params = disposeParams(cli);
-		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList",
+        return (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList",
 				"selectPersonalCustomerCount", params, pageNo, pageSize);
-		return list;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
 		Map<String, Object> params = disposeParams(cli);
-		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectManagePersonalCustomerList",
+        return (Pagination<CustomerListOut>) findPage("selectManagePersonalCustomerList",
 				"selectManagePersonalCustomerCount", params, pageNo, pageSize);
-		return list;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer sort,
 			Integer sortType, Integer power, Integer pageNo, Integer pageSize) {
@@ -213,19 +204,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return list;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
 		Map<String, Object> params = disposeParams(cli);
-		Pagination<CustomerListOut> p = (Pagination<CustomerListOut>) findPage("selectPublicOrganizationCustomerList",
+        return (Pagination<CustomerListOut>) findPage("selectPublicOrganizationCustomerList",
 				"selectPublicOrganizationCustomerCount", params, pageNo, pageSize);
-		return p;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
@@ -278,8 +266,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		String newstr1=name.replaceAll(" ",","); //先把所有空格替换成 逗号。
 		String newstr2=newstr1.replaceAll("\t",",");  //再把所有的制表符替换成逗号。
 		String newstr3=newstr2.replaceAll(",+", ","); //把所有重复的逗号合并成一个逗号。
-		String[] strings=newstr3.split(",");     //按逗号分解该字符串。
-		return strings;
+        return newstr3.split(",");
 	}
 
 	@Override
@@ -289,15 +276,13 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
 		cli.setAid(TokenManager.getAdminId());
 		Map<String, Object> params = disposeParams(cli);
-		@SuppressWarnings("unchecked")
-		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage(
+        return (Pagination<CustomerListOut>) findPage(
 				"selectManageOrganizationCustomerList", "selectManageOrganizationCustomerCount", params, pageNo,
 				pageSize);
-		return list;
 	}
 
 	private Map<String, Object> disposeParams(CustomerListIn cli) {
-		Map<String, Object> params = new HashMap<String, Object>();
+		Map<String, Object> params = new HashMap<>();
 		if (StringUtils.isNotBlank(cli.getType()))
 			params.put("type", Integer.parseInt(cli.getType()));
 		if (StringUtils.isNotBlank(cli.getName()))
@@ -401,6 +386,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			ui.setAuditStatus(IdentityProcess.SUCCESS.getCode());// 认证个人
 			userIdentityMapper.insert(ui);
 		} else if (Objects.equals(in.getType(), UserType.ORGANIZATION.getCode())) {
+			//判定客户名称
 			checkUserName(in);
 			UserMid um=new UserMid();
 			um.setAid(user.getAid());
@@ -450,11 +436,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cob.setMajor(AFTConstants.YES);
 		organizationContactBookMapper.insert(cob);
 		// 新增锁定数据
-		boolean isUs = false;
-		if (uid.contains(",")) {
-			isUs = true;
-		}
-		List<String> uList = new ArrayList<>();
+		boolean isUs = uid.contains(",");
+        List<String> uList = new ArrayList<>();
 		if (isUs) {
 			uList = Arrays.asList(uid.split(","));
 		}
@@ -475,12 +458,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		String startTime=DateUtils.formatDate(transferTime,AFTConstants.YYYYMMDD);
 		String endTime=startTime+" 23:59:59";
 		AdminUserCount adminUserCount=getAdminUserCount(aid,startTime);
-		if (adminUserCount==null){
-			AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
-			if(selectAUC!=null) adminUserCountMapper.insertSelective(selectAUC);
+        AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
+        if (adminUserCount==null){
+            if(selectAUC!=null) adminUserCountMapper.insertSelective(selectAUC);
 		}else {
-			AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
-			AdminUserCount newAUC=new AdminUserCount();
+            AdminUserCount newAUC=new AdminUserCount();
 			newAUC.setId(adminUserCount.getId());
 			if (selectAUC==null){
 				newAUC.setPrivateCount(0);
@@ -767,7 +749,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Override
 
 	public List<OrganizationContactBook> findCustomerContacts(String uid) {
-		List<OrganizationContactBook> list = userMapper.findCustomerContacts(uid, null);
+		List<OrganizationContactBook> list = userMapper.findCustomerContacts(uid, TokenManager.getAdminId());
 		for (OrganizationContactBook ob : list) {
 			if (!ob.getAid().equals(TokenManager.getAdminId())){
 				ob.setName("***");
@@ -1006,16 +988,15 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			String endTime=startTime+" 23:59:59";
 			AdminUserCount adminUserCount = getAdminUserCount(aid,startTime);
 			Integer count = userFollowMapper.selectByaidAndDate(aid, startTime, endTime);
-			if (adminUserCount==null){
-				AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
-				if (selectAUC==null)selectAUC=new AdminUserCount();
+            AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
+            if (adminUserCount==null){
+                if (selectAUC==null)selectAUC=new AdminUserCount();
 				selectAUC.setFollowCount(count);
 				selectAUC.setAid(aid);
 				selectAUC.setDateTime(transferTime);
 				adminUserCountMapper.insertSelective(selectAUC);
 			}else {
-				AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
-				AdminUserCount newAUC=new AdminUserCount();
+                AdminUserCount newAUC=new AdminUserCount();
 				newAUC.setId(adminUserCount.getId());
 				newAUC.setFollowCount(count);
 				if (selectAUC==null){
@@ -1396,6 +1377,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		List<User> useList=new ArrayList<>();
 		List<User> newList=new ArrayList<>();
 		//领取
+		boolean typeFlag = AFTConstants.USER_TRANSFER_TO_OTHER.equals(operatorType)
+				|| AFTConstants.SIGN_USER_TRANSFER_TO_OTHER.equals(operatorType)
+				|| AFTConstants.CHANNEL_USER_TRANSFER_TO_OTHER.equals(operatorType);
 		if (AFTConstants.USER_RECEIVE.equals(operatorType)) {
 			User use = userMapper.selectByPrimaryKey(uid);
 			user.setAid(TokenManager.getAdminId());
@@ -1411,9 +1395,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			updateUserMid(aid,uid,0,null);
 			organizationContactBookMapper.updateAdmin(uid,aid);
 			//转交
-		} else if (AFTConstants.USER_TRANSFER_TO_OTHER.equals(operatorType)
-				|| AFTConstants.SIGN_USER_TRANSFER_TO_OTHER .equals(operatorType)
-				|| AFTConstants.CHANNEL_USER_TRANSFER_TO_OTHER .equals(operatorType)) {
+		} else if (typeFlag) {
 
 			if (!isUs) {
 				user.setAid(aid);
@@ -1476,7 +1458,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 						throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL, ""));
 				}
 			}
-			Integer type = 2;
+			int type = 2;
 			if (AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType)type = 7;
 
 			addUserTransferLog(uid, aid,oldAid, type, null, now, uList);
@@ -1484,7 +1466,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			transferUser(uList,aid,uid);
 		}
 		if (isUs) {
-			if (AFTConstants.USER_RECEIVE == operatorType) {
+			if (AFTConstants.USER_RECEIVE.equals(operatorType)) {
 				userMapper.updateList(aid, null, 3, null, 2, uList,null);
 			} else {
 				userMapper.updateList(aid, null, 3, null, null, uList,data);
@@ -1496,9 +1478,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if (AFTConstants.USER_RECEIVE.equals(operatorType)){
 			updateAdminUserCount(user.getAid(),user.getTransferTime());
 		}
-		if (AFTConstants.USER_TRANSFER_TO_OTHER.equals(operatorType)
-				|| AFTConstants.SIGN_USER_TRANSFER_TO_OTHER .equals(operatorType)
-				|| AFTConstants.CHANNEL_USER_TRANSFER_TO_OTHER .equals(operatorType)) {
+		if (typeFlag) {
 			updateAdminUserCountTransfer(useList,newList);
 		}
 		return errors;
@@ -1540,7 +1520,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				PublicRelease pr=new PublicRelease();
 				pr.setId(e.getId());
 				pr.setPublicType(0);
-				publicReleaseMapper.updateByPrimaryKeySelective(pr);
+				publicReleaseMapper.update(pr);
 				Admin sendAdmin=adminMapper.selectByPrimaryKey(admin.getReviewer());
 				noticeAid=sendAdmin.getId();
 				logStatus=2;
@@ -2601,11 +2581,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		Date date = new Date();
 		List<LockingReleaseBo> newList = new ArrayList<LockingReleaseBo>();
 		List<UserTransferLog> list3 = new ArrayList<UserTransferLog>();
-		if (list != null && list.size() > 0) {
+		if (!list.isEmpty()) {
 			for (int i = 0; i < list.size(); i++) {
 				newList.add(list.get(i));
 				if (50 == newList.size() || i == list.size() - 1) {
-					if (newList.size() > 0) {
+					if (!newList.isEmpty()) {
 						// 处理日志
 						for (LockingReleaseBo lrb : newList) {
 							UserTransferLog utl = new UserTransferLog();
@@ -2725,7 +2705,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Override
 	public boolean checkChannel(List<String> uids) {
 		for (String uid : uids) {
-			List<UserFollow> list = userFollowMapper.selectbyUid(uid, TokenManager.getAdminId());
+			List<UserFollow> list = userFollowMapper.selectByUidAndUid(uid, TokenManager.getAdminId());
 			if (!list.isEmpty()) {
 				return true;
 			}
@@ -2902,33 +2882,34 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,
-							  String introduction,Integer channelType,String orgCode) {
+	public int updateUserDate(InputUserData in ) {
 		OrganizationIdentity oi =new OrganizationIdentity();
-		oi.setUid(uid);
-		if (province!=null ||city !=null ||area!=null|| businessScope!=null ||intendedProject!=null||orgCode!=null){
-			if(province!=null)oi.setLocationProvince(province);
-			if(city!=null)oi.setLocationCity(city);
-			if(area!=null)oi.setLocationArea(area);
-			if (orgCode!=null)oi.setOrgCode(orgCode);
-			if (businessScope!=null){
-				OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
-				updateBusinessScope(uid,businessScope,use.getBusinessScope(),new Date());
-				oi.setBusinessScope(businessScope);
+		oi.setUid(in.getUid());
+		if (in.getProvince()!=null ||in.getCity() !=null ||in.getArea()!=null|| in.getBusinessScope()!=null
+				||in.getIntendedProject()!=null||in.getOrgCode()!=null||in.getIndustry()!=null){
+			if(in.getProvince()!=null)oi.setLocationProvince(in.getProvince());
+			if(in.getCity()!=null)oi.setLocationCity(in.getCity());
+			if(in.getArea()!=null)oi.setLocationArea(in.getArea());
+			if (in.getOrgCode()!=null)oi.setOrgCode(in.getOrgCode());
+			if (in.getIndustry()!=null)oi.setIndustry(in.getIndustry());
+			if (in.getBusinessScope()!=null){
+				OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(in.getUid());
+				updateBusinessScope(in.getUid(),in.getBusinessScope(),use.getBusinessScope(),new Date());
+				oi.setBusinessScope(in.getBusinessScope());
 			}
-			if(intendedProject!=null)oi.setIntendedProject(intendedProject);
+			if(in.getIntendedProject()!=null)oi.setIntendedProject(in.getIntendedProject());
 			organizationIdentityMapper.updateServiceByUid(oi);
 		}
-		if (introduction!=null){
+		if (in.getIntroduction()!=null){
 			User user=new User();
-			user.setId(uid);
-			user.setIntroduction(introduction);
+			user.setId(in.getUid());
+			user.setIntroduction(in.getIntroduction());
 			userMapper.updateByPrimaryKeySelective(user);
 		}
-		if (channelType !=null){
+		if (in.getChannelType() !=null){
 			UserMid um =new UserMid();
-			um.setUid(uid);
-			um.setChannelType(channelType);
+			um.setUid(in.getUid());
+			um.setChannelType(in.getChannelType());
 			userMidMapper.updateByUid(um);
 		}
 		return 1;
@@ -3128,6 +3109,24 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return userMapper.getRestrictCustomerByName(name,TokenManager.getAdminId());
 	}
 
+	@Override
+	public UserArchivesDetails selectUserByUid(String id) {
+		UserArchivesDetails user = userMapper.selectUser(id);
+		return user;
+	}
+
+    @Override
+    public Object getPublicReleaseList(String id) {
+		Map<String, Object> map=new HashMap<>();
+		User user = userMapper.selectByPrimaryKey(id);
+		if (user.getAid().equals(TokenManager.getAdminId())){
+			map.put("myUser",1);
+		}else {
+			map.put("myUser",0);
+		}
+		map.put("list",userMapper.getPublicReleaseList(id));
+		return map;
+    }
 
 
 	private List<InputExcelUser> pushUserName(List<InputExcelUser> list) {
@@ -3166,4 +3165,50 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return res;
 	}
 
+
+	@Override
+	public Pagination<SelectMyUserOut> selectMyUser(SelectMyUserBo in) {
+		Map<String, Object> params = new HashMap<>();
+		if (in.getType() != null){
+			params.put("type", in.getType());
+		}else {
+			params.put("type", 0);
+		}
+		if (in.getLevel() !=null) params.put("level", in.getLevel());
+		if (in.getShareType() != null) params.put("shareType", in.getShareType());
+		if (in.getName() != null) params.put("name", in.getName());
+		params.put("aid", TokenManager.getAdminId());
+		Pagination<SelectMyUserOut> list = (Pagination<SelectMyUserOut>) findPage("selectMyUserList",
+				"selectMyUserCount", params, in.getPageNo(), in.getPageSize());
+		return list;
+	}
+
+	@Override
+	public Object selectMyUserDetails(String id) {
+		Map<String, Object> params = new LinkedHashMap<>();
+		List<MyUserDetailsBo> publicReleases = publicReleaseMapper.selectByUid(id);
+		MyUserDetailsBo  maxPr = new MyUserDetailsBo();
+		MyUserDetailsBo  minPr = new MyUserDetailsBo();
+		for (MyUserDetailsBo  e : publicReleases) {
+				if (maxPr.getReleaseStart()==null)maxPr=e;
+				if (maxPr.getReleaseStart().before(e.getReleaseStart()))maxPr=e;
+				if (minPr.getReleaseStart()==null)minPr=e;
+				if (minPr.getReleaseStart().after(e.getReleaseStart()))minPr=e;
+		}
+		List<UserFollow> userFollows = userFollowMapper.selectByUidAndUid(id, null);
+		Optional<UserFollow> latestFollow = userFollows.stream()
+				.max(Comparator.comparing(UserFollow::getCreateTime));
+		params.put("count",publicReleases.size());
+		params.put("minPublicRelease",minPr);
+		params.put("maxPublicRelease",maxPr);
+		Map<String, Object> map = new LinkedHashMap<>();
+        latestFollow.ifPresent(userFollow -> {
+			map.put("id",userFollow.getId());
+			map.put("followTime",DateUtils.formatDate(userFollow.getCreateTime(),AFTConstants.YYYYMMDD));
+			map.put("followName",userFollow.getFollowName());
+		});
+		params.put("latestFollow",map);
+		return params;
+	}
+
 }

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

@@ -0,0 +1,204 @@
+package com.goafanti.customer.service.impl;
+
+import com.goafanti.common.dao.UserArchivesMapper;
+import com.goafanti.common.dao.UserLimitCheckMapper;
+import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.dao.UserMidMapper;
+import com.goafanti.common.model.*;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.UserArchivesDetails;
+import com.goafanti.customer.service.CustomerService;
+import com.goafanti.customer.service.UserArchivesService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 客户档案表(UserArchives)表服务实现类
+ *
+ * @author makejava
+ * @since 2024-07-12 11:52:01
+ */
+@Service("userArchivesService")
+public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper> implements UserArchivesService {
+    @Resource
+    private UserArchivesMapper userArchivesMapper;
+    @Resource
+    private CustomerService customerService;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private UserMidMapper userMidMapper;
+    @Resource
+    private UserLimitCheckMapper userLimitCheckMapper;
+    
+    
+    @Override
+    public Pagination<UserArchives> list(UserArchives userArchives, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+        params.put("in",userArchives); 
+		return (Pagination<UserArchives>) findPage("findUserArchivesList",
+				"findUserArchivesCount", params, pageNo, pageSize);
+	}
+
+    @Override
+    public UserArchives queryByUid(String id) {
+        UserArchives userArchives =userArchivesMapper.queryByUid(id);
+        if (userArchives==null)userArchives =new UserArchives();
+        return userArchives;
+    }
+
+    @Override
+    public Object queryByUidAll(String id) {
+        UserArchivesDetails user = customerService.selectUserByUid(id);
+        User u = userMapper.selectByPrimaryKey(id);
+        if (u.getAid().equals(TokenManager.getAdminId())){
+            user.setMyUser(1);
+        }else {
+            user.setMyUser(0);
+        }
+        UserArchives userArchives = queryByUid(id);
+        List<OrganizationContactBook> customerContacts = customerService.findCustomerContacts(id);
+        if (!customerContacts.isEmpty()){
+            List<OrganizationContactBook> collect = customerContacts.stream()
+                    .filter(e -> e.getMajor() == 1).collect(Collectors.toList());
+            user.setContactList(collect);
+        }
+        BeanUtils.copyProperties(userArchives, user);
+        return user;
+    }
+
+    @Override
+    public boolean checkPermission(String id) {
+        User user = userMapper.selectByPrimaryKey(id);
+        if (user.getAid().equals(TokenManager.getAdminId())){
+            return false;
+        }
+        UserLimitCheck userLimitCheck = userLimitCheckMapper.selectByUid(id);
+        //如果没有和大于时间则不能查看
+        if (userLimitCheck==null||System.currentTimeMillis()>userLimitCheck.getCheckTime().getTime()) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    @Override
+    public UserArchives queryById(Integer id) {
+        return this.userArchivesMapper.queryById(id);
+    }
+
+
+
+    /**
+     * 新增数据
+     *
+     * @param userArchives 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserArchives insert(UserArchives userArchives) {
+        UserArchives query = userArchivesMapper.queryByUid(userArchives.getUid());
+        if (query != null){
+            userArchives.setId(query.getId());
+            return update(userArchives,null);
+        }else {
+            if (userArchives.getAppearancePatentCount()!=null||
+                    userArchives.getInventionPatentCount()!=null||
+                    userArchives.getUtilityModelCount() !=null||
+                    userArchives.getSoftwareWorksCount()!=null||
+                    userArchives.getOtherCount()!=null
+            ){
+                int count = getCount(userArchives);
+                userArchives.setPatentCount(count);
+            }
+            if(userArchives.getPatentCount()==null)userArchives.setPatentCount(0);
+            this.userArchivesMapper.insert(userArchives);
+        }
+        return userArchives;
+    }
+
+    /**
+     * 修改数据
+     *
+     * @param userArchives 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserArchives update(UserArchives userArchives,Integer channelType) {
+        if (userArchives.getAppearancePatentCount()!=null||
+            userArchives.getInventionPatentCount()!=null||
+                userArchives.getUtilityModelCount() !=null||
+                userArchives.getSoftwareWorksCount()!=null||
+                userArchives.getOtherCount()!=null
+        ){
+            int count = getCount(userArchives);
+            userArchives.setPatentCount(count);
+        }
+        if (channelType!=null){
+            String uid=null;
+            if (userArchives.getUid()==null){
+                UserArchives useData = this.queryById(userArchives.getId());
+                uid=useData.getUid();
+            }else {
+                uid=userArchives.getUid();
+            }
+            userMidMapper.updateByUid(new UserMid(uid,channelType));
+        }
+        if(userArchives.getId()==null){
+            return insert(userArchives);
+        }else {
+            this.userArchivesMapper.update(userArchives);
+            return this.queryById(userArchives.getId());
+        }
+
+    }
+
+    /**
+     * 计算专利总数,必须5个都传,不然会导致计算漏掉
+     * @param userArchives 用户档案参数
+     * @return count
+     */
+    private int getCount(UserArchives userArchives) {
+        int count = 0;
+        if (userArchives.getAppearancePatentCount()!=null){
+            count+= userArchives.getAppearancePatentCount();
+        }
+        if (userArchives.getInventionPatentCount()!=null){
+            count+= userArchives.getInventionPatentCount();
+        }
+        if (userArchives.getUtilityModelCount() !=null){
+            count+= userArchives.getUtilityModelCount();
+        }
+        if (userArchives.getSoftwareWorksCount() !=null){
+            count+= userArchives.getSoftwareWorksCount();
+        }
+        if (userArchives.getOtherCount()!=null){
+            count+= userArchives.getOtherCount();
+        }
+        return count;
+    }
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    @Override
+    public boolean deleteById(Integer id) {
+        return this.userArchivesMapper.deleteById(id) > 0;
+    }
+}

+ 86 - 0
src/main/java/com/goafanti/customer/service/impl/UserSuperEvaluateServiceImpl.java

@@ -0,0 +1,86 @@
+package com.goafanti.customer.service.impl;
+
+import com.goafanti.common.dao.UserSuperEvaluateMapper;
+import com.goafanti.common.model.UserSuperEvaluate;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.OutUserSuperEvaluate;
+import com.goafanti.customer.service.UserSuperEvaluateService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 客户上级评价(UserSuperEvaluate)表服务实现类
+ *
+ * @author makejava
+ * @since 2024-07-17 08:51:36
+ */
+@Service("userSuperEvaluateService")
+public class UserSuperEvaluateServiceImpl extends BaseMybatisDao< UserSuperEvaluateMapper> implements UserSuperEvaluateService {
+    @Resource
+    private UserSuperEvaluateMapper userSuperEvaluateMapper;
+    
+    
+    
+    @Override
+    public Pagination<OutUserSuperEvaluate> list(UserSuperEvaluate userSuperEvaluate, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+        params.put("uid",userSuperEvaluate.getUid());
+        params.put("aid",userSuperEvaluate.getAid());
+		return (Pagination<OutUserSuperEvaluate>) findPage("findUserSuperEvaluateList",
+				"findUserSuperEvaluateCount", params, pageNo, pageSize);
+	}
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    @Override
+    public UserSuperEvaluate queryById(Integer id) {
+        return this.userSuperEvaluateMapper.queryById(id);
+    }
+
+
+
+    /**
+     * 新增数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserSuperEvaluate insert(UserSuperEvaluate userSuperEvaluate) {
+        userSuperEvaluate.setAid(TokenManager.getAdminId());
+        this.userSuperEvaluateMapper.insert(userSuperEvaluate);
+        return userSuperEvaluate;
+    }
+
+    /**
+     * 修改数据
+     *
+     * @param userSuperEvaluate 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserSuperEvaluate update(UserSuperEvaluate userSuperEvaluate) {
+        this.userSuperEvaluateMapper.update(userSuperEvaluate);
+        return this.queryById(userSuperEvaluate.getId());
+    }
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    @Override
+    public boolean deleteById(Integer id) {
+        return this.userSuperEvaluateMapper.deleteById(id) > 0;
+    }
+}

+ 8 - 0
src/main/java/com/goafanti/expenseAccount/bo/MainExpenseAccount.java

@@ -40,7 +40,15 @@ public class MainExpenseAccount  {
     private Integer examine;
 
     private List<SonExpenseAccount> sonList;
+    private List<String> strList;
 
+    public List<String> getStrList() {
+        return strList;
+    }
+
+    public void setStrList(List<String> strList) {
+        this.strList = strList;
+    }
 
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     public Date getCreateTime() {

+ 2 - 2
src/main/java/com/goafanti/expenseAccount/controller/ExpenseAccountController.java

@@ -162,7 +162,7 @@ public class ExpenseAccountController extends CertifyApiController {
     }
 
     /**
-     * 报销列表
+     * 报销详情
      */
     @RequestMapping(value = "/selectById",method = RequestMethod.GET)
     public Result selectById(Integer id ){
@@ -172,7 +172,7 @@ public class ExpenseAccountController extends CertifyApiController {
     }
 
     /**
-     * 报销列表
+     * 报销查询编号
      * @param checkNo 查询编号
      */
     @RequestMapping(value = "/selectByCheckNo",method = RequestMethod.GET)

+ 37 - 10
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -88,6 +88,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     private OrderNewService orderNewService;
     @Autowired
     private OrderYearMaxDurationMapper orderYearMaxDurationMapper;
+    @Autowired
+    private UserMapper userMapper;
 
 
 
@@ -101,7 +103,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     public Integer add(InputExpenseAccount in) {
         //如果关联公出,获取公出信息
         if (in.getPrid()!=null){
-            PublicRelease pr = publicReleaseMapper.selectByPrimaryKey(in.getPrid());
+            PublicRelease pr = publicReleaseMapper.queryById(in.getPrid());
             in.setReleaseStart(pr.getReleaseStart());
             in.setReleaseEnd(pr.getReleaseEnd());
             in.setDistrictName(pr.getDistrictName());
@@ -1408,7 +1410,16 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
 
     private void pushData(MainExpenseAccount res) {
         List<SonExpenseAccount> sonList = res.getSonList();
-        for (SonExpenseAccount e : sonList) {
+        List<String> orderList = new ArrayList<>();
+        List<SonExpenseAccount> orderSonList = new ArrayList<>();
+        sonList.stream().forEach(e -> {
+            if (!orderList.contains(e.getOrderNo())){
+                orderList.add(e.getOrderNo());
+                orderSonList.add(e);
+            }
+        });
+        orderList.clear();
+        for (SonExpenseAccount e : orderSonList) {
             if (StringUtils.isNotEmpty(e.getUserNames())){
                 String userNames = e.getUserNames();
                 String  districtName = e.getDistrictName();
@@ -1433,15 +1444,15 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(e.getOrderNo());
                 if(!expenseAccounts.isEmpty()){
                     for (ExpenseAccount ea : expenseAccounts) {
-                        count=count.add(ea.getAmount());
+                        count=count.add(ea.getRealAmount());
                         Admin admin = adminMapper.selectByPrimaryKey(ea.getAid());
                         if (admin.getPosition()!=null){
                             if (admin.getPosition().equals("1")){
-                                yxyCount=yxyCount.add(ea.getAmount());
-                            }else if (admin.getPosition().equals("2")){
-                                zxsCount=zxsCount.add(ea.getAmount());
+                                yxyCount=yxyCount.add(ea.getRealAmount());
+                            }else if (admin.getPosition().equals("0")){
+                                zxsCount=zxsCount.add(ea.getRealAmount());
                             }else {
-                                qtCount=qtCount.add(ea.getAmount());
+                                qtCount=qtCount.add(ea.getRealAmount());
                             }
                         }
                     }
@@ -1465,11 +1476,26 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                     }
 
                 }
-
-
+                //获取未归集的订单
+                List<BigDecimal> orderNoNotCountAmount = expenseAccountMapper.getOrderNoNotCountAmount(e.getOrderNo());
+                BigDecimal countAmount = orderNoNotCountAmount.stream().reduce(BigDecimal.ZERO, BigDecimal::add);
                 String str = getString(e, out, count, yxyCount, zxsCount,qtCount,useOyd);
-                e.setCountStr(str);
+                str=str+",未归集:"+countAmount.stripTrailingZeros().toPlainString()+"元";
+                orderList.add(str);
+            }else if (e.getPrid() !=null){
+                //获取未归集的订单
+                List<PublicReleaseDetails> list = publicReleaseMapper.selectDetailsByPrid(e.getPrid());
+
+                StringBuffer sb = new StringBuffer();
+                for (PublicReleaseDetails e2 : list) {
+                    User user = userMapper.selectByPrimaryKey(e2.getUid());
+                    List<BigDecimal> orderNoNotCountAmount = expenseAccountMapper.getUidNotCountAmount(e2.getUid());
+                    BigDecimal countAmount = orderNoNotCountAmount.stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+                    sb.append("[").append(user.getNickname()).append("]未归集:").append(countAmount.stripTrailingZeros().toPlainString()).append("元,");
+                }
+                orderList.add(sb.substring(0,sb.length()-1));
             }
+            res.setStrList(orderList);
         }
 
 
@@ -1480,6 +1506,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     private String getString(SonExpenseAccount e, TOrderPublicReleaseCount out, BigDecimal count, BigDecimal yxyCount,
                              BigDecimal zxsCount, BigDecimal qtCount,OrderYearMaxDuration useOyd) {
         TOrderPublicReleaseCountBo bo = new TOrderPublicReleaseCountBo();
+        if (out==null||useOyd==null)return String.format("订单%s统计信息不存在,请要营销员先将订单派单。",e.getOrderNo());
         bo.setMaxDuration(useOyd.getMaxDuration());
         bo.setExceedDuration(useOyd.getMaxDuration().subtract(BigDecimal.valueOf(out.getActualDuration())).abs());
         bo.setActualDuration(out.getActualDuration());

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

@@ -355,7 +355,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			content += "<div>订单编号: "+ o.getOrderNo() +"</div>";
 			if(StringUtils.isNotBlank(o.getEmail())){
 
-				EmailBo emailBo = new EmailBo("同意退单", o.getEmail(), o.getSalesmanName(), a.getDepartmentName(), a.getName(), content);
+				EmailBo emailBo = new EmailBo("同意退单", o.getEmail(), a.getDepartmentName(), o.getSalesmanName());
 				asyncUtils.send(emailBo);
 
 			}
@@ -368,7 +368,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 					//addNotic(o.getOrderNo(),NoticeStatus.ORDER_REFUND.getCode(),tOrderTask.getTaskReceiver());//给技术员
 					//发邮件给技术员
 					if(StringUtils.isNotBlank(tOrderTask.getEmail())){
-						EmailBo emailBo = new EmailBo("同意退单", tOrderTask.getEmail(), tOrderTask.getName(), a.getDepartmentName(), a.getName(), content);
+						EmailBo emailBo = new EmailBo("同意退单", tOrderTask.getEmail(), a.getDepartmentName(), tOrderTask.getName());
 						asyncUtils.send(emailBo);
 					}
 				}
@@ -388,7 +388,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 				String sale = o.getSalesmanName();
 				sale = sale.substring(0,sale.indexOf(","));
 				if(email.matches("[\\w\\.\\-]+@([\\w\\-]+\\.)+[\\w\\-]+")){//email格式校验
-					EmailBo emailBo = new EmailBo("拒绝退单",email, sale, a.getDepartmentName(), a.getName(), content);
+					EmailBo emailBo = new EmailBo("拒绝退单",email, a.getDepartmentName(), sale);
 					asyncUtils.send(emailBo);
 				}
 			}

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

@@ -1701,7 +1701,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			}
 
 		}
-		processName.setYybz(processName.getYybz()==null?"未设置营运保障审核":processName.getYybz());
+//		processName.setYybz(processName.getYybz()==null?"未设置营运保障审核":processName.getYybz());
 		return processName;
 	}
 

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

@@ -2133,7 +2133,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				tite="催收通知";
 			}
 			//发送驳回邮件
-			EmailBo bo = new EmailBo(tite, b.getEmail(), b.getSalesmanName(), a.getDepartmentName(), a.getName(), content);
+			EmailBo bo = new EmailBo(tite, b.getEmail(), a.getDepartmentName(), b.getSalesmanName());
 			if(StringUtils.isNotBlank(b.getEmail())) {
 				asyncUtils.send(bo);
 			}
@@ -2503,10 +2503,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public OrderProcessName getProcessName(String orderNo) {
 		OrderProcessName names=tOrderNewMapper.getProcessName(orderNo);
-		if (names.getApprovalStatus()==0){
-			names.setApprovalName("未设置特批审核人员");
-		}
-		names.setYybz(names.getYybz()==null?"未设置运营保障审核":names.getYybz());
 		return names;
 	}
 

+ 16 - 2
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -45,6 +45,8 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 	private AdminMapper	adminMapper;
 	@Autowired
 	private NewOrderChangeMapper newOrderChangeMapper;
+	@Autowired
+	private ExpenseAccountExamineMapper expenseAccountExamineMapper;
 
 
 	@Autowired
@@ -248,7 +250,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 	 * 根据传入参数处理各种情况,并且处理传入数据
 	 * @param in 输入部门参数
 	 * @param useDep 原部门参数
-	 * @param dep  修改部门擦拭
+	 * @param dep  修改部门参数
 	 */
 	private void pushUpdateDep(InputDep in, Department useDep, Department dep) {
 		List<String> orderS = new ArrayList();
@@ -256,16 +258,23 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		if(StringUtils.isBlank(useDep.getFinanceId())&&StringUtils.isNotBlank(in.getFinanceId())){
 			addExamine(useDep, in.getFinanceId(),orderS);
 		}
+		if(in.getManagerId()!=null&&useDep.getManagerId()!=null&&!in.getManagerId().equals(useDep.getManagerId())){
+			expenseAccountExamineMapper.updateExamine(in.getManagerId(),useDep.getManagerId());
+		}
+
+		//财务复审
 		if(StringUtils.isBlank(useDep.getRetrialFinanceId())&&StringUtils.isNotBlank(in.getRetrialFinanceId())){
 			addExamine(useDep, in.getExpenseFinanceId(),orderS);
 		}
+		//技术总监审核人
 		if(StringUtils.isBlank(useDep.getTechAdminId())&&StringUtils.isNotBlank(in.getTechAdminId())){
 			addExamine(useDep, in.getTechAdminId(),orderS);
 		}
+		//已派财务与总监审核
 		if(!orderS.isEmpty()){
 			torderNewMapper.updateOrderDepFinanceExamineName(orderS,ProcessStatus.YPCW_JSZJ.getCode());
 		}
-
+		//运营保障审核人
 		if(StringUtils.isBlank(useDep.getOperationGuaranteeId())&&StringUtils.isNotBlank(in.getOperationGuaranteeId())){
 			List<String> strings = torderNewMapper.selectByDepAndProcess(useDep.getId(), ProcessStatus.YYBZSH.getCode());
 			if(!strings.isEmpty()){
@@ -429,6 +438,11 @@ 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());

+ 1 - 2
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -548,8 +548,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		String str=NoticeStatus.getValueByCode(type)+": 订单编号 -"+in.getOrderNo()+
 				",客户名称:"+in.getBuyerName()+", 操作人:"+a.getName()+"-"+a.getDepartmentName()+"。";
 		Notice n =new Notice();
-		EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), a.getEmail(), a.getDepartmentName(), a.getName(),
-				in.getOrderNo(), in.getSalesmanName());
+		EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), a.getEmail(), a.getDepartmentName(), a.getName());
 		n.setId(UUID.randomUUID().toString());
 		if (type==NoticeStatus.PAYMENT_NODE.getCode()||type==NoticeStatus.PAYMENT_NODE.getCode()) {
 			n.setAid(in.getFinanceId());

+ 24 - 0
src/main/java/com/goafanti/test/controller/TestController.java

@@ -0,0 +1,24 @@
+package com.goafanti.test.controller;
+
+import com.goafanti.common.bo.EmailBo;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.utils.AsyncUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping(value = "/open")
+public class TestController {
+
+    @Resource
+    private AsyncUtils asyncUtils;
+
+    @GetMapping(value = "/test")
+    public String test(){
+        asyncUtils.send(new EmailBo("催款处理失败",  AFTConstants.ADMIN_EMAIL,  "超管", "平台"));
+        return "test";
+    }
+}

+ 4 - 2
src/main/java/com/goafanti/weChat/bo/InputPublicReleaseList.java

@@ -4,11 +4,13 @@ public class InputPublicReleaseList {
 
 	private Integer pageSize;
 	private Integer pageNo;
-//	查看类型 0我的公出 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核
+	/**
+	 * 查看类型 0我的公出 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核 6=协单审核
+	 */
 	private Integer type;
 	private String clockTime;
 	/**
-	 *  assist 字段意思0非协单 1主协单 2子协单
+	 *  assist 字段意思0非协单 1主协单 2子协单 3协单租售
 	 *  此处 0是 非+主  1是所有 2是子协单
 	 */
 	private Integer assist;

+ 10 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java

@@ -46,6 +46,16 @@ public class OutPublicRelease extends PublicRelease {
 	private List<OutPublicReleaseDetails> prdList;
 	private List<PublicExamine> peList;
 
+	private Integer publicAssistAdvice;
+
+	public Integer getPublicAssistAdvice() {
+		return publicAssistAdvice;
+	}
+
+	public void setPublicAssistAdvice(Integer publicAssistAdvice) {
+		this.publicAssistAdvice = publicAssistAdvice;
+	}
+
 	@Override
 	public String getAddressName() {
 		return addressName;

+ 28 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicReleaseList.java

@@ -30,14 +30,42 @@ public class OutPublicReleaseList {
 	private String assistantName;
 	private String userNames;
 	private String adminExamine;
+	private String userAdminName;
 	private Integer publicAgain;
 	private Integer publicType;
 	private Integer techStartProcess;
 	private BigDecimal expenseAmount;
 
+
+	private Integer publicAssistAdvice;
+	private Integer assistProcess;
+
+
 	private List<OutPublicReleaseDetails> prdList;
 
+	public Integer getAssistProcess() {
+		return assistProcess;
+	}
 
+	public void setAssistProcess(Integer assistProcess) {
+		this.assistProcess = assistProcess;
+	}
+
+	public Integer getPublicAssistAdvice() {
+		return publicAssistAdvice;
+	}
+
+	public void setPublicAssistAdvice(Integer publicAssistAdvice) {
+		this.publicAssistAdvice = publicAssistAdvice;
+	}
+
+	public String getUserAdminName() {
+		return userAdminName;
+	}
+
+	public void setUserAdminName(String userAdminName) {
+		this.userAdminName = userAdminName;
+	}
 
 	public Integer getTechStartProcess() {
 		return techStartProcess;

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

@@ -61,11 +61,29 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"协单人员"));
 			return res;
 		}
+		if (publicReleaseService.checkPublicReviewer(in)){
+			res.getError().add(buildError("请让管理员先设置公出审核人。"));
+			return res;
+		}
 		res.setData(publicReleaseService.addPublicRelease(in));
 		return res;
 	}
 
 	/**
+	 * 判定客户是否完成了客户档案
+	 */
+	@RequestMapping(value = "/checkUserArchives", method = RequestMethod.GET)
+	public Result checkUserArchives(String uid){
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"用户编号"));
+			return res;
+		}
+		res.setData(publicReleaseService.checkUserArchives(uid));
+		return res;
+	}
+
+	/**
 	 * 修改外出申请、修改公出
 	 */
 	@RequestMapping(value = "/updatePublicRelease", method = RequestMethod.POST)
@@ -113,18 +131,22 @@ public class AdminReleaseApiController extends CertifyApiController{
 			return res;
 		}
 //		取消打卡限制
-//		if (x==-2){
-//			res.getError().add(buildError("已超过合同规定时限,需审核通过,才可打卡!"));
-//			return res;
-//		}
+		if (x==-2){
+			res.getError().add(buildError("公出审核中,不可打卡!"));
+			return res;
+		}
+		if (x==-3){
+			res.getError().add(buildError("技术协单,必须先写协单意见,才可打卡!"));
+			return res;
+		}
 		res.setData(x);
 		return res;
 	}
 	/**
-	 * 外出申请详情
+	 * 外出申请详情、公出详情
 	 */
 	@RequestMapping(value = "/dtails", method = RequestMethod.GET)
-	public Result dtails(Integer id){
+	public Result details(Integer id){
 		Result res =new Result();
 		res.setData(publicReleaseService.dtails(id));
 		return res;
@@ -135,14 +157,14 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * 外出申请详情
 	 */
 	@RequestMapping(value = "/followDtails", method = RequestMethod.GET)
-	public Result followDtails(String id){
+	public Result followDetails(String id){
 		Result res =new Result();
 		res.setData(publicReleaseService.followDtails(id));
 		return res;
 	}
 
 	/**
-	 * 外出申请列表.公出列表
+	 * 外出申请列表.公出列表,我的协单列表,协单审核,
 	 */
 	@RequestMapping(value = "/listPublicRelease", method = RequestMethod.GET)
 	public Result listPublicRelease(InputPublicReleaseList in){
@@ -174,7 +196,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 	}
 
 	/**
-	 * 公出审核、外出审核 营销
+	 * 公出审核、外出审核 客户归属人
 	 */
 	@RequestMapping(value = "/marketersExamine", method = RequestMethod.POST)
 	public Result marketersExamine(Integer id ,Integer status,String remarks){
@@ -196,6 +218,36 @@ public class AdminReleaseApiController extends CertifyApiController{
 	}
 
 
+	/**
+	 * 公出审核、外出审核 协单审核
+	 */
+	@RequestMapping(value = "/assistExamine", method = RequestMethod.POST)
+	public Result assistExamine(Integer id ,Integer status,String remarks){
+		Result res =new Result();
+		if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
+			return res;
+		}
+		if (status!=0&&status!=2) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"审核状态"));
+			return res;
+		}
+		if (remarks.length()>20) {
+			res.getError().add(buildError("备注长度不能超过20个字符。"));
+			return res;
+		}
+		res.setData(publicReleaseService.updateAssistExamine(id,status,remarks));
+		return res;
+	}
+
+
+	/**
+	 * 技术公出审核 公出他人企业
+	 * @param id
+	 * @param status
+	 * @param remarks
+	 * @return
+	 */
 	@RequestMapping(value = "/techExamine", method = RequestMethod.POST)
 	public Result techExamine(Integer id ,Integer status,String remarks){
 		Result res =new Result();
@@ -333,14 +385,6 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
 			return res;
 		}
-		if (supplement==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"本次公出目标总结"));
-			return res;
-		}
-		if (nextPlan==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"下次公出计划"));
-			return res;
-		}
 		res.setData(publicReleaseService.addSupplement( id ,supplement,nextPlan));
 		return res;
 	}
@@ -469,5 +513,29 @@ public class AdminReleaseApiController extends CertifyApiController{
 	}
 
 
+	/**
+	 * 协单审核是否有未审核查询
+	 */
+	@RequestMapping(value = "/unaudited",method = RequestMethod.GET)
+	public Result assistUnaudited (){
+		Result res =new Result();
+		return res.data(publicReleaseService.assistUnaudited());
+	}
+
+
+	/**
+	 * 分享限时查询
+	 */
+	@RequestMapping(value = "/limitUser",method = RequestMethod.POST)
+	public Result limitUser (String uid,Integer hours){
+		Result res =new Result();
+		int i = publicReleaseService.pushLimitUser(uid,hours);
+		if (i==0){
+			return res().error(buildError(ErrorConstants.PARAM_ERROR,"只有客户归属人可以分享"));
+		}
+		return res.data(i);
+	}
+
+
 
 }

+ 89 - 0
src/main/java/com/goafanti/weChat/controller/PublicAssistAdviceController.java

@@ -0,0 +1,89 @@
+package com.goafanti.weChat.controller;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.model.PublicAssistAdvice;
+import com.goafanti.weChat.controller.service.PublicAssistAdviceService;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
+/**
+ * 公出协单意见表(PublicAssistAdvice)表控制层
+ *
+ * @author makejava
+ * @since 2024-07-12 09:21:26
+ */
+@RestController
+@RequestMapping("/api/admin/publicAssistAdvice")
+public class PublicAssistAdviceController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private PublicAssistAdviceService publicAssistAdviceService;
+
+
+    /**
+     * 新增数据
+     *
+     * @param publicAssistAdvice 实体
+     * @return 新增结果
+     */
+    @PostMapping("/add")
+    public Result add(PublicAssistAdvice publicAssistAdvice) {
+        return new Result<>().data(this.publicAssistAdviceService.insert(publicAssistAdvice));
+    }
+    
+    
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/get")
+    public Result<PublicAssistAdvice> queryById( Integer id) {
+        return new Result<>().data(this.publicAssistAdviceService.queryById(id));
+    }
+
+
+
+    /**
+     * 编辑数据
+     *
+     * @param publicAssistAdvice 实体
+     * @return 编辑结果
+     */
+    @PostMapping("/update")
+    public Result edit(PublicAssistAdvice publicAssistAdvice) {
+        return new Result<>().data(this.publicAssistAdviceService.update(publicAssistAdvice));
+    }
+
+    /**
+     * 删除数据
+     *
+     * @param id 主键
+     * @return 删除是否成功
+     */
+    @GetMapping("/delete")
+    public Result deleteById(Integer id) {
+        return new Result<>().data(this.publicAssistAdviceService.deleteById(id));
+    }
+
+
+
+    /**
+     * 公出协单意见列表
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<PublicAssistAdvice> list(Integer id, Integer type) {
+        if (type==null)type=0;
+        return new Result<>().data(this.publicAssistAdviceService.list(id,type));
+    }
+
+}
+

+ 48 - 0
src/main/java/com/goafanti/weChat/controller/service/PublicAssistAdviceService.java

@@ -0,0 +1,48 @@
+package com.goafanti.weChat.controller.service;
+
+import com.goafanti.common.model.PublicAssistAdvice;
+
+/**
+ * 公出协单意见表(PublicAssistAdvice)表服务接口
+ *
+ * @author makejava
+ * @since 2024-07-12 09:21:26
+ */
+public interface PublicAssistAdviceService {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicAssistAdvice queryById(Integer id);
+
+    
+
+    /**
+     * 新增数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 实例对象
+     */
+    PublicAssistAdvice insert(PublicAssistAdvice publicAssistAdvice);
+
+    /**
+     * 修改数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 实例对象
+     */
+    PublicAssistAdvice update(PublicAssistAdvice publicAssistAdvice);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    boolean deleteById(Integer id);
+
+    Object list(Integer id, Integer type);
+}

+ 82 - 0
src/main/java/com/goafanti/weChat/controller/service/impl/PublicAssistAdviceServiceImpl.java

@@ -0,0 +1,82 @@
+package com.goafanti.weChat.controller.service.impl;
+
+import com.goafanti.common.dao.PublicAssistAdviceMapper;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.PublicAssistAdvice;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.weChat.controller.service.PublicAssistAdviceService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 公出协单意见表(PublicAssistAdvice)表服务实现类
+ *
+ * @author makejava
+ * @since 2024-07-12 09:21:26
+ */
+@Service("publicAssistAdviceService")
+public class PublicAssistAdviceServiceImpl extends BaseMybatisDao< PublicAssistAdviceMapper> implements PublicAssistAdviceService {
+    @Resource
+    private PublicAssistAdviceMapper publicAssistAdviceMapper;
+    
+    
+    
+    @Override
+    public List<PublicAssistAdvice> list(Integer id, Integer type) {
+		return publicAssistAdviceMapper.selectList(id,type);
+	}
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    @Override
+    public PublicAssistAdvice queryById(Integer id) {
+        return this.publicAssistAdviceMapper.queryById(id);
+    }
+
+
+
+    /**
+     * 新增数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public PublicAssistAdvice insert(PublicAssistAdvice publicAssistAdvice) {
+        Admin adminToken = TokenManager.getAdminToken();
+        publicAssistAdvice.setAid(adminToken.getId());
+        publicAssistAdvice.setAname(adminToken.getName());
+        this.publicAssistAdviceMapper.insert(publicAssistAdvice);
+        return publicAssistAdvice;
+    }
+
+    /**
+     * 修改数据
+     *
+     * @param publicAssistAdvice 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public PublicAssistAdvice update(PublicAssistAdvice publicAssistAdvice) {
+        this.publicAssistAdviceMapper.update(publicAssistAdvice);
+        return this.queryById(publicAssistAdvice.getId());
+    }
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    @Override
+    public boolean deleteById(Integer id) {
+        return this.publicAssistAdviceMapper.deleteById(id) > 0;
+    }
+}

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

@@ -12,14 +12,7 @@ public interface PublicReleaseService {
 	Object listPublicRelease(InputPublicReleaseList in);
 
 
-	/**
-	 *
-	 * @param id
-	 * @param status 状态 0驳回 1发起 2同意 3 撤销 4技术驳回
-	 * @param remarks
-	 * @param type 0上级审核 1营销员审核
-	 * @return
-	 */
+
 	int pushExaminePublicRelease(Integer id, Integer status, String remarks,Integer type);
 
 
@@ -35,6 +28,7 @@ public interface PublicReleaseService {
 
 	Object publicReleaseListDtails(InputPublicDtails in);
 
+
 	OutPublicReleaseAndDetails followDtails(String id);
 
 	boolean checkTime(InputPublicRelease in);
@@ -75,4 +69,14 @@ public interface PublicReleaseService {
 	List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
 
 	Object releaseAndExpenseCountClear();
+
+	Object updateAssistExamine(Integer id, Integer status, String remarks);
+
+	Object assistUnaudited();
+
+    boolean checkPublicReviewer(InputPublicRelease in);
+
+	int pushLimitUser(String uid,Integer hours);
+
+	boolean checkUserArchives(String uid);
 }

File diff suppressed because it is too large
+ 519 - 90
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java


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

@@ -1,7 +1,7 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-static.host=//static.jishutao.com/1.3.22
+static.host=//static.jishutao.com/1.3.23
 #static.host=//172.16.1.187/1.3.19
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20240430?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.22
+static.host=//static.jishutao.com/1.3.23
 #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