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

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

gitadmin месяцев назад: 2
Родитель
Сommit
bbe85b9883
58 измененных файлов с 2471 добавлено и 315 удалено
  1. 1 1
      EasyCodeConfig.json
  2. 25 10
      pom.xml
  3. 7 7
      src/main/java/com/goafanti/Interview/controller/UserArchivesInterviewController.java
  4. 5 5
      src/main/java/com/goafanti/Interview/controller/UserInterviewProjectController.java
  5. 1 3
      src/main/java/com/goafanti/RD/service/impl/RDServiceImpl.java
  6. 6 6
      src/main/java/com/goafanti/admin/controller/AdminSalesTeamController.java
  7. 5 5
      src/main/java/com/goafanti/businessCard/controller/AdminBusinessCardController.java
  8. 4 2
      src/main/java/com/goafanti/common/bo/Result.java
  9. 1 1
      src/main/java/com/goafanti/common/controller/BaseController.java
  10. 7 7
      src/main/java/com/goafanti/common/controller/PublicController.java
  11. 87 0
      src/main/java/com/goafanti/common/dao/PublicAssistDetailsMapper.java
  12. 85 0
      src/main/java/com/goafanti/common/dao/PublicReleaseContentTypeMapper.java
  13. 85 0
      src/main/java/com/goafanti/common/dao/PublicReleaseTypeMapper.java
  14. 2 0
      src/main/java/com/goafanti/common/dao/UserMidMapper.java
  15. 43 0
      src/main/java/com/goafanti/common/enums/AssistContentType.java
  16. 68 0
      src/main/java/com/goafanti/common/enums/AssistType.java
  17. 144 0
      src/main/java/com/goafanti/common/mapper/PublicAssistDetailsMapper.xml
  18. 114 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseContentTypeMapper.xml
  19. 174 63
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  20. 114 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseTypeMapper.xml
  21. 3 1
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  22. 19 0
      src/main/java/com/goafanti/common/mapper/UserMidMapper.xml
  23. 75 0
      src/main/java/com/goafanti/common/model/PublicAssistDetails.java
  24. 1 1
      src/main/java/com/goafanti/common/model/PublicRelease.java
  25. 51 0
      src/main/java/com/goafanti/common/model/PublicReleaseContentType.java
  26. 51 0
      src/main/java/com/goafanti/common/model/PublicReleaseType.java
  27. 1 1
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  28. 138 0
      src/main/java/com/goafanti/common/utils/pdf/ExcelToPdfUtils.java
  29. 39 0
      src/main/java/com/goafanti/common/utils/pdf/PdfMerger.java
  30. 70 0
      src/main/java/com/goafanti/common/utils/word/DocToPdfUtils.java
  31. 12 1
      src/main/java/com/goafanti/core/mybatis/BaseMybatisDao.java
  32. 13 1
      src/main/java/com/goafanti/customer/bo/BusinessListBo.java
  33. 11 0
      src/main/java/com/goafanti/customer/bo/PublicReleaseListBo.java
  34. 11 11
      src/main/java/com/goafanti/customer/controller/UserArchivesController.java
  35. 6 6
      src/main/java/com/goafanti/customer/controller/UserOutboundApiController.java
  36. 6 6
      src/main/java/com/goafanti/customer/controller/UserSuperEvaluateController.java
  37. 16 2
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  38. 9 7
      src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java
  39. 7 7
      src/main/java/com/goafanti/order/controller/TaskScoreController.java
  40. 5 6
      src/main/java/com/goafanti/order/service/ProjectStatisticsService.java
  41. 0 1
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  42. 5 5
      src/main/java/com/goafanti/standard/controller/StandardPlatformLinkController.java
  43. 13 13
      src/main/java/com/goafanti/techproject/controller/TaskDetailsController.java
  44. 145 0
      src/main/java/com/goafanti/weChat/bo/InputListAssist.java
  45. 14 1
      src/main/java/com/goafanti/weChat/bo/InputPublicDtails.java
  46. 38 0
      src/main/java/com/goafanti/weChat/bo/InputPublicRelease.java
  47. 195 0
      src/main/java/com/goafanti/weChat/bo/OutListAssist.java
  48. 10 0
      src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java
  49. 28 0
      src/main/java/com/goafanti/weChat/bo/OutPublicRelease.java
  50. 12 2
      src/main/java/com/goafanti/weChat/bo/OutPublicStatistics.java
  51. 74 15
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  52. 5 5
      src/main/java/com/goafanti/weChat/controller/PublicAssistAdviceController.java
  53. 5 0
      src/main/java/com/goafanti/weChat/service/PublicReleaseService.java
  54. 375 111
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  55. 13 0
      src/main/resources/excel-license.xml
  56. 1 1
      src/main/resources/props/config_local.properties
  57. 1 1
      src/main/resources/props/config_test.properties
  58. 15 0
      src/main/resources/word-license.xml

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
EasyCodeConfig.json


+ 25 - 10
pom.xml

@@ -425,12 +425,7 @@
 			<artifactId>itext</artifactId>
 			<version>2.1.7</version>
 		</dependency>
-		<!-- https://mvnrepository.com/artifact/com.itextpdf/itext-asian -->
-		<dependency>
-			<groupId>com.itextpdf</groupId>
-			<artifactId>itext-asian</artifactId>
-			<version>5.2.0</version>
-		</dependency>
+
 		<!-- https://mvnrepository.com/artifact/com.lowagie/itext-rtf -->
 		<dependency>
 			<groupId>com.lowagie</groupId>
@@ -438,15 +433,18 @@
 			<version>2.1.7</version>
 		</dependency>
 		<!--pdf-->
+		<!-- https://mvnrepository.com/artifact/com.itextpdf/itext-asian -->
+		<!-- 保留1处itext-asian依赖,删除重复项 -->
 		<dependency>
 			<groupId>com.itextpdf</groupId>
-			<artifactId>itextpdf</artifactId>
-			<version>5.5.13</version>
+			<artifactId>itext-asian</artifactId>
+			<version>5.2.0</version>
 		</dependency>
+		<!-- itextpdf核心依赖,无重复,保留 -->
 		<dependency>
 			<groupId>com.itextpdf</groupId>
-			<artifactId>itext-asian</artifactId>
-			<version>5.2.0</version>
+			<artifactId>itextpdf</artifactId>
+			<version>5.5.13</version>
 		</dependency>
 
 		<!-- 图片缩略图 -->
@@ -478,6 +476,22 @@
 			<artifactId>commons-io</artifactId>
 			<version>2.11.0</version>
 		</dependency>
+		<!-- 引入自定义 jar 包  word.Excel转PDF -->
+		<dependency>
+			<groupId>com.aspose</groupId>
+			<artifactId>aspose-cells</artifactId>
+			<version>8.5.2</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/resources/lib/aspose-cells-8.5.2.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>com.aspose</groupId>
+			<artifactId>aspose-words</artifactId>
+			<version>15.8.0</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/resources/lib/aspose-words-15.8.0.jar</systemPath>
+		</dependency>
+
 
 
 
@@ -578,6 +592,7 @@
 
 
 
+
 	<pluginRepositories>
 		<pluginRepository>
 			<id>aliyun-plugin</id>

+ 7 - 7
src/main/java/com/goafanti/Interview/controller/UserArchivesInterviewController.java

@@ -43,7 +43,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @PostMapping("/add")
     public Result add(UserArchivesInterview in) {
-        Result res = new Result<>();
+        Result res = new Result();
         if (in.getUid()==null){
             res.getError().add(buildError("客户ID不能为空"));
             return res;
@@ -60,7 +60,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @GetMapping("/get")
     public Result<UserArchivesInterview> queryById(Integer id) {
-        return new Result<>().data(this.userArchivesInterviewService.queryById(id));
+        return new Result().data(this.userArchivesInterviewService.queryById(id));
     }
 
 
@@ -72,7 +72,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @PostMapping("/update")
     public Result edit(UserArchivesInterview userArchivesInterview) {
-        return new Result<>().data(this.userArchivesInterviewService.update(userArchivesInterview));
+        return new Result().data(this.userArchivesInterviewService.update(userArchivesInterview));
     }
 
     /**
@@ -83,7 +83,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.userArchivesInterviewService.deleteById(id));
+        return new Result().data(this.userArchivesInterviewService.deleteById(id));
     }
 
     /**
@@ -94,7 +94,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @GetMapping("/list")
     public Result list(UserArchivesInterview in, Integer pageNo, Integer pageSize) {
-        Result res = new Result<>();
+        Result res = new Result();
         if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)){
             if (in.getUid()==null){
                 res.getError().add(buildError("客户ID不能为空"));
@@ -110,7 +110,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @PostMapping("/updateUser")
     public Result updateUser(UpdateUserBo in, InputUserData in2 ) {
-        Result res = new Result<>();
+        Result res = new Result();
         in.setAid(TokenManager.getAdminId());
         if (in2.getOrgCode()!=null){
             in2.setOrgCode(in2.getOrgCode().trim());
@@ -137,7 +137,7 @@ public class UserArchivesInterviewController extends BaseController {
      */
     @GetMapping("/selectByPrdid")
     public Result selectByPrdid(Integer prdid) {
-        Result res = new Result<>();
+        Result res = new Result();
         if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)){
             if (prdid==null){
                 res.getError().add(buildError("客户ID不能为空"));

+ 5 - 5
src/main/java/com/goafanti/Interview/controller/UserInterviewProjectController.java

@@ -36,7 +36,7 @@ public class UserInterviewProjectController extends BaseController {
      */
     @PostMapping("/add")
     public Result add(UserInterviewProject userInterviewProject) {
-        return new Result<>().data(this.userInterviewProjectService.insert(userInterviewProject));
+        return new Result().data(this.userInterviewProjectService.insert(userInterviewProject));
     }
 
 
@@ -48,7 +48,7 @@ public class UserInterviewProjectController extends BaseController {
      */
     @GetMapping("/get")
     public Result<UserInterviewProject> queryById(Integer id) {
-        return new Result<>().data(this.userInterviewProjectService.queryById(id));
+        return new Result().data(this.userInterviewProjectService.queryById(id));
     }
 
 
@@ -60,7 +60,7 @@ public class UserInterviewProjectController extends BaseController {
      */
     @PostMapping("/update")
     public Result edit(UserInterviewProject userInterviewProject) {
-        return new Result<>().data(this.userInterviewProjectService.update(userInterviewProject));
+        return new Result().data(this.userInterviewProjectService.update(userInterviewProject));
     }
 
     /**
@@ -71,7 +71,7 @@ public class UserInterviewProjectController extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.userInterviewProjectService.deleteById(id));
+        return new Result().data(this.userInterviewProjectService.deleteById(id));
     }
 
     /**
@@ -82,7 +82,7 @@ public class UserInterviewProjectController extends BaseController {
      */
     @GetMapping("/list")
     public Result<UserInterviewProjectBo> list(UserInterviewProject in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.userInterviewProjectService.list(in, pageNo, pageSize));
+        return new Result().data(this.userInterviewProjectService.list(in, pageNo, pageSize));
     }
 
 }

+ 1 - 3
src/main/java/com/goafanti/RD/service/impl/RDServiceImpl.java

@@ -70,9 +70,7 @@ public class RDServiceImpl extends BaseMybatisDao<RdDetailsMapper> implements RD
 
     @Override
     public Pagination<OutExcelRdDetails> list(InputRdList in) {
-        Map<String, Object> param = getParam(in);
-
-        return (Pagination<OutExcelRdDetails>) findPage("RdDetailsList","RdDetailsCount",param,in.getPageNo(), in.getPageSize());
+        return (Pagination<OutExcelRdDetails>) findPage("RdDetailsList","RdDetailsCount",in);
     }
 
     private Map<String, Object> getParam(InputRdList in) {

+ 6 - 6
src/main/java/com/goafanti/admin/controller/AdminSalesTeamController.java

@@ -63,7 +63,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @GetMapping("/get")
     public Result<SalesTeam> queryById(Integer id) {
-        return new Result<>().data(this.salesTeamService.queryById(id));
+        return new Result().data(this.salesTeamService.queryById(id));
     }
 
 
@@ -75,7 +75,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @PostMapping("/update")
     public Result edit(SalesTeam salesTeam) {
-        return new Result<>().data(this.salesTeamService.update(salesTeam));
+        return new Result().data(this.salesTeamService.update(salesTeam));
     }
 
     /**
@@ -86,7 +86,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.salesTeamService.deleteById(id));
+        return new Result().data(this.salesTeamService.deleteById(id));
     }
 
     /**
@@ -96,7 +96,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @GetMapping("/pageList")
     public Result<Pagination<SalesTeamBo>> pageList(SalesTeam in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.salesTeamService.pageList(in, pageNo, pageSize));
+        return new Result().data(this.salesTeamService.pageList(in, pageNo, pageSize));
     }
 
     /**
@@ -106,7 +106,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @GetMapping("/list")
     public Result<Pagination<SalesTeamBo>> list(Integer lvl) {
-        return new Result<>().data(this.salesTeamService.list(lvl));
+        return new Result().data(this.salesTeamService.list(lvl));
     }
 
     /**
@@ -115,7 +115,7 @@ public class AdminSalesTeamController extends CertifyApiController {
      */
     @GetMapping("/lvlList")
     public Result<List<SalesTeamBo>> lvlList() {
-        return new Result<>().data(this.salesTeamService.lvlList());
+        return new Result().data(this.salesTeamService.lvlList());
     }
 
 }

+ 5 - 5
src/main/java/com/goafanti/businessCard/controller/AdminBusinessCardController.java

@@ -35,7 +35,7 @@ public class AdminBusinessCardController extends BaseController {
      */
     @PostMapping("/add")
     public Result add(AdminBusinessCard adminBusinessCard) {
-        return new Result<>().data(this.adminBusinessCardService.insert(adminBusinessCard));
+        return new Result().data(this.adminBusinessCardService.insert(adminBusinessCard));
     }
 
 
@@ -47,7 +47,7 @@ public class AdminBusinessCardController extends BaseController {
      */
     @GetMapping("/get")
     public Result<AdminBusinessCard> queryById(Integer id) {
-        return new Result<>().data(this.adminBusinessCardService.queryById(id));
+        return new Result().data(this.adminBusinessCardService.queryById(id));
     }
 
 
@@ -59,7 +59,7 @@ public class AdminBusinessCardController extends BaseController {
      */
     @PostMapping("/update")
     public Result edit(AdminBusinessCard adminBusinessCard) {
-        return new Result<>().data(this.adminBusinessCardService.update(adminBusinessCard));
+        return new Result().data(this.adminBusinessCardService.update(adminBusinessCard));
     }
 
     /**
@@ -70,7 +70,7 @@ public class AdminBusinessCardController extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.adminBusinessCardService.deleteById(id));
+        return new Result().data(this.adminBusinessCardService.deleteById(id));
     }
 
     /**
@@ -81,7 +81,7 @@ public class AdminBusinessCardController extends BaseController {
      */
     @GetMapping("/list")
     public Result<AdminBusinessCard> list(AdminBusinessCard in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.adminBusinessCardService.list(in, pageNo, pageSize));
+        return new Result().data(this.adminBusinessCardService.list(in, pageNo, pageSize));
     }
 
 }

+ 4 - 2
src/main/java/com/goafanti/common/bo/Result.java

@@ -22,6 +22,8 @@ public class Result<T> {
 		this.data = data;
 	}
 
+
+
 	/**
 	 * @return the data
 	 */
@@ -52,14 +54,14 @@ public class Result<T> {
 		this.error = error;
 	}
 
-	public Result error(Error e) {
+	public Result<T> error(Error e) {
 		if (e != null) {
 			this.error.add(e);
 		}
 		return this;
 	}
 
-	public Result data(T o) {
+	public Result<T> data(T o) {
 		this.data = o;
 		return this;
 	}

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

@@ -52,7 +52,7 @@ public class BaseController {
 	private RedisUtil redisUtil;
 
 	protected Error buildError(String key) {
-		return buildError(key, null);
+		return buildError(key, key);
 	}
 
 	protected Error buildError(String key, String message) {

+ 7 - 7
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -988,7 +988,7 @@ public class PublicController extends CertifyApiController {
 	@PostMapping("/callCompleted")
 	@ResponseBody
 	public Result callCompleted(@RequestBody InputCallCompleter in) {
-		return new Result<>().data(userOutboundService.pushCallCompleted(in));
+		return new Result().data(userOutboundService.pushCallCompleted(in));
 	}
 
 	/**
@@ -998,7 +998,7 @@ public class PublicController extends CertifyApiController {
 	@PostMapping("/pullAllCall")
 	@ResponseBody
 	public Result pullAllCall() {
-		return new Result<>().data(userOutboundService.pushAllCall());
+		return new Result().data(userOutboundService.pushAllCall());
 	}
 
 
@@ -1009,7 +1009,7 @@ public class PublicController extends CertifyApiController {
 //	@ResponseBody
 //	public Result ImageOCR(@RequestParam(value = "file", required = false) MultipartFile file) {
 //
-//		return new Result<>().data(imageService.ImageOCR(file));
+//		return new Result().data(imageService.ImageOCR(file));
 //	}
 
 	/**
@@ -1018,7 +1018,7 @@ public class PublicController extends CertifyApiController {
 	 */
 	@RequestMapping("/pushUserFirstInterview")
 	public Result pushUserFirstInterview(){
-		return new Result<>().data(userArchivesInterviewService.pushUserFirstInterview());
+		return new Result().data(userArchivesInterviewService.pushUserFirstInterview());
 	}
 
 	/**
@@ -1027,7 +1027,7 @@ public class PublicController extends CertifyApiController {
 	 */
 	@RequestMapping(value = "/pushUserFirstInterview", method = RequestMethod.GET)
 	public Result pushOrderNewUser(){
-		return new Result<>().data(orderNewService.pushOrderNewUser());
+		return new Result().data(orderNewService.pushOrderNewUser());
 	}
 
 
@@ -1035,13 +1035,13 @@ public class PublicController extends CertifyApiController {
 	public Result mergeDocumentsToPdf(HttpServletResponse  response) throws DocumentException, IOException {
 		// 转换Word为PDF文件
 //		PDFUtils.convertWordToPDF("E:/4.docx", "E:/4-PDF.pdf");
-		PDFUtils.newConvertWordToPDF("E:/tmp/0814.docx", "E:/tmp/0814-PDF.pdf");
+		PDFUtils.newConvertWordToPDF("F:/data/111.docx", "F:/data/0814-PDF.pdf");
 //		PDFUtils.convertXlsxToPDF("E:/tmp/0811.xlsx", "E:/tmp/0811-PDF.pdf");
 //		List<String> list = Arrays.asList(
 //				"E:/tmp/4-PDF.pdf",
 //				"E:/tmp/0811-PDF.pdf"
 //		);
 //		DocumentToPDFMerger.mergePdfFiles(list,  "E:/tmp/"+System.currentTimeMillis()+".pdf");
-		return new Result<>();
+		return new Result();
 	}
 }

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

@@ -0,0 +1,87 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicAssistDetails;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 公出协单详情表(PublicAssistDetails)表数据库访问层
+ *
+ * @author makejava
+ * @since 2026-01-22 08:46:31
+ */
+public interface PublicAssistDetailsMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicAssistDetails selectById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param publicAssistDetails 查询条件
+     * @param pageable            分页对象
+     * @return 对象列表
+     */
+    List<PublicAssistDetails> findPublicAssistDetailsList(PublicAssistDetails publicAssistDetails);
+
+    /**
+     * 统计总行数
+     *
+     * @param publicAssistDetails 查询条件
+     * @return 总行数
+     */
+    int findPublicAssistDetailsCount(PublicAssistDetails publicAssistDetails);
+
+    /**
+     * 新增数据
+     *
+     * @param publicAssistDetails 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicAssistDetails publicAssistDetails);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicAssistDetails> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<PublicAssistDetails> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicAssistDetails> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicAssistDetails> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param publicAssistDetails 实例对象
+     * @return 影响行数
+     */
+    int update(PublicAssistDetails publicAssistDetails);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    PublicAssistDetails selectByPrid(Integer id);
+
+    void deeleteByPrid(Integer id);
+}
+

+ 85 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseContentTypeMapper.java

@@ -0,0 +1,85 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicReleaseContentType;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 公出内容表(查询列表多选使用)(PublicReleaseContentType)表数据库访问层
+ *
+ * @author makejava
+ * @since 2026-01-22 08:43:11
+ */
+public interface PublicReleaseContentTypeMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicReleaseContentType selectById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param publicReleaseContentType 查询条件
+     * @param pageable                 分页对象
+     * @return 对象列表
+     */
+    List<PublicReleaseContentType> findPublicReleaseContentTypeList(PublicReleaseContentType publicReleaseContentType);
+
+    /**
+     * 统计总行数
+     *
+     * @param publicReleaseContentType 查询条件
+     * @return 总行数
+     */
+    int findPublicReleaseContentTypeCount(PublicReleaseContentType publicReleaseContentType);
+
+    /**
+     * 新增数据
+     *
+     * @param publicReleaseContentType 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicReleaseContentType publicReleaseContentType);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicReleaseContentType> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<PublicReleaseContentType> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicReleaseContentType> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicReleaseContentType> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param publicReleaseContentType 实例对象
+     * @return 影响行数
+     */
+    int update(PublicReleaseContentType publicReleaseContentType);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    void deleteByPrid(Integer id);
+}
+

+ 85 - 0
src/main/java/com/goafanti/common/dao/PublicReleaseTypeMapper.java

@@ -0,0 +1,85 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PublicReleaseType;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 公出协单项目表(查询列表多选使用)(PublicReleaseType)表数据库访问层
+ *
+ * @author makejava
+ * @since 2026-01-19 11:50:42
+ */
+public interface PublicReleaseTypeMapper {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicReleaseType selectById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param publicReleaseType 查询条件
+     * @param pageable          分页对象
+     * @return 对象列表
+     */
+    List<PublicReleaseType> findPublicReleaseTypeList(PublicReleaseType publicReleaseType);
+
+    /**
+     * 统计总行数
+     *
+     * @param publicReleaseType 查询条件
+     * @return 总行数
+     */
+    int findPublicReleaseTypeCount(PublicReleaseType publicReleaseType);
+
+    /**
+     * 新增数据
+     *
+     * @param publicReleaseType 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicReleaseType publicReleaseType);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicReleaseType> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<PublicReleaseType> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicReleaseType> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicReleaseType> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param publicReleaseType 实例对象
+     * @return 影响行数
+     */
+    int update(PublicReleaseType publicReleaseType);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    void deleteByPrid(Integer id);
+}
+

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

@@ -93,5 +93,7 @@ public interface UserMidMapper {
     UserMid selectByUid(String uid);
 
     void updateCallByUid(@Param("uid") String uid, @Param("count") int count, @Param("duration") int duration);
+
+    int  addUserMidCount(@Param("uid") String uid);
 }
 

+ 43 - 0
src/main/java/com/goafanti/common/enums/AssistContentType.java

@@ -0,0 +1,43 @@
+package com.goafanti.common.enums;
+
+public enum AssistContentType {
+    //内容 0=其他,1=会议,2=写方案,3=接待
+    OTHER(0,"其他"),
+    MEETING(1,"会议"),
+    WRITE_SCHEME(2,"写方案"),
+    RECEPTION(3,"接待");
+    private Integer code;
+    private String desc;
+    AssistContentType(int code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public static String getDesc(int code) {
+        for (AssistContentType type : AssistContentType.values()) {
+            if (type.getCode() == code) {
+                return type.getDesc();
+            }
+        }
+        return null;
+    }
+
+    public static Integer getCode(String desc) {
+        for (AssistContentType type : AssistContentType.values()) {
+            if (type.getDesc().equals(desc)) {
+                return type.getCode();
+            }
+        }
+        return null;
+    }
+
+
+}

+ 68 - 0
src/main/java/com/goafanti/common/enums/AssistType.java

@@ -0,0 +1,68 @@
+package com.goafanti.common.enums;
+
+public enum AssistType {
+    //分类 0=其他,1=高企认定,2=会员服务,3=科技项目,4=研动力系统,5=知识产权,6=军工,7=涉密,8=技术合同登记,9=第三方认证项目
+    QT(0,"其他"),
+    GQRD(1,"高企认定"),
+    HYFW(2,"会员服务"),
+    KJXM(3,"科技项目"),
+    YKJX(4,"研动力系统"),
+    ZKNW(5,"知识产权"),
+    GYJG(6,"军工"),
+    SEM(7,"涉密"),
+    THHD(8,"技术合同登记"),
+    SQZC(9,"第三方认证项目");
+    private Integer code;
+    private String message;
+    AssistType(Integer code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+    public Integer getCode() {
+        return code;
+    }
+    public String getMessage() {
+        return message;
+    }
+    public static String getDesc(Integer code) {
+        for (AssistType type : AssistType.values()) {
+            if (type.getCode().equals(code)) {
+                return type.getMessage();
+            }
+        }
+        return null;
+    }
+    public static Integer getCodeByMessage(String message) {
+        for (AssistType type : AssistType.values()) {
+            if (type.getMessage().equals(message)) {
+                return type.getCode();
+            }
+        }
+        return null;
+    }
+    public static AssistType getByCode(Integer code) {
+        for (AssistType type : AssistType.values()) {
+            if (type.getCode().equals(code)) {
+                return type;
+            }
+        }
+        return null;
+    }
+    public static AssistType getByMessage(String message) {
+        for (AssistType type : AssistType.values()) {
+            if (type.getMessage().equals(message)) {
+                return type;
+            }
+        }
+        return null;
+    }
+    public static String getMessageByCode(String code) {
+        for (AssistType type : AssistType.values()) {
+            if (type.getCode().equals(Integer.valueOf(code))) {
+                return type.getMessage();
+            }
+        }
+        return null;
+    }
+
+}

+ 144 - 0
src/main/java/com/goafanti/common/mapper/PublicAssistDetailsMapper.xml

@@ -0,0 +1,144 @@
+<?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.PublicAssistDetailsMapper">
+
+    <resultMap type="com.goafanti.common.model.PublicAssistDetails" id="PublicAssistDetailsMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="prid" column="prid" jdbcType="INTEGER"/>
+        <result property="type" column="type" jdbcType="VARCHAR"/>
+        <result property="contentType" column="content_type" jdbcType="VARCHAR"/>
+        <result property="content" column="content" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="PublicAssistDetailsAllSql">
+        id, prid, type, content_type, content
+    </sql>
+
+    <!--查询单个-->
+    <select id="selectById" resultMap="PublicAssistDetailsMap">
+        select
+        <include refid="PublicAssistDetailsAllSql"/>
+        from public_assist_details
+        where id = #{id}
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into public_assist_details(prid, type, content_type, content)
+        values (#{prid}, #{type}, #{contentType}, #{content})
+    </insert>
+
+    <insert id="insertBatch">
+        insert into public_assist_details(prid, type, content_type, content)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type}, #{entity.contentType}, #{entity.content})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_assist_details(prid, type, content_type, content)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type}, #{entity.contentType}, #{entity.content})
+        </foreach>
+        on duplicate key update
+        prid = values(prid),
+        type = values(type),
+        content_type = values(content_type),
+        content = values(content)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update public_assist_details
+        <set>
+            <if test="prid != null">
+                prid = #{prid},
+            </if>
+            <if test="type != null and type != ''">
+                type = #{type},
+            </if>
+            <if test="contentType != null and contentType != ''">
+                content_type = #{contentType},
+            </if>
+            <if test="content != null and content != ''">
+                content = #{content},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--查询指定行数据-->
+    <select id="findPublicAssistDetailsList" resultMap="PublicAssistDetailsMap">
+        select
+        <include refid="PublicAssistDetailsAllSql"/>
+
+        from public_assist_details
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+            <if test="contentType != null and contentType != ''">
+                and content_type = #{contentType}
+            </if>
+            <if test="content != null and content != ''">
+                and content = #{content}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findPublicAssistDetailsCount" resultType="java.lang.Integer">
+        select count(1)
+        from public_assist_details
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+            <if test="contentType != null and contentType != ''">
+                and content_type = #{contentType}
+            </if>
+            <if test="content != null and content != ''">
+                and content = #{content}
+            </if>
+        </where>
+    </select>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from public_assist_details
+        where id = #{id}
+    </delete>
+
+
+    <select id="selectByPrid" resultMap="PublicAssistDetailsMap">
+        select
+        <include refid="PublicAssistDetailsAllSql"/>
+        from public_assist_details
+        where prid = #{id}
+    </select>
+    <delete id="deeleteByPrid">
+        delete
+        from public_assist_details
+        where prid = #{id}
+    </delete>
+
+</mapper>
+

+ 114 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseContentTypeMapper.xml

@@ -0,0 +1,114 @@
+<?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.PublicReleaseContentTypeMapper">
+
+    <resultMap type="com.goafanti.common.model.PublicReleaseContentType" id="PublicReleaseContentTypeMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="prid" column="prid" jdbcType="INTEGER"/>
+        <result property="type" column="type" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="PublicReleaseContentTypeAllSql">
+        id, prid, type
+    </sql>
+
+    <!--查询单个-->
+    <select id="selectById" resultMap="PublicReleaseContentTypeMap">
+        select
+        <include refid="PublicReleaseContentTypeAllSql"/>
+        from public_release_content_type
+        where id = #{id}
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_content_type(prid, type)
+        values (#{prid}, #{type})
+    </insert>
+
+    <insert id="insertBatch">
+        insert into public_release_content_type(prid, type)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_content_type(prid, type)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type})
+        </foreach>
+        on duplicate key update
+        prid = values(prid),
+        type = values(type)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update public_release_content_type
+        <set>
+            <if test="prid != null">
+                prid = #{prid},
+            </if>
+            <if test="type != null and type != ''">
+                type = #{type},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--查询指定行数据-->
+    <select id="findPublicReleaseContentTypeList" resultMap="PublicReleaseContentTypeMap">
+        select
+        <include refid="PublicReleaseContentTypeAllSql"/>
+
+        from public_release_content_type
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findPublicReleaseContentTypeCount" resultType="java.lang.Integer">
+        select count(1)
+        from public_release_content_type
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+    </select>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from public_release_content_type
+        where id = #{id}
+    </delete>
+    <delete id="deleteByPrid">
+        delete
+        from public_release_content_type
+        where prid = #{prid}
+    </delete>
+
+</mapper>
+

+ 174 - 63
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -714,6 +714,19 @@
         </if>
         <if test="type==1">
             left join admin_public_reviewer apr on a.aid=apr.aid
+            <if test="status==2">
+                left join public_release_log prl on a.id=prl.prid and prl.status=2
+            </if>
+        </if>
+        <if test="type==6">
+            JOIN (
+            SELECT pr.main_id
+            FROM public_release pr
+            JOIN admin_public_reviewer apr ON pr.aid = apr.aid
+            WHERE pr.`type` IN (3, 6)
+            AND apr.type = 1
+            AND apr.reviewer_id = #{aid}
+            ) sub ON a.id = sub.main_id
         </if>
         <if test="type==7">
             left join t_order_public_release_count opc on a.order_no=opc.order_no
@@ -727,19 +740,34 @@
         </if>
     </select>
     <sql id="listPublicReleaseSql">
-        <if test="type==0">
+        <if test="type==0 or type>7">
+            <if test="type==8">
+                and a.type=0
+                and a.assist =1
+            </if>
+            <if test="type==9">
+                and a.type=5
+                and a.assist =1
+            </if>
+
             and a.public_type in (0,1,2,3)
             <if test="assist ==0">
                 and a.assist in(0,1,4)
             </if>
             <if test="assist == 2">
+                <if test="type==10">
+                    and a.type=6
+                </if>
+                <if test="type==0">
+                    and a.type = 3
+                </if>
                 and a.assist    in (2,4)
             </if>
             <if test="assist == 3">
                 and a.assist    =3
             </if>
-            <if test="assist ==4">
-                and a.assist in (2,3,4)
+            <if test="assist == 4">
+                and a.assist    in (2,3,4)
             </if>
             <if test="assistType ==1">
                 and a.assist in(0,1,2)
@@ -751,8 +779,16 @@
             <if test="statusType ==1">
                 and a.status in (0,1,2,4)
             </if>
+            <if test="stauts==0">
+                and a.status=0
+            </if>
+            <if test="status==1">
+                and a.status=1
+            </if>
+
         </if>
         <if test="type==1">
+            and apr.reviewer_id = #{aid}
             and a.public_type in (0,2)
             and a.assist in(0,1)
             and a.tech_start_process in (0,2)
@@ -760,14 +796,13 @@
             <if test="status == 1">
                 and a.status = 1 and  a.assist_process in (0,1)
                 and ((apr.type=0 and a.process_status in (0,1)) or(apr.type=4 and a.process_status in (2)))
-                and apr.reviewer_id = #{aid}
+
             </if>
             <if test="status == 2">
-                and a.status in(1,2) and  a.assist_process in (0,2,3,4)
-                and apr.type in (0,4)
-                and a.process_status in (0,4)
-                and apr.reviewer_id = #{aid}
+                and a.status in(1,2)
+                and prl.status=2
             </if>
+
         </if>
         <if test="type==2">
             and a.public_type in (0,2)
@@ -796,9 +831,9 @@
             <if test="status==2">and a.tech_start_process in (2) </if>
         </if>
         <if test="type==6">
-            and a.type=0 and a.assist=1
-            and a.id in (select pr.main_id from public_release pr left join admin_public_reviewer apr
-            on pr.aid = apr.aid where  pr.`type` =3 and apr.type = 1 and apr.reviewer_id = #{aid})
+            and a.type in (0,5)
+            and a.assist=1
+            and a.process_status in(0,3)
         </if>
         <if test="type==7">
             and opc.max_process in (1,2,3,4,5)
@@ -846,6 +881,17 @@
         </if>
         <if test="type==1">
             left join admin_public_reviewer apr on a.aid=apr.aid
+            left join public_release_log prl on a.id=prl.prid and prl.aid=#{aid}
+        </if>
+        <if test="type==6">
+            JOIN (
+            SELECT pr.main_id
+            FROM public_release pr
+            JOIN admin_public_reviewer apr ON pr.aid = apr.aid
+            WHERE pr.`type` IN (3, 6)
+            AND apr.type = 1
+            AND apr.reviewer_id = #{aid}
+            ) sub ON a.id = sub.main_id
         </if>
         <if test="type==7">
             left join t_order_public_release_count opc on a.order_no=opc.order_no
@@ -860,10 +906,12 @@
         a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.aid ,c.superior_id suprId,a.tech_start_process techStartProcess,a.alone,
         a.plan ,a.expected_effect expectedEffect,a.next_plan nextPlan,c.reviewer,a.type,a.order_no orderNo,d.contract_no contractNo,a.address_name addressName,
         date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_Status updateStatus,a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,
-        a.main_name mainName,a.assistant_aid assistantAid,a.assistant_name assistantName,a.public_again publicAhain,x.uids,a.public_type publicType,c2.name reviewerName
+        a.main_name mainName,a.assistant_aid assistantAid,a.assistant_name assistantName,a.public_again publicAhain,x.uids,a.public_type publicType,c2.name reviewerName,
+        pad.type as assistType,pad.content_type assistContentType,pad.content assistContent
         from public_release a  left join admin c on a.aid =c.id  left join admin c2 on c.reviewer =c2.id
         left join (select prid ,GROUP_CONCAT(uid)uids from public_release_details where prid= #{id} group by prid)x on a.id=x.prid
         left join t_order_new d on a.order_no=d.order_no
+        left join public_assist_details pad on a.id=pad.prid
         where 1=1
         <if test="id !=null">
             and a.id= #{id}
@@ -887,8 +935,15 @@
     </select>
 
     <select id="listPublicStatistics" resultType="com.goafanti.weChat.bo.OutPublicStatistics">
-        select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name  from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
-        from (select a.aid, if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,b.dk ,if(a.status=2,a.duration,0)duration
+        select y.aid,y.bh,y.dk,y.wsh,y.tg,y.xds,y.duration,c.name
+        from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.xds)xds,
+        sum(x.dk)dk,sum(x.duration)duration
+        from (select a.aid, b.dk ,
+        if(a.status=0,1,0)bh ,
+        if(a.status=1,1,0)wsh,
+        if(a.status=2 and a.type &lt; 5,1,0)tg,
+        if(a.status=2 and (a.type=5 or a.type=6),1,0)xds,
+        if(a.status=2,a.duration,0)duration
         from public_release a left join admin c on a.aid =c.id
         inner join (select prid ,sum(if(clock_in=1,1,0))dk from public_release_details where 1=1
         <if test="clockStart != null and clockEnd != null">
@@ -941,17 +996,32 @@
         b.main_name mainName,b.assist,b.assistant_aid assistantAid, b.assistant_name assistantName,f.contract_no contractNo,
         uai.customer_demand customerDemand,uai.early_communication earlyCommunication,uai.interview_ideas interviewIdeas,
         uai.interview_purpose interviewPurpose,uai.interview_feedback interviewFeedback,uai.follow_up_plan followUpPlan,
-        uai.interview_recommend interviewRecommend,
+        uai.interview_recommend interviewRecommend,pad.type assistType,pad.content_type assistContentType,pad.content assistContent,
         e.name sname,f.total_amount  totalAmout,d.sign_bills signBills,date_format(d.sign_time,'%Y-%m-%d')signTime
         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 t_order_new f on b.order_no =f.order_no
         left join `user` d on a.uid =d.id  left join admin e on d.aid=e.id
         left join user_archives_interview uai on a.id=uai.prdid
+        left join public_assist_details pad on b.id=pad.prid
         where 1=1
+        <include refid="publicDtails_sql" />
+        order by b.status,b.create_time desc
+        <if test="page_sql!=null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <sql id="publicDtails_sql">
         <if test="publicType != null">
             and b.type= #{publicType}
         </if>
+        <if test="assistType!=null">
+            and
+            <foreach  collection="assistType" item="type" separator=" or " open="(" close=")">
+                find_in_set(#{type},pad.type) &gt; 0
+            </foreach>
+        </if>
         <if test="aid != null">
             and b.aid= #{aid}
         </if>
@@ -985,11 +1055,7 @@
         <if test="contractNo !=null">
             and f.contract_no like CONCAT('%',#{contractNo},'%')
         </if>
-        order by b.status,b.create_time desc
-        <if test="page_sql!=null">
-            ${page_sql}
-        </if>
-    </select>
+    </sql>
 
     <select id="countPublicDtails" resultType="java.lang.Integer">
         select count(*)
@@ -998,43 +1064,11 @@
         <if test="contractNo !=null">
             left join t_order_new f on b.order_no =f.order_no
         </if>
-        where 1=1
-        <if test="publicType != null">
-            and b.type= #{publicType}
-        </if>
-        <if test="aid != null">
-            and b.aid= #{aid}
-        </if>
-        <if test="sid != null">
-            and d.aid= #{sid}
-        </if>
-        <if test="deps !=null">
-            and c.department_id in
-            <foreach close=")" collection="deps" item="dep" open="(" separator=",">
-                #{dep}
-            </foreach>
-        </if>
-        <if test="uid != null">
-            and a.uid = #{uid}
-        </if>
-        <if test="releaseStart != null and releaseEnd != null">
-            and (b.release_start  between #{releaseStart} and #{releaseEnd} or b.release_end  between #{releaseStart} and #{releaseEnd})
-        </if>
-        <if test="createStart != null and createEnd != null">
-            and b.create_time  between #{createStart} and #{createEnd}
-        </if>
-        <if test="status != null">
-            and b.status = #{status}
-        </if>
-        <if test="statusType == 1">
-            and b.status in (1,2)
-        </if>
-        <if test="clockIn !=null">
-            and a.clock_in= #{clockIn}
-        </if>
-        <if test="contractNo !=null">
-            and f.contract_no like CONCAT('%',#{contractNo},'%')
+        <if test="assistType!=null">
+            left join public_assist_details pad on b.id=pad.prid
         </if>
+        where 1=1
+        <include refid="publicDtails_sql" />
     </select>
 
 
@@ -1114,6 +1148,7 @@
         <include refid="PublicReleaseAllSql" />
         from public_release
         where status in(1,2)  and aid = #{aid}
+        and release_start &lt;= now()
         order by release_start desc limit 10
     </select>
     <select id="selectOutListBoById" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
@@ -1186,13 +1221,15 @@
     </select>
     <select id="selectCountByAssistUnaudited" resultType="java.lang.Integer">
         SELECT count(*)
-        from public_release a
-        where a.`type`=0 and a.assist =1 and a.status =1
-          and a.id in (select pr.main_id
-                       from public_release pr left join admin_public_reviewer apr on
-                           pr.aid = apr.aid
-                       where  pr.`type` =3 and apr.type = 1
-                         and apr.reviewer_id = #{aid})
+        FROM public_release a
+                 JOIN (
+            SELECT pr.main_id
+            FROM public_release pr
+                     LEFT JOIN admin_public_reviewer apr ON pr.aid = apr.aid
+                        WHERE pr.`type` in (3,6) AND apr.type = 1
+                    AND apr.reviewer_id = #{aid}        ) sub ON a.id = sub.main_id
+        WHERE a.`type` in ( 0,5) AND a.assist = 1 AND a.status = 1
+          and a.process_status in (0,3)
     </select>
     <select id="selectCountByUnaudited" resultType="java.lang.Integer">
         select  COUNT(*)
@@ -1241,6 +1278,7 @@
         select
         <include refid="PublicReleaseAllSql"/>
         from public_release where aid=#{aid} and status in (0,1,2)
+        and type &lt;5
         and (alone in (0,1) or (alone=2 and assist=2))
         and ( (release_start &gt;= #{start} and release_start &lt;= #{end})
         or  (release_start &lt; #{start} and release_end &gt; #{start})
@@ -1272,6 +1310,79 @@
         where a.status =2 and a.type=0
     </select>
 
+    <select id="findAssistList" resultType="com.goafanti.weChat.bo.OutListAssist">
+        select a.id ,a.`type`,c.type assistType,
+               c.content_type contentType,c.content ,a.aname,a.assist_aid_name assistAidName,
+        a.user_names userNames ,d.sign_number signNumber ,d.public_count publicCount,d.assist_count assistCount ,
+        d.public_assist_count  publicAssistCount ,d.non_public_count nonPublicCount,a.release_start releaseStart,
+        d.task_names  taskNames
+        from public_release a left join public_release_details b on a.id =b.prid
+        left join public_assist_details c on a.id =c.prid
+        left join user_mid d on b.uid =d.uid
+        where a.assist =1 and a.status =2
+        <include refid="findAssistListSql"/>
+        order by a.release_start desc
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+    <sql id="findAssistListSql">
+        <if test="type==0">
+            and a.type &lt; 5
+        </if>
+        <if test="type==1">
+            and a.type &gt; 4
+        </if>
+        <if test="contentType!=null">
+        and
+            <foreach item="item" collection="contentType" separator=" or ">
+                 find_in_set(#{item},c.content_type) &gt;  0
+            </foreach>
+        </if>
+        <if test="aid !=null">
+            and a.aid = #{aid}
+        </if>
+        <if test="assistAid != null">
+            and  FIND_IN_SET(#{assistAid},a.assist_aid)
+        </if>
+        <if test="uid !=null">
+            and b.uid = #{uid}
+        </if>
+        <if test="assistType !=null">
+        and
+            <foreach item="item" collection="assistType" separator=" or ">
+                 find_in_set(#{item},c.type) &gt;  0
+            </foreach>
+        </if>
+        <if test="startTime !=null and endTime !=null">
+            and a.release_start  between #{startTime} and #{endTime}
+        </if>
+        <if test="depId != null">
 
+        </if>
+        <if test="assistCount != null">
+            <if test="assistCount == 1">
+                and d.assist_count &lt; 5
+            </if>
+            <if test="assistCount == 2">
+                and d.assist_count &gt;4 and  d.assist_count &lt; 10
+            </if>
+            <if test="assistCount == 3">
+                and d.assist_count &gt;9 and  d.assist_count &lt; 15
+            </if>
+            <if test="assistCount == 4">
+                and d.assist_count &gt;14
+            </if>
+
+        </if>
+    </sql>
+    <select id="findAssistCount" resultType="java.lang.Integer">
+    select count(*)
+    from public_release a left join public_release_details b on a.id =b.prid
+    left join public_assist_details c on a.id =c.prid
+    left join user_mid d on b.uid =d.uid
+        where a.assist =1 and a.status =2
+    <include refid="findAssistListSql"/>
+    </select>
 </mapper>
 

+ 114 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseTypeMapper.xml

@@ -0,0 +1,114 @@
+<?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.PublicReleaseTypeMapper">
+
+    <resultMap type="com.goafanti.common.model.PublicReleaseType" id="PublicReleaseTypeMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="prid" column="prid" jdbcType="INTEGER"/>
+        <result property="type" column="type" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="PublicReleaseTypeAllSql">
+        id, prid, type
+    </sql>
+
+    <!--查询单个-->
+    <select id="selectById" resultMap="PublicReleaseTypeMap">
+        select
+        <include refid="PublicReleaseTypeAllSql"/>
+        from public_release_type
+        where id = #{id}
+    </select>
+
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_type(prid, type)
+        values (#{prid}, #{type})
+    </insert>
+
+    <insert id="insertBatch">
+        insert into public_release_type(prid, type)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type})
+        </foreach>
+    </insert>
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_type(prid, type)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.type})
+        </foreach>
+        on duplicate key update
+        prid = values(prid),
+        type = values(type)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update public_release_type
+        <set>
+            <if test="prid != null">
+                prid = #{prid},
+            </if>
+            <if test="type != null and type != ''">
+                type = #{type},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+    <!--查询指定行数据-->
+    <select id="findPublicReleaseTypeList" resultMap="PublicReleaseTypeMap">
+        select
+        <include refid="PublicReleaseTypeAllSql"/>
+
+        from public_release_type
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findPublicReleaseTypeCount" resultType="java.lang.Integer">
+        select count(1)
+        from public_release_type
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+    </select>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from public_release_type
+        where id = #{id}
+    </delete>
+    <delete id="deleteByPrid">
+        delete
+        from public_release_type
+        where prid = #{id}
+    </delete>
+
+</mapper>
+

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

@@ -1897,7 +1897,9 @@
     </select>
     <select id="selectOrderByuid" resultType="java.util.Map">
         select order_no orderNo,contract_no contractNo,total_amount totalAmount
-        from t_order_new  where delete_sign in (0,2) and  buyer_id = #{uid}
+        from t_order_new
+        where delete_sign in (0,2) and process_status &gt; 0
+        and  buyer_id = #{uid}
         order by create_time desc
     </select>
     <select id="orderSalesSourceAmount" resultType="com.goafanti.order.bo.outStatistics.OutOrderSalesSourceAmount">

+ 19 - 0
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -647,6 +647,7 @@
     </insert>
 
 
+
     <update id="updateListByUid" parameterType="com.goafanti.common.model.UserMid">
         update user_mid
         <set>
@@ -1180,5 +1181,23 @@
         from user_mid
         where uid = #{uid}
     </select>
+
+    <insert id="addUserMidCount">
+        update user_mid x
+        right join (select b.uid , count(*)counts, sum(if(a.assist = 1, 1, 0)) assistCount,
+        sum(if(a.assist = 1 and a.`type` &lt; 5, 1, 0)) publicCount,
+        sum(if(a.assist = 1 and a.`type` &gt; 4, 1, 0)) nonPublicCount
+        from public_release a
+        left join public_release_details b on
+        a.id = b.prid
+        where status = 2
+        and b.uid = #{uid}
+        group by b.uid) y on
+        x.uid = y.uid
+        set
+        x.public_count = y.counts, x.assist_count = y.assistCount,
+        x.public_assist_count = publicCount, x.non_public_count = y.nonPublicCount
+        where x.uid = #{uid}
+    </insert>
 </mapper>
 

+ 75 - 0
src/main/java/com/goafanti/common/model/PublicAssistDetails.java

@@ -0,0 +1,75 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+
+
+/**
+ * 公出协单详情表(PublicAssistDetails)实体类
+ *
+ * @author makejava
+ * @since 2026-01-22 08:46:31
+ */
+public class PublicAssistDetails implements Serializable {
+    private static final long serialVersionUID = -41238799072140202L;
+
+    private Integer id;
+    /**
+     * 公出详情编号
+     */
+    private Integer prid;
+    /**
+     * 分类 0=其他,1=高企认定,2=会员服务,3=科技项目,4=研动力系统,5=知识产权,6=军工,7=涉密,8=技术合同登记,9=第三方认证项目
+     */
+    private String type;
+    /**
+     * 内容 0=其他,1=会议,2=写方案,3=接待
+     */
+    private String contentType;
+    /**
+     * 内容说明
+     */
+    private String content;
+
+
+    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 getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+}
+

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

@@ -175,7 +175,7 @@ public class PublicRelease implements Serializable {
      */
     private Integer alone;
     /**
-     * 0=无需多级审核,1=1级审核,2=2级审核,4=完成审核
+     * 0=无需多级审核,1=1级审核,2=2级审核,3=完成审核
      */
     private Integer processStatus;
     /**

+ 51 - 0
src/main/java/com/goafanti/common/model/PublicReleaseContentType.java

@@ -0,0 +1,51 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+
+
+/**
+ * 公出内容表(查询列表多选使用)(PublicReleaseContentType)实体类
+ *
+ * @author makejava
+ * @since 2026-01-22 08:43:12
+ */
+public class PublicReleaseContentType implements Serializable {
+    private static final long serialVersionUID = -40950203601730541L;
+
+    private Integer id;
+    /**
+     * 公出详情编号
+     */
+    private Integer prid;
+    /**
+     * 内容
+     */
+    private String type;
+
+
+    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 getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+}
+

+ 51 - 0
src/main/java/com/goafanti/common/model/PublicReleaseType.java

@@ -0,0 +1,51 @@
+package com.goafanti.common.model;
+
+import java.io.Serializable;
+
+
+/**
+ * 公出协单项目表(查询列表多选使用)(PublicReleaseType)实体类
+ *
+ * @author makejava
+ * @since 2026-01-19 11:50:43
+ */
+public class PublicReleaseType implements Serializable {
+    private static final long serialVersionUID = -48595395135053328L;
+
+    private Integer id;
+    /**
+     * 公出详情编号
+     */
+    private Integer prid;
+    /**
+     * 协单项目
+     */
+    private String type;
+
+
+    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 getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+}
+

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

@@ -302,7 +302,7 @@ public class ReleaseUserTask {
 						if (!userTmpList.isEmpty()) {
 							lockUserList.addAll(userTmpList);
 						}
-						//获取需要释放的签单客户
+						//获取需要释放的签单客户 现在签单也是30天释放
 						List<LockingReleaseBo> users1 = userService.selectSignReleaseUser(u.getId());
 						customerService.pushReleaseLog(users1);
 						addUserNotice(users1);

+ 138 - 0
src/main/java/com/goafanti/common/utils/pdf/ExcelToPdfUtils.java

@@ -0,0 +1,138 @@
+package com.goafanti.common.utils.pdf;
+
+
+import com.aspose.cells.License;
+import com.aspose.cells.PdfSaveOptions;
+import com.aspose.cells.Workbook;
+
+import java.io.FileOutputStream;
+import java.io.InputStream;
+
+/**
+ * Excel转PDF工具类
+ *
+ */
+public class ExcelToPdfUtils {
+
+    /**
+     * excel 转 pdf
+     *
+     * @param excelFilePath excel文件路径
+     */
+    public static void excel2pdf(String excelFilePath) {
+        excel2pdf(excelFilePath, null, null);
+    }
+
+    /**
+     * excel 转 pdf
+     *
+     * @param excelFilePath excel文件路径
+     * @param convertSheets 需要转换的sheet
+     */
+    public static void excel2pdf(String excelFilePath, int[] convertSheets) {
+        excel2pdf(excelFilePath, null, convertSheets);
+    }
+
+    /**
+     * excel 转 pdf
+     *
+     * @param excelFilePath excel文件路径
+     * @param pdfFilePath   pdf文件路径
+     */
+    public static void excel2pdf(String excelFilePath, String pdfFilePath) {
+        excel2pdf(excelFilePath, pdfFilePath, null);
+    }
+
+    /**
+     * excel 转 pdf
+     *
+     * @param excelFilePath excel文件路径
+     * @param pdfFilePath   pdf文件路径
+     * @param convertSheets 需要转换的sheet
+     */
+    public static void excel2pdf(String excelFilePath, String pdfFilePath, int[] convertSheets) {
+        try {
+            pdfFilePath = pdfFilePath == null ? getPdfFilePath(excelFilePath) : pdfFilePath;
+            // 验证 License
+            getLicense();
+            Workbook wb = new Workbook(excelFilePath);
+            FileOutputStream fileOS = new FileOutputStream(pdfFilePath);
+            PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
+
+            //删除强制每个sheet为一页的设置,允许Aspose自动分页
+            pdfSaveOptions.setOnePagePerSheet(true);
+            // 如果有指定需要转换的sheet,隐藏不需要转换的sheet
+            if (null != convertSheets) {
+                printSheetPage(wb, convertSheets);
+            }
+            // 将文件保存为PDF
+            wb.save(fileOS, pdfSaveOptions);
+            fileOS.flush();
+            fileOS.close();
+            System.out.println("convert success");
+        } catch (Exception e) {
+            System.out.println("convert failed");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取生成的 pdf 文件路径,默认与源文件同一目录
+     *
+     * @param excelFilePath excel文件路径
+     * @return 生成的 pdf 文件路径
+     */
+    public static String getPdfFilePath(String excelFilePath) {
+        if (excelFilePath == null || excelFilePath.isEmpty()) {
+            throw new IllegalArgumentException("Excel file path cannot be null or empty");
+        }
+        int dotIndex = excelFilePath.lastIndexOf('.');
+        if (dotIndex > 0) {
+            return excelFilePath.substring(0, dotIndex) + ".pdf";
+        }
+        // 如果文件路径中没有扩展名,直接追加 .pdf
+        return excelFilePath + ".pdf";
+    }
+
+
+    /**
+     * 获取 license 去除水印
+     * 若不验证则转化出的pdf文档会有水印产生
+     */
+    public static void getLicense() {
+        String licenseFilePath = "excel-license.xml";
+        try {
+            InputStream is = ExcelToPdfUtils.class.getClassLoader().getResourceAsStream(licenseFilePath);
+            License license = new License();
+            license.setLicense(is);
+        } catch (Exception e) {
+            System.out.println("license verify failed");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 隐藏workbook中不需要的sheet页。
+     *
+     * @param sheets 显示页的sheet数组
+     */
+    public static void printSheetPage(Workbook wb, int[] sheets) {
+        for (int i = 1; i < wb.getWorksheets().getCount(); i++) {
+            wb.getWorksheets().get(i).setVisible(false);
+        }
+        if (null == sheets || sheets.length == 0) {
+            wb.getWorksheets().get(0).setVisible(true);
+        } else {
+            for (int i = 0; i < sheets.length; i++) {
+                wb.getWorksheets().get(i).setVisible(true);
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+//        String srcFilePath = Paths.get(FileUtils.getRootPath("fileDir"), "/templates/差旅费报销单打印模板.xlsx").toString();
+//        ExcelToPdfUtils.excel2pdf(srcFilePath);
+                ExcelToPdfUtils.excel2pdf("F:\\data\\6-2和6-3 研发支出汇总表和辅助明细账-加计扣除-8.xls");
+
+    }
+}

+ 39 - 0
src/main/java/com/goafanti/common/utils/pdf/PdfMerger.java

@@ -0,0 +1,39 @@
+package com.goafanti.common.utils.pdf;
+
+import com.itextpdf.text.Document;
+import com.itextpdf.text.pdf.PdfCopy;
+import com.itextpdf.text.pdf.PdfReader;
+
+import java.io.FileOutputStream;
+
+public class PdfMerger {
+
+    public static void main(String[] args) {
+        String[] pdfs = new String[] {
+                "F:\\data\\2-1加计扣除情况说明.pdf",
+                "F:\\data\\6-2和6-3 研发支出汇总表和辅助明细账-加计扣除-8.pdf"};
+
+        String outputPdf = "F:\\data\\merger.pdf"; // 合并后的PDF文件
+
+        try {
+            Document document = new Document();
+            PdfCopy copy = new PdfCopy(document, new FileOutputStream(outputPdf));
+            document.open();
+
+            for (String pdf : pdfs) {
+                PdfReader reader = new PdfReader(pdf);
+                for (int i = 1; i <= reader.getNumberOfPages(); i++) {
+                    document.newPage();
+                    copy.addPage(copy.getImportedPage(reader, i));
+                }
+                reader.close();
+            }
+
+            document.close();
+            System.out.println("PDFs merged successfully.");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 70 - 0
src/main/java/com/goafanti/common/utils/word/DocToPdfUtils.java

@@ -0,0 +1,70 @@
+package com.goafanti.common.utils.word;
+
+import com.aspose.words.Document;
+import com.aspose.words.License;
+import com.aspose.words.SaveFormat;
+import com.goafanti.common.utils.LoggerUtils;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.Objects;
+
+
+/**
+ * word转PDF 工具类
+ *
+ */
+public class DocToPdfUtils {
+
+
+
+
+
+
+        /**
+         * 获取 license 去除水印
+         * 若不验证则转化出的pdf文档会有水印产生
+         */
+        private static void getLicense() {
+            String licenseFilePath = "word-license.xml";
+            try {
+                InputStream is = DocToPdfUtils.class.getClassLoader().getResourceAsStream(licenseFilePath);
+                License license = new License();
+                license.setLicense(Objects.requireNonNull(is));
+            } catch (Exception e) {
+                LoggerUtils.debug(DocToPdfUtils.class, "license verify failed");
+                e.printStackTrace();
+            }
+        }
+
+        /**
+         * word 转 pdf
+         *
+         * @param wordFile word 文件路径
+         * @param pdfFile  生成的 pdf 文件路径
+         */
+        public static void word2Pdf(String wordFile, String pdfFile) {
+            File file = new File(pdfFile);
+            if (!file.getParentFile().exists()) {
+                file.getParentFile().mkdir();
+            }
+            getLicense();
+            try (FileOutputStream os = new FileOutputStream(new File(pdfFile))) {
+                Document doc = new Document(wordFile);
+                doc.save(os, SaveFormat.PDF);
+            } catch (Exception e) {
+                LoggerUtils.debug(DocToPdfUtils.class, "word转pdf失败");
+                e.printStackTrace();
+            }
+        }
+
+        public static void main(String[] args) {
+//            String docFilePath = Paths.get(FileUtils.getRootPath("fileDir"), "/templates/演示文档导出.doc").toString();
+//            String pdfFilePath = Paths.get(FileUtils.getRootPath("fileDir"), "/templates/演示文档导出.pdf").toString();
+//            DocToPdfUtils.word2Pdf(docFilePath, pdfFilePath);
+              DocToPdfUtils.word2Pdf("F:\\data\\2-1加计扣除情况说明.doc", "F:\\data\\2-1加计扣除情况说明.pdf");
+        }
+
+
+}

+ 12 - 1
src/main/java/com/goafanti/core/mybatis/BaseMybatisDao.java

@@ -121,6 +121,10 @@ public class BaseMybatisDao<T> extends SqlSessionDaoSupport {
 		}
 		return page;
 	}
+	public List<?> findList(String sqlId, Object params) {
+		Map<String, Object> map = BeanUtilsExt.pushMap(params);
+		return findListAll(sqlId, map);
+	}
 
 	public List<?> findList(String sqlId, Object params, Integer pageNo, Integer pageSize) {
 		Map<String, Object> map = BeanUtilsExt.pushMap(params);
@@ -149,7 +153,14 @@ public class BaseMybatisDao<T> extends SqlSessionDaoSupport {
 		params.put("page_sql", page_sql);
 		sqlId = String.format("%s.%s", NAMESPACE, sqlId);
 
-        return this.getSqlSession().selectList(sqlId, params);
+		return this.getSqlSession().selectList(sqlId, params);
+	}
+
+	public List<?> findListAll(String sqlId, Map<String, Object> params) {
+		String page_sql = String.format(" ");
+		params.put("page_sql", page_sql);
+		sqlId = String.format("%s.%s", NAMESPACE, sqlId);
+		return this.getSqlSession().selectList(sqlId, params);
 	}
 
 	/**

+ 13 - 1
src/main/java/com/goafanti/customer/bo/BusinessListBo.java

@@ -35,7 +35,19 @@ public class BusinessListBo {
 	private String businessVarietiesName;
 	/** 备注信息 **/
 	private String remarks;
-	
+	/**
+	 * 查询类型 0我的, 1=所有
+	 */
+	private Integer type;
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
 	public String getUfbId() {
 		return ufbId;
 	}

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

@@ -3,6 +3,7 @@ package com.goafanti.customer.bo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
 import java.util.Date;
+import java.util.List;
 
 public class PublicReleaseListBo {
 
@@ -77,6 +78,16 @@ public class PublicReleaseListBo {
      */
     private Integer followCount;
 
+    private List<?> logList;
+
+    public List<?> getLogList() {
+        return logList;
+    }
+
+    public void setLogList(List<?> logList) {
+        this.logList = logList;
+    }
+
     public Integer getPrdId() {
         return prdId;
     }

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

@@ -36,7 +36,7 @@ public class UserArchivesController  extends BaseController {
      */
     @PostMapping("/add")
     public Result add(UserArchives userArchives) {
-        return new Result<>().data(this.userArchivesService.insert(userArchives));
+        return new Result().data(this.userArchivesService.insert(userArchives));
     }
     
     
@@ -48,7 +48,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/get")
     public Result<UserArchives> queryById( Integer id) {
-        return new Result<>().data(this.userArchivesService.queryById(id));
+        return new Result().data(this.userArchivesService.queryById(id));
     }
 
 
@@ -61,7 +61,7 @@ public class UserArchivesController  extends BaseController {
      */
     @PostMapping("/update")
     public Result edit(UserArchives userArchives,Integer channelType) {
-        return new Result<>().data(this.userArchivesService.update(userArchives,channelType));
+        return new Result().data(this.userArchivesService.update(userArchives,channelType));
     }
 
     /**
@@ -72,7 +72,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.userArchivesService.deleteById(id));
+        return new Result().data(this.userArchivesService.deleteById(id));
     }
     
         /**
@@ -81,7 +81,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/list")
     public Result<UserArchives> list(UserArchives in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.userArchivesService.list(in,  pageNo,  pageSize));
+        return new Result().data(this.userArchivesService.list(in,  pageNo,  pageSize));
     }
 
     /**
@@ -92,7 +92,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/queryByUid")
     public Result<UserArchives> queryByUid( String id) {
-        return new Result<>().data(this.userArchivesService.queryByUid(id));
+        return new Result().data(this.userArchivesService.queryByUid(id));
     }
 
 
@@ -104,7 +104,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/queryByUidAll")
     public Result queryByUidAll( String id) {
-        Result res = new Result<>();
+        Result res = new Result();
         if (userArchivesService.checkPermission(id)){
             res.error(buildError("查看超时,请要分享人重新分享。"));
             return res;
@@ -122,7 +122,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/superQueryByUidAll")
     public Result superQueryByUidAll( String id) {
-        Result res = new Result<>();
+        Result res = new Result();
         res.data(this.userArchivesService.queryByUidAll(id));
         return res;
     }
@@ -134,7 +134,7 @@ public class UserArchivesController  extends BaseController {
      */
     @GetMapping("/selectUserArchives")
     public Result selectUserArchives( InputSelectUserArchives in) {
-        Result res = new Result<>();
+        Result res = new Result();
         if (in.getNewChannel()==null)in.setNewChannel(0);
         res.data(this.userArchivesService.selectUserArchives(in));
         return res;
@@ -155,7 +155,7 @@ public class UserArchivesController  extends BaseController {
      */
     @PostMapping("/addAwardsUid")
     public Result addAwardsUid( String uid) {
-        Result res = new Result<>();
+        Result res = new Result();
         res.data(this.userArchivesService.addAwards(uid,1));
         return res;
     }
@@ -165,7 +165,7 @@ public class UserArchivesController  extends BaseController {
      */
     @PostMapping("/selectAwardsUid")
     public Result selectAwardsUid( String uid) {
-        Result res = new Result<>();
+        Result res = new Result();
         res.data(this.userArchivesService.updateAwards(uid,2));
         return res;
     }

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

@@ -35,7 +35,7 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @PostMapping("/checkUser")
     public Result checkUser(Integer type) {
-        return new Result<>().data(this.userOutboundService.checkUser(type));
+        return new Result().data(this.userOutboundService.checkUser(type));
     }
 
 
@@ -93,7 +93,7 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @GetMapping("/agentList")
     public Result agentList() {
-        return new Result<>().data(this.userOutboundService.agentList());
+        return new Result().data(this.userOutboundService.agentList());
     }
 
 
@@ -103,7 +103,7 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @GetMapping("/getDefaultMobile")
     public Result getDefaultMobile(String uid) {
-        return new Result<>().data(this.userOutboundService.getDefaultMobile(uid));
+        return new Result().data(this.userOutboundService.getDefaultMobile(uid));
     }
 
 
@@ -113,7 +113,7 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @GetMapping("/userCallList")
     public Result userCallList(InputUserCallList in) {
-        return new Result<>().data(this.userOutboundService.userCallList(in));
+        return new Result().data(this.userOutboundService.userCallList(in));
     }
 
     /**
@@ -122,7 +122,7 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @GetMapping("/callAllList")
     public Result callAllList(InputUserCallList in) {
-        return new Result<>().data(this.userOutboundService.callAllList(in));
+        return new Result().data(this.userOutboundService.callAllList(in));
     }
 
 
@@ -132,6 +132,6 @@ public class UserOutboundApiController  extends BaseApiController {
      */
     @GetMapping("/listCallDay")
     public Result<Pagination<AdminCallDay>> listCallDay(InputListCallDayBo in) {
-        return new Result<>().data(this.adminCallDayService.listCallDay(in));
+        return new Result().data(this.adminCallDayService.listCallDay(in));
     }
 }

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

@@ -36,7 +36,7 @@ public class UserSuperEvaluateController extends BaseApiController{
      */
     @PostMapping("/add")
     public Result add(UserSuperEvaluate userSuperEvaluate) {
-        return new Result<>().data(this.userSuperEvaluateService.insert(userSuperEvaluate));
+        return new Result().data(this.userSuperEvaluateService.insert(userSuperEvaluate));
     }
     
     
@@ -48,7 +48,7 @@ public class UserSuperEvaluateController extends BaseApiController{
      */
     @GetMapping("/get")
     public Result<UserSuperEvaluate> queryById( Integer id) {
-        return new Result<>().data(this.userSuperEvaluateService.queryById(id));
+        return new Result().data(this.userSuperEvaluateService.queryById(id));
     }
 
 
@@ -61,7 +61,7 @@ public class UserSuperEvaluateController extends BaseApiController{
      */
     @PostMapping("/update")
     public Result edit(UserSuperEvaluate userSuperEvaluate) {
-        return new Result<>().data(this.userSuperEvaluateService.update(userSuperEvaluate));
+        return new Result().data(this.userSuperEvaluateService.update(userSuperEvaluate));
     }
 
     /**
@@ -72,7 +72,7 @@ public class UserSuperEvaluateController extends BaseApiController{
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.userSuperEvaluateService.deleteById(id));
+        return new Result().data(this.userSuperEvaluateService.deleteById(id));
     }
     
         /**
@@ -83,9 +83,9 @@ public class UserSuperEvaluateController extends BaseApiController{
     @GetMapping("/list")
     public Result list(UserSuperEvaluate in , Integer pageNo, Integer pageSize) {
         if (StringUtils.isBlank(in.getUid())){
-            return new Result<>().error(buildError("客户选择不能为空"));
+            return new Result().error(buildError("客户选择不能为空"));
         }
-        return new Result<>().data(this.userSuperEvaluateService.list(in,  pageNo,  pageSize));
+        return new Result().data(this.userSuperEvaluateService.list(in,  pageNo,  pageSize));
     }
 
 }

+ 16 - 2
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -21,6 +21,7 @@ import com.goafanti.customer.bo.*;
 import com.goafanti.customer.service.CustomerService;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.user.bo.OutUserChannel;
+import com.goafanti.weChat.bo.outPublicReleaseLog;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.ibatis.builder.BuilderException;
@@ -1803,7 +1804,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<BusinessListBo> listBusiness(BusinessListBo blo, Integer pageNo, Integer pageSize) {
-		blo.setAid(TokenManager.getAdminId());
+		if (blo.getType()==null|| blo.getType()==1){
+			blo.setAid(TokenManager.getAdminId());
+		}
+
 		return (Pagination<BusinessListBo>) findPage("selectBusinessList", "selectBusinessCount", disposeParams(blo),
 				pageNo, pageSize);
 	}
@@ -3125,10 +3129,20 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		}else {
 			map.put("myUser",0);
 		}
-		map.put("list",userMapper.getPublicReleaseList(id));
+		List<PublicReleaseListBo> publicReleaseList = userMapper.getPublicReleaseList(id);
+		pushLog(publicReleaseList);
+		map.put("list",publicReleaseList);
 		return map;
     }
 
+	private void pushLog(List<PublicReleaseListBo> publicReleaseList) {
+		for (PublicReleaseListBo e : publicReleaseList) {
+			List<outPublicReleaseLog> outPublicReleaseLogs = publicReleaseLogMapper.listPublicReleaseLog(e.getPrdId(), null);
+			e.setLogList(outPublicReleaseLogs);
+		}
+
+	}
+
 	@Override
 	public void updateUserShareType(List<LockingReleaseBo> newList) {
 			userMapper.updateUserShareType(newList);

+ 9 - 7
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -93,10 +93,11 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
     @Override
     public Result pushCallNumber(InputCallNumber in) {
         String msg =null;
+        Result res = new Result();
         if (StringUtils.isNotBlank(in.getUid())){
             User u =userMapper.queryById(in.getUid());
             if (u.getCallStatus()==1){
-                return new Result().error(new Error("该用户正在通话中"));
+                return res.error(new Error("该用户正在通话中"));
             }
         }
         String url= default_url +"/openapi/"+version+"/callNumber";
@@ -124,16 +125,17 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
                     u.setCallStatus(1);
                     userMapper.update(u);
                 }
-                return new Result().data("呼叫成功");
+                return res.data("呼叫成功");
             }
-            return new Result().error(new Error(msg));
+            return res.error(new Error(msg));
         }
-        return new Result().error(new Error("通信异常"));
+        return res.error(new Error("通信异常"));
     }
 
     @Override
     public Result blindTransferByAgent(InputCallNumber in) {
         String url= default_url +"/openapi/"+version+"/blindTransferByAgent";
+        Result res = new Result();
         Map<String,Object> param=new HashMap<>();
         param.put("authentication",getAuthentication());
         Map<String,Object> request=new HashMap<>();
@@ -149,10 +151,10 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
         String msg = result.getString("msg");
         String error = result.getString("error");
         if ("0".equals(error)){
-            return new Result().data("转移成功");
+            return res.data("转移成功");
         }else {
             LoggerUtils.debug(getClass(),"msg="+msg);
-            return new Result().error(new Error(msg));
+            return res.error(new Error(msg));
         }
 
     }
@@ -211,7 +213,7 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
         callLogMapper.insert(callLog);
         pushCountUser(uid,id);
         //需要关闭客户呼叫中
-//        SseResult res =  SseMap.sseEmitterMap.get(TokenManager.getAdminId());
+//        SseResult<T> res =  SseMap.sseEmitterMap.get(TokenManager.getAdminId());
 
         try {
 //        res.sseEmitter.send(callResult);

+ 7 - 7
src/main/java/com/goafanti/order/controller/TaskScoreController.java

@@ -37,7 +37,7 @@ public class TaskScoreController extends BaseController {
      */
     @PostMapping("/add")
     public Result add(TaskScore taskScore) {
-        return new Result<>().data(this.taskScoreService.insert(taskScore));
+        return new Result().data(this.taskScoreService.insert(taskScore));
     }
 
 
@@ -49,7 +49,7 @@ public class TaskScoreController extends BaseController {
      */
     @GetMapping("/get")
     public Result<TaskScore> queryById(Integer id) {
-        return new Result<>().data(this.taskScoreService.queryById(id));
+        return new Result().data(this.taskScoreService.queryById(id));
     }
 
     /**
@@ -60,7 +60,7 @@ public class TaskScoreController extends BaseController {
      */
     @GetMapping("/queryByTid")
     public Result<TaskScore> queryByTid(Integer tid) {
-        return new Result<>().data(this.taskScoreService.queryByTid(tid));
+        return new Result().data(this.taskScoreService.queryByTid(tid));
     }
 
 
@@ -72,7 +72,7 @@ public class TaskScoreController extends BaseController {
      */
     @PostMapping("/update")
     public Result edit(TaskScore taskScore) {
-        return new Result<>().data(this.taskScoreService.update(taskScore));
+        return new Result().data(this.taskScoreService.update(taskScore));
     }
 
     /**
@@ -83,7 +83,7 @@ public class TaskScoreController extends BaseController {
      */
     @PostMapping("/updateByTid")
     public Result updateByTid(TaskScore taskScore) {
-        return new Result<>().data(this.taskScoreService.updateByTid(taskScore));
+        return new Result().data(this.taskScoreService.updateByTid(taskScore));
     }
 
     /**
@@ -94,7 +94,7 @@ public class TaskScoreController extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.taskScoreService.deleteById(id));
+        return new Result().data(this.taskScoreService.deleteById(id));
     }
 
     /**
@@ -104,7 +104,7 @@ public class TaskScoreController extends BaseController {
      */
     @GetMapping("/list")
     public Result<OutAdminTaskScore> list(InputTaskScore in) {
-        return new Result<>().data(this.taskScoreService.list(in));
+        return new Result().data(this.taskScoreService.list(in));
     }
 
     /**

+ 5 - 6
src/main/java/com/goafanti/order/service/ProjectStatisticsService.java

@@ -1,21 +1,20 @@
 package com.goafanti.order.service;
 
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletResponse;
-
 import com.goafanti.common.bo.Result;
 import com.goafanti.order.bo.InputProjectStatistics;
 import com.goafanti.order.bo.InputProvincialStatistics;
+import org.apache.poi.ss.formula.functions.T;
+
+import javax.servlet.http.HttpServletResponse;
 
 public interface ProjectStatisticsService {
 
 	Object selectTaskList(InputProjectStatistics ps);
 
-	Result exporTaskList(InputProjectStatistics ib,HttpServletResponse response) ;
+	Result<T> exporTaskList(InputProjectStatistics ib, HttpServletResponse response) ;
 
 	Object selectProvincialStatistics(InputProvincialStatistics is);
 
-	Result exporProvincialList(InputProvincialStatistics ib);
+	Result<T> exporProvincialList(InputProvincialStatistics ib);
 
 }

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

@@ -184,7 +184,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		t.setReceiverName(a.getName());
 		tOrderTaskMapper.update(t);
-
 		projectDistributionAsyncService.pushProjectDistribution(taskId, taskReceiverId, type, t, tn, date, a);
 		return 1;
 	}

+ 5 - 5
src/main/java/com/goafanti/standard/controller/StandardPlatformLinkController.java

@@ -34,7 +34,7 @@ public class StandardPlatformLinkController {
      */
     @GetMapping("/list")
     public Result<StandardPlatformLink> list(InputStandardPlatformLink in ) {
-        return new Result<>().data(this.standardPlatformLinkService.list(in));
+        return new Result().data(this.standardPlatformLinkService.list(in));
     }
 
     /**
@@ -45,7 +45,7 @@ public class StandardPlatformLinkController {
      */
     @GetMapping("/get")
     public Result<StandardPlatformLink> queryById(Integer id) {
-        return new Result<>().data(this.standardPlatformLinkService.queryById(id));
+        return new Result().data(this.standardPlatformLinkService.queryById(id));
     }
 
     /**
@@ -56,7 +56,7 @@ public class StandardPlatformLinkController {
      */
     @PostMapping("/add")
     public Result add(StandardPlatformLink standardPlatformLink) {
-        return new Result<>().data(this.standardPlatformLinkService.insert(standardPlatformLink));
+        return new Result().data(this.standardPlatformLinkService.insert(standardPlatformLink));
     }
 
     /**
@@ -67,7 +67,7 @@ public class StandardPlatformLinkController {
      */
     @PostMapping("/update")
     public Result edit(StandardPlatformLink standardPlatformLink) {
-        return new Result<>().data(this.standardPlatformLinkService.update(standardPlatformLink));
+        return new Result().data(this.standardPlatformLinkService.update(standardPlatformLink));
     }
 
     /**
@@ -78,7 +78,7 @@ public class StandardPlatformLinkController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.standardPlatformLinkService.deleteById(id));
+        return new Result().data(this.standardPlatformLinkService.deleteById(id));
     }
 
 }

+ 13 - 13
src/main/java/com/goafanti/techproject/controller/TaskDetailsController.java

@@ -44,7 +44,7 @@ public class TaskDetailsController extends BaseController {
      */
     @PostMapping("/add")
     public Result<TaskDetails> add(TaskDetails taskDetails,Integer type) {
-        Result<TaskDetails> res = new Result<>();
+        Result<TaskDetails> res = new Result();
         if (taskDetailsService.checkTid(taskDetails)){
             res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR,"项目进度与年份"));
             return res;
@@ -61,7 +61,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/get")
     public Result<TaskDetails> queryById(Integer id) {
-        return new Result<>().data(this.taskDetailsService.queryById(id));
+        return new Result().data(this.taskDetailsService.queryById(id));
     }
 
     /**
@@ -72,7 +72,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/getByTid")
     public Result<TaskDetails> getByTid(Integer id) {
-        return new Result<>().data(this.taskDetailsService.pushByTid(id));
+        return new Result().data(this.taskDetailsService.pushByTid(id));
     }
 
 
@@ -84,7 +84,7 @@ public class TaskDetailsController extends BaseController {
      */
     @PostMapping("/update")
     public Result update(TaskDetails taskDetails,Integer type) {
-        return new Result<>().data(this.taskDetailsService.update(taskDetails,type));
+        return new Result().data(this.taskDetailsService.update(taskDetails,type));
     }
 
     /**
@@ -97,7 +97,7 @@ public class TaskDetailsController extends BaseController {
         TaskDetails newTd=new TaskDetails();
         newTd.setId(id);
         newTd.setDownloadTime(new Date());
-        return new Result<>().data(this.taskDetailsService.updateDownload(newTd));
+        return new Result().data(this.taskDetailsService.updateDownload(newTd));
     }
 
 
@@ -109,7 +109,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.taskDetailsService.deleteById(id));
+        return new Result().data(this.taskDetailsService.deleteById(id));
     }
 
     /**
@@ -120,7 +120,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/list")
     public Result<TaskDetails> list(TaskDetails in, Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.taskDetailsService.list(in, pageNo, pageSize));
+        return new Result().data(this.taskDetailsService.list(in, pageNo, pageSize));
     }
 
     /**
@@ -131,7 +131,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/detailsList")
     public Result<TaskDetailsBo> detailsList(InputTaskDetailsBo in) {
-        return new Result<>().data(this.taskDetailsService.pushDetailsList(in));
+        return new Result().data(this.taskDetailsService.pushDetailsList(in));
     }
 
 
@@ -164,7 +164,7 @@ public class TaskDetailsController extends BaseController {
      */
     @PostMapping("/addTaskFeature")
     public Result<TaskFeature> addTaskFeature(InputTaskFeature in ) {
-        Result<TaskFeature> res = new Result<>();
+        Result<TaskFeature> res = new Result();
         return res.data(this.taskDetailsService.addFeature(in));
     }
 
@@ -176,7 +176,7 @@ public class TaskDetailsController extends BaseController {
      */
     @PostMapping("/updateTaskFeature")
     public Result<TaskFeature> updateTaskFeature(InputTaskFeature in) {
-        return new Result<>().data(this.taskDetailsService.updateFeature(in));
+        return new Result().data(this.taskDetailsService.updateFeature(in));
     }
 
     /**
@@ -186,7 +186,7 @@ public class TaskDetailsController extends BaseController {
      */
     @PostMapping("/deleteTaskFeature")
     public Result deleteTaskFeature(Integer id) {
-        return new Result<>().data(this.taskDetailsService.deleteTaskFeature(id));
+        return new Result().data(this.taskDetailsService.deleteTaskFeature(id));
     }
 
 
@@ -197,7 +197,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/logList")
     public Result<List<TaskDetailsLog>> logList(Integer id,Integer pageNo, Integer pageSize) {
-        return new Result<>().data(this.taskDetailsService.logList(id, pageNo,pageSize));
+        return new Result().data(this.taskDetailsService.logList(id, pageNo,pageSize));
     }
 
 
@@ -207,7 +207,7 @@ public class TaskDetailsController extends BaseController {
      */
     @GetMapping("/logDetails")
     public Result logDetails(Integer id) {
-        return new Result<>().data(this.taskDetailsService.logDetails(id));
+        return new Result().data(this.taskDetailsService.logDetails(id));
     }
 
 }

+ 145 - 0
src/main/java/com/goafanti/weChat/bo/InputListAssist.java

@@ -0,0 +1,145 @@
+package com.goafanti.weChat.bo;
+
+public class InputListAssist {
+
+    private Integer pageSize;
+    private Integer pageNo;
+    /**
+     * 协单类型 0协单公出 1=非协单公出
+     */
+    private Integer type;
+    /**
+     * 协单内容类型
+     */
+    private String contentType;
+    /**
+     * 发起人
+     */
+    private String aid;
+    /**
+     * 协单人
+     */
+    private String assistAid;
+    /**
+     * 客户编号
+     */
+    private String uid;
+    /**
+     * 项目类型
+     */
+    private String assistType;
+    /**
+     * 协单开始时间
+     */
+    private String startTime;
+    /**
+     * 协单结束时间
+     */
+    private String endTime;
+    /**
+     * 部门编号
+     */
+    private String depId;
+    /**
+     * 协单总数 0=所有,1=小于5,2=5-10,3=10-15,4=15以上
+     */
+    private String assistCount;
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+
+
+    public String getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getAssistAid() {
+        return assistAid;
+    }
+
+    public void setAssistAid(String assistAid) {
+        this.assistAid = assistAid;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getAssistType() {
+        return assistType;
+    }
+
+    public void setAssistType(String assistType) {
+        this.assistType = assistType;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getAssistCount() {
+        return assistCount;
+    }
+
+    public void setAssistCount(String assistCount) {
+        this.assistCount = assistCount;
+    }
+}

+ 14 - 1
src/main/java/com/goafanti/weChat/bo/InputPublicDtails.java

@@ -24,12 +24,25 @@ public class InputPublicDtails {
 	private String sid;
 	private String deps;
 	/**
-	 * 0业务 1技术 2行政 3协单
+	 * 0=业务公出 1=技术公出 2=行政公出 3=技术协单 4=协单助手,5=非公出协单(营销),6=非公出协单(技术)
 	 */
 	private Integer publicType;
+
+	/**
+	 * 协单项目 分类 0=其他,1=高企认定,2=会员服务,3=科技项目,4=研动力系统,5=知识产权,6=军工,7=涉密,8=技术合同登记,9=第三方认证项目
+	 */
+	private String assistType;
 	private Integer pageSize;
 	private Integer pageNo;
 
+	public String getAssistType() {
+		return assistType;
+	}
+
+	public void setAssistType(String assistType) {
+		this.assistType = assistType;
+	}
+
 	public Integer getStatusType() {
 		return statusType;
 	}

+ 38 - 0
src/main/java/com/goafanti/weChat/bo/InputPublicRelease.java

@@ -67,6 +67,44 @@ public class InputPublicRelease extends PublicRelease {
 
 	private String uais;
 
+	private String assistType;
+	private String assistContentType;
+	private String assistContent;
+
+	private String pid;
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+	public String getAssistType() {
+		return assistType;
+	}
+
+	public void setAssistType(String assistType) {
+		this.assistType = assistType;
+	}
+
+	public String getAssistContentType() {
+		return assistContentType;
+	}
+
+	public void setAssistContentType(String assistContentType) {
+		this.assistContentType = assistContentType;
+	}
+
+	public String getAssistContent() {
+		return assistContent;
+	}
+
+	public void setAssistContent(String assistContent) {
+		this.assistContent = assistContent;
+	}
+
 	public String getUais() {
 		return uais;
 	}

+ 195 - 0
src/main/java/com/goafanti/weChat/bo/OutListAssist.java

@@ -0,0 +1,195 @@
+package com.goafanti.weChat.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+public class OutListAssist {
+    private Integer id;
+
+    @Excel(name = "协单类型")
+    private  String type;
+
+    /**
+     * 协单内容类型
+     */
+    private String contentType;
+    /**
+     * 协单内容
+     */
+    @Excel(name = "内容")
+    private String content;
+    /**
+     * 协单发起人
+     */
+    @Excel(name = "发起人员")
+    private String aname;
+    /**
+     * 协单人
+     */
+    @Excel(name = "协单人员")
+    private String assistAidName;
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    private String userNames;
+    /**
+     * 签单次数
+     */
+    @Excel(name = "签单次数")
+    private String signNumber;
+    /**
+     * 公出次数
+     */
+    @Excel(name = "公出次数")
+    private String publicCount;
+    /**
+     * 协单总数
+     */
+    @Excel(name = "协单总数")
+    private String assistCount;
+    /**
+     * 公出协单数
+     */
+    @Excel(name = "公出协单数")
+    private String publicAssistCount;
+    /**
+     * 非公出协单数
+     */
+    @Excel(name = "非公出协单数")
+    private String nonPublicCount;
+    /**
+     * 协单开始时间
+     */
+    @Excel(name = "协单时间")
+    private String releaseStart;
+    @Excel(name = "协单项目")
+    private String assistType;
+
+    /**
+     * 已签项目
+     */
+    @Excel(name = "已签项目")
+    private String taskNames;
+
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getAssistType() {
+        return assistType;
+    }
+
+    public void setAssistType(String assistType) {
+        this.assistType = assistType;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public String getAssistAidName() {
+        return assistAidName;
+    }
+
+    public void setAssistAidName(String assistAidName) {
+        this.assistAidName = assistAidName;
+    }
+
+    public String getUserNames() {
+        return userNames;
+    }
+
+    public void setUserNames(String userNames) {
+        this.userNames = userNames;
+    }
+
+    public String getSignNumber() {
+        return signNumber;
+    }
+
+    public void setSignNumber(String signNumber) {
+        this.signNumber = signNumber;
+    }
+
+    public String getPublicCount() {
+        return publicCount;
+    }
+
+    public void setPublicCount(String publicCount) {
+        this.publicCount = publicCount;
+    }
+
+    public String getAssistCount() {
+        return assistCount;
+    }
+
+    public void setAssistCount(String assistCount) {
+        this.assistCount = assistCount;
+    }
+
+    public String getPublicAssistCount() {
+        return publicAssistCount;
+    }
+
+    public void setPublicAssistCount(String publicAssistCount) {
+        this.publicAssistCount = publicAssistCount;
+    }
+
+    public String getNonPublicCount() {
+        return nonPublicCount;
+    }
+
+    public void setNonPublicCount(String nonPublicCount) {
+        this.nonPublicCount = nonPublicCount;
+    }
+
+    public String getReleaseStart() {
+        return releaseStart;
+    }
+
+    public void setReleaseStart(String releaseStart) {
+        this.releaseStart = releaseStart;
+    }
+
+
+    public String getTaskNames() {
+        return taskNames;
+    }
+
+    public void setTaskNames(String taskNames) {
+        this.taskNames = taskNames;
+    }
+}

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

@@ -113,6 +113,16 @@ public class OutPublicDtails  {
 	private String contractNo;
 	@Excel(name = "订单总金额" ,scale = 6)
 	private BigDecimal totalAmout;
+	@Excel(name = "协单类型")
+	private String assistType;
+
+	public String getAssistType() {
+		return assistType;
+	}
+
+	public void setAssistType(String assistType) {
+		this.assistType = assistType;
+	}
 
 	public String getInterviewProject() {
 		return interviewProject;

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

@@ -58,6 +58,34 @@ public class OutPublicRelease extends PublicRelease {
 	private Integer maxProcess;
 	private Integer maxType;
 
+	private String assistType;
+	private String assistContentType;
+	private String assistContent;
+
+	public String getAssistType() {
+		return assistType;
+	}
+
+	public void setAssistType(String assistType) {
+		this.assistType = assistType;
+	}
+
+	public String getAssistContentType() {
+		return assistContentType;
+	}
+
+	public void setAssistContentType(String assistContentType) {
+		this.assistContentType = assistContentType;
+	}
+
+	public String getAssistContent() {
+		return assistContent;
+	}
+
+	public void setAssistContent(String assistContent) {
+		this.assistContent = assistContent;
+	}
+
 	public BigDecimal getMaxDuration() {
 		return maxDuration;
 	}

+ 12 - 2
src/main/java/com/goafanti/weChat/bo/OutPublicStatistics.java

@@ -7,8 +7,11 @@ public class OutPublicStatistics {
 	@Excel(name = "公出人员")
 	private String name;
 	private String aid;
+	@Excel(name = "非公出协单次数")
+	private Integer xds;
 	@Excel(name = "公出次数")
 	private Integer tg;
+
 	@Excel(name = "打卡次数")
 	private Integer dk;
 	@Excel(name = "总时长")
@@ -17,8 +20,15 @@ public class OutPublicStatistics {
 	private Integer wsh;
 	@Excel(name = "驳回次数")
 	private Integer bh;
-	
-	
+
+	public Integer getXds() {
+		return xds;
+	}
+
+	public void setXds(Integer xds) {
+		this.xds = xds;
+	}
+
 	public Integer getDk() {
 		return dk;
 	}

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

@@ -3,16 +3,19 @@ package com.goafanti.weChat.controller;
 
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.OrderPublicReleaseLog;
 import com.goafanti.common.model.PublicConfig;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.service.PublicReleaseService;
 import org.apache.commons.beanutils.BeanUtils;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -21,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -50,18 +54,40 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"公出时间"));
 			return res;
 		}
-		if (StringUtils.isBlank(in.getDistrictName())) {
-			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
-			return res;
-		}
-		int i = publicReleaseService.checkTime(in);
-		if (i==1) {
-			res.getError().add(buildError("发起人公出时段已经被使用!","发起人公出时段已经被使用!"));
-			return res;
-		}
-		if (i==2) {
-			res.getError().add(buildError("协单人公出时段已经被使用!","协单人公出时段已经被使用!"));
-			return res;
+		try {
+			String format = AFTConstants.YYYYMMDDHHMMSS;
+			if (in.getType()==5){
+				format = AFTConstants.YYYYMMDD;
+			}
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), format));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), format));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		//新增5和6非公出协单,不用判断公出时间
+		if (in.getType()<4){
+			if (StringUtils.isBlank(in.getDistrictName())) {
+				res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"公出地点"));
+				return res;
+			}
+			int i = publicReleaseService.checkTime(in);
+			if (i==1) {
+				res.getError().add(buildError("发起人公出时段已经被使用!","发起人公出时段已经被使用!"));
+				return res;
+			}
+			if (i==2) {
+				res.getError().add(buildError("协单人公出时段已经被使用!","协单人公出时段已经被使用!"));
+				return res;
+			}
+		}else{
+			if (in.getAssistType()==null){
+				res.getError().add(buildError("请选择协单类型!"));
+				return res;
+			}
+			if (in.getAssistContentType()==null){
+				res.getError().add(buildError("请选择协单内容"));
+			}
 		}
 		if(in.getAssist()==null)in.setAssist(0);
 		if (in.getAssist()==1&&in.getAssistAid()==null) {
@@ -102,7 +128,18 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"编号"));
 			return res;
 		}
-		if (in.getStatus()!=3) {
+		try {
+			String format = AFTConstants.YYYYMMDDHHMMSS;
+			if (in.getType()==5){
+				format = AFTConstants.YYYYMMDD;
+			}
+			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), format));
+			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), format));
+		} catch (ParseException e) {
+			e.printStackTrace();
+			throw new BusinessException("转换异常");
+		}
+		if (in.getStatus()!=3&&in.getType()<4) {
 			int i = publicReleaseService.checkTime(in);
 			if (i==1) {
 				res.getError().add(buildError("发起人公出时段已经被使用!","发起人公出时段已经被使用!"));
@@ -155,6 +192,10 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildError("技术协单,必须先写协单意见,才可打卡!"));
 			return res;
 		}
+		if (x==-4){
+			res.getError().add(buildError("当前打卡不在公出/非公出时间范围内!"));
+			return res;
+		}
 		res.setData(x);
 		return res;
 	}
@@ -191,7 +232,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 	}
 
 	/**
-	 * 公出审核、外出审核 上级
+	 * 公出审核、外出审核 上级,二级审核
 	 */
 	@RequestMapping(value = "/examinePublicRelease", method = RequestMethod.POST)
 	public Result examinePublicRelease(Integer id ,Integer status,String remarks,Integer evaluateType){
@@ -216,7 +257,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * 公出审核、外出审核 客户归属人
 	 */
 	@RequestMapping(value = "/marketersExamine", method = RequestMethod.POST)
-	public Result marketersExamine(Integer id ,Integer status,String remarks,Integer evaluateType){
+	public Result<T> marketersExamine(Integer id , Integer status, String remarks, Integer evaluateType){
 		Result res =new Result();
 		if (id==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
@@ -610,4 +651,22 @@ public class AdminReleaseApiController extends CertifyApiController{
 		Result res =new Result();
 		return res.data(publicReleaseService.getPublicConfig());
 	}
+
+	/**
+	 * 协单统计列表
+	 */
+	@RequestMapping(value = "/listAssist", method = RequestMethod.GET)
+	public Result listAssist(InputListAssist in){
+		Result res =new Result();
+		res.setData(publicReleaseService.listAssist(in));
+		return res;
+	}
+
+	/**
+	 * 协单统计列表-导出
+	 */
+	@RequestMapping(value = "/listAssistExprot", method = RequestMethod.GET)
+	public Result listAssistExprot(InputListAssist in){
+		return  publicReleaseService.listAssistExprot(in,uploadPath);
+	}
 }

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

@@ -34,7 +34,7 @@ public class PublicAssistAdviceController {
      */
     @PostMapping("/add")
     public Result add(PublicAssistAdvice publicAssistAdvice) {
-        return new Result<>().data(this.publicAssistAdviceService.insert(publicAssistAdvice));
+        return new Result().data(this.publicAssistAdviceService.insert(publicAssistAdvice));
     }
     
     
@@ -46,7 +46,7 @@ public class PublicAssistAdviceController {
      */
     @GetMapping("/get")
     public Result<PublicAssistAdvice> queryById( Integer id) {
-        return new Result<>().data(this.publicAssistAdviceService.queryById(id));
+        return new Result().data(this.publicAssistAdviceService.queryById(id));
     }
 
 
@@ -59,7 +59,7 @@ public class PublicAssistAdviceController {
      */
     @PostMapping("/update")
     public Result edit(PublicAssistAdvice publicAssistAdvice) {
-        return new Result<>().data(this.publicAssistAdviceService.update(publicAssistAdvice));
+        return new Result().data(this.publicAssistAdviceService.update(publicAssistAdvice));
     }
 
     /**
@@ -70,7 +70,7 @@ public class PublicAssistAdviceController {
      */
     @GetMapping("/delete")
     public Result deleteById(Integer id) {
-        return new Result<>().data(this.publicAssistAdviceService.deleteById(id));
+        return new Result().data(this.publicAssistAdviceService.deleteById(id));
     }
 
 
@@ -82,7 +82,7 @@ public class PublicAssistAdviceController {
     @GetMapping("/list")
     public Result<PublicAssistAdvice> list(Integer id, Integer type) {
         if (type==null)type=0;
-        return new Result<>().data(this.publicAssistAdviceService.list(id,type));
+        return new Result().data(this.publicAssistAdviceService.list(id,type));
     }
 
 }

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

@@ -1,5 +1,6 @@
 package com.goafanti.weChat.service;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.model.PublicConfig;
 import com.goafanti.weChat.bo.*;
 
@@ -97,4 +98,8 @@ public interface PublicReleaseService {
 	Object updatePublicConfig(PublicConfig in);
 
 	Object getPublicConfig();
+
+	Object listAssist(InputListAssist in);
+
+	Result listAssistExprot(InputListAssist in,String uploadPath);
 }

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

@@ -6,12 +6,16 @@ import com.goafanti.admin.bo.AdminPublicReviewerBo;
 import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.business.bo.InputRestrictProject;
 import com.goafanti.common.bo.EmailBo;
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
+import com.goafanti.common.enums.AssistContentType;
+import com.goafanti.common.enums.AssistType;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.*;
 import com.goafanti.common.utils.*;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.common.utils.weChat.WeChatUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -24,13 +28,13 @@ import com.goafanti.order.service.OrderNewService;
 import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.service.PublicReleaseService;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.socket.TextMessage;
 
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.*;
@@ -39,71 +43,117 @@ import java.util.stream.Collectors;
 
 @Service
 public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper> implements PublicReleaseService {
-	@Autowired
-	private PublicReleaseMapper	publicReleaseMapper;
-	@Autowired
-	private PublicReleaseLogMapper publicReleaseLogMapper;
-	@Autowired
-	private CustomerService customerService;
-	@Autowired
-	private PublicReleaseDetailsMapper publicReleaseDetailsMapper;
-	@Autowired
-	private WeChatUtils weChatUtils;
-	@Autowired
-	private AdminMapper adminMapper;
-	@Autowired
-	private	AsyncUtils asyncUtils;
-	@Autowired
-	private	UserMapper	userMapper;
-	@Autowired
-	private OrganizationContactBookMapper	organizationContactBookMapper;
-	@Autowired
-	private SystemWebSocketHandler	systemWebSocketHandler;
-	@Autowired
-	private TOrderNewMapper tOrderNewMapper;
-	@Autowired
-	private DepartmentService	departmentService;
-	@Autowired
-	private PublicExamineMapper publicExamineMapper;
-	@Autowired
-	private AdminUserCountMapper adminUserCountMapper;
-	@Autowired
-	private PublicReleaseClockMapper publicReleaseClockMapper;
-	@Autowired
-	private PublicReleaseDateClockMapper publicReleaseDateClockMapper;
-	@Autowired
-	private TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper;
-
-	@Autowired
-	private RestrictProjectMapper restrictProjectMapper;
-	@Autowired
-	private OrderYearMaxDurationMapper orderYearMaxDurationMapper;
-	@Autowired
-	private TTaskMemberMapper tTaskMemberMapper;
-	@Autowired
-	private OrderNewService orderNewService;
-	@Autowired
-	private AdminPublicReviewerMapper adminPublicReviewerMapper;
-	@Autowired
-	private PublicAssistAdviceMapper publicAssistAdviceMapper;
-	@Autowired
-	private UserLimitCheckMapper userLimitCheckMapper;
-	@Autowired
-	private UserArchivesMapper userArchivesMapper;
-	@Autowired
-	private OrganizationIdentityMapper organizationIdentityMapper;
-	@Autowired
-	private UserSuperEvaluateMapper userSuperEvaluateMapper;
-	@Autowired
-	private OrderPublicReleaseLogMapper orderPublicReleaseLogMapper;
-	@Autowired
-	private PublicConfigMapper publicConfigMapper;
-	@Autowired
-	private UserFirstInterviewMapper userFirstInterviewMapper;
-	@Autowired
-	private UserArchivesInterviewMapper userArchivesInterviewMapper;
-	@Autowired
-	private UserInterviewProjectMapper userInterviewProjectMapper;
+	private final PublicReleaseMapper publicReleaseMapper;
+	private final PublicReleaseLogMapper publicReleaseLogMapper;
+	private final CustomerService customerService;
+	private final PublicReleaseDetailsMapper publicReleaseDetailsMapper;
+	private final WeChatUtils weChatUtils;
+	private final AdminMapper adminMapper;
+	private final AsyncUtils asyncUtils;
+	private final UserMapper userMapper;
+	private final OrganizationContactBookMapper organizationContactBookMapper;
+	private final SystemWebSocketHandler systemWebSocketHandler;
+	private final TOrderNewMapper tOrderNewMapper;
+	private final DepartmentService departmentService;
+	private final PublicExamineMapper publicExamineMapper;
+	private final PublicReleaseClockMapper publicReleaseClockMapper;
+	private final PublicReleaseDateClockMapper publicReleaseDateClockMapper;
+	private final TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper;
+	private final RestrictProjectMapper restrictProjectMapper;
+	private final OrderYearMaxDurationMapper orderYearMaxDurationMapper;
+	private final TTaskMemberMapper tTaskMemberMapper;
+	private final OrderNewService orderNewService;
+	private final AdminPublicReviewerMapper adminPublicReviewerMapper;
+	private final PublicAssistAdviceMapper publicAssistAdviceMapper;
+	private final UserLimitCheckMapper userLimitCheckMapper;
+	private final UserArchivesMapper userArchivesMapper;
+	private final OrganizationIdentityMapper organizationIdentityMapper;
+	private final UserSuperEvaluateMapper userSuperEvaluateMapper;
+	private final OrderPublicReleaseLogMapper orderPublicReleaseLogMapper;
+	private final PublicConfigMapper publicConfigMapper;
+	private final UserFirstInterviewMapper userFirstInterviewMapper;
+	private final UserArchivesInterviewMapper userArchivesInterviewMapper;
+	private final UserInterviewProjectMapper userInterviewProjectMapper;
+	private final PublicAssistDetailsMapper publicAssistDetailsMapper;
+	private final PublicReleaseTypeMapper publicReleaseTypeMapper;
+	private final UserMidMapper userMidMapper;
+	private final PublicReleaseContentTypeMapper publicReleaseContentTypeMapper;
+
+	public PublicReleaseServiceImpl(
+			PublicReleaseMapper publicReleaseMapper,
+			PublicReleaseLogMapper publicReleaseLogMapper,
+			CustomerService customerService,
+			PublicReleaseDetailsMapper publicReleaseDetailsMapper,
+			WeChatUtils weChatUtils,
+			AdminMapper adminMapper,
+			AsyncUtils asyncUtils,
+			UserMapper userMapper,
+			OrganizationContactBookMapper organizationContactBookMapper,
+			SystemWebSocketHandler systemWebSocketHandler,
+			TOrderNewMapper tOrderNewMapper,
+			DepartmentService departmentService,
+			PublicExamineMapper publicExamineMapper,
+			PublicReleaseClockMapper publicReleaseClockMapper,
+			PublicReleaseDateClockMapper publicReleaseDateClockMapper,
+			TOrderPublicReleaseCountMapper tOrderPublicReleaseCountMapper,
+			RestrictProjectMapper restrictProjectMapper,
+			OrderYearMaxDurationMapper orderYearMaxDurationMapper,
+			TTaskMemberMapper tTaskMemberMapper,
+			OrderNewService orderNewService,
+			AdminPublicReviewerMapper adminPublicReviewerMapper,
+			PublicAssistAdviceMapper publicAssistAdviceMapper,
+			UserLimitCheckMapper userLimitCheckMapper,
+			UserArchivesMapper userArchivesMapper,
+			OrganizationIdentityMapper organizationIdentityMapper,
+			UserSuperEvaluateMapper userSuperEvaluateMapper,
+			OrderPublicReleaseLogMapper orderPublicReleaseLogMapper,
+			PublicConfigMapper publicConfigMapper,
+			UserFirstInterviewMapper userFirstInterviewMapper,
+			UserArchivesInterviewMapper userArchivesInterviewMapper,
+			UserInterviewProjectMapper userInterviewProjectMapper,
+			PublicAssistDetailsMapper publicAssistDetailsMapper,
+			PublicReleaseTypeMapper publicReleaseTypeMapper,
+			UserMidMapper userMidMapper,
+			PublicReleaseContentTypeMapper publicReleaseContentTypeMapper
+	) {
+		super();
+		this.publicReleaseMapper = publicReleaseMapper;
+		this.publicReleaseLogMapper = publicReleaseLogMapper;
+		this.customerService = customerService;
+		this.publicReleaseDetailsMapper = publicReleaseDetailsMapper;
+		this.weChatUtils = weChatUtils;
+		this.adminMapper = adminMapper;
+		this.asyncUtils = asyncUtils;
+		this.userMapper = userMapper;
+		this.organizationContactBookMapper = organizationContactBookMapper;
+		this.systemWebSocketHandler = systemWebSocketHandler;
+		this.tOrderNewMapper = tOrderNewMapper;
+		this.departmentService = departmentService;
+		this.publicExamineMapper = publicExamineMapper;
+		this.publicReleaseClockMapper = publicReleaseClockMapper;
+		this.publicReleaseDateClockMapper = publicReleaseDateClockMapper;
+		this.tOrderPublicReleaseCountMapper = tOrderPublicReleaseCountMapper;
+		this.restrictProjectMapper = restrictProjectMapper;
+		this.orderYearMaxDurationMapper = orderYearMaxDurationMapper;
+		this.tTaskMemberMapper = tTaskMemberMapper;
+		this.orderNewService = orderNewService;
+		this.adminPublicReviewerMapper = adminPublicReviewerMapper;
+		this.publicAssistAdviceMapper = publicAssistAdviceMapper;
+		this.userLimitCheckMapper = userLimitCheckMapper;
+		this.userArchivesMapper = userArchivesMapper;
+		this.organizationIdentityMapper = organizationIdentityMapper;
+		this.userSuperEvaluateMapper = userSuperEvaluateMapper;
+		this.orderPublicReleaseLogMapper = orderPublicReleaseLogMapper;
+		this.publicConfigMapper = publicConfigMapper;
+		this.userFirstInterviewMapper = userFirstInterviewMapper;
+		this.userArchivesInterviewMapper = userArchivesInterviewMapper;
+		this.userInterviewProjectMapper = userInterviewProjectMapper;
+		this.publicAssistDetailsMapper = publicAssistDetailsMapper;
+		this.publicReleaseTypeMapper = publicReleaseTypeMapper;
+		this.userMidMapper = userMidMapper;
+		this.publicReleaseContentTypeMapper = publicReleaseContentTypeMapper;
+	}
+
 
 	@Override
 	@Transactional
@@ -138,13 +188,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		}
 		in.setProcessStatus(1);
 		publicReleaseMapper.insertSelective(in);
+		//如果是非公出协单添加协单信息
+		if (in.getAssist()==1){
+			addPublicAssistType(in);
+		}
 		if (in.getType()==1&&in.getOrderNo()!=null){
 			TOrderNew tOrderNew = tOrderNewMapper.queryById(in.getOrderNo());
 			orderNewService.pushOrderPublicReleaseCount(tOrderNew);
 		}
 		addPRD(in, users, str, prdList);
 		addPublicReleaseDateClock(in);
-		if (in.getType()==0&&in.getUids()!=null){
+		if ((in.getType()==0)
+				&&in.getUids()!=null){
 			pushUserArchivesInterview(in);
 		}
 		String userNames=str.substring(0,str.length()-1);
@@ -164,6 +219,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		return (Map<String, Object>) addPublicReleaseLog(my, in,userNames,date,users,checkOrderNo);
 	}
 
+
+	private void addPublicAssistType(InputPublicRelease in) {
+		PublicAssistDetails pad=new PublicAssistDetails();
+		pad.setPrid(in.getId());
+		pad.setType(in.getAssistType());
+		pad.setContentType(in.getAssistContentType());
+		pad.setContent(in.getAssistContent());
+		publicAssistDetailsMapper.insert(pad);
+	}
+
+
+
 	private void pushPublicAssistCarbonCopy(InputPublicRelease in, AdminListBo my, String userNames) {
 		String[] split = in.getAssistAid().split(",");
 		for (String aid2 : split) {
@@ -228,7 +295,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	}
 
 	private void addPRD(InputPublicRelease in, List<User> users, StringBuilder str, List<PublicReleaseDetails> prdList) {
-
+		List<PublicAssistDetails> listAd=new ArrayList<>();
 		if (in.getUids()!=null){
 			List<String> split = Arrays.asList(in.getUids().split(","));
 			int userCount=split.size();
@@ -381,7 +448,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			AtomicReference<Integer> status= new AtomicReference<>(1);
 			String formatDate = DateUtils.formatDate(in.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 			//业务公出
-			if (in.getType()==0||in.getType()==2){
+			if (in.getType()==0||in.getType()==2||in.getType()==5){
 				//不是业务员
 				if (my.getPublicPurview()==0){
                     for (User u : users) {
@@ -390,7 +457,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 							StringBuilder str2 = new StringBuilder();
 							Admin admin = adminMapper.selectById(u.getAid());
 							//业务公出限定项目直接公出,不是业务项目审核公出
-							if(in.getType()==0){
+							if(in.getType()==0||in.getType()==5){
 									List<RestrictProject> list = restrictProjectMapper.selectListByParam(new InputRestrictProject(u.getId(), my.getId()));
 									if (!list.isEmpty()){
 										String start = DateUtils.formatDate(in.getReleaseStart(), AFTConstants.MMDDHHMM);
@@ -577,15 +644,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	@Override
 	public int updatePublicRelease(InputPublicRelease in) {
 		Date date = new Date();
-		try {
-			if(in.getReleaseStarts()!=null)in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
-			if(in.getReleaseEnds()!=null)in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
-		} catch (ParseException e) {
-			e.printStackTrace();
-			throw new BusinessException("转换异常");
-		}
 		Map checkOrderNo =null;
-
 		List<User> uses=null;
 		PublicRelease use = publicReleaseMapper.selectById(in.getId());
 		in.setCreateTime(use.getCreateTime());
@@ -624,6 +683,22 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 						throw new BusinessException("该公出已签到,无法取消");
 					}
 				}
+				PublicAssistDetails usePd = publicAssistDetailsMapper.selectByPrid(in.getId());
+				//添加协单信息
+				PublicAssistDetails publicAssistDetails = publicAssistDetailsMapper.selectByPrid(in.getId());
+				if (publicAssistDetails==null){
+					//如果是非公出协单添加协单信息
+					addPublicAssistType(in);
+				}else {
+					//如果是非公出协单添加协单信息
+					PublicAssistDetails pad=new PublicAssistDetails();
+					pad.setId(publicAssistDetails.getId());
+					pad.setPrid(in.getId());
+					pad.setType(in.getAssistType());
+					pad.setContentType(in.getAssistContentType());
+					pad.setContent(in.getAssistContent());
+					publicAssistDetailsMapper.update(pad);
+				}
 			}else if (in.getAssist()==0){
 				publicReleaseMapper.updateAssist(in);
 				in.setAssistProcess(0);
@@ -664,6 +739,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			in.setProcessStatus(0);
 		}
 		publicReleaseMapper.update(in);
+
 		if (in.getOrderNo()!=null){
 			TOrderNew tOrderNew = tOrderNewMapper.queryById(in.getOrderNo());
 			orderNewService.pushOrderPublicReleaseCount(tOrderNew);
@@ -715,7 +791,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		//如果是业务切公出则撤销营销审核与审核人
 		pushUpdateType(in, use);
 		//如果是业务公出,切审核状态为其他,则重置审核
-		if(in.getType()==0&&(use.getPublicType()==2|| use.getPublicType()==3)){
+		if((in.getType()==0||in.getType()==5)
+				&&(use.getPublicType()==2|| use.getPublicType()==3)){
 			in.setPublicType(1);
 			PublicExamine pe=new PublicExamine();
 			pe.setPrid(in.getId());
@@ -926,7 +1003,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 
 	/**
-	 * in.type 查看类型 0我的公出 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核 6=协单审核
+	 * in.type 查看类型 0我的全部 1公出审核 2管理员 3协单(技术财税总监看全部) 4 公出企业负责人审核 5 技术公出审核
+	 * 				6=协单审核 7=最大公出审核 8=我的公出 9=非公出协单(营销) 10=非公出协单(技术)
 	 * @return
 	 */
 	@Override
@@ -985,6 +1063,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					e.setAdminExamine(config.getOtherAuditorName());
 				}
 			}
+
 		}
 	}
 
@@ -995,6 +1074,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			list.forEach(e ->{ ids.add(e.getId()); });
 			List<PublicExamine> publicExamines = publicExamineMapper.selectByIds(ids);
 			for (OutPublicReleaseList e : list) {
+				if (e.getType()>4){
+					//开始时间和结束时间删除时分秒
+					e.setReleaseStarts(e.getReleaseStarts().substring(0,10));
+					e.setReleaseEnds(e.getReleaseEnds().substring(0,10));
+				}
 				if (e.getStatus()==1){
 					List<AdminPublicReviewerBo> adminPublicReviewerBos=null;
 					if (e.getType()==3){
@@ -1021,7 +1105,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 								}
 							}
 							if (str.length()>1)e.setAdminExamine(str.substring(0,str.length()-1)+" 未审核");
-						}else if (e.getType()==0&&e.getAssistProcess()==2){
+						}else if ((e.getType()==0||e.getType()>4)&&e.getAssistProcess()==2){
 							//获取技术协单
 							List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(e.getId(), null, null);
 							StringBuffer str =new StringBuffer();
@@ -1066,7 +1150,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					}else {
 						e.setPublicAssistAdvice(publicAssistAdvices.size());
 					}
-				}else if(e.getType()==0){
+				}else if(e.getType()==0||e.getType()==5){
 					List<PublicAssistAdvice> publicAssistAdvices = publicAssistAdviceMapper.selectList(e.getId(), 1);
 					if (publicAssistAdvices.isEmpty()){
 						e.setPublicAssistAdvice(0);
@@ -1150,7 +1234,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 						}else if (use.getAssist()==0){
 							publicReleaseMapper.updateStatusByMainId(3,use.getId(),null,null);
 						}
-						addpublicLog(id, status, "无需二级审核直接通过");
+						addUserMidCount(id);
+						//添加审核日志,在当前时间加1秒作为显示
+						Date date1 = new Date();
+						date1.setTime(date1.getTime()+1000);
+						addpublicLog(id, 6, "无需二级审核直接通过",date1);
 					}else {
 						if(use.getProcessStatus()==0||use.getProcessStatus()==1){
 							//一级审核
@@ -1186,6 +1274,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 							p.setAuditInfo(str.toString());
 							p.setAuditTime(date);
 							p.setRejectName(ad.getName());
+							addUserMidCount(id);
 							sendNoticeAndSoucket(a.getId(),status,content.toString());
 						}
 					}
@@ -1396,26 +1485,51 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					count++;
 				}
 			}
+			List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
+			//如果完成了所有协单审核,主项目修改状态
+			int assistProcess = use.getAssistProcess();
 			if(count==newList.size()){
+				assistProcess=4;
 				PublicRelease newPublic2=new PublicRelease();
 				newPublic2.setId(use.getId());
 				newPublic2.setStatus(2);
+				newPublic2.setAssistProcess(assistProcess);
 				publicReleaseMapper.update(newPublic2);
+				addUserMidCount(outPublicReleaseDetails);
+				//添加
 				sendNoticeAndSoucket(use.getAid(),status,content.toString());
 			}else {
+				assistProcess=3;
 				PublicRelease newPublic2=new PublicRelease();
 				newPublic2.setId(use.getId());
 				newPublic2.setStatus(1);
+				newPublic2.setAssistProcess(assistProcess);
+				publicReleaseMapper.update(newPublic2);
+			}
+			//再根据主协单的状态修改子协单的状态
+			for (PublicRelease e : publicReleases) {
+				PublicRelease newPublic2=new PublicRelease();
+				newPublic2.setId(e.getId());
+				newPublic2.setAssistProcess(assistProcess);
 				publicReleaseMapper.update(newPublic2);
 			}
 			if (evaluateType==1){
-				List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
 				addUserSuperEvaluate(remarks, outPublicReleaseDetails, new Date());
 			}
 		}
 		return 1;
 	}
+	private void addUserMidCount(Integer id) {
+		List<OutPublicReleaseDetails> outPublicReleaseDetails = publicReleaseDetailsMapper.selectByPrid(id);
+		addUserMidCount(outPublicReleaseDetails);
+	}
+	private void addUserMidCount(List<OutPublicReleaseDetails> outPublicReleaseDetails) {
+		for (OutPublicReleaseDetails e : outPublicReleaseDetails) {
+			String uid=e.getUid();
+			userMidMapper.addUserMidCount(uid);
+		}
 
+	}
 
 
 	@Override
@@ -1628,6 +1742,85 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		return publicConfigMapper.selectDetails();
 	}
 
+	@Override
+	public Object listAssist(InputListAssist in) {
+		Map<String, Object> params = new HashMap<>();
+		//把参数放入map中
+		 params.put("startTime", in.getStartTime());
+		 if (StringUtils.isNotBlank(in.getEndTime())){
+			 params.put("endTime", in.getEndTime()+" 23:59:59");
+		 }
+
+
+		 params.put("aid", in.getAid());
+		 params.put("assistAid", in.getAssistAid());
+		 params.put("uid", in.getUid());
+		 params.put("type", in.getType());
+		 if (in.getContentType() != null){
+			 params.put("contentType", in.getContentType().split(","));
+		 }
+		 if (in.getAssistType()!=null){
+			 params.put("assistType", in.getAssistType().split(","));
+		 }
+		 params.put("depId", in.getDepId());
+		 params.put("assistCount", in.getAssistCount());
+		Pagination<OutListAssist> page = (Pagination<OutListAssist>) findPage("findAssistList", "findAssistCount", params, in.getPageNo(), in.getPageSize());
+		for (OutListAssist e : (List<OutListAssist>)page.getList()) {
+			pushTypeName(e);
+		}
+		return page;
+	}
+
+	@Override
+	public Result listAssistExprot(InputListAssist in,String uploadPath) {
+		List<OutListAssist> list = (List<OutListAssist>) findList("findAssistList", in);
+		for (OutListAssist e : list) {
+			pushTypeName(e);
+		}
+		NewExcelUtil<OutListAssist> excelExport = new NewExcelUtil<>(OutListAssist.class);
+		return excelExport.exportExcel(list,"协单统计列表",uploadPath);
+	}
+
+	private void pushTypeName(OutListAssist e) {
+		//处理公出类型
+		if (Integer.valueOf(e.getType())>4){
+			e.setType("非公出协单");
+		}else {
+			e.setType("公出协单");
+		}
+		//处理公出项目分类
+		e.setAssistType(pushAssistTypeName(e.getAssistType()));
+
+		//处理公出内容分类
+		if (StringUtils.isNotBlank(e.getContentType())){
+			String[] split = e.getContentType().split(",");
+			StringBuilder str=new StringBuilder();
+			for (String s : split) {
+				str.append(AssistContentType.getDesc(Integer.valueOf(s))).append(",");
+			}
+			if (StringUtils.isNotBlank(e.getContent())){
+				str.append(e.getContent());
+			}else {
+				str.deleteCharAt(str.length()-1);
+			}
+
+			e.setContent(str.toString());
+		}
+	}
+
+	private String pushAssistTypeName(String assistType) {
+		if (StringUtils.isNotBlank(assistType)){
+			String[] split = assistType.split(",");
+			StringBuilder str=new StringBuilder();
+			for (String s : split) {
+				str.append(AssistType.getDesc(Integer.valueOf(s))).append(",");
+			}
+			str.deleteCharAt(str.length()-1);
+			return str.toString();
+		}
+		return "";
+	}
+
 	private void pushCompleteMaxDuration(String orderNo) {
 		List<OrderPublicReleaseLog> orderPublicReleaseLogs = orderPublicReleaseLogMapper.queryByOrderNo(orderNo);
 		List<PublicRelease> publicReleases = publicReleaseMapper.selectByOrderNo(orderNo);
@@ -1689,11 +1882,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		orderPublicReleaseLogMapper.insert(log);
 	}
 
-
+	private void addpublicLog(Integer id, Integer status, String remarks,Date date) {
+		PublicReleaseLog log = new PublicReleaseLog(id, TokenManager.getAdminId(), status, remarks, date);
+		publicReleaseLogMapper.insertSelective(log);
+	}
 
 	private void addpublicLog(Integer id, Integer status, String remarks) {
-		PublicReleaseLog log = new PublicReleaseLog(id, TokenManager.getAdminId(), status, remarks, new Date());
-		publicReleaseLogMapper.insertSelective(log);
+		addpublicLog(id, status, remarks,new Date());
 	}
 
 	@Override
@@ -1768,9 +1963,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	 * @param date
 	 */
 	private void updatePushassist(PublicRelease use, PublicRelease updatePR, Date date, Admin a) {
-
 		//协单
-		List<PublicRelease> list = publicReleaseMapper.selectByMainId(use.getId(),3,null);
+		int type=3;
+		if (use.getType()==5)type=6;
+		List<PublicRelease> list = publicReleaseMapper.selectByMainId(use.getId(),type,null);
 		String []ss= use.getAssistAid().split(",");
 		//数据库与传入比对,如果不存在就标记撤销 ,如果存在就修改成
 		for (PublicRelease out : list) {
@@ -1803,6 +1999,24 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				StringBuffer str = new StringBuffer("[").append(a.getName()).append("]修改了公出").append("[").append(use.getUserNames()).append("]。");
 				PublicReleaseLog log = new PublicReleaseLog(np.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.xg.getCode(),str.toString(), date);
 				publicReleaseLogMapper.insertSelective(log);
+				if (use.getType()==5){
+					//主非协单内容
+					PublicAssistDetails up = publicAssistDetailsMapper.selectByPrid(use.getId());
+					//子非协单内容如果子不存在则新增,否则修改
+					PublicAssistDetails up2 = publicAssistDetailsMapper.selectByPrid(np.getId());
+					if (up2==null){
+						PublicAssistDetails np2 = new PublicAssistDetails();
+						BeanUtils.copyProperties(up,np2);
+						np2.setPrid(np.getId());
+						np2.setId(null);
+						publicAssistDetailsMapper.insert(np2);
+					}else {
+						PublicAssistDetails np2 = new PublicAssistDetails();
+						BeanUtils.copyProperties(up,np2);
+						np2.setId(up2.getId());
+						publicAssistDetailsMapper.update(np2);
+					}
+				}
 				sendNoticeAndSoucket(out.getAid(),np.getStatus(),str.toString());
 			}
 		}
@@ -1812,6 +2026,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			for (PublicRelease o : list) {
 				if (s.equals(o.getAid())) {
 					flag2 = true;
+					break;
 				}
 			}
 			if (!flag2) {
@@ -1822,10 +2037,23 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				np.setAid(s);
 				np.setAname(my2.getName());
 				//协单审核,判定是否跳过的逻辑
-				np.setType(3);
+				if (use.getType()==0){
+					np.setType(3);
+				}else {
+					np.setType(6);
+				}
 				np.setMainId(use.getId());
 				np.setId(null);
 				pushAssist(use, date, a, np, np);
+				if (use.getType()==5){
+					//主非协单内容
+					PublicAssistDetails up = publicAssistDetailsMapper.selectByPrid(use.getId());
+					PublicAssistDetails np2 = new PublicAssistDetails();
+					BeanUtils.copyProperties(up,np2);
+					np2.setPrid(np.getId());
+					np2.setId(null);
+					publicAssistDetailsMapper.insert(np2);
+				}
 				StringBuffer str = new StringBuffer("[").append(a.getName()).append("]邀请你技术协单").append("[").append(use.getUserNames()).append("]。");
 				PublicReleaseLog log = new PublicReleaseLog(np.getId(), TokenManager.getAdminId(), PublicReleaseLog.states.fq.getCode(), str.toString(), date);
 				sendNoticeAndSoucket(s,np.getStatus(),str.toString());
@@ -1834,7 +2062,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			}
 		}
 		//判定是审核还是完成,取决于协单是否通过
-		List<PublicRelease> newList = publicReleaseMapper.selectByMainId(use.getId(),3,null);
+		List<PublicRelease> newList = publicReleaseMapper.selectByMainId(use.getId(),null,null);
 		int count = 0;
 		for (PublicRelease e : newList) {
 			//如果是完成或者拒绝则标记,全中断则修改状态
@@ -1862,6 +2090,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			publicReleaseMapper.insertSelective(np);
 		}else {
 			np.setAid(null);
+			np.setAname(null);
 			publicReleaseMapper.update(np);
 		}
 		updatePublicReleaseDtails(use, np);
@@ -2048,7 +2277,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 							outPublicReleaseLog.setAname(str.substring(0,str.length()-1));
 							list.add(outPublicReleaseLog);
 						}
-					}else if (e.getType()==0&&e.getAssistProcess()==2){
+					}else if ((e.getType()==0||e.getType()==5)&&e.getAssistProcess()==2){
 						//获取技术协单
 						List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(e.getId(), null, null);
 						StringBuffer str =new StringBuffer();
@@ -2080,6 +2309,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	@Override
 	public int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ,String uid) {
 		if (clockIn == null) clockIn = 1;
+		String str = "";
+		Date date = new Date();
+		boolean flag=false;
+		Integer clockCount=0;
 		PublicRelease use = publicReleaseMapper.selectById(id);
 		if (use.getPublicType()==1||use.getPublicType()==3) {
 			return -1;
@@ -2093,13 +2326,22 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				return -3;
 			}
 		}
+		//非公出协单只要大于
+		Date start = use.getReleaseStart();
+		Date end = use.getReleaseEnd();
+		if (use.getType()==5||use.getType()==6){
+			//结束时间需要+1天
+			end = DateUtils.addDays(end, 1);
+		}
+		if (start.getTime()>date.getTime()){
+			return -4;
+		}
+		if (end.getTime()<date.getTime()){
+			return -4;
+		}
 		List<OutPublicReleaseDetails> prdList = publicReleaseDetailsMapper.selectByPrid(id);
 		List<PublicReleaseDateClock> prdcList = publicReleaseDateClockMapper.selectByPrid(id);
 		pushDateClockDetails(prdList,prdcList);
-		String str = "";
-		Date date = new Date();
-		boolean flag=false;
-		Integer clockCount=0;
 		PublicReleaseClock pc=new PublicReleaseClock();
 		pc.setPrid(id);
 		pc.setPhotoUrl(photoUrl);
@@ -2227,7 +2469,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}
 			}
 			out.setMyExamine(0);
-			if (out.getType()==0||out.getType()==1||out.getType()==2){
+			if (out.getType()==0||out.getType()==1||out.getType()==2||out.getType()==5){
 				if (adminPublicReviewerBos==null)adminPublicReviewerBos = adminPublicReviewerMapper.selectByAid(out.getAid());
 				//判定是否是上级审核人
 				boolean myFlag = false;
@@ -2251,7 +2493,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}
 				//新增所有审核人就是查看权限
 				for (AdminPublicReviewerBo e : adminPublicReviewerBos) {
-					if ((e.getType()==0||e.getType()==4)
+					if ((e.getType()==0||e.getType()==4||e.getType()==5)
 							&&aid.equals(e.getReviewerId())){
 						flag=true;
 						flag2=true;
@@ -2359,6 +2601,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}else {
 					out.setPermission(1);
 				}
+				if (out.getType()>4){
+					out.setReleaseStarts(out.getReleaseStarts().substring(0,10));
+					out.setReleaseEnds(out.getReleaseEnds().substring(0,10));
+				}
 			}else {
 				out=null;
 				return out;
@@ -2405,7 +2651,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					str.append(e.getReviewerName()+",");
 				}
 				//业务公出且协单部分审核(看着流程有点问题)
-			}else if (out.getType()==0&& out.getAssistProcess()==2){
+			}else if ((out.getType()==0||out.getType()==5)
+					&& out.getAssistProcess()==2){
 				//获取技术协单
 				List<PublicRelease> publicReleases = publicReleaseMapper.selectByMainId(out.getId(), null, null);
 				List<String> names=new ArrayList<>();
@@ -2545,6 +2792,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if(in.getStatus()!=null) map.put("status", in.getStatus());
 		if(in.getClockIn()!=null) map.put("clockIn", in.getClockIn());
 		if(in.getPublicType()!=null)map.put("publicType",in.getPublicType());
+		if(in.getAssistType()!=null){
+			String[] split = in.getAssistType().split(",");
+			map.put("assistType",split);
+		}
 		//type 0私有 1管理权限 2所有权限
 		if(TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)
 				||TokenManager.hasRole(AFTConstants.CED_ASSISTANT )||TokenManager.hasRole(AFTConstants.PERSONNEL_AUDITOR)
@@ -2598,13 +2849,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	@Override
 	public int checkTime(InputPublicRelease in) {
-		try {
-			in.setReleaseStart(DateUtils.parseDate(in.getReleaseStarts(), AFTConstants.YYYYMMDDHHMMSS));
-			in.setReleaseEnd(DateUtils.parseDate(in.getReleaseEnds(), AFTConstants.YYYYMMDDHHMMSS));
-		} catch (ParseException e) {
-			e.printStackTrace();
-			throw new BusinessException("转换异常");
-		}
+
 		//如果主协单且一起公出
 		if(in.getAssist()==1){
 			//如果一起公出先判定发起人,再判定协单人,如果只是协单公出则只需要判定协单
@@ -2727,25 +2972,37 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	@Override
 	public Object getMyNewPublic() {
+
 		List<PublicRelease> myPublic=publicReleaseMapper.selectMyNewPublic(TokenManager.getAdminId());
 		if(myPublic.isEmpty())return null;
 		Integer id=null;
 		long count=999999;
+		long nowTime=System.currentTimeMillis();
 		for (PublicRelease e : myPublic) {
-			long nowTime=System.currentTimeMillis();
+			long start=e.getReleaseStart().getTime();
+			long end=e.getReleaseEnd().getTime();
+			//添加结束时间小于当前时间或者开始时间大于当前时间不显示
+			if (end<nowTime||start>nowTime){
+				continue;
+			}
 			long time = Math.abs(nowTime-e.getReleaseStart().getTime())/(1000*60);
 			long time2 = Math.abs(e.getReleaseEnd().getTime()-nowTime)/(1000*60);
 
 			//距离当前时间近的开始时间,不大于当前时间
 			if (time<count&&e.getReleaseStart().getTime()<nowTime){
-				if (e.getAlone()!=1 && e.getAssist()!=1){
+				if (e.getAlone()!=1 ){
 					count=time;
 					id=e.getId();
 				}
 			}
 			//距离当前时间近的结束时间,不小于当前时间
-			if (time2<count&&e.getReleaseEnd().getTime()>nowTime){
-				if (e.getAlone()!=1 && e.getAssist()!=1){
+			if (e.getType()==5||e.getType()==6){
+				if (time2<count){
+					count=time2;
+					id=e.getId();
+				}
+			}else if (time2<count&&e.getReleaseEnd().getTime()>nowTime){
+				if (e.getAlone()!=1 ){
 					count=time2;
 					id=e.getId();
 				}
@@ -2775,7 +3032,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			out.setPublicAssistAdvice(publicAssistAdvices.size());
 
 		}
-
+		if (out.getType()>4){
+			//开始时间与结束时间显示去掉时分秒
+			out.setReleaseStarts(out.getReleaseStarts().substring(0,10));
+			out.setReleaseEnds(out.getReleaseEnds().substring(0,10));
+		}
 		return out;
 //		List<OutPublicReleaseList> myPublic = getMyPublic(0,1);
 //		if (myPublic.isEmpty()){
@@ -3251,6 +3512,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 
 	private void pushiClockInTime(List<OutPublicDtails> list, List<PublicReleaseClock> publicReleaseClocks) {
 		for (OutPublicDtails outPublicDtails : list) {
+			//处理协单类型
+			outPublicDtails.setAssistType(pushAssistTypeName(outPublicDtails.getAssistType()));
+			//处理打卡
 			if (outPublicDtails.getClockIn()!=null){
 				if (outPublicDtails.getAlone()==2&&outPublicDtails.getAssist()==1){
 					outPublicDtails.setClockInStr("无需打卡");

+ 13 - 0
src/main/resources/excel-license.xml

@@ -0,0 +1,13 @@
+<License>
+  <Data>
+    <Products>
+      <Product>Aspose.Total for Java</Product>
+      <Product>Aspose.Words for Java</Product>
+    </Products>
+    <EditionType>Enterprise</EditionType>
+    <SubscriptionExpiry>20991231</SubscriptionExpiry>
+    <LicenseExpiry>20991231</LicenseExpiry>
+    <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
+  </Data>
+  <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
+</License>

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

@@ -1,7 +1,7 @@
 dev.name=local
 spring.main.lazy-initialization=true
 jdbc.driverClassName=com.mysql.jdbc.Driver
-kede.version=1.3.47
+kede.version=1.3.48
 static.host=//static.jishutao.com/${kede.version}
 #static.host=//172.16.1.199:3000/${kede.version}
 #static.host=//172.16.1.187/${kede.version}

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

@@ -1,5 +1,5 @@
 dev.name=test
-kede.version=1.3.47
+kede.version=1.3.48
 static.host=//static.jishutao.com/${kede.version}
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver

+ 15 - 0
src/main/resources/word-license.xml

@@ -0,0 +1,15 @@
+<License>
+    <Data>
+        <Products>
+            <Product>Aspose.Total for Java</Product>
+            <Product>Aspose.Words for Java</Product>
+        </Products>
+        <EditionType>Enterprise</EditionType>
+        <SubscriptionExpiry>20991231</SubscriptionExpiry>
+        <LicenseExpiry>20991231</LicenseExpiry>
+        <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
+    </Data>
+    <Signature>
+        sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
+    </Signature>
+</License>