Browse Source

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

anderx 1 year ago
parent
commit
4cdf877611
49 changed files with 6832 additions and 3937 deletions
  1. 2 2
      pom.xml
  2. 11 56
      src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java
  3. 1 1
      src/main/java/com/goafanti/business/service/impl/RestrictProjectServiceImpl.java
  4. 36 25
      src/main/java/com/goafanti/common/controller/PublicController.java
  5. 85 24
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  6. 83 10
      src/main/java/com/goafanti/common/dao/TOrderMidMapper.java
  7. 76 6
      src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java
  8. 4 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  9. 465 259
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  10. 817 321
      src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml
  11. 2971 2467
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  12. 2 2
      src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml
  13. 17 0
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  14. 198 0
      src/main/java/com/goafanti/common/mapper/UserMidMapper.xml
  15. 6 0
      src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml
  16. 50 235
      src/main/java/com/goafanti/common/model/BusinessProject.java
  17. 69 262
      src/main/java/com/goafanti/common/model/TOrderMid.java
  18. 33 67
      src/main/java/com/goafanti/common/model/TOrderTask.java
  19. 1 0
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  20. 32 9
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  21. 1 1
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  22. 277 0
      src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java
  23. 6 3
      src/main/java/com/goafanti/customer/bo/LockingReleaseBo.java
  24. 3 2
      src/main/java/com/goafanti/customer/service/CustomerService.java
  25. 11 4
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  26. 5 0
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java
  27. 445 0
      src/main/java/com/goafanti/order/bo/InputOrderProject.java
  28. 683 0
      src/main/java/com/goafanti/order/bo/OutOrderProject.java
  29. 30 0
      src/main/java/com/goafanti/order/controller/StatisticsApiController.java
  30. 3 0
      src/main/java/com/goafanti/order/enums/NewOrderDunType.java
  31. 1 0
      src/main/java/com/goafanti/order/enums/NewProjectStatus.java
  32. 6 0
      src/main/java/com/goafanti/order/service/OrderNewService.java
  33. 2 0
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  34. 2 0
      src/main/java/com/goafanti/order/service/UserStaticticsService.java
  35. 0 1
      src/main/java/com/goafanti/order/service/impl/LegalAffairsServiceImpl.java
  36. 9 4
      src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java
  37. 62 6
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  38. 107 42
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  39. 12 17
      src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java
  40. 124 2
      src/main/java/com/goafanti/order/service/impl/UserStatisticsServiceImpl.java
  41. 5 5
      src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java
  42. 5 5
      src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java
  43. 12 40
      src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java
  44. 10 0
      src/main/java/com/goafanti/user/bo/InputListOrderUserService.java
  45. 14 13
      src/main/java/com/goafanti/user/service/UserService.java
  46. 26 30
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  47. 10 14
      src/main/java/com/goafanti/user/service/impl/UserServiceServiceImpl.java
  48. 1 1
      src/main/resources/props/config_local.properties
  49. 1 1
      src/main/resources/props/config_test.properties

+ 2 - 2
pom.xml

@@ -183,7 +183,7 @@
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
 			<artifactId>jackson-databind</artifactId>
-			<version>2.8.2</version>
+			<version>2.13.4.1</version>
 		</dependency>
 		<!-- jackson end -->
 
@@ -299,7 +299,7 @@
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>fastjson</artifactId>
-			<version>1.2.31</version>
+			<version>1.2.68</version>
 		</dependency>
 
 		<!-- AspectJ -->

+ 11 - 56
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -57,7 +57,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		bp.setStatus("0");
 		bp.setBoutique(Integer.valueOf(boutique));
 		bp.setFirstPayment(new BigDecimal("0"));
-		return businessProjectMapper.insertSelective(bp);
+		return businessProjectMapper.insert(bp);
 	}
 	@SuppressWarnings("unchecked")
 	@Override
@@ -112,29 +112,29 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public int deleteProject(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		if (bp.getDeleteSign()==0) {
 			bp.setDeleteSign(1);
 		}else {
 			bp.setDeleteSign(0);
 		}
 
-		return businessProjectMapper.updateByPrimaryKey(bp);
+		return businessProjectMapper.update(bp);
 	}
 	@Override
 	public int updateStopProject(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		if (Integer.valueOf(bp.getStatus())==0) {
 			bp.setStatus("1");
 		}else {
 			bp.setStatus("0");
 		}
 
-		return businessProjectMapper.updateByPrimaryKey(bp);
+		return businessProjectMapper.update(bp);
 	}
 	@Override
 	public BusinessProjectBo orgProjects(String id) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		BusinessProject bp=businessProjectMapper.queryById(id);
 		BusinessProjectBo bpo=new BusinessProjectBo();
 		BeanUtils.copyProperties(bp,bpo);
 		String cname=getAllCname(bpo.getCid());
@@ -209,54 +209,9 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 
 	@Override
 	public int updateProject(BusinessProject s) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
-		TheGinseng(s, bp);
-		return businessProjectMapper.updateByPrimaryKeySelective(bp);
-	}
-	private void TheGinseng(BusinessProject s, BusinessProject bp) {
-
-		if (StringUtils.isNotBlank(s.getBname())) {
-			bp.setBname(s.getBname());
-		}
-		if (StringUtils.isNotBlank(s.getCid())) {
-			bp.setCid(s.getCid());
-		}
-		if (StringUtils.isNotBlank(s.getCountry())) {
-			bp.setCountry(s.getCountry());
-		}
-		if (StringUtils.isNotBlank(s.getProvince())) {
-			bp.setProvince(s.getProvince());
-			bp.setCity(s.getCity());
-			bp.setDistrict(s.getDistrict());
-		}
-		if (StringUtils.isNotBlank(s.getCity())) {
-			bp.setCity(s.getCity());
-			bp.setDistrict(s.getDistrict());
-		}
-		if (StringUtils.isNotBlank(s.getDistrict())) {
-			bp.setDistrict(s.getDistrict());
-		}
-
-		bp.setPrice(s.getPrice());
-		bp.setOffset(s.getOffset());
-		bp.setActivityFlag(s.getActivityFlag());
-		bp.setMemberPrice(s.getMemberPrice());
-		bp.setActivityPrice(s.getActivityPrice());
-		bp.setIntroduce(s.getIntroduce());
-		bp.setValueEffect(s.getValueEffect());
-		bp.setClientSize(s.getClientSize());
-		bp.setMinLogo(s.getMinLogo());
-		bp.setMaxLogo(s.getMaxLogo());
-		bp.setBoutique(s.getBoutique());
-		bp.setProjectUrl(s.getProjectUrl());
-		bp.setFirstPayment(s.getFirstPayment());
-		bp.setType(s.getType());
-		bp.setPatentTransfer(s.getPatentTransfer());
-		bp.setRestrictStatus(s.getRestrictStatus());
-		if (null!=(s.getStatus())) {
-			bp.setStatus(s.getStatus());
-		}
-		bp.setUpdateTime(new Date());
+		BusinessProject bp=businessProjectMapper.queryById(s.getId());
+		BeanUtils.copyProperties(s, bp);
+		return businessProjectMapper.update(bp);
 	}
 	@Override
 	public int addProjectSize(BusinessProjectModel ps) {
@@ -353,7 +308,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public boolean judgeStatus(BusinessProjectModel ps) {
-		 BusinessProject bp=businessProjectMapper.selectByPrimaryKey(ps.getPid());
+		 BusinessProject bp=businessProjectMapper.queryById(ps.getPid());
 		if (Integer.valueOf(bp.getStatus())==1) {
 			return true;
 		}else {
@@ -363,7 +318,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	}
 	@Override
 	public boolean judgeBeing(BusinessProject s) {
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
+		BusinessProject bp=businessProjectMapper.queryById(s.getId());
 		BusinessProject bp1=businessProjectMapper.selectByPrimaryBname(s.getBname());
 		if (null==bp||null==bp1||bp.getId().equals(bp1.getId())) {
 			return false;

+ 1 - 1
src/main/java/com/goafanti/business/service/impl/RestrictProjectServiceImpl.java

@@ -84,7 +84,7 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
         userBusinessMapper.insertSelective(ub);
         addUserLog(in,0);
         User user = userMapper.selectByPrimaryKey(in.getUid());
-        BusinessProject businessProject = businessProjectMapper.selectByPrimaryKey(in.getPid());
+        BusinessProject businessProject = businessProjectMapper.queryById(in.getPid());
         String str =String.format("客户:%s,已被营销员%s领取了【限定项目:%s】",user.getNickname(),TokenManager.getAdminToken().getName(),businessProject.getBname());
         //如果客户是当事人的不提示消息
         if (user.getAid()!=null&&!user.getAid().equals(aid)){

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

@@ -18,7 +18,8 @@ import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.websocket.SystemWebSocketHandler;
 import com.goafanti.expenseAccount.service.ExpenseAccountService;
-import com.goafanti.order.enums.OrderImgEnums;
+import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OrderProjectService;
 import com.goafanti.user.service.UserService;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -91,6 +92,10 @@ public class PublicController extends CertifyApiController {
 
 	@Autowired
 	private ExpenseAccountService	expenseAccountService;
+	@Autowired
+	private OrderNewService orderNewService;
+	@Autowired
+	private OrderProjectService orderProjectService;
 
 	@Value(value = "${patentTemplate}")
 	private String					patentTemplate		= null;
@@ -737,10 +742,7 @@ public class PublicController extends CertifyApiController {
 				}
 				String filePath = uploadPath + "/" + fileName;
 				FileUtils.deleteFile(filePath);
-				if (fileName.contains(OrderImgEnums.CONTRACT.getCode())){
-
-				}
-				res.setData(1);
+                res.setData(1);
 			} catch (Exception e) {
 				LoggerUtils.error(PublicController.class, "删除文件失败", e);
 			}
@@ -752,7 +754,7 @@ public class PublicController extends CertifyApiController {
           @RequestMapping("/getWxConfig")
           public Result getWxConfig() {
         	  Result res =new Result();
-        	  Map<String, Object> config=new HashedMap<String, Object>();
+        	  Map<String, Object> config= new HashedMap<>();
         	  config.put("clockInRange", clockInRange);
         	  res.data(config);
 			return res;
@@ -768,7 +770,6 @@ public class PublicController extends CertifyApiController {
 
 	/**
 	 * 补充发票报销查询编号
-	 * @return
 	 */
 	@RequestMapping("/supplementCheckNo")
 	public Result supplementCheckNo() {
@@ -779,7 +780,6 @@ public class PublicController extends CertifyApiController {
 
 	/**
 	 * 查询贫困信息
-	 * @return
 	 */
 	@RequestMapping("/selectPoverty")
 	public Result selectPoverty(@RequestParam(value = "file", required = false) MultipartFile file) {
@@ -804,7 +804,6 @@ public class PublicController extends CertifyApiController {
 	 * 查询贫困信息
 	 * @param id 贫困信息编号
 	 * @param type 0=所有 ,1=只看有效数据
-	 * @return
 	 */
 	@RequestMapping("/selectPovertyById/export")
 	public Result selectPovertyByIdExport(String id,Integer type) {
@@ -850,14 +849,12 @@ public class PublicController extends CertifyApiController {
 	/**
 	 * 	批量导入回款模版
 	 *
-	 * @return
 	 */
 	@RequestMapping(value = "/downloadPovertyTemplate", method = RequestMethod.GET)
 	public void downloadTemplate(HttpServletResponse response) {
-		Result res = new Result();
-		StringBuffer url= new StringBuffer(uploadPath);
-		url=url.append("/tmp").append("/poverty_template.xls");
-		try {
+		StringBuilder url= new StringBuilder(uploadPath);
+        url.append("/tmp").append("/poverty_template.xls");
+        try {
 			response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
 			FileUtils.setAttachmentResponseHeader(response, url.toString(),"poverty导入模版.xls");
 			FileUtils.writeBytes(url.toString(), response.getOutputStream());
@@ -869,7 +866,6 @@ public class PublicController extends CertifyApiController {
 
 	/**
 	 * 查询贫困信息
-	 * @return
 	 */
 	@RequestMapping("/selectFlag")
 	public Result selectFlag(@RequestParam(value = "file", required = false) MultipartFile file) {
@@ -900,15 +896,13 @@ public class PublicController extends CertifyApiController {
 	 * 查询贫困信息
 	 * @param id 贫困信息编号
 	 * @param type 0=所有 ,1=只看有效数据
-	 * @return
 	 */
 	@RequestMapping("/selectPovertyFlagById")
 	public Result selectPovertyFlagById(String id,Integer type) {
 		Result res =new Result();
 		Map<String,Object> map = povertyService.selectFlag(null, id);
 		if (type==null)type=0;
-		List<OutPovertyFlag> resList=new ArrayList<>();
-		if (type==1){
+        if (type==1){
 			map.put("list",map.get("trueList"));
 		}else {
 			map.put("list",map.get("falseList"));
@@ -921,7 +915,6 @@ public class PublicController extends CertifyApiController {
 	 * 查询贫困信息
 	 * @param id 贫困信息编号
 	 * @param type 0=所有 ,1=只看有效数据
-	 * @return
 	 */
 	@RequestMapping("/selectPovertyFlagById/export")
 	public Result selectPovertyFlagByIdExport(String id,Integer type) {
@@ -947,13 +940,31 @@ public class PublicController extends CertifyApiController {
 		res.data(adminService.pushStatistics());
 		return res;
 	}
-	@RequestMapping(value = "/pushClockIn",method = RequestMethod.POST)
+
+	/**
+	 * 处理催款节点详情
+	 */
+	@RequestMapping(value = "/pushDunNodeContent",method = RequestMethod.GET)
+	@ResponseBody
+	public Result pushDunNodeContent(){
+		Result res =new Result();
+		orderNewService.pushDunNodeContent();
+		res.data("ok");
+		return res;
+	}
+
+
+	/**
+	 * 处理项目完成时间
+	 */
+	@RequestMapping(value = "/pushProjectCompleteDate",method = RequestMethod.GET)
 	@ResponseBody
-	public Result pushClockIn ( String clokInTime, String userId){
+	public Result pushProjectCompleteDate(){
 		Result res =new Result();
-		System.out.println("=====================================================》 clokInTime="+clokInTime);
-		System.out.println("=====================================================》 userId="+userId);
-        res.data("ok");
-        return res;
+		orderProjectService.pushProjectCompleteDate();
+		res.data("ok");
+		return res;
 	}
+
+
 }

+ 85 - 24
src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java

@@ -6,52 +6,113 @@ import com.goafanti.business.bo.BusinessProjectBo;
 import com.goafanti.common.model.BusinessCategory;
 import com.goafanti.common.model.BusinessProject;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.util.List;
 import java.util.Map;
 
 /**
-* @author Administrator
-* @description 针对表【business_project】的数据库操作Mapper
-* @createDate 2024-05-13 13:56:51
-* @Entity com.goafanti.common.model.BusinessProject
-*/
+ * (BusinessProject)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-09-19 14:54:12
+ */
 public interface BusinessProjectMapper {
 
-    int deleteByPrimaryKey(String id);
-
-    int insert(BusinessProject record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    BusinessProject queryById(String id);
+
+    
+
+    /**
+     * 查询指定行数据
+     *
+     * @param businessProject 查询条件
+     * @param pageable         分页对象
+     * @return 对象列表
+     */
+    List<BusinessProject> findBusinessProjectList(BusinessProject businessProject, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param businessProject 查询条件
+     * @return 总行数
+     */
+    int findBusinessProjectCount(BusinessProject businessProject);
+
+    /**
+     * 新增数据
+     *
+     * @param businessProject 实例对象
+     * @return 影响行数
+     */
+    int insert(BusinessProject businessProject);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<BusinessProject> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<BusinessProject> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<BusinessProject> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<BusinessProject> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param businessProject 实例对象
+     * @return 影响行数
+     */
+    int update(BusinessProject businessProject);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(String id);
 
     int insertSelective(BusinessProject record);
 
-    BusinessProject selectByPrimaryKey(String id);
-
-    int updateByPrimaryKeySelective(BusinessProject record);
 
-    int updateByPrimaryKey(BusinessProject record);
 
-	int getBnamecount(String bname);
+    int getBnamecount(String bname);
 
-	String getCreateName(String id);
+    String getCreateName(String id);
 
-	BusinessProject selectByPrimaryBname(String bname);
+    BusinessProject selectByPrimaryBname(String bname);
 
-	List<ProjectBo> getBusinessProject(String id);
+    List<ProjectBo> getBusinessProject(String id);
 
-	ProjectDetailBo selectAppProjectDetail(String id);
+    ProjectDetailBo selectAppProjectDetail(String id);
 
-	int checkProject(String id);
+    int checkProject(String id);
 
-	List<BusinessProjectBo > selectBusinessProjectByName(@Param("businessName")String businessName, @Param("cname")String cname);
+    List<BusinessProjectBo> selectBusinessProjectByName(@Param("businessName")String businessName, @Param("cname")String cname);
 
 
-	 List<BusinessCategory> selectBusinessProjectCatalog();
+    List<BusinessCategory> selectBusinessProjectCatalog();
 
 
-	/**
-	 * @return
-	 */
+    /**
+     * @return
+     */
     List<Map> selectProjectAndTypeAll();
 
-
 }
+

+ 83 - 10
src/main/java/com/goafanti/common/dao/TOrderMidMapper.java

@@ -3,23 +3,87 @@ package com.goafanti.common.dao;
 import com.goafanti.common.bo.ErrorDunListBo;
 import com.goafanti.common.model.TOrderMid;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
+/**
+ * 订单中间表(TOrderMid)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-09-06 14:24:11
+ */
 public interface TOrderMidMapper {
-    int deleteByPrimaryKey(Integer id);
 
-    int insert(TOrderMid record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    TOrderMid queryById(Integer id);
+
+
+    /**
+     * 查询指定行数据
+     *
+     * @param tOrderMid 查询条件
+     * @param pageable  分页对象
+     * @return 对象列表
+     */
+    List<TOrderMid> findTOrderMidList(TOrderMid tOrderMid, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param tOrderMid 查询条件
+     * @return 总行数
+     */
+    int findTOrderMidCount(TOrderMid tOrderMid);
+
+    /**
+     * 新增数据
+     *
+     * @param tOrderMid 实例对象
+     * @return 影响行数
+     */
+    int insert(TOrderMid tOrderMid);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderMid> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<TOrderMid> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderMid> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<TOrderMid> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param tOrderMid 实例对象
+     * @return 影响行数
+     */
+    int update(TOrderMid tOrderMid);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
 
-    int insertSelective(TOrderMid record);
-
-    TOrderMid selectByPrimaryKey(Integer id);
-
-    int updateByPrimaryKeySelective(TOrderMid record);
-
-    int updateByPrimaryKey(TOrderMid record);
 
     TOrderMid selectByOrderNo(String orderNo);
 
@@ -28,7 +92,7 @@ public interface TOrderMidMapper {
     void updateFinanceId(@Param("id")String id, @Param("financeId")String financeId);
 
     void updatefinalReceivables(@Param("orderNo")String orderNo, @Param("amount") BigDecimal amount,
-                                @Param("count") BigDecimal count,@Param("receivablesTime") Date receivablesTime);
+                                @Param("count") BigDecimal count, @Param("receivablesTime") Date receivablesTime);
 
     void updateInvoice(String orderNo);
 
@@ -55,4 +119,13 @@ public interface TOrderMidMapper {
     void updateStopProjectByOrderNo(String orderNo);
 
     void updateBidTypeByOrderNo(String orderNo);
+
+    void updateByPrimaryKeySelective(TOrderMid tm);
+
+    void insertSelective(TOrderMid tm);
+
+    void updateMid(String orderNo);
+
+    void updateOExpense(String orderNo);
 }
+

+ 76 - 6
src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java

@@ -7,22 +7,89 @@ import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.bo.*;
 import com.goafanti.organization.bo.ProjectTypePuls;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.math.BigDecimal;
 import java.util.List;
 
+/**
+ * 订单任务表(TOrderTask)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-09-11 16:02:02
+ */
 public interface TOrderTaskMapper {
-    int deleteByPrimaryKey(Integer id);
 
-    int insert(TOrderTask record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    TOrderTask queryById(Integer id);
 
-    int insertSelective(TOrderTask record);
 
-    TOrderTask selectByPrimaryKey(Integer id);
+    /**
+     * 查询指定行数据
+     *
+     * @param tOrderTask 查询条件
+     * @param pageable   分页对象
+     * @return 对象列表
+     */
+    List<TOrderTask> findTOrderTaskList(TOrderTask tOrderTask, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param tOrderTask 查询条件
+     * @return 总行数
+     */
+    int findTOrderTaskCount(TOrderTask tOrderTask);
+
+    /**
+     * 新增数据
+     *
+     * @param tOrderTask 实例对象
+     * @return 影响行数
+     */
+    int insert(TOrderTask tOrderTask);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderTask> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<TOrderTask> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderTask> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<TOrderTask> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param tOrderTask 实例对象
+     * @return 影响行数
+     */
+    int update(TOrderTask tOrderTask);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
 
     int updateByPrimaryKeySelective(TOrderTask record);
 
-    int updateByPrimaryKey(TOrderTask record);
+    int insertSelective(TOrderTask record);
 
     List<TOrderTaskBo> selectOrderTask(@Param("orderNo") String orderNo,@Param("type") Integer type);
 
@@ -63,7 +130,7 @@ public interface TOrderTaskMapper {
 
     void resstPayment(Integer id);
 
-    void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost);
+    void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost") BigDecimal cost);
 
     OrderOperator selectAidByParam(@Param("tid")Integer tid);
 
@@ -90,4 +157,7 @@ public interface TOrderTaskMapper {
 
     List<String> selectOrderNoAllByaid(String aid);
 
+
+    List<TOrderTask> selectAll();
 }
+

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

@@ -252,4 +252,8 @@ public interface UserMapper {
     UserArchivesDetails selectUser(String id);
 
     List<PublicReleaseListBo> getPublicReleaseList(String uid);
+
+    void updateUserShareType(List<LockingReleaseBo> newList);
+
+    List<LockingReleaseBo > selectSignReleaseUser(String id);
 }

File diff suppressed because it is too large
+ 465 - 259
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml


File diff suppressed because it is too large
+ 817 - 321
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml


File diff suppressed because it is too large
+ 2971 - 2467
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml


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

@@ -378,7 +378,7 @@
 
   <select id="selectWaitReleaseCustomer" resultType="com.goafanti.customer.bo.LockingReleaseBo">
 	select
-		t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel,
+		t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel, 0 type,
 		um.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType,u.share_type shareType
 	from
 		(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
@@ -386,7 +386,7 @@
 	where u.channel=0
 	 and datediff(now(),if(t0.lock_time &lt; um.last_follow_time,um.last_follow_time,t0.lock_time))>30
     UNION
-    SELECT t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel,
+    SELECT t0.id, t0.uid, t0.aid, DATE_FORMAT(t0.lock_time , '%Y-%m-%d') lockTime,u.new_channel newChannel, 1 type,
            um.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType,u.share_type shareType
     from (select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
       left join `user` u  on t0.uid=u.id left join user_mid um on u.id =um.uid

+ 17 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1530,4 +1530,21 @@
         </if>
     </select>
 
+    <update id="updateUserShareType">
+        update user
+        set share_type = 0,transfer_time = now()
+        where id in
+        <foreach collection="list" item="item" separator="," open="(" close=")">
+                #{item.uid}
+        </foreach>
+    </update>
+
+    <select id="selectSignReleaseUser" resultType="com.goafanti.customer.bo.LockingReleaseBo">
+        select
+        u.id uid,u.aid,0 type,u.share_type shareType,u.nickname userName,u.new_channel newChannel
+        from user u left join user_mid um on u.id=um.uid
+        where u.channel=0 and u.share_type in (2)
+        and u.aid = #{id}
+        and datediff(now(),if(u.transfer_time  &lt; um.last_follow_time,um.last_follow_time,u.transfer_time))>30
+    </select>
 </mapper>

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

@@ -717,4 +717,202 @@
       </if>
     </if>
   </select>
+  <select id="selectStatisticsOrderProjectList" resultType="com.goafanti.order.bo.OutOrderProject">
+    SELECT a.order_no as orderNo, bc.sort sortType,a.sales_type as salesType, b.service_type AS serviceType,
+    a.liquidation_status as liquidationStatus,b2.big_customer as bigCustomer,b.project_type as projectType,b.dun_node_content DunNodeContent,
+    a.total_amount as totalAmount,a.approval ,a.sign_time as signTime,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S')  as createTime,
+    b.buyer_name as buyerName,a.contract_no as contractNo, c.cname htlx,b.province_name province ,b.dep_name depName,
+    b.order_receivables orderReceivables,a.refund_amount refundAmount,a.settlement_amount as settlementAmount,
+    b.invoice_amount as invicueAmount, b.cost_amount as costAmount,b.payment_amount as paymentAmount,bp.lvl_type lvlType,
+    b.finance_name as financeName,b.salesman_name as salesmanName,b.expense_amount as expenseAmount,
+    e.commodity_name as commodityName,ttm.service_year as serviceYear,ttm.service_life as serviceLife,ttm.year_sum as yearSum,
+    date_format(e.task_distribution_time ,'%Y-%m-%d %H:%i:%S')  as taskDistributionTime ,e.commodity_quantity as commodityQuantity,
+    e3.cost_amount as costAmount,e.project_status as  projectStatus,e.task_start_time as taskStartTime,e.task_end_time as taskEndTime,
+    e.receiver_name as receiverName ,'技术组' jsz,a.order_status orderStatus,e.satisfaction_degree satisfactionDegree,
+    e.task_comment taskComment,'核算比例' hsbl,a.order_status orderStatus,
+    b.change_count changeType, b.restatement_count restatementType,b.refund_count refundType
+    from t_order_new a
+    left join t_order_mid b on a.order_no =b.order_no
+    left join t_order_task c on a.order_no =c.order_no and c.main =1
+    left join user_mid b2 on a.buyer_id=b2.uid
+    left join t_order_task e on a.order_no =e.order_no and e.split_status in (0,2)
+    left join business_project bp on e.commodity_id =bp.id
+    left join business_category bc on bp.cid=bc.id
+    <if test="liabilitiesDepId !=null">
+      left join admin e2 on e.task_receiver=e2.id
+    </if>
+    left join t_task_mid e3 on e.id=e3.tid
+    left join t_task_member ttm on e.id =ttm.tid
+    <if test="dunType !=null">
+      left join new_order_dun nod  on e.id=nod.tid
+    </if>
+    <if test="province !=null">
+    left join admin p1 on a.salesman_id=p1.id left join department p2 on p1.department_id=p2.id
+    </if>
+    where a.process_status >6 and a.delete_sign in (0,2)
+    <include refid="selectStatisticsOrderProjectSql"/>
+    <if test="page_sql!=null">
+      ${page_sql}
+    </if>
+  </select>
+  <sql id="selectStatisticsOrderProjectSql">
+
+    <if test="orderNo !=null">
+      and a.order_no like CONCAT('%',#{orderNo},'%')
+    </if>
+    <if test="contractNo !=null">
+      and a.contract_no like CONCAT('%',#{contractNo},'%')
+    </if>
+    <if test="userName !=null">
+      and b.buyer_name like CONCAT('%',#{userName},'%')
+    </if>
+    <if test="projectName !=null">
+      and e.commodity_name like CONCAT('%',#{projectName},'%')
+    </if>
+    <if test="orderAmountType==1">
+      and a.total_amount &lt; 10
+    </if>
+    <if test="orderAmountType==2">
+      and a.total_amount &gt;= 10 and a.total_amount &lt; 20
+    </if>
+    <if test="orderAmountType==3">
+      and a.total_amount &gt;= 20 and a.total_amount &lt; 30
+    </if>
+    <if test="orderAmountType==4">
+      and a.total_amount &gt;= 30 and a.total_amount &lt; 40
+    </if>
+    <if test="orderAmountType==5">
+      and a.total_amount &gt;= 40
+    </if>
+    <if test="depId !=null">
+      and a.order_dep = #{depId}
+    </if>
+    <if test="liabilitiesDepId !=null">
+      and e2.department_id = #{liabilitiesDepId}
+    </if>
+    <if test="declarationBatch !=null">
+      and e.declaration_batch = #{declarationBatch}
+    </if>
+    <if test="projectAmountType==1">
+      and e.commodity_price &lt; 1
+    </if>
+    <if test="projectAmountType==2">
+      and e.commodity_price &gt;= 1 and e.commodity_price &lt; 5
+    </if>
+    <if test="projectAmountType==3">
+      and e.commodity_price &gt;= 5 and e.commodity_price &lt; 10
+    </if>
+    <if test="projectAmountType==4">
+      and e.commodity_price &gt;= 10 and e.commodity_price &lt; 20
+    </if>
+    <if test="projectAmountType==5">
+      and e.commodity_price &gt;= 20
+    </if>
+    <if test="projectStatus !=null">
+      and e.project_status = #{projectStatus}
+    </if>
+    <if test="satisfactionDegree !=null">
+      and e.satisfaction_degree = #{satisfactionDegree}
+    </if>
+    <if test="startDate !=null and endDate !=null">
+      and a.create_time BETWEEN #{startDate} and #{endDate}
+    </if>
+    <if test="signStartDate !=null and signEndDate !=null">
+      and a.sign_time BETWEEN #{signStartDate} and #{signEndDate}
+    </if>
+    <if test="projectStartDate !=null and projectEndDate !=null">
+      and e.task_distribution_time BETWEEN #{projectStartDate} and #{projectEndDate}
+    </if>
+    <if test="salesType !=null">
+      and a.sales_type = #{salesType}
+    </if>
+    <if test="serviceType !=null">
+      and find_in_set(b.service_type,#{serviceType})
+    </if>
+    <if test="liquidationStatus !=null">
+      and a.liquidation_status = #{liquidationStatus}
+    </if>
+    <if test="dunType !=null">
+      and nod.status = #{dunType}
+    </if>
+    <if test="province !=null">
+      and p2.province = #{province}
+    </if>
+    <if test="salesmanId !=null">
+      and a.salesman_id = #{salesmanId}
+    </if>
+    <if test="financeId !=null">
+      and a.finance_id = #{financeId}
+    </if>
+    <if test="techId !=null">
+      and e.task_receiver =#{techId}
+    </if>
+    <if test="approval ==0">
+      and a.approval = 0
+    </if>
+    <if test="approval ==1">
+      and a.approval > 0
+    </if>
+    <if test="projectType ==0">
+      and bp.type in (0,1,2,3,4,5,6,8)
+    </if>
+    <if test="projectType ==1">
+      and bp.type in (7)
+    </if>
+    <if test="businessCategory !=null">
+      and bp.cid = #{businessCategory}
+    </if>
+    <if test="bigCustomer !=null">
+      and b2.big_customer = #{bigCustomer}
+    </if>
+    <if test="restatement ==0">
+      and b.restatement_count = 0
+    </if>
+    <if test="restatement ==1">
+      and b.restatement_count > 0
+    </if>
+    <if test="changeCount ==0">
+      and b.change_count =0
+    </if>
+    <if test="changeType ==1">
+      and b.change_count >0
+    </if>
+    <if test="refundType ==0">
+      and b.refund_count=0
+    </if>
+    <if test="refundType ==1">
+      and b.refund_count >0
+    </if>
+    <if test="orderType ==0">
+      and a.order_type  in(0,2)
+    </if>
+    <if test="orderType ==1">
+      and a.order_type  in(1)
+    </if>
+    <if test="projectCompleteStartTime !=null and projectCompleteEndTime !=null">
+      and e.complete_date BETWEEN #{projectCompleteStartTime} and #{projectCompleteEndTime}
+    </if>
+  </sql>
+  <select id="selectStatisticsOrderProjectCount" resultType="java.lang.Integer">
+    SELECT count(*)
+    from t_order_new a
+    left join t_order_mid b on a.order_no =b.order_no
+    left join t_order_task c on a.order_no =c.order_no and c.main =1
+    left join user_mid b2 on a.buyer_id=b2.uid
+    left join t_order_task e on a.order_no =e.order_no and e.split_status in (0,2)
+    left join business_project bp on e.commodity_id =bp.id
+    <if test="liabilitiesDepId !=null">
+      left join admin e2 on e.task_receiver=e2.id
+    </if>
+    left join t_task_mid e3 on e.id=e3.tid
+    left join t_task_member ttm on e.id =ttm.tid
+    <if test="dunType !=null">
+      left join new_order_dun nod  on e.id=nod.tid
+    </if>
+    <if test="province !=null">
+      left join admin p1 on a.salesman_id=p1.id left join department p2 on p1.department_id=p2.id
+    </if>
+    where a.process_status >6 and a.delete_sign in (0,2)
+    <include refid="selectStatisticsOrderProjectSql"/>
+  </select>
 </mapper>

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

@@ -279,6 +279,9 @@ from t_order_new a
 left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid
 left join admin d on c.aid =d.id
 where a.delete_sign in(0,2,3)
+    <if test="contractNo!=null">
+  and  a.contract_no like CONCAT('%', #{contractNo},'%')
+    </if>
   <if test="userName != null">
   and b.buyer_name like CONCAT('%', #{userName},'%')
   </if>
@@ -312,6 +315,9 @@ from t_order_new a
 left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid
 left join admin d on c.aid =d.id
 where a.delete_sign in(0,2,3)
+   <if test="contractNo!=null">
+     and a.contract_no like CONCAT('%', #{contractNo},'%')
+   </if>
     <if test="userName != null">
     and b.buyer_name like CONCAT('%', #{userName},'%')
     </if>

+ 50 - 235
src/main/java/com/goafanti/common/model/BusinessProject.java

@@ -4,561 +4,376 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
+
 /**
- * 
- * @TableName business_project
+ * (BusinessProject)实体类
+ *
+ * @author makejava
+ * @since 2024-09-19 14:54:12
  */
 public class BusinessProject implements Serializable {
-    /**
+    private static final long serialVersionUID = -25621623846487956L;
+/**
      * 业务项目ID
      */
     private String id;
-
-    /**
+/**
      * 创建人
      */
     private String createId;
-
-    /**
+/**
      * 创建时间
      */
     private Date createTime;
-
-    /**
+/**
      * 更新时间
      */
     private Date updateTime;
-
-    /**
+/**
      * 删除标识
      */
     private Integer deleteSign;
-
-    /**
+/**
      * 业务名称
      */
     private String bname;
-
-    /**
+/**
      * 业务分类
      */
     private String cid;
-
-    /**
+/**
      * 市场价
      */
     private BigDecimal price;
-
-    /**
+/**
      * 最低折扣
      */
     private BigDecimal offset;
-
-    /**
+/**
      * 活动价
      */
     private BigDecimal activityPrice;
-
-    /**
+/**
      * 活动价生效标识
      */
     private String activityFlag;
-
-    /**
+/**
      * 会员价
      */
     private BigDecimal memberPrice;
-
-    /**
+/**
      * 业务项目介绍
      */
     private String introduce;
-
-    /**
+/**
      * 业务项目状态
      */
     private String status;
-
-    /**
+/**
      * 是否全国
      */
     private String country;
-
-    /**
+/**
      * 业务地区-省
      */
     private String province;
-
-    /**
+/**
      * 业务地区-市
      */
     private String city;
-
-    /**
+/**
      * 业务地区-区
      */
     private String district;
-
-    /**
+/**
      * 业务负责人ID
      */
     private String principalId;
-
-    /**
+/**
      * 价值及作用
      */
     private String valueEffect;
-
-    /**
+/**
      * 客户基本条件
      */
     private String clientSize;
-
-    /**
+/**
      * 业务项目图标35*35
      */
     private String minLogo;
-
-    /**
+/**
      * 业务项目图标200*200
      */
     private String maxLogo;
-
-    /**
+/**
      * 项目地址
      */
     private String projectUrl;
-
-    /**
+/**
      * 是否精品  0-否,1-是
      */
     private Integer boutique;
-
-    /**
+/**
      * 首付金额
      */
     private BigDecimal firstPayment;
-
-    /**
+/**
      * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
      */
     private Integer type;
-
-    /**
+/**
      * 专利转让 0否1是
      */
     private Integer patentTransfer;
-
-    /**
+/**
      * 限定 0否  1是
      */
     private Integer restrictStatus;
+/**
+     * 完成状态 0否 1国家级,2=省级,3=市级
+     */
+    private Integer lvlType;
 
-    private static final long serialVersionUID = 1L;
 
-    /**
-     * 业务项目ID
-     */
     public String getId() {
         return id;
     }
 
-    /**
-     * 业务项目ID
-     */
     public void setId(String id) {
         this.id = id;
     }
 
-    /**
-     * 创建人
-     */
     public String getCreateId() {
         return createId;
     }
 
-    /**
-     * 创建人
-     */
     public void setCreateId(String createId) {
         this.createId = createId;
     }
 
-    /**
-     * 创建时间
-     */
     public Date getCreateTime() {
         return createTime;
     }
 
-    /**
-     * 创建时间
-     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
-    /**
-     * 更新时间
-     */
     public Date getUpdateTime() {
         return updateTime;
     }
 
-    /**
-     * 更新时间
-     */
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
 
-    /**
-     * 删除标识
-     */
     public Integer getDeleteSign() {
         return deleteSign;
     }
 
-    /**
-     * 删除标识
-     */
     public void setDeleteSign(Integer deleteSign) {
         this.deleteSign = deleteSign;
     }
 
-    /**
-     * 业务名称
-     */
     public String getBname() {
         return bname;
     }
 
-    /**
-     * 业务名称
-     */
     public void setBname(String bname) {
         this.bname = bname;
     }
 
-    /**
-     * 业务分类
-     */
     public String getCid() {
         return cid;
     }
 
-    /**
-     * 业务分类
-     */
     public void setCid(String cid) {
         this.cid = cid;
     }
 
-    /**
-     * 市场价
-     */
     public BigDecimal getPrice() {
         return price;
     }
 
-    /**
-     * 市场价
-     */
     public void setPrice(BigDecimal price) {
         this.price = price;
     }
 
-    /**
-     * 最低折扣
-     */
     public BigDecimal getOffset() {
         return offset;
     }
 
-    /**
-     * 最低折扣
-     */
     public void setOffset(BigDecimal offset) {
         this.offset = offset;
     }
 
-    /**
-     * 活动价
-     */
     public BigDecimal getActivityPrice() {
         return activityPrice;
     }
 
-    /**
-     * 活动价
-     */
     public void setActivityPrice(BigDecimal activityPrice) {
         this.activityPrice = activityPrice;
     }
 
-    /**
-     * 活动价生效标识
-     */
     public String getActivityFlag() {
         return activityFlag;
     }
 
-    /**
-     * 活动价生效标识
-     */
     public void setActivityFlag(String activityFlag) {
         this.activityFlag = activityFlag;
     }
 
-    /**
-     * 会员价
-     */
     public BigDecimal getMemberPrice() {
         return memberPrice;
     }
 
-    /**
-     * 会员价
-     */
     public void setMemberPrice(BigDecimal memberPrice) {
         this.memberPrice = memberPrice;
     }
 
-    /**
-     * 业务项目介绍
-     */
     public String getIntroduce() {
         return introduce;
     }
 
-    /**
-     * 业务项目介绍
-     */
     public void setIntroduce(String introduce) {
         this.introduce = introduce;
     }
 
-    /**
-     * 业务项目状态
-     */
     public String getStatus() {
         return status;
     }
 
-    /**
-     * 业务项目状态
-     */
     public void setStatus(String status) {
         this.status = status;
     }
 
-    /**
-     * 是否全国
-     */
     public String getCountry() {
         return country;
     }
 
-    /**
-     * 是否全国
-     */
     public void setCountry(String country) {
         this.country = country;
     }
 
-    /**
-     * 业务地区-省
-     */
     public String getProvince() {
         return province;
     }
 
-    /**
-     * 业务地区-省
-     */
     public void setProvince(String province) {
         this.province = province;
     }
 
-    /**
-     * 业务地区-市
-     */
     public String getCity() {
         return city;
     }
 
-    /**
-     * 业务地区-市
-     */
     public void setCity(String city) {
         this.city = city;
     }
 
-    /**
-     * 业务地区-区
-     */
     public String getDistrict() {
         return district;
     }
 
-    /**
-     * 业务地区-区
-     */
     public void setDistrict(String district) {
         this.district = district;
     }
 
-    /**
-     * 业务负责人ID
-     */
     public String getPrincipalId() {
         return principalId;
     }
 
-    /**
-     * 业务负责人ID
-     */
     public void setPrincipalId(String principalId) {
         this.principalId = principalId;
     }
 
-    /**
-     * 价值及作用
-     */
     public String getValueEffect() {
         return valueEffect;
     }
 
-    /**
-     * 价值及作用
-     */
     public void setValueEffect(String valueEffect) {
         this.valueEffect = valueEffect;
     }
 
-    /**
-     * 客户基本条件
-     */
     public String getClientSize() {
         return clientSize;
     }
 
-    /**
-     * 客户基本条件
-     */
     public void setClientSize(String clientSize) {
         this.clientSize = clientSize;
     }
 
-    /**
-     * 业务项目图标35*35
-     */
     public String getMinLogo() {
         return minLogo;
     }
 
-    /**
-     * 业务项目图标35*35
-     */
     public void setMinLogo(String minLogo) {
         this.minLogo = minLogo;
     }
 
-    /**
-     * 业务项目图标200*200
-     */
     public String getMaxLogo() {
         return maxLogo;
     }
 
-    /**
-     * 业务项目图标200*200
-     */
     public void setMaxLogo(String maxLogo) {
         this.maxLogo = maxLogo;
     }
 
-    /**
-     * 项目地址
-     */
     public String getProjectUrl() {
         return projectUrl;
     }
 
-    /**
-     * 项目地址
-     */
     public void setProjectUrl(String projectUrl) {
         this.projectUrl = projectUrl;
     }
 
-    /**
-     * 是否精品  0-否,1-是
-     */
     public Integer getBoutique() {
         return boutique;
     }
 
-    /**
-     * 是否精品  0-否,1-是
-     */
     public void setBoutique(Integer boutique) {
         this.boutique = boutique;
     }
 
-    /**
-     * 首付金额
-     */
     public BigDecimal getFirstPayment() {
         return firstPayment;
     }
 
-    /**
-     * 首付金额
-     */
     public void setFirstPayment(BigDecimal firstPayment) {
         this.firstPayment = firstPayment;
     }
 
-    /**
-     * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
-     */
     public Integer getType() {
         return type;
     }
 
-    /**
-     * 0 正常 1专利 2软著 3审计 4双软 5高新 6商标 7会员
-     */
     public void setType(Integer type) {
         this.type = type;
     }
 
-    /**
-     * 专利转让 0否1是
-     */
     public Integer getPatentTransfer() {
         return patentTransfer;
     }
 
-    /**
-     * 专利转让 0否1是
-     */
     public void setPatentTransfer(Integer patentTransfer) {
         this.patentTransfer = patentTransfer;
     }
 
-    /**
-     * 限定 0否  1是
-     */
     public Integer getRestrictStatus() {
         return restrictStatus;
     }
 
-    /**
-     * 限定 0否  1是
-     */
     public void setRestrictStatus(Integer restrictStatus) {
         this.restrictStatus = restrictStatus;
     }
-}
+
+    public Integer getLvlType() {
+        return lvlType;
+    }
+
+    public void setLvlType(Integer lvlType) {
+        this.lvlType = lvlType;
+    }
+
+}
+

+ 69 - 262
src/main/java/com/goafanti/common/model/TOrderMid.java

@@ -4,713 +4,520 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
+
 /**
- * 订单中间表
- * @TableName t_order_mid
+ * 订单中间表(TOrderMid)实体类
+ *
+ * @author makejava
+ * @since 2024-09-06 14:24:11
  */
 public class TOrderMid implements Serializable {
+    private static final long serialVersionUID = -15370816738687916L;
     /**
      * id
      */
     private Integer id;
-
     /**
      * 订单编号
      */
     private String orderNo;
-
     /**
      * 营销员id
      */
     private String salesmanId;
-
     /**
      * 财务id
      */
     private String financeId;
-
     /**
      * 营销员名称
      */
     private String salesmanName;
-
     /**
      * 财务名称
      */
     private String financeName;
-
     /**
      * 最后一次收款
      */
     private BigDecimal finalReceivables;
-
     /**
      * 最后一次收款时间
      */
     private Date finalReceivablesTime;
-
     /**
      * 开票金额
      */
     private BigDecimal invoiceAmount;
-
     /**
      * 创建时间
      */
     private Date createTime;
-
     /**
      * 公司名称(冗余)
      */
     private String buyerName;
-
     /**
      * 应收款
      */
     private BigDecimal orderReceivables;
-
     /**
      * 欠款
      */
     private BigDecimal orderArrears;
-
     /**
      * 成本实付
      */
     private BigDecimal paymentAmount;
-
     /**
      * 成本金额
      */
     private BigDecimal costAmount;
-
     /**
      * 部门名称
      */
     private String depName;
-
     /**
      * 省份名称
      */
     private String provinceName;
-
     /**
      * 法务 0否 1是
      */
     private Integer legalAffairs;
-
     /**
      * 催款启动日期
      */
     private Date dunStartTime;
-
     /**
      * 法务状态 0法务催收中 1延期法务 2已完成法务
      */
     private Integer legalAffairsType;
-
     /**
      * 催款日期
      */
     private Date operationTime;
-
     /**
      * 法务状态 0否 1已回款 2已诉讼 3已坏账处理
      */
     private Integer legalAffairsStatus;
-
     /**
      * 会员 0否 1是
      */
     private Integer projectType;
-
     /**
      * 服务类型
      */
     private String serviceType;
-
     /**
      * 服务项目
      */
     private String serviceProject;
-
     /**
      * 专利成本
      */
     private BigDecimal patentCost;
-
     /**
      * 专利成本实付
      */
     private BigDecimal patentCostActual;
-
     /**
      * 软著成本
      */
     private BigDecimal softCost;
-
     /**
      * 软著成本实付
      */
     private BigDecimal softCostActual;
-
     /**
      * 审计成本
      */
     private BigDecimal auditCost;
-
     /**
      * 审计成本实付
      */
     private BigDecimal auditCostActual;
-
     /**
      * 其他成本
      */
     private BigDecimal otherCost;
-
     /**
      * 其他成本实付
      */
     private BigDecimal otherCostActual;
-
     /**
      * 预计毛利
      */
     private BigDecimal expectProfit;
-
     /**
      * 实际毛利
      */
     private BigDecimal actualProfit;
-
     /**
      * 暂停项目  0无 1有
      */
     private Integer stopProject;
-
     /**
      * 会员 0否 1是
      */
     private Integer bidType;
-
-    private static final long serialVersionUID = 1L;
-
     /**
-     * id
+     * 催款节点说明
+     */
+    private String dunNodeContent;
+    /**
+     * 变更数
+     */
+    private Integer changeCount;
+    /**
+     * 重报数
+     */
+    private Integer restatementCount;
+    /**
+     * 退单退款数
      */
+    private Integer refundCount;
+    /**
+     * 报销金额
+     */
+    private BigDecimal expenseAmount;
+
+
     public Integer getId() {
         return id;
     }
 
-    /**
-     * id
-     */
     public void setId(Integer id) {
         this.id = id;
     }
 
-    /**
-     * 订单编号
-     */
     public String getOrderNo() {
         return orderNo;
     }
 
-    /**
-     * 订单编号
-     */
     public void setOrderNo(String orderNo) {
         this.orderNo = orderNo;
     }
 
-    /**
-     * 营销员id
-     */
     public String getSalesmanId() {
         return salesmanId;
     }
 
-    /**
-     * 营销员id
-     */
     public void setSalesmanId(String salesmanId) {
         this.salesmanId = salesmanId;
     }
 
-    /**
-     * 财务id
-     */
     public String getFinanceId() {
         return financeId;
     }
 
-    /**
-     * 财务id
-     */
     public void setFinanceId(String financeId) {
         this.financeId = financeId;
     }
 
-    /**
-     * 营销员名称
-     */
     public String getSalesmanName() {
         return salesmanName;
     }
 
-    /**
-     * 营销员名称
-     */
     public void setSalesmanName(String salesmanName) {
         this.salesmanName = salesmanName;
     }
 
-    /**
-     * 财务名称
-     */
     public String getFinanceName() {
         return financeName;
     }
 
-    /**
-     * 财务名称
-     */
     public void setFinanceName(String financeName) {
         this.financeName = financeName;
     }
 
-    /**
-     * 最后一次收款
-     */
     public BigDecimal getFinalReceivables() {
         return finalReceivables;
     }
 
-    /**
-     * 最后一次收款
-     */
     public void setFinalReceivables(BigDecimal finalReceivables) {
         this.finalReceivables = finalReceivables;
     }
 
-    /**
-     * 最后一次收款时间
-     */
     public Date getFinalReceivablesTime() {
         return finalReceivablesTime;
     }
 
-    /**
-     * 最后一次收款时间
-     */
     public void setFinalReceivablesTime(Date finalReceivablesTime) {
         this.finalReceivablesTime = finalReceivablesTime;
     }
 
-    /**
-     * 开票金额
-     */
     public BigDecimal getInvoiceAmount() {
         return invoiceAmount;
     }
 
-    /**
-     * 开票金额
-     */
     public void setInvoiceAmount(BigDecimal invoiceAmount) {
         this.invoiceAmount = invoiceAmount;
     }
 
-    /**
-     * 创建时间
-     */
     public Date getCreateTime() {
         return createTime;
     }
 
-    /**
-     * 创建时间
-     */
     public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
 
-    /**
-     * 公司名称(冗余)
-     */
     public String getBuyerName() {
         return buyerName;
     }
 
-    /**
-     * 公司名称(冗余)
-     */
     public void setBuyerName(String buyerName) {
         this.buyerName = buyerName;
     }
 
-    /**
-     * 应收款
-     */
     public BigDecimal getOrderReceivables() {
         return orderReceivables;
     }
 
-    /**
-     * 应收款
-     */
     public void setOrderReceivables(BigDecimal orderReceivables) {
         this.orderReceivables = orderReceivables;
     }
 
-    /**
-     * 欠款
-     */
     public BigDecimal getOrderArrears() {
         return orderArrears;
     }
 
-    /**
-     * 欠款
-     */
     public void setOrderArrears(BigDecimal orderArrears) {
         this.orderArrears = orderArrears;
     }
 
-    /**
-     * 成本实付
-     */
     public BigDecimal getPaymentAmount() {
         return paymentAmount;
     }
 
-    /**
-     * 成本实付
-     */
     public void setPaymentAmount(BigDecimal paymentAmount) {
         this.paymentAmount = paymentAmount;
     }
 
-    /**
-     * 成本金额
-     */
     public BigDecimal getCostAmount() {
         return costAmount;
     }
 
-    /**
-     * 成本金额
-     */
     public void setCostAmount(BigDecimal costAmount) {
         this.costAmount = costAmount;
     }
 
-    /**
-     * 部门名称
-     */
     public String getDepName() {
         return depName;
     }
 
-    /**
-     * 部门名称
-     */
     public void setDepName(String depName) {
         this.depName = depName;
     }
 
-    /**
-     * 省份名称
-     */
     public String getProvinceName() {
         return provinceName;
     }
 
-    /**
-     * 省份名称
-     */
     public void setProvinceName(String provinceName) {
         this.provinceName = provinceName;
     }
 
-    /**
-     * 法务 0否 1是
-     */
     public Integer getLegalAffairs() {
         return legalAffairs;
     }
 
-    /**
-     * 法务 0否 1是
-     */
     public void setLegalAffairs(Integer legalAffairs) {
         this.legalAffairs = legalAffairs;
     }
 
-    /**
-     * 催款启动日期
-     */
     public Date getDunStartTime() {
         return dunStartTime;
     }
 
-    /**
-     * 催款启动日期
-     */
     public void setDunStartTime(Date dunStartTime) {
         this.dunStartTime = dunStartTime;
     }
 
-    /**
-     * 法务状态 0法务催收中 1延期法务 2已完成法务
-     */
     public Integer getLegalAffairsType() {
         return legalAffairsType;
     }
 
-    /**
-     * 法务状态 0法务催收中 1延期法务 2已完成法务
-     */
     public void setLegalAffairsType(Integer legalAffairsType) {
         this.legalAffairsType = legalAffairsType;
     }
 
-    /**
-     * 催款日期
-     */
     public Date getOperationTime() {
         return operationTime;
     }
 
-    /**
-     * 催款日期
-     */
     public void setOperationTime(Date operationTime) {
         this.operationTime = operationTime;
     }
 
-    /**
-     * 法务状态 0否 1已回款 2已诉讼 3已坏账处理
-     */
     public Integer getLegalAffairsStatus() {
         return legalAffairsStatus;
     }
 
-    /**
-     * 法务状态 0否 1已回款 2已诉讼 3已坏账处理
-     */
     public void setLegalAffairsStatus(Integer legalAffairsStatus) {
         this.legalAffairsStatus = legalAffairsStatus;
     }
 
-    /**
-     * 会员 0否 1是
-     */
     public Integer getProjectType() {
         return projectType;
     }
 
-    /**
-     * 会员 0否 1是
-     */
     public void setProjectType(Integer projectType) {
         this.projectType = projectType;
     }
 
-    /**
-     * 服务类型
-     */
     public String getServiceType() {
         return serviceType;
     }
 
-    /**
-     * 服务类型
-     */
     public void setServiceType(String serviceType) {
         this.serviceType = serviceType;
     }
 
-    /**
-     * 服务项目
-     */
     public String getServiceProject() {
         return serviceProject;
     }
 
-    /**
-     * 服务项目
-     */
     public void setServiceProject(String serviceProject) {
         this.serviceProject = serviceProject;
     }
 
-    /**
-     * 专利成本
-     */
     public BigDecimal getPatentCost() {
         return patentCost;
     }
 
-    /**
-     * 专利成本
-     */
     public void setPatentCost(BigDecimal patentCost) {
         this.patentCost = patentCost;
     }
 
-    /**
-     * 专利成本实付
-     */
     public BigDecimal getPatentCostActual() {
         return patentCostActual;
     }
 
-    /**
-     * 专利成本实付
-     */
     public void setPatentCostActual(BigDecimal patentCostActual) {
         this.patentCostActual = patentCostActual;
     }
 
-    /**
-     * 软著成本
-     */
     public BigDecimal getSoftCost() {
         return softCost;
     }
 
-    /**
-     * 软著成本
-     */
     public void setSoftCost(BigDecimal softCost) {
         this.softCost = softCost;
     }
 
-    /**
-     * 软著成本实付
-     */
     public BigDecimal getSoftCostActual() {
         return softCostActual;
     }
 
-    /**
-     * 软著成本实付
-     */
     public void setSoftCostActual(BigDecimal softCostActual) {
         this.softCostActual = softCostActual;
     }
 
-    /**
-     * 审计成本
-     */
     public BigDecimal getAuditCost() {
         return auditCost;
     }
 
-    /**
-     * 审计成本
-     */
     public void setAuditCost(BigDecimal auditCost) {
         this.auditCost = auditCost;
     }
 
-    /**
-     * 审计成本实付
-     */
     public BigDecimal getAuditCostActual() {
         return auditCostActual;
     }
 
-    /**
-     * 审计成本实付
-     */
     public void setAuditCostActual(BigDecimal auditCostActual) {
         this.auditCostActual = auditCostActual;
     }
 
-    /**
-     * 其他成本
-     */
     public BigDecimal getOtherCost() {
         return otherCost;
     }
 
-    /**
-     * 其他成本
-     */
     public void setOtherCost(BigDecimal otherCost) {
         this.otherCost = otherCost;
     }
 
-    /**
-     * 其他成本实付
-     */
     public BigDecimal getOtherCostActual() {
         return otherCostActual;
     }
 
-    /**
-     * 其他成本实付
-     */
     public void setOtherCostActual(BigDecimal otherCostActual) {
         this.otherCostActual = otherCostActual;
     }
 
-    /**
-     * 预计毛利
-     */
     public BigDecimal getExpectProfit() {
         return expectProfit;
     }
 
-    /**
-     * 预计毛利
-     */
     public void setExpectProfit(BigDecimal expectProfit) {
         this.expectProfit = expectProfit;
     }
 
-    /**
-     * 实际毛利
-     */
     public BigDecimal getActualProfit() {
         return actualProfit;
     }
 
-    /**
-     * 实际毛利
-     */
     public void setActualProfit(BigDecimal actualProfit) {
         this.actualProfit = actualProfit;
     }
 
-    /**
-     * 暂停项目  0无 1有
-     */
     public Integer getStopProject() {
         return stopProject;
     }
 
-    /**
-     * 暂停项目  0无 1有
-     */
     public void setStopProject(Integer stopProject) {
         this.stopProject = stopProject;
     }
 
-    /**
-     * 会员 0否 1是
-     */
     public Integer getBidType() {
         return bidType;
     }
 
-    /**
-     * 会员 0否 1是
-     */
     public void setBidType(Integer bidType) {
         this.bidType = bidType;
     }
-}
+
+    public String getDunNodeContent() {
+        return dunNodeContent;
+    }
+
+    public void setDunNodeContent(String dunNodeContent) {
+        this.dunNodeContent = dunNodeContent;
+    }
+
+    public Integer getChangeCount() {
+        return changeCount;
+    }
+
+    public void setChangeCount(Integer changeCount) {
+        this.changeCount = changeCount;
+    }
+
+    public Integer getRestatementCount() {
+        return restatementCount;
+    }
+
+    public void setRestatementCount(Integer restatementCount) {
+        this.restatementCount = restatementCount;
+    }
+
+    public Integer getRefundCount() {
+        return refundCount;
+    }
+
+    public void setRefundCount(Integer refundCount) {
+        this.refundCount = refundCount;
+    }
+
+    public BigDecimal getExpenseAmount() {
+        return expenseAmount;
+    }
+
+    public void setExpenseAmount(BigDecimal expenseAmount) {
+        this.expenseAmount = expenseAmount;
+    }
+
+}
+

File diff suppressed because it is too large
+ 33 - 67
src/main/java/com/goafanti/common/model/TOrderTask.java


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

@@ -402,6 +402,7 @@ public class OrderDunTask {
 				tArrearsDunMapper.updateByPrimaryKeySelective(td);
 			}
 			orderNewService.addTimingTaskNewDunNoticAndSendEmail( t,0);
+			orderNewService.pushOrderDunContent(orderNew);
 			try {
 				Thread.sleep(2000);
 			} catch (InterruptedException e) {

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

@@ -65,7 +65,7 @@ public class ReleaseUserTask {
 	 * 客户释放
 	 *
 	 */
-//	@Scheduled(cron = "0 23 9  * * ?")
+//	@Scheduled(cron = "0 10 17  * * ?")
 //	@RequestMapping("/open/test")
 	@Scheduled(cron = "0 0 1  * * ?")
 	public void startTask() {
@@ -232,29 +232,51 @@ public class ReleaseUserTask {
 		LoggerUtils.debug(getClass(), "==============客户释放开始============");
 		Date releaseTime = new Date();
 		try {
-			List<LockingReleaseBo> lockUserList = new ArrayList<LockingReleaseBo>();
+			List<LockingReleaseBo> lockUserList = new ArrayList<>();
+			List<LockingReleaseBo> users=new ArrayList<>();
 			if (userList != null && !userList.isEmpty()) {
 				for (User u : userList) {
 					System.out.println(u.getId());
 					if (StringUtils.isNotBlank(u.getId())&&!AFTConstants.CAOJIN_AID.equals(u.getId())) {
 						// 获取30天释放 释放以锁定表与user_mid最后跟进取时间
-
 						List<LockingReleaseBo>  userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
-						customerService.pushReleaseLog(userTmpList, 0);
+						customerService.pushReleaseLog(userTmpList);
 						addUserNotice(userTmpList);
-						if (userTmpList != null && !userTmpList.isEmpty())
+						if (!userTmpList.isEmpty()) {
 							lockUserList.addAll(userTmpList);
+						}
+						//获取需要释放的签单客户
+						List<LockingReleaseBo> users1 = userService.selectSignReleaseUser(u.getId());
+						customerService.pushReleaseLog(users1);
+						addUserNotice(users1);
+						if (!users1.isEmpty()){
+							users.addAll(users1);
+						}
+
 					}
 				}
 			}
 			List<LockingReleaseBo> newList = new ArrayList<LockingReleaseBo>();
-			if (lockUserList != null && !lockUserList.isEmpty()) {
+			//处理私有客户
+			if (!lockUserList.isEmpty()) {
 				for (int i = 0; i < lockUserList.size(); i++) {
 					newList.add(lockUserList.get(i));
 					if (pointsDataLimit == newList.size() || i == lockUserList.size() - 1) {
-						if (!newList.isEmpty()) {
-							customerService.updatePendingReleaseLock(newList);
-						}
+                        customerService.updatePendingReleaseLock(newList);
+                        newList.clear();
+						Thread.sleep(2000);
+					}
+
+				}
+			}
+
+			//新增客户丢失
+			if (!users.isEmpty()) {
+				List<LockingReleaseBo> releaseList = new ArrayList<>();
+				for (int i = 0; i < users.size(); i++) {
+					releaseList.add(users.get(i));
+					if (pointsDataLimit == releaseList.size() || i == users.size() - 1) {
+						userService.updateUserShareType(releaseList);
 						newList.clear();
 						Thread.sleep(2000);
 					}
@@ -278,6 +300,7 @@ public class ReleaseUserTask {
 
 
 
+
 	private void pushSalesmanCount(List<LockingReleaseBo> aidList) {
 		for (LockingReleaseBo e : aidList) {
 			String dates= e.getLockTime();

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

@@ -271,7 +271,7 @@ public class AsyncUtils {
 	 */
 	public void addProjectSotpNotic(Integer type,  Integer sotpType, String ids, TOrderTask task) {
 		Integer noticeType=0;
-		if (task==null)task = tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(ids.split(",")[0]));
+		if (task==null)task = tOrderTaskMapper.queryById(Integer.valueOf(ids.split(",")[0]));
 		TOrderNewBo tOrderNew = tOrderNewMapper.getOrderNewDetail(task.getOrderNo());
 		List<Notice> notes=new ArrayList<>();
 		StringBuffer emails=new StringBuffer();

+ 277 - 0
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -25,6 +25,8 @@ import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.net.URL;
 import java.net.URLConnection;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.text.DecimalFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -175,6 +177,223 @@ public class NewExcelUtil<T> {
 		this.downloadPath=uploadPath;
 		return exportExcel();
 	}
+
+	/**
+	 * 	将数据合并按订单合并并导出CXCEL表到指定目录
+	 * @param list 导出数据集合
+	 * @param sheetName 工作表的名称
+	 * @param uploadPath 导出本地地址
+	 */
+	public Result OrderMergeAndExportExcel(List<T> list, String sheetName, String uploadPath) {
+		this.init(list, sheetName);
+		this.downloadPath=uploadPath;
+		return OrderMergeAndExportExcel();
+	}
+
+	private Result OrderMergeAndExportExcel() {
+		OutputStream out = null;
+		String filename="";
+		try {
+			// 取出一共有多少个sheet.
+			int sheetNo =  (list.size() / sheetSize);
+			for (int index = 0; index <= sheetNo; index++) {
+				createSheet(sheetNo, index);
+				int line=0;
+				// 产生一行
+				Row title = sheet.createRow(line);
+				Cell cell = title.createCell(0);
+				cell.setCellValue(sheetName);
+				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
+				sheet.addMergedRegion(region);
+				cell.setCellStyle(styles.get("total"));
+				if (StringUtils.isNotEmpty(screen)){
+					log.debug(screen);
+					Row r = sheet.createRow(++line);
+					Cell c = r.createCell(0);
+					c.setCellValue(screen);
+					CellRangeAddress rg = new CellRangeAddress(line, line, 0, fields.size()-1);
+					sheet.addMergedRegion(rg);
+					c.setCellStyle(styles.get("header"));
+				}
+				Row row = sheet.createRow(++line);
+				// 产生一行
+				int column = 0;
+				// 写入各个字段的列头名称
+				for (Object[] os : fields) {
+					Excel excel = (Excel) os[1];
+					this.createCell(excel, row, column++);
+				}
+				filename = encodingFilename(sheetName);
+				out = Files.newOutputStream(Paths.get(getAbsoluteFile(filename)));
+				fillMergeExcelData(index,++line);
+				//新增合并
+//				mergeOrderNo();
+				addStatisticsRow();
+			}
+			wb.write(out);
+			return new Result().data(filename);
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new BusinessException("导出Excel失败,请联系网站管理员!");
+		} finally {
+			if (wb != null) {
+				try {
+					wb.close();
+				} catch (IOException e1) {
+					e1.printStackTrace();
+				}
+			}
+			if (out != null) {
+				try {
+					out.close();
+				} catch (IOException e1) {
+					e1.printStackTrace();
+				}
+			}
+		}
+	}
+
+	private void fillMergeExcelData(int index, Integer line) throws Exception {
+		int startNo = index * sheetSize;
+		int endNo = Math.min(startNo + sheetSize, list.size());
+		if(line==null)line=2;
+		for (int i = startNo; i < endNo; i++) {
+			int start=i + line - startNo;
+			Row row = sheet.createRow(start);
+			// 得到导出对象.
+			T vo = (T) list.get(i);
+
+			String orderNo = (String) getValue(vo, "orderNo");
+			int x = i+1;
+			int  count =0;
+			while (x<endNo){
+				T t1 = list.get(x);
+				String orderNo1 = (String) getValue(t1, "orderNo");
+				if (orderNo.equals(orderNo1)){
+					count++;
+					x++;
+				}else{
+					break;
+				}
+			}
+			if(count>0){
+				int column = 0;
+				for (Object[] os : fields) {
+					Field field = (Field) os[0];
+					Excel excel = (Excel) os[1];
+					// 设置实体类私有属性可访问
+					field.setAccessible(true);
+					if (column<35){
+						this.addOrderMegerCell(excel, row, vo, field, column);
+						CellRangeAddress region = new CellRangeAddress(start, start+count, column, column);
+						sheet.addMergedRegion(region);
+						Row row1 = sheet.getRow(start);
+						Cell cell1 = row1.getCell(column);
+						CellStyle style = styles.get("data4");
+						cell1.setCellStyle(style);
+						column++;
+					}else {
+						this.addOrderMegerCell(excel, row, vo, field, column++);
+					}
+				}
+				for (int j = 1; j <= count; j++) {
+					T vo3 = (T) list.get(i+j);
+					Row row3 = sheet.createRow(start+j);
+					int column3 = 0;
+					for (Object[] os : fields) {
+						Field field = (Field) os[0];
+						Excel excel = (Excel) os[1];
+						// 设置实体类私有属性可访问
+						field.setAccessible(true);
+						if (column3>34){
+							this.addOrderMegerCell(excel, row3, vo3, field, column3++);
+						}else {
+							column3++;
+						}
+
+					}
+				}
+				i=i+count;
+			}else {
+				int column = 0;
+				for (Object[] os : fields) {
+					Field field = (Field) os[0];
+					Excel excel = (Excel) os[1];
+					// 设置实体类私有属性可访问
+					field.setAccessible(true);
+					Cell cell = this.addCell(excel, row, vo, field, column++);
+					cell.setCellStyle(styles.get("data4"));
+				}
+			}
+		}
+	}
+
+	private void mergeOrderNo() throws Exception {
+		int max = list.size();
+		for (int i = 0; i < max; i++) {
+			T t = list.get(i);
+			String orderNo = (String) getValue(t, "orderNo");
+			int  count =0;
+			if (i!=max-1){
+				int x = i+1;
+				while (x<max){
+					T t1 = list.get(x);
+					String orderNo1 = (String) getValue(t1, "orderNo");
+					if (orderNo.equals(orderNo1)){
+						count++;
+						x++;
+					}else{
+						break;
+					}
+				}
+				if (count>0&&orderNo.equals("1015315879283802112")){
+					int rowNum = i+2;
+					int rowNum1 = x+1;
+					Row row = sheet.getRow(rowNum);
+					Row row1 = sheet.getRow(rowNum1);
+					System.out.println("orderNo="+orderNo+",count="+count+",rowNum="+rowNum+",rowNum1="+rowNum1);
+					int index=0;
+					for (Object[] e : fields) {
+						Field field = (Field) e[0];
+						Excel attr = (Excel) e[1];
+						// 设置实体类私有属性可访问
+						field.setAccessible(true);
+						Object value = getTargetValue(t, field, attr);
+						Cell cell = row.createCell(index);
+						String dateFormat = attr.dateFormat();
+						String readConverterExp = attr.readConverterExp();
+						String separator = attr.separator();
+						String enumsName = attr.enumsName();
+						String methodName="getValueByCode";
+						if (StringUtils.isNotBlank(enumsName)&& StringUtils.isNotNull(value)) {
+							Class<?> clazz=Class.forName(enumsName);
+							Method method=clazz.getDeclaredMethod(methodName,Integer.class);
+							Object s=method.invoke(clazz,value);
+							setCellVo(s.toString(), attr, cell);
+						}else if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) {
+							value=DateUtils.parseDateToStr(dateFormat, (Date) value);
+						} else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) {
+							value=convertByExp(toStr(value), readConverterExp, separator);
+						} else if (value instanceof BigDecimal && -1 != attr.scale()) {
+							value=(((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).stripTrailingZeros().toPlainString();
+						} else{
+							// 设置列类型
+							setCellVo(value, attr, cell);
+						}
+						if (value==null)value="";
+						cell.setCellValue(value.toString());
+						CellRangeAddress region = new CellRangeAddress(rowNum, rowNum1, index, index);
+						sheet.addMergedRegion(region);
+						index++;
+					}
+
+				}
+			}
+		}
+//		CellRangeAddress region = new CellRangeAddress(4, 5, 0, fields.size()-1);
+//		sheet.addMergedRegion(region);
+	}
+
 	/**
 	 * 	直接导出CXCEL表
 	 * @param list 导出数据集合
@@ -423,6 +642,22 @@ public class NewExcelUtil<T> {
 		style.setAlignment(HorizontalAlignment.RIGHT);
 		styles.put("data3", style);
 
+
+		style = wb.createCellStyle();
+		style.cloneStyleFrom(styles.get("data"));
+		style.setAlignment(HorizontalAlignment.CENTER);
+		style.setVerticalAlignment(VerticalAlignment.CENTER);
+		style.setBorderRight(BorderStyle.THIN);
+		style.setRightBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
+		style.setBorderLeft(BorderStyle.THIN);
+		style.setLeftBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
+		style.setBorderTop(BorderStyle.THIN);
+		style.setTopBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
+		style.setBorderBottom(BorderStyle.THIN);
+		style.setBottomBorderColor(IndexedColors.GREY_25_PERCENT.getIndex());
+		styles.put("data4", style);
+
+
 		return styles;
 	}
 
@@ -551,7 +786,49 @@ public class NewExcelUtil<T> {
 				cell = row.createCell(column);
 				int align = attr.align().value();
 				cell.setCellStyle(styles.get("data" + (align >= 1 && align <= 3 ? align : "")));
+				// 用于读取对象中的属性
+				Object value = getTargetValue(vo, field, attr);
+				String dateFormat = attr.dateFormat();
+				String readConverterExp = attr.readConverterExp();
+				String separator = attr.separator();
+				String enumsName = attr.enumsName();
+				String methodName="getValueByCode";
+				if (StringUtils.isNotBlank(enumsName)&& StringUtils.isNotNull(value)) {
+					Class<?> clazz=Class.forName(enumsName);
+					Object[] os=clazz.getEnumConstants();
+					Method method=clazz.getDeclaredMethod(methodName,Integer.class);
+					Object s=method.invoke(clazz,value);
+					setCellVo(s.toString(), attr, cell);
+				}else if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) {
+					cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value));
+				} else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) {
+					cell.setCellValue(convertByExp(toStr(value), readConverterExp, separator));
+				} else if (value instanceof BigDecimal && -1 != attr.scale()) {
+					cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).stripTrailingZeros().toPlainString());
+				} else{
+					// 设置列类型
+					setCellVo(value, attr, cell);
+				}
+				addStatisticsData(column, toStr(value), attr);
+			}
+		} catch (Exception e) {
+			log.error("导出Excel失败{}", e);
+		}
+		return cell;
+	}
+
 
+	public Cell addOrderMegerCell(Excel attr, Row row, T vo, Field field, int column) {
+		Cell cell = null;
+		try {
+			// 设置行高
+			row.setHeight(maxHeight);
+			// 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列.
+			if (attr.isExport()) {
+				// 创建cell
+				cell = row.createCell(column);
+				int align = attr.align().value();
+				cell.setCellStyle(styles.get("data4"));
 				// 用于读取对象中的属性
 				Object value = getTargetValue(vo, field, attr);
 				String dateFormat = attr.dateFormat();

+ 6 - 3
src/main/java/com/goafanti/customer/bo/LockingReleaseBo.java

@@ -5,7 +5,7 @@ public class LockingReleaseBo {
 	private String uid;
 	private String aid;
 	private String lockTime;
-	private String type;
+	private Integer type;
 	private String businessProjectId;
 	private String businessProjectName;
 	private String salesmanName;
@@ -98,12 +98,15 @@ public class LockingReleaseBo {
 	public void setLastSignTime(String lastSignTime) {
 		this.lastSignTime = lastSignTime;
 	}
-	public String getType() {
+
+	public Integer getType() {
 		return type;
 	}
-	public void setType(String type) {
+
+	public void setType(Integer type) {
 		this.type = type;
 	}
+
 	public Integer getMySign() {
 		return mySign;
 	}

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

@@ -507,10 +507,9 @@ public interface CustomerService {
 	/**
 	 *
 	 * @param list 释放客户
-	 * @param type 0 未跟进  1未签单
 	 * @throws InterruptedException
 	 */
-	void pushReleaseLog(List<LockingReleaseBo> list,Integer type) throws InterruptedException;
+	void pushReleaseLog(List<LockingReleaseBo> list) throws InterruptedException;
 	Object listChannelCustomer(InputListChannel in);
 	/**
 	 *
@@ -596,4 +595,6 @@ public interface CustomerService {
 	UserArchivesDetails selectUserByUid(String id);
 
 	Object getPublicReleaseList(String id);
+
+	void updateUserShareType(List<LockingReleaseBo> newList);
 }

+ 11 - 4
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -815,7 +815,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			userBusiness = new UserBusiness();
 			userFollowBusiness = new UserFollowBusiness();
 			ufbId = UUID.randomUUID().toString();
-			businessName = businessProjectMapper.selectByPrimaryKey(ub.getBusinessProjectId()).getBname();
+			businessName = businessProjectMapper.queryById(ub.getBusinessProjectId()).getBname();
 			UserBusiness us = userBusinessMapper.selectByPrimaryKey(ub.getBusinessId());
 			if (StringUtils.isNotBlank(ub.getBusinessId())) {
 				// 更新业务表
@@ -879,7 +879,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				userBusiness = new UserBusiness();
 				userFollowBusiness = new UserFollowBusiness();
 				ufbId = UUID.randomUUID().toString();
-				businessName = businessProjectMapper.selectByPrimaryKey(ub.getBusinessProjectId()).getBname();
+				businessName = businessProjectMapper.queryById(ub.getBusinessProjectId()).getBname();
 				UserBusiness us = userBusinessMapper.selectByPrimaryKey(ub.getBusinessId());
 				if (StringUtils.isNotBlank(ub.getBusinessId())) {
 					// 更新业务表
@@ -1085,7 +1085,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			UserFollowBusiness userFollowBusiness = null;
 			for (BusinessListBo ub : fbb.getUserBusinessList()) {
 				userFollowBusiness = new UserFollowBusiness();
-				businessName = businessProjectMapper.selectByPrimaryKey(ub.getBusinessProjectId()).getBname();
+				businessName = businessProjectMapper.queryById(ub.getBusinessProjectId()).getBname();
 				if (StringUtils.isNotBlank(ub.getUfbId())) {
 					userFollowBusiness.setId(ub.getUfbId());
 					userFollowBusiness.setFollowSituation(ub.getFollowSituation());
@@ -2579,17 +2579,19 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	@Override
-	public void pushReleaseLog(List<LockingReleaseBo> list, Integer type) throws InterruptedException {
+	public void pushReleaseLog(List<LockingReleaseBo> list) throws InterruptedException {
 		Date date = new Date();
 		List<LockingReleaseBo> newList = new ArrayList<LockingReleaseBo>();
 		List<UserTransferLog> list3 = new ArrayList<UserTransferLog>();
 		if (!list.isEmpty()) {
 			for (int i = 0; i < list.size(); i++) {
+
 				newList.add(list.get(i));
 				if (50 == newList.size() || i == list.size() - 1) {
 					if (!newList.isEmpty()) {
 						// 处理日志
 						for (LockingReleaseBo lrb : newList) {
+							int type = lrb.getType();
 							UserTransferLog utl = new UserTransferLog();
 							utl.setAid(lrb.getAid());
 							utl.setCreateTime(date);
@@ -3131,6 +3133,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return map;
     }
 
+	@Override
+	public void updateUserShareType(List<LockingReleaseBo> newList) {
+
+	}
+
 
 	private List<InputExcelUser> pushUserName(List<InputExcelUser> list) {
 		List<InputExcelUser> res=new ArrayList<>();

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

@@ -90,6 +90,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     private OrderYearMaxDurationMapper orderYearMaxDurationMapper;
     @Autowired
     private UserMapper userMapper;
+    @Autowired
+    private TOrderMidMapper tOrderMidMapper;
 
 
 
@@ -877,6 +879,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 updateSon.setId(e.getId());
                 updateSon.setStatus(2);
                 expenseAccountMapper.updateByPrimaryKeySelective(updateSon);
+                if (e.getOrderNo()!=null){
+                    tOrderMidMapper.updateOExpense(e.getOrderNo());
+                }
             }
         }else if (newEa.getStatus()==1){
             if (newEa.getProcessStatus()==EAProcessStatus.BMFZRSH.getCode()){

+ 445 - 0
src/main/java/com/goafanti/order/bo/InputOrderProject.java

@@ -0,0 +1,445 @@
+package com.goafanti.order.bo;
+
+public class InputOrderProject {
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+    /**
+     * 企业名称
+     */
+    private String userName;
+    /**
+     * 项目分类
+     */
+    private String businessCategory;
+    /**
+     * 项目名称
+     */
+    private String projectName;
+    /**
+     * 订单金额类型 1=10万以下,2=10-20万,3=20-30万,4=30-40万,5=40万以上
+     */
+    private Integer orderAmountType;
+    /**
+     * 订单部门
+     */
+    private String depId;
+    /**
+     * 负债部门
+     */
+    private String liabilitiesDepId;
+    /**
+     * 申报批次
+     */
+    private Integer declarationBatch;
+    /**
+     * 项目金额类型 1=1万以下,2=1-5万,3=5-10万,4=10-20万,5=20万以上
+     */
+    private Integer projectAmountType;
+    /**
+     * 项目状态
+     */
+    private Integer projectStatus;
+
+    /**
+     * 满意度 0非常满意 1满意 2一般 3不满意
+     */
+    private Integer satisfactionDegree;
+    /**
+     * 派单时间开始
+     */
+    private String startDate;
+    /**
+     * 派单时间结束
+     */
+    private String endDate;
+    /**
+     * 项目时间结束
+     */
+    private String projectStartDate;
+    /**
+     * 项目时间结束
+     */
+    private String projectEndDate;
+    /**
+     * 销售类型 0=电话新开发,1=电话自带资源,2=网络,3=渠道,4=转介绍,5=其他,6=高新复购,7=其他复购,8=私有/渠道
+     */
+    private Integer salesType;
+    /**
+     * 服务类型(订单类型)
+     */
+    private String serviceType;
+    /**
+     * 清算状态(结算状态) 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
+     */
+    private Integer liquidationStatus;
+    /**
+     * 催款节点筛选
+     */
+    private Integer dunType;
+    /**
+     * 签单时间结束
+     */
+    private String signStartDate;
+    /**
+     * 签单时间结束
+     */
+    private String signEndDate;
+    /**
+     * 省份
+     */
+    private Integer province;
+    /**
+     * 财务负责人
+     */
+    private String financeId;
+    /**
+     * 营销负责人
+     */
+    private String salesmanId;
+    /**
+     * 技术负责人
+     */
+    private String techId;
+    /**
+     * 是否特批 0否 1是
+     */
+    private Integer approval;
+    /**
+     * 是否会员 0否 1是
+     */
+    private Integer projectType;
+    /**
+     * 大客户 0=否,1=是
+     */
+    private Integer bigCustomer;
+    /**
+     * 重报  0否,1是
+     */
+    private Integer restatement;
+    /**
+     * 科技项目 0否 1是
+     */
+    private Integer orderType;
+    /**
+     * 变更  0否 1是
+     */
+    private Integer changeType;
+    /**
+     * 退单 0否 1是
+     */
+    private Integer refundType;
+    /**
+     * 项目完成时间开始
+     */
+    private String projectCompleteStartTime;
+    /**
+     * 项目完成时间结束
+     */
+    private String projectCompleteEndTime;
+
+    private Integer pageSize;
+    private Integer pageNo;
+
+    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 getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getBusinessCategory() {
+        return businessCategory;
+    }
+
+    public void setBusinessCategory(String businessCategory) {
+        this.businessCategory = businessCategory;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Integer getOrderAmountType() {
+        return orderAmountType;
+    }
+
+    public void setOrderAmountType(Integer orderAmountType) {
+        this.orderAmountType = orderAmountType;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getLiabilitiesDepId() {
+        return liabilitiesDepId;
+    }
+
+    public void setLiabilitiesDepId(String liabilitiesDepId) {
+        this.liabilitiesDepId = liabilitiesDepId;
+    }
+
+    public Integer getDeclarationBatch() {
+        return declarationBatch;
+    }
+
+    public void setDeclarationBatch(Integer declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+
+    public Integer getProjectAmountType() {
+        return projectAmountType;
+    }
+
+    public void setProjectAmountType(Integer projectAmountType) {
+        this.projectAmountType = projectAmountType;
+    }
+
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getProjectStartDate() {
+        return projectStartDate;
+    }
+
+    public void setProjectStartDate(String projectStartDate) {
+        this.projectStartDate = projectStartDate;
+    }
+
+    public String getProjectEndDate() {
+        return projectEndDate;
+    }
+
+    public void setProjectEndDate(String projectEndDate) {
+        this.projectEndDate = projectEndDate;
+    }
+
+    public Integer getSalesType() {
+        return salesType;
+    }
+
+    public void setSalesType(Integer salesType) {
+        this.salesType = salesType;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public Integer getLiquidationStatus() {
+        return liquidationStatus;
+    }
+
+    public void setLiquidationStatus(Integer liquidationStatus) {
+        this.liquidationStatus = liquidationStatus;
+    }
+
+    public Integer getDunType() {
+        return dunType;
+    }
+
+    public void setDunType(Integer dunType) {
+        this.dunType = dunType;
+    }
+
+    public String getSignStartDate() {
+        return signStartDate;
+    }
+
+    public void setSignStartDate(String signStartDate) {
+        this.signStartDate = signStartDate;
+    }
+
+    public String getSignEndDate() {
+        return signEndDate;
+    }
+
+    public void setSignEndDate(String signEndDate) {
+        this.signEndDate = signEndDate;
+    }
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public String getFinanceId() {
+        return financeId;
+    }
+
+    public void setFinanceId(String financeId) {
+        this.financeId = financeId;
+    }
+
+    public String getSalesmanId() {
+        return salesmanId;
+    }
+
+    public void setSalesmanId(String salesmanId) {
+        this.salesmanId = salesmanId;
+    }
+
+    public String getTechId() {
+        return techId;
+    }
+
+    public void setTechId(String techId) {
+        this.techId = techId;
+    }
+
+    public Integer getApproval() {
+        return approval;
+    }
+
+    public void setApproval(Integer approval) {
+        this.approval = approval;
+    }
+
+    public Integer getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Integer projectType) {
+        this.projectType = projectType;
+    }
+
+    public Integer getBigCustomer() {
+        return bigCustomer;
+    }
+
+    public void setBigCustomer(Integer bigCustomer) {
+        this.bigCustomer = bigCustomer;
+    }
+
+    public Integer getRestatement() {
+        return restatement;
+    }
+
+    public void setRestatement(Integer restatement) {
+        this.restatement = restatement;
+    }
+
+    public Integer getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(Integer orderType) {
+        this.orderType = orderType;
+    }
+
+    public Integer getChangeType() {
+        return changeType;
+    }
+
+    public void setChangeType(Integer changeType) {
+        this.changeType = changeType;
+    }
+
+    public Integer getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(Integer refundType) {
+        this.refundType = refundType;
+    }
+
+    public String getProjectCompleteStartTime() {
+        return projectCompleteStartTime;
+    }
+
+    public void setProjectCompleteStartTime(String projectCompleteStartTime) {
+        this.projectCompleteStartTime = projectCompleteStartTime;
+    }
+
+    public String getProjectCompleteEndTime() {
+        return projectCompleteEndTime;
+    }
+
+    public void setProjectCompleteEndTime(String projectCompleteEndTime) {
+        this.projectCompleteEndTime = projectCompleteEndTime;
+    }
+}

+ 683 - 0
src/main/java/com/goafanti/order/bo/OutOrderProject.java

@@ -0,0 +1,683 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+import java.math.BigDecimal;
+
+public class OutOrderProject {
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+
+    /**
+     * 销售类型 0=电话新开发,1=电话自带资源,2=网络,3=渠道,4=转介绍,5=其他,6=高新复购,7=其他复购,8=私有/渠道
+     */
+    @Excel(name = "销售类型",readConverterExp = "0=电话新开发,1=电话自带资源,2=网络,3=渠道,4=转介绍,5=其他,6=高新复购,7=其他复购,8=私有/渠道")
+    private Integer salesType;
+    /**
+     * 订单类型(服务类型)
+     */
+    @Excel(name = "订单类型")
+    private String serviceType;
+    /**
+     * 清算状态(结算状态) 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
+     */
+    @Excel(name = "结算状态",readConverterExp = "0=首付待付请,1=尾款待付清,2=已付请,3=部分退款,4=全部退款")
+    private Integer liquidationStatus;
+    /**
+     * 催款节点统计
+     */
+    @Excel(name = "催款节点")
+    private String dunNodeContent;
+    /**
+     * 是否会员
+     */
+    @Excel(name = "是否会员",readConverterExp = "0=否,1=是",width = 10)
+    private Integer projectType;
+    /**
+     * 大客户
+     */
+    @Excel(name = "大客户",readConverterExp = "0=否,1=是",width = 10)
+    private Integer bigCustomer;
+    /**
+     * 是否特批 0-非特批 ,1-负责人审核,2-负责人通过,3-负责人驳回 4董事长待审核 5董事长通过 6董事长驳回
+     */
+    @Excel(name = "是否特批",readConverterExp = "0=非特批,1=特批,2=特批,3=特批,4=特批,5=特批,6=特批",width = 10)
+    private String approval;
+    /**
+     * 签单时间
+     */
+    @Excel(name = "签单时间",width = 10)
+    private String signTime;
+    /**
+     * 派单时间
+     */
+    @Excel(name = "派单时间")
+    private String createTime;
+    /**
+     * 公司名称
+     */
+    @Excel(name = "公司名称")
+    private String buyerName;
+
+    /**
+     * 合同编号
+     */
+    @Excel(name = "合同编号")
+    private String contractNo;
+    /**
+     * 合同类型
+     */
+    @Excel(name = "合同类型")
+    private String htlx;
+    /**
+     * 省份
+     */
+    @Excel(name = "省份")
+    private String province;
+    /**
+     * 派单部门
+     */
+    @Excel(name = "派单部门")
+    private String depName;
+    /**
+     * 总金额
+     */
+    @Excel(name = "签单金额",scale = 6,width = 10)
+    private BigDecimal totalAmount;
+
+    /**
+     * 合同收款比例
+     */
+    @Excel(name = "合同收款比例",width = 10)
+    private String contractAmountProportion;
+
+    /**
+     * 应收款
+     */
+    @Excel(name = "应收款",scale = 6,width = 10)
+    private BigDecimal orderReceivables;
+
+    /**
+     * 已收款
+     */
+    @Excel(name = "已收款",scale = 6,width = 10)
+    private BigDecimal settlementAmount;
+
+    /**
+     * 欠款
+     */
+    @Excel(name = "欠款",scale = 6,width = 10)
+    private BigDecimal arrearsAmount;
+
+    /**
+     * 已报销
+     */
+    @Excel(name = "已报销",width = 10)
+    private BigDecimal expenseAmount;
+
+    /**
+     * 应公出
+     */
+    @Excel(name = "应公出")
+    private String shouldPublic;
+    /**
+     * 已公出
+     */
+    @Excel(name = "已公出")
+    private String alreadyPublic;
+    /**
+     * 超出
+     */
+    @Excel(name = "超出")
+    private String exceedPublic;
+
+    /**
+     * 成本金额
+     */
+    @Excel(name = "总成本",scale = 6,width = 10)
+    private BigDecimal costAmount;
+    /**
+     * 成本实付
+     */
+    @Excel(name = "实付成本",scale = 6,width = 10)
+    private BigDecimal paymentAmount;
+    /**
+     * 开票金额
+     */
+    @Excel(name = "已开票金额",scale = 6,width = 10)
+    private BigDecimal invicueAmount;
+    /**
+     * 退款金额
+     */
+    @Excel(name = "退款金额",scale = 6,width = 10)
+    private BigDecimal refundAmount;
+    /**
+     * 财务负责人
+     */
+    @Excel(name = "财务负责人")
+    private String financeName;
+    /**
+     * 营销负责人
+     */
+    @Excel(name = "营销负责人")
+    private String salesmanName;
+    /**
+     * 核算比例
+     */
+    @Excel(name = "核算比例")
+    private String hsbl;
+    /**
+     * 订单情况 ,readConverterExp = "0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项,5=已驳回,6=已退单"
+     */
+    @Excel(name = "订单情况")
+    private String orderStatus;
+    /**
+     * 变更情况
+     */
+    @Excel(name = "变更情况")
+    private String changeType;
+    /**
+     * 退单退款
+     */
+    @Excel(name = "退单退款")
+    private String refundType;
+    /**
+     * 是否重报
+     */
+    @Excel(name = "是否重报")
+    private String restatementType;
+    /**
+     * 是否科技项目(订单类型) 0认证项目 1科技项目 2 两化融化管理体系认证项目
+     */
+    @Excel(name = "是否科技项目")
+    private String sortType;
+
+    /**
+     * 层级类型 0=否,1=国家级,2=省级,3=市级
+     */
+    private Integer lvlType;
+    /**
+     * 项目名称
+     */
+    @Excel(name = "项目名称")
+    private String commodityName;
+    /**
+     * 本次年份
+     */
+    @Excel(name = "本次年份")
+    private String serviceYear;
+    /**
+     * 服务年限
+     */
+    @Excel(name = "服务年限")
+    private String serviceLife;
+    /**
+     * 服务年份
+     */
+    @Excel(name = "服务年份")
+    private Integer yearSum;
+    /**
+     * 项目转入时间
+     */
+    @Excel(name = "项目转入时间")
+    private String taskDistributionTime;
+
+    /**
+     * 项目数
+     */
+    @Excel(name = "项目数")
+    private String commodityQuantity;
+    /**
+     * 项目成本
+     */
+    @Excel(name = "项目成本")
+    private String projectCostAmount;
+    /**
+     * 项目状态
+     */
+    @Excel(name = "项目状态")
+    private String projectStatus;
+    /**
+     * 项目启动时间
+     */
+    @Excel(name = "项目启动时间")
+    private String taskStartTime;
+    /**
+     * 项目完成时间
+     */
+    @Excel(name = "项目完成时间")
+    private String taskEndTime;
+    /**
+     * 技术组
+     */
+    @Excel(name = "技术组")
+    private String jsz;
+    /**
+     * 项目负责人
+     */
+    @Excel(name = "项目负责人")
+    private String receiverName;
+    /**
+     * 满意度
+     */
+    @Excel(name = "满意度",readConverterExp = "0=非常满意,1=满意,2=一般,3=不满意")
+    private Integer satisfactionDegree;
+    /**
+     * 项目备注
+     */
+    @Excel(name = "项目备注")
+    private String taskComment;
+
+    public Integer getLvlType() {
+        return lvlType;
+    }
+
+    public void setLvlType(Integer lvlType) {
+        this.lvlType = lvlType;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Integer getSalesType() {
+        return salesType;
+    }
+
+    public void setSalesType(Integer salesType) {
+        this.salesType = salesType;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public Integer getLiquidationStatus() {
+        return liquidationStatus;
+    }
+
+    public void setLiquidationStatus(Integer liquidationStatus) {
+        this.liquidationStatus = liquidationStatus;
+    }
+
+    public String getDunNodeContent() {
+        return dunNodeContent;
+    }
+
+    public void setDunNodeContent(String dunNodeContent) {
+        this.dunNodeContent = dunNodeContent;
+    }
+
+    public Integer getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Integer projectType) {
+        this.projectType = projectType;
+    }
+
+    public Integer getBigCustomer() {
+        return bigCustomer;
+    }
+
+    public void setBigCustomer(Integer bigCustomer) {
+        this.bigCustomer = bigCustomer;
+    }
+
+    public String getApproval() {
+        return approval;
+    }
+
+    public void setApproval(String approval) {
+        this.approval = approval;
+    }
+
+    public String getSignTime() {
+        return signTime;
+    }
+
+    public void setSignTime(String signTime) {
+        this.signTime = signTime;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getHtlx() {
+        return htlx;
+    }
+
+    public void setHtlx(String htlx) {
+        this.htlx = htlx;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public String getContractAmountProportion() {
+        return contractAmountProportion;
+    }
+
+    public void setContractAmountProportion(String contractAmountProportion) {
+        this.contractAmountProportion = contractAmountProportion;
+    }
+
+    public BigDecimal getOrderReceivables() {
+        return orderReceivables;
+    }
+
+    public void setOrderReceivables(BigDecimal orderReceivables) {
+        this.orderReceivables = orderReceivables;
+    }
+
+    public BigDecimal getSettlementAmount() {
+        return settlementAmount;
+    }
+
+    public void setSettlementAmount(BigDecimal settlementAmount) {
+        this.settlementAmount = settlementAmount;
+    }
+
+    public BigDecimal getArrearsAmount() {
+        return arrearsAmount;
+    }
+
+    public void setArrearsAmount(BigDecimal arrearsAmount) {
+        this.arrearsAmount = arrearsAmount;
+    }
+
+    public BigDecimal getExpenseAmount() {
+        return expenseAmount;
+    }
+
+    public void setExpenseAmount(BigDecimal expenseAmount) {
+        this.expenseAmount = expenseAmount;
+    }
+
+    public String getShouldPublic() {
+        return shouldPublic;
+    }
+
+    public void setShouldPublic(String shouldPublic) {
+        this.shouldPublic = shouldPublic;
+    }
+
+    public String getAlreadyPublic() {
+        return alreadyPublic;
+    }
+
+    public void setAlreadyPublic(String alreadyPublic) {
+        this.alreadyPublic = alreadyPublic;
+    }
+
+    public String getExceedPublic() {
+        return exceedPublic;
+    }
+
+    public void setExceedPublic(String exceedPublic) {
+        this.exceedPublic = exceedPublic;
+    }
+
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+
+    public BigDecimal getPaymentAmount() {
+        return paymentAmount;
+    }
+
+    public void setPaymentAmount(BigDecimal paymentAmount) {
+        this.paymentAmount = paymentAmount;
+    }
+
+    public BigDecimal getInvicueAmount() {
+        return invicueAmount;
+    }
+
+    public void setInvicueAmount(BigDecimal invicueAmount) {
+        this.invicueAmount = invicueAmount;
+    }
+
+    public BigDecimal getRefundAmount() {
+        return refundAmount;
+    }
+
+    public void setRefundAmount(BigDecimal refundAmount) {
+        this.refundAmount = refundAmount;
+    }
+
+    public String getFinanceName() {
+        return financeName;
+    }
+
+    public void setFinanceName(String financeName) {
+        this.financeName = financeName;
+    }
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getCommodityName() {
+        return commodityName;
+    }
+
+    public void setCommodityName(String commodityName) {
+        this.commodityName = commodityName;
+    }
+
+    public String getServiceYear() {
+        return serviceYear;
+    }
+
+    public void setServiceYear(String serviceYear) {
+        this.serviceYear = serviceYear;
+    }
+
+    public String getServiceLife() {
+        return serviceLife;
+    }
+
+    public void setServiceLife(String serviceLife) {
+        this.serviceLife = serviceLife;
+    }
+
+    public Integer getYearSum() {
+        return yearSum;
+    }
+
+    public void setYearSum(Integer yearSum) {
+        this.yearSum = yearSum;
+    }
+
+    public String getTaskDistributionTime() {
+        return taskDistributionTime;
+    }
+
+    public void setTaskDistributionTime(String taskDistributionTime) {
+        this.taskDistributionTime = taskDistributionTime;
+    }
+
+
+    public String getSortType() {
+        return sortType;
+    }
+
+    public void setSortType(String sortType) {
+        this.sortType = sortType;
+    }
+
+    public String getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    public void setCommodityQuantity(String commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    public String getProjectCostAmount() {
+        return projectCostAmount;
+    }
+
+    public void setProjectCostAmount(String projectCostAmount) {
+        this.projectCostAmount = projectCostAmount;
+    }
+
+    public String getProjectStatus() {
+        return projectStatus;
+    }
+
+    public void setProjectStatus(String projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+
+    public String getTaskStartTime() {
+        return taskStartTime;
+    }
+
+    public void setTaskStartTime(String taskStartTime) {
+        this.taskStartTime = taskStartTime;
+    }
+
+    public String getTaskEndTime() {
+        return taskEndTime;
+    }
+
+    public void setTaskEndTime(String taskEndTime) {
+        this.taskEndTime = taskEndTime;
+    }
+
+    public String getJsz() {
+        return jsz;
+    }
+
+    public void setJsz(String jsz) {
+        this.jsz = jsz;
+    }
+
+    public String getReceiverName() {
+        return receiverName;
+    }
+
+    public void setReceiverName(String receiverName) {
+        this.receiverName = receiverName;
+    }
+
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    public String getTaskComment() {
+        return taskComment;
+    }
+
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+
+    public String getHsbl() {
+        return hsbl;
+    }
+
+    public void setHsbl(String hsbl) {
+        this.hsbl = hsbl;
+    }
+
+    public String getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(String orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    public String getRestatementType() {
+        return restatementType;
+    }
+
+    public void setRestatementType(String restatementType) {
+        this.restatementType = restatementType;
+    }
+
+    public String getChangeType() {
+        return changeType;
+    }
+
+    public void setChangeType(String changeType) {
+        this.changeType = changeType;
+    }
+
+    public String getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(String refundType) {
+        this.refundType = refundType;
+    }
+}

+ 30 - 0
src/main/java/com/goafanti/order/controller/StatisticsApiController.java

@@ -5,6 +5,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.utils.excel.NewExcelUtil;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.bo.outStatistics.OutOrderSalesSourceAmount;
@@ -183,4 +184,33 @@ public class StatisticsApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 订单项目数据统计
+	 * @param in
+	 * @return
+	 */
+	@RequestMapping(value="/orderProject", method = RequestMethod.GET)
+	public Result<Pagination<OutOrderProject>> orderProject(InputOrderProject in ){
+		Result res=new Result();
+		res.data(userStaticticsService.orderProject(in));
+		return res;
+	}
+
+
+	/**
+	 * 订单项目数据统计导出
+	 */
+	@RequestMapping(value = "/orderProject/export",method = RequestMethod.GET)
+	public Result orderProjectExport(InputOrderProject in){
+		in.setPageSize(999999);
+		in.setPageNo(1);
+		Pagination<OutOrderProject> p = userStaticticsService.orderProject(in);
+		List<OutOrderProject> list = (List<OutOrderProject>) p.getList();
+		NewExcelUtil<OutOrderProject> excelUtil=new NewExcelUtil<>(OutOrderProject.class);
+		return excelUtil.OrderMergeAndExportExcel(list,"订单项目数据统计表",uploadPath);
+	}
+
+
+
+
 }

+ 3 - 0
src/main/java/com/goafanti/order/enums/NewOrderDunType.java

@@ -3,6 +3,9 @@ package com.goafanti.order.enums;
 import java.util.HashMap;
 import java.util.Map;
 
+/**
+ * 催款节点对应数据
+ */
 public enum NewOrderDunType {
 	CGZH_ZDY(10,"成果转化-"),
 	CGZH_SQ(11,"成果转化-首期"),

+ 1 - 0
src/main/java/com/goafanti/order/enums/NewProjectStatus.java

@@ -5,6 +5,7 @@ import java.util.Map;
 
 
 /**
+ * 项目状态 枚举
  * 	高新
  *	0未启动 1进行中 2暂停(客户通知暂停)3暂停(业务线通知暂停)4已提交 5未推荐 6已推荐 7未公示 8已公示 9已备案 10已下证
  *	11退单(已申报)12退单(未申报)28抽查未备案

+ 6 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -235,4 +235,10 @@ public interface OrderNewService {
 	List<TOrderNew> selectGetAll();
 
     Object addOperationGuaranteeAudit(String orderNo, Integer type, String reason);
+
+    void pushDunNodeContent();
+
+	void pushOrderDunContent(TOrderNew e);
+
+	String pushOrderGetDunContent(TOrderNew e);
 }

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

@@ -149,4 +149,6 @@ public interface OrderProjectService {
     Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
 
 	Object dispatchTaskLog(Integer id);
+
+    void pushProjectCompleteDate();
 }

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

@@ -16,4 +16,6 @@ public interface UserStaticticsService {
     Pagination<TOrderNewBo> signStatisticsOrderList(InputSignStatistics in);
 
     List<OutSignStatistics> signStatisticsGetList(InputSignStatistics in);
+
+    Pagination<OutOrderProject> orderProject(InputOrderProject in);
 }

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

@@ -20,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.text.ParseException;
 import java.util.*;
 
 @Service

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

@@ -99,6 +99,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 
 
 
+
 	@Override
 	public int addOrderChange(NewOrderChangeBo t,String startRemarks) {
 		TOrderNew ton=new TOrderNew();
@@ -168,7 +169,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			}
 			tChangeTaskMapper.insertSelectiveList(listck);
 		}
-
+	//处理中间表数据
+		tOrderMidMapper.updateMid(t.getOrderNo());
 	return 1;
 	}
 
@@ -693,11 +695,14 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			TOrderMid tm=new TOrderMid();
 			tm.setOrderNo(nb.getOrderNo());
 			tm.setProjectType(1);
+			tm.setDunNodeContent(orderNewService.pushOrderGetDunContent(t1));
 			tOrderMidMapper.updateByOrderNo(tm);
 		}
+
 		tOrderNewMapper.updateByPrimaryKeySelective(orderNew);
 	}
 
+
 	@Override
 	public boolean checkOderNo(String orderNo) {
 		int i=newOrderChangeMapper.checkOderNo(orderNo);
@@ -1201,7 +1206,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				if (ot.getSplitSuper()!=null)ot.setSplitId(pushSplitId(ot.getSplitSuper()));
 				if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
 				if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
-				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+				tOrderTaskMapper.update(ot);
 				if (cd.getServiceLife()!=null){
 					updateTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum(),cd.getContractTerm());
 				}
@@ -1209,7 +1214,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 					updateTaskMid(ot.getId(),cd.getLastYear(),cd.getLastYearCapital(),cd.getLastYearIncome());
 				}
 			}else if(cd.getType()==3) {
-				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
+				tOrderTaskMapper.deleteById(cd.getTid());
 			}
 		}
 		return map;
@@ -1416,7 +1421,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				if(t.getTid()!=null) {
 					//type 0正常 1新增 2修改 3删除
 					TChangeTask tt=tChangeTaskMapper.selectByPrimaryKey(t.getId());
-					BusinessProject bp = businessProjectMapper.selectByPrimaryKey(tt.getCommodityId());
+					BusinessProject bp = businessProjectMapper.queryById(tt.getCommodityId());
 					Integer member=null;
 					if (t.getType()==3) {
 

+ 62 - 6
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -242,7 +242,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		addTTaskMember(t);
 		addTaskMid(t);
 		//如果是会员添加同性质不同项目
-		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
+		BusinessProject bp=businessProjectMapper.queryById(t.getCommodityId());
 		if (bp.getType()==ProjectType.HY.getCode()){
 			InputAddTask t2=new InputAddTask();
 			BeanUtils.copyProperties(t,t2);
@@ -325,7 +325,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tm.setTid(t.getId());
 		//判断这个项目是不是高新复审
 		int highNewRetrial=0;
-		BusinessProject b=businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
+		BusinessProject b=businessProjectMapper.queryById(t.getCommodityId());
 		if (b.getType()==5){
 			int i=tOrderTaskMapper.getHighNewRetrial(t.getOrderNo());
 			if (i>0) {
@@ -384,7 +384,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public int updateOrderTask(InputAddTask t) {
-		TOrderTask use=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		TOrderTask use=tOrderTaskMapper.queryById(t.getId());
 		boolean flag=false;
 		if(use.getCheckStatus()==1) {
 			t.setCheckStatus(2);
@@ -426,7 +426,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 			projcetCheckLogMapper.insertSelective(log);
 		}
-		int  i=tOrderTaskMapper.updateByPrimaryKeySelective(t);
+		int  i=tOrderTaskMapper.update(t);
 		if (t.getServiceLife()!=null||t.getServiceYear()!=null||t.getYearSum()!=null||t.getContractTerm()!=null){
 			TTaskMember ttm=new TTaskMember();
 			ttm.setTid(t.getId());
@@ -461,7 +461,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		//连带催款一起删除
 		newOrderDunMapper.deleteByTid(id);
 		tOrderTaskMapper.deleteBySplitId(id);
-		return tOrderTaskMapper.deleteByPrimaryKey(id);
+		return tOrderTaskMapper.deleteById(id);
 	}
 
 	@Override
@@ -648,6 +648,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 		}
 		tOrderNewMapper.updateByPrimaryKeySelective(t);
+		pushOrderDunContent(t2);
 		//计算公出统计
 		pushOrderPublicReleaseCount(t2);
 		updateAdminUserCountOrder(t2.getSalesmanId(),t2.getCreateTime());
@@ -875,7 +876,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 
-	/**
+
+
+    /**
 	 * 处理订单公出&报销最大公出
 	 */
 	private BigDecimal pushMaxDuration(BigDecimal totalAmount) {
@@ -2506,6 +2509,59 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return names;
 	}
 
+	@Override
+	public void pushDunNodeContent() {
+		List<TOrderNew> tOrderNews = tOrderNewMapper.selectgetAll();
+		for (TOrderNew e : tOrderNews) {
+			pushOrderDunContent(e);
+		}
+//		TOrderNew tOrderNew = tOrderNewMapper.selectByPrimaryKey("412255829035991040");
+//		pushOrderDunContent(tOrderNew);
+	}
+
+	@Override
+	public void pushOrderDunContent(TOrderNew e) {
+		String valueByCode = pushOrderGetDunContent(e);
+		if (StringUtils.isNotBlank(valueByCode)){
+			TOrderMid mid=new TOrderMid();
+			mid.setOrderNo(e.getOrderNo());
+			mid.setDunNodeContent(valueByCode);
+			tOrderMidMapper.updateByOrderNo(mid);
+		}
+	}
+
+	@Override
+	public String pushOrderGetDunContent(TOrderNew e) {
+		List<OutNewOrderDunBo> dunBoList = newOrderDunMapper.selectListNewOrderDun(e.getOrderNo(), null);
+		StringBuilder valueByCode= new StringBuilder();
+		for (OutNewOrderDunBo bo : dunBoList) {
+			String str =""+bo.getProjectType()+bo.getDunType();
+			valueByCode.append(NewOrderDunType.getValueByCode(Integer.valueOf(str)));
+			if (bo.getDunType().equals(0)){
+				valueByCode.append(bo.getCustomizeName());
+				if(StringUtils.isNotBlank(bo.getCustomizeTimes())){
+					valueByCode.append(" ").append(bo.getCustomizeTimes());
+				}
+			}else if (bo.getProjectType().equals(5)||bo.getProjectType().equals(6)){
+				if (bo.getDunType().equals(2)){
+					valueByCode.append(" ").append(bo.getStartDate());
+				}
 
+			}
+			if (bo.getAppropriationRatio()!=null){
+				valueByCode.append(" ").append(bo.getAppropriationRatio().multiply(new BigDecimal(100)).stripTrailingZeros().toPlainString()).append("%");
+			}else {
+				valueByCode.append(" ").append(bo.getMoney().stripTrailingZeros().toPlainString());
+			}
+			if (bo.getStatus()==0){
+				valueByCode.append(" 未启动");
+			}else if (bo.getStatus()==1){
+				valueByCode.append(" 已启动");
+			}
+			valueByCode.append(",");
+		}
+		if (valueByCode.length()>0)valueByCode.deleteCharAt(valueByCode.length()-1);
+		return valueByCode.toString();
+	}
 
 }

+ 107 - 42
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1,6 +1,8 @@
 package com.goafanti.order.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.goafanti.admin.service.DepartmentService;
 import com.goafanti.business.bo.InputRestrictProject;
 import com.goafanti.common.bo.Error;
@@ -148,7 +150,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	@Transactional
 	public int updateProjectDistribution(Integer taskId, String taskReceiverId,String remarks,Integer type) {
-		TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(taskId);
+		TOrderTask t=tOrderTaskMapper.queryById(taskId);
 		TOrderNew tn=checkDeleteSign(t.getOrderNo());
 		Date date=new Date();
 		t.setTaskStatus(TaskState.DISTRIBUTION.getCode());
@@ -172,7 +174,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			//处理客户已派项目
 			projectDistributionPushUserMid(tn);
 			//处理限定项目状态
-			BusinessProject businessProject = businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
+			BusinessProject businessProject = businessProjectMapper.queryById(t.getCommodityId());
 			if (businessProject.getRestrictStatus()==1){
 				RestrictProject use = restrictProjectMapper.selectByParam(new InputRestrictProject(tn.getBuyerId(), null, t.getCommodityId()));
 				if (use!=null){
@@ -214,7 +216,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			t.setManagerId(taskReceiverId);
 		}
 		t.setReceiverName(a.getName());
-		tOrderTaskMapper.updateByPrimaryKey(t);
+		tOrderTaskMapper.update(t);
 		List<String> aids = new ArrayList<>();
 		aids.add(taskReceiverId);
 		TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t.getOrderNo());
@@ -266,7 +268,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	}
 
 	private void projectDistributionPushUserMid(TOrderNew tn) {
-		if (tn.getProcessStatus()==ProcessStatus.YPZXSGLY.getCode()){
+		if (Objects.equals(tn.getProcessStatus(), ProcessStatus.YPZXSGLY.getCode())){
 			UserMid um=new UserMid();
 			String taskNames=userMidMapper.getUserTaskNames(tn.getBuyerId());
 			UserMid use=userMidMapper.getUserDtails(tn.getBuyerId());
@@ -277,7 +279,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				um.setLastSalesType(tn.getSalesType());
 			}
 			BigDecimal signAmount;
-			Integer signNumber;
+			int signNumber;
 			if (use!=null){
 				if (use.getFirstSigningTime() != null) {
 					um.setFirstSigningTime(use.getFirstSigningTime()); }
@@ -305,9 +307,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	/**
 	 * 	推动客户、业务渠道的锁定
-	 * @param t
-	 * @param tn
-	 * @param date
 	 */
 	private void pushUser(TOrderTask t, TOrderNew tn, Date date) {
 		if (userMapper.checkLock(tn.getBuyerId())<1) {
@@ -423,7 +422,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (i==taskBos.size()) {
 			processStatus=ProcessStatus.YQBFPZXSGLY.getCode();
 		}else if(i>0&&i<taskBos.size()){
-			processStatus=ProcessStatus.YBFPZXSGLY.getCode();;
+			processStatus=ProcessStatus.YBFPZXSGLY.getCode();
 		}else if(i==0){
 			processStatus=ProcessStatus.YPZXSGLY.getCode();
 		}
@@ -442,10 +441,9 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		tTaskLogMapper.insertSelective(tl);
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<TOrderTaskListBo> orderTaskList(inuptTaskListBo ib) {
-		Map<String, Object> params = new HashMap<String, Object>();
+		Map<String, Object> params = new HashMap<>();
 		if(ib.getPageSize()==null||ib.getPageSize()<0)ib.setPageSize(10);
 		if(ib.getPageNo()==null||ib.getPageNo()<0)ib.setPageNo(1);
 		params.put("outsource", ib.getOutsource()==null?0:ib.getOutsource());
@@ -515,7 +513,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		t.setTimeRecord(JSON.toJSONString(map));
 		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)
 				||TokenManager.hasRole(AFTConstants.CUSTOMER_SERVICE)
-					||TokenManager.getAdminId().equals(t.getTaskReceiver())) {
+					|| Objects.equals(TokenManager.getAdminId(), t.getTaskReceiver())) {
 			return t;
 		}else {
 			t.setContacts("***");
@@ -605,7 +603,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(task);
+		tOrderTaskMapper.update(task);
 		//项目中间表修改
 		if (t.getUrgentDay()!=null||t.getIfMaterial()!=null||t.getRejectCount()!=null||
 				t.getAcceptCount()!=null||t.getAuthorizeCount()!=null||t.getSpotCheckStatus()!=null) {
@@ -639,17 +637,20 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		t.setId(b.getTid());
 		t.setProjectStatus(b.getProjectStatus());
 		t.setTimeRecord(b.getTimeRecord());
+		updateProjectCompleteDate(t,1);
 		t.setCertificateNumber(b.getCertificateNumber());
 		if(b.getSetUpAmount()!=null)t.setSetUpAmount(new BigDecimal(b.getSetUpAmount()));
 		if (b.getPubicityUrl()!=null)t.setPubicityUrl(b.getPubicityUrl());
-		TOrderTask task2=tOrderTaskMapper.selectByPrimaryKey(b.getTid());//查询出项目信息
-		if(b.getProjectStatus()!=task2.getProjectStatus()||!b.getTimeRecord().equals(task2.getTimeRecord())){
+		TOrderTask task2=tOrderTaskMapper.queryById(b.getTid());//查询出项目信息
+		if(!Objects.equals(b.getProjectStatus(), task2.getProjectStatus())
+				||!b.getTimeRecord().equals(task2.getTimeRecord())){
 				TTaskMid taskMid = new TTaskMid();
 				taskMid.setTid(b.getTid());
-			if(b.getProjectStatus()==NewProjectStatus.YLX.getCode()||b.getProjectStatus()==NewProjectStatus.YNGS.getCode()){
+			if(Objects.equals(b.getProjectStatus(), NewProjectStatus.YLX.getCode())
+					|| Objects.equals(b.getProjectStatus(), NewProjectStatus.YNGS.getCode())){
 				t.setSetUpStatus(1);
 				taskMid.setSetUpCount(task2.getCommodityQuantity());
-				if (b.getProjectStatus()==NewProjectStatus.YNGS.getCode()){
+				if (Objects.equals(b.getProjectStatus(), NewProjectStatus.YNGS.getCode())){
 					t.setIfPublicity(1);
 					taskMid.setPromulgateCount(task2.getCommodityQuantity());
 				}
@@ -671,7 +672,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			}
 			//做计时处理
 			pushTaskTimes(t);
-			tOrderTaskMapper.updateByPrimaryKeySelective(t);
+			tOrderTaskMapper.update(t);
 			projectSplitPush(b.getTid(), b.getProjectStatus(),task2);
 			pushTaskLog(b.getTid(), b.getProjectStatus());
 			updateMidServiceProject(task2.getOrderNo());
@@ -749,8 +750,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			TOrderTask fatherTask=new TOrderTask();
 			fatherTask.setId(task2.getSplitSuper());
 			fatherTask.setProjectStatus(i);
-			tOrderTaskMapper.updateByPrimaryKeySelective(fatherTask);
-			TOrderTask task3=tOrderTaskMapper.selectByPrimaryKey(task2.getSplitSuper());
+			tOrderTaskMapper.update(fatherTask);
+			TOrderTask task3=tOrderTaskMapper.queryById(task2.getSplitSuper());
 			//设置父任务
 			TOrderTaskDetailBo t2=new TOrderTaskDetailBo();
 			t2.setOrderNo(task2.getOrderNo());
@@ -763,8 +764,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			TOrderTask task3 =tOrderTaskMapper.selectBySuperId(task2.getSuperId());
 			task3.setId(Integer.valueOf(task2.getSuperId()));
 			task3.setSuperId(null);
-			tOrderTaskMapper.updateByPrimaryKeySelective(task3);
-			TOrderTask task4 = tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(task2.getSuperId()));
+			tOrderTaskMapper.update(task3);
+			TOrderTask task4 = tOrderTaskMapper.queryById(Integer.valueOf(task2.getSuperId()));
 			meanwhileUpdateOrder(task4);
 		}else {
 			meanwhileUpdateOrder(task2);
@@ -802,7 +803,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 					if(ob.getDunType()==3&&projectStatus==NewProjectStatus.YWCXZ.getCode()) {
 						flag=true;
 					}else if (ob.getDunType()==2) {
-						BusinessProject bp=businessProjectMapper.selectByPrimaryKey(task2.getCommodityId());
+						BusinessProject bp=businessProjectMapper.queryById(task2.getCommodityId());
 						if (bp.getType()==0&&projectStatus==NewProjectStatus.YWCXZ.getCode()) {
 							flag=true;
 						}
@@ -869,7 +870,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 					if(op.getDunType()==3&&projectStatus==NewProjectStatus.YWCXZ.getCode()) {
 						flag=true;
 					}else if (op.getDunType()==2) {
-						BusinessProject bp=businessProjectMapper.selectByPrimaryKey(task2.getCommodityId());
+						BusinessProject bp=businessProjectMapper.queryById(task2.getCommodityId());
 						if (bp.getType()==0&&projectStatus==NewProjectStatus.YWCXZ.getCode()) {
 							flag=true;
 						}
@@ -973,7 +974,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int addTaskHours(TTaskHours t) {
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(t.getTaskId()));
+		TOrderTask tt=tOrderTaskMapper.queryById(Integer.valueOf(t.getTaskId()));
 		checkDeleteSign(tt.getOrderNo());
 		t.setAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		t.setId(UUID.randomUUID().toString());
@@ -1054,7 +1055,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int createTaskProgress(TaskProgressBo t) {
 		TaskProgress tp=new TaskProgress();
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTaskId());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTaskId());
 		int count =taskProgressMapper.AlreadyNuberCount(t.getTaskId());
 		count +=t.getAlreadyNumber();
 		if(tt.getCommodityQuantity()<count)throw new BusinessException(new Error( "数量不能大于总量!" ,"数量不能大于总量!"));
@@ -1079,7 +1080,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int updateTaskProgress(TaskProgressBo t) {
 		TaskProgress tp=taskProgressMapper.selectByPrimaryKey(t.getId());
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTaskId());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTaskId());
 		int count =taskProgressMapper.AlreadyNuberCount(t.getTaskId());
 		count = count-tp.getAlreadyNumber()+t.getAlreadyNumber();
 		if(tt.getCommodityQuantity()<count)throw new BusinessException(new Error( "数量不能大于总量!" ,"数量不能大于总量!"));
@@ -1141,7 +1142,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int pushSplitProject(Integer tid, String splitList) {
 			String[] str=splitList.split(",");
-			TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(tid);
+			TOrderTask task=tOrderTaskMapper.queryById(tid);
 			checkDeleteSign(task.getOrderNo());
 			TOrderTask usedTask=new TOrderTask();
 			usedTask.setId(tid);
@@ -1154,7 +1155,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			if (!task.getCommodityQuantity().equals(x)||str.length==1) {
 				return -1;
 			}
-			tOrderTaskMapper.updateByPrimaryKeySelective(usedTask);
+			tOrderTaskMapper.update(usedTask);
 			int i=1;
 			TOrderTask newTask=task;
 			newTask.setCommodityPrice(new BigDecimal(0));
@@ -1254,7 +1255,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		projcetCheckLogMapper.insertSelective(log);
 		tOrderPaymentMapper.deleteByParam(tid,2);
-		return tOrderTaskMapper.updateByPrimaryKeySelective(t);
+		return tOrderTaskMapper.update(t);
 	}
 
 
@@ -1406,7 +1407,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	 */
 	@Override
 	public int pushExamineMemberProject(InputMenber in) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(in.getId());
+		TOrderTask task=tOrderTaskMapper.queryById(in.getId());
 		String aid=TokenManager.getAdminId();
 		Integer status=1;
 		boolean appFlag=false;
@@ -1502,7 +1503,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (nt.getProcessStatus()!=null&&nt.getProcessStatus()==3){
 			tTaskMemberMapper.updateServiceYearBySplitSuper(task.getSplitSuper());
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+		tOrderTaskMapper.update(nt);
 		if (flag){
 			addNoticMember(notice, ono, in.getType(),result);
 		}
@@ -1540,7 +1541,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int updateMemberProject(InputAddTask t) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		TOrderTask task=tOrderTaskMapper.queryById(t.getId());
 		if(task.getProcessStatus()!=4)throw  new BusinessException("审核状态错误,无法提交。");
 		addMemberLog(t.getId(),0,"修改重新发起",TokenManager.getAdminId());
 		t.setProcessStatus(1);
@@ -1572,11 +1573,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public TOrderTask addMemberSonProject(Integer tid, String serviceYear, String taskComment,Integer memberType,String pictureUrl) {
 		Date date =new Date();
-		TOrderTask tOrderTask =  tOrderTaskMapper.selectByPrimaryKey(tid);
+		TOrderTask tOrderTask =  tOrderTaskMapper.queryById(tid);
 		tOrderTask.setSplitStatus(1);
 		tOrderTask.setSplitAid(TokenManager.getAdminId());
 		tOrderTask.setSplitTime(date);
-		tOrderTaskMapper.updateByPrimaryKey(tOrderTask);
+		tOrderTaskMapper.update(tOrderTask);
 		tOrderTask.setId(null);
 		tOrderTask.setSplitStatus(2);
 		tOrderTask.setSplitSuper(tid);
@@ -1657,7 +1658,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		tOrderTask.setId(t.getId());
 
-		tOrderTaskMapper.updateByPrimaryKeySelective(tOrderTask);
+		tOrderTaskMapper.update(tOrderTask);
 		tOrderExamineMapper.insertBatch(list);
 	}
 
@@ -1807,15 +1808,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int deleteMemberSonProject(Integer id) {
-		TOrderTask task = tOrderTaskMapper.selectByPrimaryKey(id);
-		tOrderTaskMapper.deleteByPrimaryKey(id);
+		TOrderTask task = tOrderTaskMapper.queryById(id);
+		tOrderTaskMapper.deleteById(id);
 		List<TOrderTaskListBo> tOrderTaskListBos = tOrderTaskMapper.splitProjectList(task.getSplitSuper(),null);
 		//如果没有子项目则修改上级
 		if (tOrderTaskListBos==null||tOrderTaskListBos.isEmpty()){
 			TOrderTask tOrderTask=new TOrderTask();
 			tOrderTask.setId(task.getSplitSuper());
 			tOrderTask.setSplitStatus(0);
-			tOrderTaskMapper.updateByPrimaryKeySelective(tOrderTask);
+			tOrderTaskMapper.update(tOrderTask);
 		}
 		tTaskMidMapper.deleteByPrimaryKey(id);
 		tTaskMemberMapper.deleteByPrimaryKey(id);
@@ -1974,7 +1975,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		TaskStop use = taskStopMapper.selectByPrimaryKey(in.getTaskStopId());
 		TaskStop t=new TaskStop();
 		t.setId(use.getId());
-		TOrderTask task = tOrderTaskMapper.selectByPrimaryKey(use.getTid());
+		TOrderTask task = tOrderTaskMapper.queryById(use.getTid());
 		if (in.getStatus()==1){
 			t.setStatus(1);
 			StringBuffer str =new StringBuffer();
@@ -1999,7 +2000,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			task2.setId(task.getId());
 			task2.setProjectStatus(task.getProjectStatus());
 
-			tOrderTaskMapper.updateByPrimaryKeySelective(task2);
+			tOrderTaskMapper.update(task2);
 			tOrderMidMapper.updateStopProjectByOrderNo(task.getOrderNo());
 			if (task.getSplitStatus()==1){
 				TOrderTask tot=new TOrderTask();
@@ -2055,7 +2056,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}else if (formRetrieve==4){
 			in.setSatisfactionDegreeUrl(satisfactionDegreeUrl);
 		}
-		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
+		return tOrderTaskMapper.update(in);
 	}
 
 	@Override
@@ -2063,4 +2064,68 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tTaskLogMapper.selectByTid(id);
 	}
 
+	@Override
+	public void pushProjectCompleteDate() {
+		List<TOrderTask> tOrderTasks = tOrderTaskMapper.selectAll();
+		for (TOrderTask e : tOrderTasks) {
+			 updateProjectCompleteDate(e,0);
+		}
+	}
+
+	/**
+	 *
+	 * @param e
+	 * @param type =0 是批量处理会修改  =1是修改属性,外部一起修改
+	 */
+	private void  updateProjectCompleteDate(TOrderTask e ,Integer type) {
+		if (StringUtils.isNotEmpty(e.getTimeRecord())) {
+			ObjectMapper mapper = new ObjectMapper();
+			try {
+				Map map = mapper.readValue(e.getTimeRecord(), Map.class);
+
+				String[] str={"4","5","6","7","8","9","10","11","13","14","15","16","17","18","19","20","27"};
+				String date = null;
+				boolean flag = false;
+				for (String s : str) {
+					if (StringUtils.isEmpty(date)){
+						String s1 = pushStr(s, map);
+						if (s1!=null)date=s1;
+					}
+					for (String string : str) {
+                        if (string.equals(s)) {
+                            flag = true;
+                            break;
+                        }
+					}
+
+				}
+				//如果是完成则修改成完成
+				if(flag){
+					if (type==1){
+						e.setCompleteStatus(1);
+						e.setCompleteDate(DateUtils.parseDate(date));
+					}else {
+						TOrderTask t=new TOrderTask();
+						t.setId(e.getId());
+						t.setCompleteStatus(1);
+						t.setCompleteDate(DateUtils.parseDate(date));
+						tOrderTaskMapper.update(t);
+					}
+				}
+			} catch (JsonProcessingException ex) {
+				throw new RuntimeException(ex);
+			}
+		}
+
+	}
+
+	private String pushStr(String s,Map map) {
+		String date=null;
+		Map map2 = (Map) map.get(s);
+		if (map2!=null){
+			date = (String) map2.get("date");
+		}
+		return date;
+	}
+
 }

+ 12 - 17
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -1,30 +1,25 @@
 package com.goafanti.order.service.impl;
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
-import com.goafanti.common.model.*;
-import com.goafanti.order.bo.*;
-import com.goafanti.organization.bo.ProjectTypePuls;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.OrderLogProcess;
+import com.goafanti.common.model.*;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.*;
 import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderService;
 import com.goafanti.order.service.OutsourceOrgService;
+import com.goafanti.organization.bo.ProjectTypePuls;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.*;
 
 @Service
 public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapper> implements OutsourceOrgService {
@@ -138,7 +133,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 			}
 			tOrderNewMapper.updateByPrimaryKeySelective(t);
 		}else if (o.getType()==1) {//项目外包
-			TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(o.getTid());
+			TOrderTask tt=tOrderTaskMapper.queryById(o.getTid());
 			aids.add(tt.getTaskReceiver());
 			Admin a =adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 			OutsourceLog ol=new OutsourceLog();
@@ -151,7 +146,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 				TOrderTask tt2=new TOrderTask();
 				tt2.setId(o.getTid());
 				tt2.setOutsource(1);
-				tOrderTaskMapper.updateByPrimaryKeySelective(tt2);
+				tOrderTaskMapper.update(tt2);
 				type=NoticeStatus.PROJECT_OUTSOURCE_YES.getCode();
 				ol.setStatus(1);
 				addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBTG.getCode(),o.getRemarks());
@@ -221,7 +216,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 		}else {
 			tt.setCheckStatus(2);
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(tt);
+		tOrderTaskMapper.update(tt);
 		OutsourceLog ol=new OutsourceLog();
 		ol.setTid(tto.getTid());
 		ol.setAid(TokenManager.getAdminId());

+ 124 - 2
src/main/java/com/goafanti/order/service/impl/UserStatisticsServiceImpl.java

@@ -1,17 +1,25 @@
 package com.goafanti.order.service.impl;
 
 import com.goafanti.admin.service.DepartmentService;
+import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.UserMidMapper;
+import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
+import com.goafanti.order.enums.NewProjectStatus;
 import com.goafanti.order.service.UserStaticticsService;
 import groovy.util.logging.Log4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.*;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Service
 @Log4j
@@ -19,6 +27,8 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 
 	@Autowired
 	private DepartmentService departmentService;
+	@Autowired
+	private TOrderTaskMapper tOrderTaskMapper;
 
 	@Override
 	public Pagination<OutSignSummary> signSummary(InputSignSummary in) {
@@ -67,7 +77,9 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 	}
 
 
-	private void addsignStatisticsParam(InputSignStatistics in, Map<String, Object> map) {
+
+
+    private void addsignStatisticsParam(InputSignStatistics in, Map<String, Object> map) {
 		if (in.getDeps()!=null){
 			map.put("deps",departmentService.parseArray(in.getDeps()));
 		}
@@ -85,4 +97,114 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 		addsignStatisticsParam(in, map);
 		return (Pagination<TOrderNewBo>) findPage("selectsignStatisticsOrderList","selectsignStatisticsOrderCount",map,in.getPageNo(),in.getPageSize());
 	}
+
+	@Override
+	public Pagination<OutOrderProject> orderProject(InputOrderProject in) {
+		Map<String, Object> map =new HashMap<>();
+		if (in.getEndDate()!=null)in.setEndDate(in.getEndDate()+" 23:59:59");
+		if (in.getProjectEndDate()!=null)in.setProjectEndDate(in.getProjectEndDate()+" 23:59:59");
+		if (in.getSignEndDate()!=null)in.setSignEndDate(in.getSignEndDate()+" 23:59:59");
+		if (in.getProjectCompleteEndTime()!=null)in.setProjectCompleteEndTime(in.getProjectCompleteEndTime()+" 23:59:59");
+		pushOrderProjectParam(in, map);
+		Pagination<OutOrderProject> page = (Pagination<OutOrderProject>) findPage("selectStatisticsOrderProjectList", "selectStatisticsOrderProjectCount", map, in.getPageNo(), in.getPageSize());
+		List<OutOrderProject> outOrderProject = (List<OutOrderProject>) page.getList();
+		for (OutOrderProject e : outOrderProject) {
+			//计算比例 数据原型修改返回
+			BigDecimal orderReceivables=BigDecimal.ZERO;
+			if (e.getOrderReceivables()!=null)orderReceivables=e.getOrderReceivables();
+			if (orderReceivables.compareTo(BigDecimal.ZERO)!=0){
+				BigDecimal settlementAmount=BigDecimal.ZERO;
+				if (e.getSettlementAmount()!=null)settlementAmount=e.getSettlementAmount();
+				BigDecimal divide = settlementAmount.divide(orderReceivables, 2, RoundingMode.HALF_UP);
+				BigDecimal multiply = divide.multiply(new BigDecimal(100));
+				e.setContractAmountProportion(multiply+"%");
+			}else {
+				e.setContractAmountProportion("100%");
+			}
+			if (e.getRefundType()!=null&&e.getRefundType().equals("1")){
+				e.setRefundType("是");
+			}else {
+				e.setRefundType("否");
+			}
+			if (e.getRestatementType()!=null&&e.getRestatementType().equals("1")){
+				e.setRestatementType("是");
+			}else {
+				e.setRestatementType("否");
+			}
+			if (e.getSortType()!=null&&e.getSortType().equals("3")){
+				StringBuilder sb = new StringBuilder();
+				sb.append("是");
+				if (e.getLvlType()==1)sb.append(",国家级");
+				if (e.getLvlType()==2)sb.append(",省级");
+				if (e.getLvlType()==3)sb.append(",市级");
+				e.setSortType(sb.toString());
+			}else {
+				e.setSortType("否");
+			}
+			if (e.getProjectStatus()!=null){
+				String valueByCode = NewProjectStatus.getValueByCode(Integer.valueOf(e.getProjectStatus()));
+				e.setProjectStatus(valueByCode);
+			}
+			if(e.getSettlementAmount()!=null){
+				if (e.getOrderReceivables().compareTo(BigDecimal.ZERO)==0){
+					e.setArrearsAmount(BigDecimal.ZERO);
+				}else {
+					e.setArrearsAmount(e.getOrderReceivables().subtract(e.getSettlementAmount()));
+				}
+			}
+			if(e.getChangeType().equals("0")){
+				e.setChangeType("无");
+			}else {
+				e.setChangeType("更新"+e.getChangeType()+"次");
+			}
+			if (e.getOrderStatus()!=null){
+				//0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项,5=已驳回,6=已退单
+				switch(e.getOrderStatus())
+					{
+					case "0":
+						e.setOrderStatus("待签单");
+						break;
+					case "1":
+						e.setOrderStatus("签单待审核");
+						break;
+					case "2":
+						e.setOrderStatus("签单审核通过");
+						break;
+					case "3":
+						e.setOrderStatus("签单审核拒绝");
+						break;
+					case "4":
+						e.setOrderStatus("已结项");
+						break;
+					case "5":
+						e.setOrderStatus("已驳回");
+						break;
+					case "6":
+						e.setOrderStatus("已退单");
+						break;
+					default:
+						e.setOrderStatus("未知");
+				}
+			}
+
+		}
+		return page;
+	}
+
+	private void pushOrderProjectParam(InputOrderProject in, Map<String, Object> map) {
+		Class<InputOrderProject> clazz= (Class<InputOrderProject>) in.getClass();
+		Field[] declaredFields = clazz.getDeclaredFields();
+		for (Field field : declaredFields) {
+			field.setAccessible(true);
+
+            try {
+				String fieldName = field.getName();
+                Object fieldValue =field.get(in);
+				map.put(fieldName,fieldValue);
+            } catch (IllegalAccessException e) {
+
+                throw new BusinessException("");
+            }
+        }
+	}
 }

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

@@ -466,19 +466,19 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		}
 		//
 		checkFinaceUpdate(aids);
-		if (in.getExpenseRetrialFinanceExamine()==1){
+		if (in.getExpenseRetrialFinanceExamine()!=null){
 			dep.setExpenseRetrialFinanceExamine(in.getExpenseRetrialFinanceExamine());
 		}
-		if (in.getCeoExamine()==1){
+		if (in.getCeoExamine()!=null){
 			dep.setCeoExamine(in.getCeoExamine());
 		}
-		if (in.getCfoExamine()==1){
+		if (in.getCfoExamine()!=null){
 			 dep.setCfoExamine(in.getCfoExamine());
 		}
-		if (in.getViceCeoExamine()==1){
+		if (in.getViceCeoExamine()!=null){
 			dep.setViceCeoExamine(in.getViceCeoExamine());
 		}
-		if (in.getCashierExamine()==1){
+		if (in.getCashierExamine()!=null){
 			dep.setCashierExamine(in.getCashierExamine());
 		}
 	}

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

@@ -317,7 +317,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			TOrderTask t=new TOrderTask();
 			t.setId(p.getTid());
 			t.setCheckStatus(3);
-			tOrderTaskMapper.updateByPrimaryKeySelective(t);
+			tOrderTaskMapper.update(t);
 		}
 		tOrderPaymentMapper.insertSelectiveGetId(p);
 		NoticeInformationBo ni=financialPaymentMapper.selectBypidGetNotice(p.getId());
@@ -574,7 +574,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		//没有填写申请金额的情况下计算金额
 				checkGetAmount(p);
 		if (p.getChooseType()==2) {
-			TOrderTask tot=tOrderTaskMapper.selectByPrimaryKey(p.getTid());
+			TOrderTask tot=tOrderTaskMapper.queryById(p.getTid());
 			List<outOrderPayment> list2=tOrderPaymentMapper.selectByTid(p.getTid(),p.getChooseType(),1);
 			int x=p.getQuantity();
 			for (outOrderPayment out : list2) {
@@ -960,7 +960,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	@Override
 	public boolean addCompanyChekeNumber(ThirdPartyCompany t) {
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTid());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTid());
 		 List<OutThirdPartyCompany> list =thirdPartyCompanyMapper.selectByTid(t.getTid());
 		 Integer count=t.getQuantity();
 		 for (OutThirdPartyCompany out : list) {
@@ -1094,7 +1094,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	@Override
 	public boolean checkQuantity(TOrderPayment p) {
 		TOrderPayment tp=tOrderPaymentMapper.selectByPrimaryKey(p.getId());
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(tp.getTid());
+		TOrderTask tt=tOrderTaskMapper.queryById(tp.getTid());
 		List<outOrderPayment> list =tOrderPaymentMapper.selectByTid(tt.getId(), 2,1);
 		Integer q=0;
 		for (outOrderPayment o : list) {
@@ -1192,7 +1192,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	 * @param id =tid 项目编号
 	 */
 	private void updateCountByTid(Integer id) {
-		TOrderTask t = tOrderTaskMapper.selectByPrimaryKey(id);
+		TOrderTask t = tOrderTaskMapper.queryById(id);
 		tOrderMidMapper.updateCostAmount(t.getOrderNo());
 	}
 

+ 12 - 40
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -1,47 +1,15 @@
 package com.goafanti.patent.service.impl;
 
 
-import java.io.UnsupportedEncodingException;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
+import cn.jiguang.common.utils.StringUtils;
 import com.goafanti.admin.service.DepartmentService;
-import com.mysql.jdbc.log.Log;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.PatentNewLogMapper;
-import com.goafanti.common.dao.PatentNewMapper;
-import com.goafanti.common.dao.PatentPaymentDetailsMapper;
-import com.goafanti.common.dao.PatentYearPaymentMapper;
-import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.Notice;
-import com.goafanti.common.model.PatentNew;
-import com.goafanti.common.model.PatentNewLog;
-import com.goafanti.common.model.PatentPaymentDetails;
-import com.goafanti.common.model.PatentYearPayment;
-import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.*;
 import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExcelUtils;
@@ -53,10 +21,14 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.patent.bo.PatentNewBo;
 import com.goafanti.patent.enums.PatentType;
 import com.goafanti.patent.service.PatentNewService;
+import org.apache.poi.ss.usermodel.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
-import cn.jiguang.common.utils.StringUtils;
-
-import javax.mail.MessagingException;
+import java.math.BigDecimal;
+import java.util.*;
 
 @Service
 public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> implements PatentNewService {
@@ -558,7 +530,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 				if (tid==null){
 					return p.getPatentAmount();
 				}else{
-					TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(tid);
+					TOrderTask t=tOrderTaskMapper.queryById(tid);
 					if (t!=null&&t.getCostReduction()!=null&& t.getCostReduction()==1) {
 						return p.getReductionAmount();
 					}else {
@@ -716,7 +688,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 
 	@Override
 	public boolean checkTid(Integer tid) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(tid);
+		TOrderTask task=tOrderTaskMapper.queryById(tid);
 		if (task==null) {
 			return true;
 		}

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

@@ -22,8 +22,18 @@ public class InputListOrderUserService {
 //	合同签订时间
 	private String startSignTimes;
 	private String endSignTimes;
+	private String contractNo;
 	private Integer pageSize;
 	private Integer pageNo;
+
+	public String getContractNo() {
+		return contractNo;
+	}
+
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+
 	public String getUserName() {
 		return userName;
 	}

+ 14 - 13
src/main/java/com/goafanti/user/service/UserService.java

@@ -1,21 +1,15 @@
 package com.goafanti.user.service;
 
-import java.util.List;
-import java.util.Map;
-
 import com.goafanti.app.bo.UserBasicInfo;
 import com.goafanti.common.bo.OutUser;
 import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.user.bo.OrgListBo;
-import com.goafanti.user.bo.OrgUnitNames;
-import com.goafanti.user.bo.StarAndExpertListBo;
-import com.goafanti.user.bo.StarListBo;
-import com.goafanti.user.bo.UserDownLoadBo;
-import com.goafanti.user.bo.UserNames;
-import com.goafanti.user.bo.UserPageHomeBo;
-import com.goafanti.user.bo.UserPartnerDetailBo;
+import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.user.bo.*;
+
+import java.util.List;
+import java.util.Map;
 
 public interface UserService {
 
@@ -78,6 +72,13 @@ public interface UserService {
 	void pushReleaseUserChannel(List<userDaysBo> newCList, Integer type);
 
 	List<OutUser> getuser();
-	
-	
+
+
+	/**
+	 * 将签单客户释放,但是不释放业务锁
+	 * @param newList
+	 */
+    void updateUserShareType(List<LockingReleaseBo> newList);
+
+	List<LockingReleaseBo> selectSignReleaseUser(String id);
 }

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

@@ -1,28 +1,10 @@
 package com.goafanti.user.service.impl;
 
-import java.text.ParseException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.goafanti.app.bo.UserBasicInfo;
 import com.goafanti.common.bo.OutUser;
 import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.CopyrightInfoMapper;
-import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
-import com.goafanti.common.dao.OrganizationIdentityMapper;
-import com.goafanti.common.dao.PatentInfoMapper;
-import com.goafanti.common.dao.TechProjectMapper;
-import com.goafanti.common.dao.UserIdentityMapper;
-import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
@@ -31,16 +13,20 @@ import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.user.bo.OrgListBo;
-import com.goafanti.user.bo.OrgPartnerDetailBo;
-import com.goafanti.user.bo.OrgUnitNames;
-import com.goafanti.user.bo.StarAndExpertListBo;
-import com.goafanti.user.bo.StarListBo;
-import com.goafanti.user.bo.UserDownLoadBo;
-import com.goafanti.user.bo.UserNames;
-import com.goafanti.user.bo.UserPageHomeBo;
-import com.goafanti.user.bo.UserPartnerDetailBo;
+import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.user.bo.*;
 import com.goafanti.user.service.UserService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.text.ParseException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 
 @Service
 public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserService {
@@ -384,6 +370,16 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	public List<OutUser> getuser() {
 		return userMapper.getAllUser();
 	}
-	
-	
+
+    @Override
+    public void updateUserShareType(List<LockingReleaseBo> newList) {
+		userMapper.updateUserShareType(newList);
+    }
+
+	@Override
+	public List<LockingReleaseBo > selectSignReleaseUser(String id) {
+		return userMapper.selectSignReleaseUser(id);
+	}
+
+
 }

+ 10 - 14
src/main/java/com/goafanti/user/service/impl/UserServiceServiceImpl.java

@@ -1,15 +1,6 @@
 package com.goafanti.user.service.impl;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import com.goafanti.admin.service.DepartmentService;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.UserServiceFollowMapper;
 import com.goafanti.common.dao.UserServiceMapper;
@@ -19,12 +10,16 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.user.bo.InputListOrderUserService;
-import com.goafanti.user.bo.InputUserServiceFollow;
-import com.goafanti.user.bo.OrderProject;
-import com.goafanti.user.bo.OutOrderUserService;
-import com.goafanti.user.bo.OutUserServiceFollow;
+import com.goafanti.user.bo.*;
 import com.goafanti.user.service.UserServiceService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Service
 public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> implements UserServiceService {
@@ -84,6 +79,7 @@ public class  UserServiceServiceImpl extends BaseMybatisDao<UserServiceMapper> i
 		if(i.getEndSignTimes()!=null)map.put("endSignTimes", i.getEndSignTimes()+" 23:59:59");
 		if(i.getAddWechat()!=null)map.put("addWechat", i.getAddWechat());
 		if(i.getRenewal()!=null)map.put("renewal", i.getRenewal());
+		if (i.getContractNo()!=null)map.put("contractNo", i.getContractNo());
 		return map;
 	}
 

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

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

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

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