2 Commits 62b3da1416 ... 503215a325

Author SHA1 Message Date
  linhuili 503215a325 Merge remote-tracking branch 'origin/develop' into develop 2 years ago
  linhuili d0d234c605 BOSS对接:生成项目交付范围 2 years ago
30 changed files with 1026 additions and 116 deletions
  1. 5 0
      adm-business/adm-server/pom.xml
  2. 0 70
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/DeliverPlanVo.java
  3. 0 32
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/impl/AdmDeliverPlanServiceImpl.java
  4. 19 10
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/controller/AdmDeliverPlanController.java
  5. 16 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/AdmProjectInitTaskMapper.java
  6. 13 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/BossProjectDeliveryPlanMapper.java
  7. 12 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/BossSkuDictRelMapper.java
  8. 36 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/BossProjectDeliveryPlan.java
  9. 28 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/BossSkuDictRel.java
  10. 10 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/ProjectInitTaskVo.java
  11. 4 4
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/AdmDeliverPlanService.java
  12. 11 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/AdmProjectInitTaskService.java
  13. 29 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/BossProjectDeliveryPlanService.java
  14. 21 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/BossSkuDictRelService.java
  15. 118 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/AdmDeliverPlanServiceImpl.java
  16. 15 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/AdmProjectInitTaskServiceImpl.java
  17. 48 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/BossProjectDeliveryPlanServiceImpl.java
  18. 32 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/BossSkuDictRelServiceImpl.java
  19. 31 0
      adm-business/adm-server/src/main/resources/db/init/schema.sql
  20. 40 0
      adm-comp/adm-steward-starter/pom.xml
  21. 30 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/config/StewardEncodeInterceptor.java
  22. 51 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/config/StewardFeignConfig.java
  23. 13 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/constant/CommonConstants.java
  24. 87 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/model/response/BossResponse.java
  25. 155 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/utils/RSAUtils.java
  26. 31 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/entity/ProductFinishNumReq.java
  27. 147 0
      adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/entity/ProjectDeliverReq.java
  28. 4 0
      adm-comp/adm-steward-starter/src/main/resources/application.yml
  29. 19 0
      adm-comp/pom.xml
  30. 1 0
      pom.xml

+ 5 - 0
adm-business/adm-server/pom.xml

@@ -42,5 +42,10 @@
             <artifactId>jts-core</artifactId>
             <version>1.16.1</version>
         </dependency>
+        <dependency>
+            <groupId>com.persagy</groupId>
+            <artifactId>adm-steward-starter</artifactId>
+            <version>1.0.0</version>
+        </dependency>
     </dependencies>
 </project>

+ 0 - 70
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/DeliverPlanVo.java

@@ -1,70 +0,0 @@
-package com.persagy.adm.server.algorithm.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotEmpty;
-import java.util.Date;
-import java.util.Set;
-
-/**
- * 交付计划VO类
- * @author : lijie
- * Update By 2022/1/14 16:26
- */
-@Data
-public class DeliverPlanVo {
-    /**
-     * 交付计划总id
-     * @mock @string(8)
-     * */
-    @NotBlank
-    private String deliverPlanMasterId;
-    /**
-     * 交付计划id
-     * @mock @string(8)
-     * */
-    @NotBlank
-    private String deliverPlanId;
-    /**
-     * 交付计划名称
-     * @mock @string(8)
-     * */
-    @NotBlank
-    private String deliverPlanName;
-
-    /**商品编码集合*/
-    @NotEmpty
-    private Set<String> skuCodes;
-    /**
-     * 数量
-     * @mock @natural(0,10000)
-     * */
-    private Integer number;
-    /**
-     * 开始时间,时间戳格式
-     * @mock @timestamp
-     * */
-    private Long startTime;
-    /**
-     * 结束时间,时间戳格式
-     * @mock @timestamp
-     * */
-    private Long endTime;
-    /**
-     * 项目id
-     * @mock @string(8)
-     * */
-    private String itemId;
-    /**
-     * 项目名称
-     * @mock @string(8)
-     * */
-    private String itemName;
-    /**
-     * 创建人名称:管家名称
-     * @mock @string(5)
-     * */
-    private String creator;
-}

+ 0 - 32
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/impl/AdmDeliverPlanServiceImpl.java

@@ -1,32 +0,0 @@
-package com.persagy.adm.server.algorithm.service.impl;
-
-import com.persagy.adm.server.algorithm.domain.DeliverPlanVo;
-import com.persagy.adm.server.algorithm.service.AdmDeliverPlanService;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-@Slf4j
-@Service
-@RequiredArgsConstructor
-public class AdmDeliverPlanServiceImpl implements AdmDeliverPlanService {
-
-    /**
-     * 处理BOSS产生的交付计划
-     * @param deliverPlanVo : 交付计划信息
-     * @author : lijie
-     * Update By 2022/1/14 17:22
-     */
-    @Override
-    public void relayDeliverPlan(DeliverPlanVo deliverPlanVo) {
-        // 1.根据商品code与项目任务模板的映射数据与规则生成项目任务数据
-        // 2.调用dmp-rwd服务根据商品code生成交付范围
-    }
-
-
-
-
-
-
-
-}

+ 19 - 10
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/controller/AdmDeliverPlanController.java

@@ -1,14 +1,14 @@
-package com.persagy.adm.server.algorithm.controller;
+package com.persagy.adm.server.delivery.controller;
 
-import com.persagy.adm.server.algorithm.domain.DeliverPlanVo;
-import com.persagy.adm.server.algorithm.domain.ModelFileVo;
-import com.persagy.adm.server.algorithm.domain.QueryModelFileVo;
-import com.persagy.adm.server.algorithm.service.AdmDeliverPlanService;
-import com.persagy.adm.server.algorithm.service.AdmModelService;
+import com.alibaba.fastjson.JSONObject;
+import com.persagy.adm.server.delivery.service.AdmDeliverPlanService;
+import com.persagy.adm.steward.basic.utils.RSAUtils;
+import com.persagy.adm.steward.entity.ProjectDeliverReq;
 import com.persagy.dmp.common.model.response.CommonResult;
 import com.persagy.dmp.common.utils.ResultHelper;
 import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -26,21 +26,30 @@ import java.util.List;
 @RestController
 @RequestMapping("/deliver/plan")
 @RequiredArgsConstructor
+@Slf4j
 public class AdmDeliverPlanController {
 
     private final AdmDeliverPlanService admDeliverPlanService;
 
+    @Value("${adm.rsa.privateKey}")
+    private String privateKey;
+
     /**
      * 020101-交付计划-处理BOSS产生的交付计划
-     * @param deliverPlanVo : 交付计划信息
+     * @param projectDeliverReqStr : 交付计划信息
      * @return : com.persagy.dmp.common.model.response.CommonResult<java.util.List<java.lang.Void>>
      * @author : lijie
      * Update By 2022/1/14 17:22
      */
     @PostMapping(value = "/relayDeliverPlan")
-    public CommonResult<List<Void>> relayDeliverPlan(@Validated @RequestBody DeliverPlanVo deliverPlanVo) {
-        admDeliverPlanService.relayDeliverPlan(deliverPlanVo);
+    public CommonResult<List<Void>> relayDeliverPlan(@RequestBody String projectDeliverReqStr) {
+        //todo 测试
+        String decode = RSAUtils.decode(projectDeliverReqStr, privateKey);
+        log.info("接受BOSS产生的交付计划入参:{}"+decode);
+        ProjectDeliverReq projectDeliverReq = JSONObject.parseObject(decode, ProjectDeliverReq.class);
+        admDeliverPlanService.relayDeliverPlan(projectDeliverReq);
         return ResultHelper.multi(new ArrayList<>());
     }
 
+
 }

+ 16 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/AdmProjectInitTaskMapper.java

@@ -0,0 +1,16 @@
+package com.persagy.adm.server.delivery.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.persagy.adm.server.algorithm.entity.AdmProject;
+import com.persagy.adm.server.delivery.entity.ProjectInitTaskVo;
+
+/**
+ * 项目初始化任务 DAO
+ */
+public interface AdmProjectInitTaskMapper extends BaseMapper<ProjectInitTaskVo> {
+
+}
+
+
+
+

+ 13 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/BossProjectDeliveryPlanMapper.java

@@ -0,0 +1,13 @@
+package com.persagy.adm.server.delivery.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.persagy.adm.server.delivery.entity.BossProjectDeliveryPlan;
+
+/**
+ * BOSS项目交付计划
+ * @author:linhuili
+ * @date:2022/1/22
+ */
+public interface BossProjectDeliveryPlanMapper  extends BaseMapper<BossProjectDeliveryPlan> {
+
+}

+ 12 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/dao/BossSkuDictRelMapper.java

@@ -0,0 +1,12 @@
+package com.persagy.adm.server.delivery.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.persagy.adm.server.delivery.entity.BossSkuDictRel;
+
+/**
+ *  BOSS商品-BDTP类型映射关系 DTO
+ * @author:linhuili
+ * @date:2022/1/19
+ */
+public interface BossSkuDictRelMapper extends BaseMapper<BossSkuDictRel> {
+}

+ 36 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/BossProjectDeliveryPlan.java

@@ -0,0 +1,36 @@
+package com.persagy.adm.server.delivery.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * BOOS项目交付计划
+ * @author:linhuili
+ * @date:2022/1/19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "boss_project_delivery_plan", autoResultMap = true)
+public class BossProjectDeliveryPlan extends AuditableEntity {
+
+    /** 项目ID */
+    private Long projectId;
+
+    /** 计划Id */
+    private Long planId;
+
+    /** 验收商品id */
+    private Long planInfoId;
+
+    /** 商品编码 */
+    private String productSkuCode;
+
+    /** 商品对应的实施数量 */
+    private Long productNum;
+
+    /** 管家账号 */
+    private String stewardAccount;
+
+}

+ 28 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/BossSkuDictRel.java

@@ -0,0 +1,28 @@
+package com.persagy.adm.server.delivery.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Description
+ *
+ * @author:linhuili
+ * @date:2022/1/19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "boss_sku_dict_rel", autoResultMap = true)
+public class BossSkuDictRel extends AuditableEntity {
+
+    /** 商品编码 */
+    private String skuCode;
+
+    /** 类型编码 */
+    private String classCode;
+
+    /** 对象类型 */
+    private String objType;
+
+}

+ 10 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/entity/ProjectInitTaskVo.java

@@ -0,0 +1,10 @@
+package com.persagy.adm.server.delivery.entity;
+
+/**
+ * 项目初始化任务VO
+ * @author:linhuili
+ * @date:2022/1/20
+ */
+public class ProjectInitTaskVo {
+
+}

+ 4 - 4
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/AdmDeliverPlanService.java

@@ -1,6 +1,6 @@
-package com.persagy.adm.server.algorithm.service;
+package com.persagy.adm.server.delivery.service;
 
-import com.persagy.adm.server.algorithm.domain.DeliverPlanVo;
+import com.persagy.adm.steward.entity.ProjectDeliverReq;
 
 /**
  * 对接BOSS的交付计划逻辑处理接口
@@ -10,9 +10,9 @@ import com.persagy.adm.server.algorithm.domain.DeliverPlanVo;
 public interface AdmDeliverPlanService {
     /**
      * 处理BOSS产生的交付计划
-     * @param deliverPlanVo : 交付计划信息
+     * @param projectDeliverReq : 交付计划信息
      * @author : lijie
      * Update By 2022/1/14 17:22
      */
-    void relayDeliverPlan(DeliverPlanVo deliverPlanVo);
+    void relayDeliverPlan(ProjectDeliverReq projectDeliverReq);
 }

+ 11 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/AdmProjectInitTaskService.java

@@ -0,0 +1,11 @@
+package com.persagy.adm.server.delivery.service;
+
+/**
+ * BOSS订单:项目初始化任务
+ *
+ * @author:linhuili
+ * @date:2022/1/20
+ */
+public interface AdmProjectInitTaskService {
+
+}

+ 29 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/BossProjectDeliveryPlanService.java

@@ -0,0 +1,29 @@
+package com.persagy.adm.server.delivery.service;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.persagy.adm.server.delivery.entity.BossProjectDeliveryPlan;
+import com.persagy.adm.server.delivery.entity.BossSkuDictRel;
+import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
+
+import java.util.List;
+
+/**
+ * BOSS项目交付计划
+ * @author:linhuili
+ * @date:2022/1/22
+ */
+public interface BossProjectDeliveryPlanService {
+    /**
+     * 条件查询BOSS交付计划
+     * @param queryWrapper 查询条件
+     * @return 返回结果
+     */
+    List<BossProjectDeliveryPlan> queryByCondition(Wrapper<BossProjectDeliveryPlan> queryWrapper);
+
+    /**
+     * 新增
+     * @param voList 待新增数据
+     * @return 新增后数据
+     */
+    List<BossProjectDeliveryPlan> insert(List<BossProjectDeliveryPlan> voList);
+}

+ 21 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/BossSkuDictRelService.java

@@ -0,0 +1,21 @@
+package com.persagy.adm.server.delivery.service;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.persagy.adm.server.delivery.entity.BossSkuDictRel;
+
+import java.util.List;
+
+/**
+ * BOSS商品-BDTP类型映射关系
+ * @author:linhuili
+ * @date:2022/1/19
+ */
+public interface BossSkuDictRelService {
+
+    /**
+     * 条件查询BOSS-BDTP商品映射关系
+     * @param queryWrapper 查询条件
+     * @return 返回结果
+     */
+    List<BossSkuDictRel> queryByCondition(Wrapper<BossSkuDictRel> queryWrapper);
+}

+ 118 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/AdmDeliverPlanServiceImpl.java

@@ -0,0 +1,118 @@
+package com.persagy.adm.server.delivery.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.persagy.adm.server.delivery.entity.BossProjectDeliveryPlan;
+import com.persagy.adm.server.delivery.entity.BossSkuDictRel;
+import com.persagy.adm.server.delivery.service.AdmDeliverPlanService;
+import com.persagy.adm.server.delivery.service.BossProjectDeliveryPlanService;
+import com.persagy.adm.server.delivery.service.BossSkuDictRelService;
+import com.persagy.adm.steward.entity.ProjectDeliverReq;
+import com.persagy.dmp.delivery.client.DigitalObjectTypeCollectFacade;
+import com.persagy.dmp.delivery.dto.DeliveryPlanDTO;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class AdmDeliverPlanServiceImpl implements AdmDeliverPlanService {
+
+    @Autowired
+    private BossSkuDictRelService bossSkuDictRelService;
+
+    @Autowired
+    private BossProjectDeliveryPlanService bossDeliveryPlanService;
+
+    /**
+     * 处理BOSS产生的交付计划
+     * @param projectDeliverReq : 交付计划信息
+     * @author : lijie
+     * Update By 2022/1/14 17:22
+     */
+    @Override
+    public void relayDeliverPlan(ProjectDeliverReq projectDeliverReq) {
+        // 1.根据商品code与项目任务模板的映射数据与规则生成项目任务数据
+        // 2.调用dmp-rwd服务根据商品code生成交付范围
+        createProjectDeliveryPlan(projectDeliverReq);
+    }
+
+    /**
+     * 生成项目交付计划
+     * @param projectDeliverReq
+     */
+    private void createProjectDeliveryPlan(ProjectDeliverReq projectDeliverReq){
+        // 存储项目交付信息
+        List<DeliveryPlanDTO> result = new ArrayList<>();
+        // 存储原BOSS订单信息
+        List<BossProjectDeliveryPlan> bossProjectDeliveryPlan = new ArrayList<>();
+        // 获取项目基础信息,后期调整为从上下文获取
+        Long projectId = projectDeliverReq.getProjectId();
+        String groupCode = projectDeliverReq.getBlocCode();
+
+        //1. 查询商品sku与数据字典的映射关系
+        Map<String, Set<String>> typeRelMap = queryBossBdtpTypeRel();
+        if(CollUtil.isEmpty(typeRelMap)){
+            return ;
+        }
+        //2. 获取项目下的计划
+        List<ProjectDeliverReq.PlanDeliverReq> planList = projectDeliverReq.getPlanDeliverReqs();
+        if(CollUtil.isEmpty(planList)){
+            log.info("项目下无计划任务,项目ID:{}"+projectId);
+        }
+        for (ProjectDeliverReq.PlanDeliverReq plan : planList) {
+            Long planId = plan.getId();
+            //获取计划下的商品信息
+            List<ProjectDeliverReq.PlanInfoDeliverReq> planInfoList = plan.getPlanInfoDeliverReqList();
+            if(CollUtil.isEmpty(planInfoList)){
+                log.info("计划下无商品信息,项目ID:{},计划ID:{}"+projectId+plan.getId());
+            }
+            //生成商品交付信息
+            for (ProjectDeliverReq.PlanInfoDeliverReq planInfo : planInfoList) {
+                String skuCode = planInfo.getProductSkuCode();
+                Set<String> classCodes = typeRelMap.get(skuCode);
+                classCodes.forEach(item->{
+                    DeliveryPlanDTO deliveryPlanDTO = new DeliveryPlanDTO();
+                    deliveryPlanDTO.setGroupCode(groupCode);
+                    deliveryPlanDTO.setProjectId("Pj"+projectId);
+                    deliveryPlanDTO.setClassCode(item);
+                    result.add(deliveryPlanDTO);
+                });
+
+                //存储原BOSS订单信息
+                BossProjectDeliveryPlan bossDeliveryPlan = new BossProjectDeliveryPlan();
+                bossDeliveryPlan.setProjectId(projectId);
+                bossDeliveryPlan.setPlanId(planId);
+                bossDeliveryPlan.setPlanInfoId(planInfo.getPlanInfoId());
+                bossDeliveryPlan.setProductSkuCode(skuCode);
+                bossDeliveryPlan.setProductNum(planInfo.getProductNum());
+                bossDeliveryPlan.setStewardAccount(projectDeliverReq.getStewardAccount());
+                bossProjectDeliveryPlan.add(bossDeliveryPlan);
+            }
+        }
+        //生成项目交付信息
+        DigitalObjectTypeCollectFacade.createProjectDelivery(groupCode,"Pj"+ projectId, null, null, result);
+        //存储原BOSS订单信息
+        bossDeliveryPlanService.insert(bossProjectDeliveryPlan);
+    }
+
+    /**
+     * 查询商品类型映射关系
+     * @return
+     */
+    private Map<String,Set<String>> queryBossBdtpTypeRel(){
+        List<BossSkuDictRel> typeRelList = bossSkuDictRelService.queryByCondition(new QueryWrapper<>());
+        if(CollUtil.isEmpty(typeRelList)){
+            return new HashMap<>();
+        }
+        return typeRelList.stream().collect(Collectors.groupingBy(BossSkuDictRel::getSkuCode,
+                Collectors.mapping(BossSkuDictRel::getClassCode, Collectors.toSet())));
+    }
+
+
+}

+ 15 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/AdmProjectInitTaskServiceImpl.java

@@ -0,0 +1,15 @@
+package com.persagy.adm.server.delivery.service.impl;
+
+import com.persagy.adm.server.delivery.service.AdmProjectInitTaskService;
+import org.springframework.stereotype.Service;
+
+/**
+ * BOSS订单:项目初始化任务
+ *
+ * @author:linhuili
+ * @date:2022/1/20
+ */
+@Service
+public class AdmProjectInitTaskServiceImpl implements AdmProjectInitTaskService {
+
+}

+ 48 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/BossProjectDeliveryPlanServiceImpl.java

@@ -0,0 +1,48 @@
+package com.persagy.adm.server.delivery.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.persagy.adm.server.delivery.dao.BossProjectDeliveryPlanMapper;
+import com.persagy.adm.server.delivery.entity.BossProjectDeliveryPlan;
+import com.persagy.adm.server.delivery.service.BossProjectDeliveryPlanService;
+import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * BOSS项目交付计划
+ * @author:linhuili
+ * @date:2022/1/22
+ */
+@Service
+@Slf4j
+public class BossProjectDeliveryPlanServiceImpl extends ServiceImpl<BossProjectDeliveryPlanMapper, BossProjectDeliveryPlan>  implements BossProjectDeliveryPlanService {
+
+    @Autowired
+    private BossProjectDeliveryPlanMapper bossDeliveryPlanMapper;
+
+    /**
+     * 查询BOSS交付信息
+     * @param queryWrapper 查询条件
+     * @return
+     */
+    @Override
+    public List<BossProjectDeliveryPlan> queryByCondition(Wrapper<BossProjectDeliveryPlan> queryWrapper) {
+        return bossDeliveryPlanMapper.selectList(queryWrapper);
+    }
+
+    /**
+     * 保存BOSS交付信息
+     * @param voList 待新增数据
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public List<BossProjectDeliveryPlan> insert(List<BossProjectDeliveryPlan> voList){
+        saveOrUpdateBatch(voList);
+        return voList;
+    }
+}

+ 32 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/delivery/service/impl/BossSkuDictRelServiceImpl.java

@@ -0,0 +1,32 @@
+package com.persagy.adm.server.delivery.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.persagy.adm.server.delivery.dao.BossSkuDictRelMapper;
+import com.persagy.adm.server.delivery.entity.BossSkuDictRel;
+import com.persagy.adm.server.delivery.service.BossSkuDictRelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * BOSS商品-BDTP类型映射关系
+ * @author:linhuili
+ * @date:2022/1/19
+ */
+@Service
+public class BossSkuDictRelServiceImpl implements BossSkuDictRelService {
+
+    @Autowired
+    private BossSkuDictRelMapper boosSkuDictRelMapper;
+
+    /**
+     * 条件查询BOSS-BDTP商品映射关系
+     * @param queryWrapper 查询条件
+     * @return
+     */
+    @Override
+    public List<BossSkuDictRel> queryByCondition(Wrapper<BossSkuDictRel> queryWrapper) {
+        return boosSkuDictRelMapper.selectList(queryWrapper);
+    }
+}

+ 31 - 0
adm-business/adm-server/src/main/resources/db/init/schema.sql

@@ -404,3 +404,34 @@ CREATE TABLE IF NOT EXISTS `adm_model_file` (
     PRIMARY KEY (`id`) USING BTREE,
     UNIQUE INDEX `idx_1`(`version`, `floor_id`, `building_id`, `project_id`, `group_code`,`valid`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='模型文件表';
+
+CREATE TABLE IF NOT EXISTS `boss_sku_dict_rel` (
+    `id` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
+    `sku_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'BOSS:商品编码',
+    `type_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'BDTP:对象类型编码',
+    `obj_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '对象类型',
+    `creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
+    `creation_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建时间',
+    `modifier` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改人',
+    `modified_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改时间',
+    `valid` tinyint NOT NULL DEFAULT '1' COMMENT '合法标识',
+    `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='BOSS商品sku与数据字典关系映射表';
+
+CREATE TABLE IF NOT EXISTS `boss_project_delivery_plan` (
+  `id` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
+  `project_id` int DEFAULT NULL COMMENT '项目id(BOSS)',
+  `plan_id` int DEFAULT NULL COMMENT '商品所属计划Id',
+  `plan_info_id` int NOT NULL COMMENT '验收商品id',
+  `product_sku_code` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '商品编码',
+  `product_num` int DEFAULT NULL COMMENT '商品对应的实施数量',
+  `steward_account` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管家账号',
+  `creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
+  `creation_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建时间',
+  `modifier` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改人',
+  `modified_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改时间',
+  `valid` tinyint NOT NULL DEFAULT '1' COMMENT '合法标识',
+  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci='BOSS项目交付计划';

+ 40 - 0
adm-comp/adm-steward-starter/pom.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>adm-comp</artifactId>
+        <groupId>com.persagy</groupId>
+        <version>1.0.0</version>
+    </parent>
+
+    <artifactId>adm-steward-starter</artifactId>
+
+    <dependencies>
+        <!-- 配置中心(包含注册中心) -->
+        <dependency>
+            <groupId>com.persagy</groupId>
+            <artifactId>integrated-config-client</artifactId>
+        </dependency>
+        <!-- 项目启动 -->
+        <dependency>
+            <groupId>com.persagy</groupId>
+            <artifactId>dmp-server</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.persagy</groupId>
+            <artifactId>dmp-mybatis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.persagy</groupId>
+            <artifactId>dmp-digital-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.locationtech.jts</groupId>
+            <artifactId>jts-core</artifactId>
+            <version>1.16.1</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 30 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/config/StewardEncodeInterceptor.java

@@ -0,0 +1,30 @@
+package com.persagy.adm.steward.basic.config;
+
+import com.alibaba.fastjson.JSONObject;
+import com.persagy.adm.steward.basic.utils.RSAUtils;
+import feign.Request;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+/**
+ * 加密拦截器
+ * @author linhuili
+ * @date 2022-01-22
+ */
+@Configuration
+@Slf4j
+public class StewardEncodeInterceptor implements RequestInterceptor {
+
+    @Value("${adm.rsa.privateKey}")
+    private String privateKey;
+
+    @Override
+    public void apply(RequestTemplate template) {
+        // 更改请求体中的content的值
+        Request.Body body = template.requestBody();
+        JSONObject temp = JSONObject.parseObject(body.asString());
+        template.body(RSAUtils.decode(body.asString(),privateKey));
+    }
+}

+ 51 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/config/StewardFeignConfig.java

@@ -0,0 +1,51 @@
+package com.persagy.adm.steward.basic.config;
+
+import feign.Logger;
+import feign.RequestInterceptor;
+import feign.codec.Encoder;
+import feign.form.spring.SpringFormEncoder;
+import org.springframework.beans.factory.ObjectFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.cloud.openfeign.support.SpringEncoder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Scope;
+
+import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE;
+
+/**
+ * Feign配置
+ * @author Charlie Yu
+ * @date 2021-05-15
+ */
+@EnableFeignClients(basePackages="com.persagy.**.client")
+@Configuration
+public class StewardFeignConfig {
+
+    @Autowired
+    private ObjectFactory<HttpMessageConverters> messageConverters;
+
+    @Bean
+    @Primary
+    @Scope(SCOPE_PROTOTYPE)
+    Encoder feignFormEncoder() {
+        return new SpringFormEncoder(new SpringEncoder(this.messageConverters));
+    }
+
+    @Bean
+    Logger.Level feignLevel(){
+        return Logger.Level.FULL;
+    }
+
+    @Bean
+    @ConditionalOnMissingBean({RequestInterceptor.class})
+    RequestInterceptor stewardEncryptInterceptor(){
+        return new StewardEncodeInterceptor();
+    }
+
+
+}

+ 13 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/constant/CommonConstants.java

@@ -0,0 +1,13 @@
+package com.persagy.adm.steward.basic.constant;
+
+/**
+ * 通用常量
+ * @author:linhuili
+ * @date:2022/1/22
+ */
+public interface CommonConstants {
+
+     Integer SUCCESS = 1;
+
+     Integer FAIL = 0;
+}

+ 87 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/model/response/BossResponse.java

@@ -0,0 +1,87 @@
+package com.persagy.adm.steward.basic.model.response;
+
+import com.persagy.adm.steward.basic.constant.CommonConstants;
+
+import java.io.Serializable;
+
+
+/***
+ * @Description: 操作消息提醒
+ *
+ * @Author: QiaoPengQiang
+ * @Date: 2021/12/29
+ */
+public class BossResponse<T> implements Serializable {
+
+    private static final long serialVersionUID = 1626120430566031974L;
+
+    private int code;
+
+    private String msg;
+
+    private T data;
+
+    public static <T> BossResponse<T> success() {
+        return restResult(null, CommonConstants.SUCCESS, null);
+    }
+
+    public static <T> BossResponse<T> success(T data) {
+        return restResult(data, CommonConstants.SUCCESS, null);
+    }
+
+    public static <T> BossResponse<T> success(T data, String msg) {
+        return restResult(data, CommonConstants.SUCCESS, msg);
+    }
+
+    public static <T> BossResponse<T> error() {
+        return restResult(null, CommonConstants.FAIL, "操作失败");
+    }
+
+    public static <T> BossResponse<T> error(String msg) {
+        return restResult(null, CommonConstants.FAIL, msg);
+    }
+
+    public static <T> BossResponse<T> error(T data) {
+        return restResult(data, CommonConstants.FAIL, "操作失败");
+    }
+
+    public static <T> BossResponse<T> error(T data, String msg) {
+        return restResult(data, CommonConstants.FAIL, msg);
+    }
+
+    public static <T> BossResponse<T> error(int code, String msg) {
+        return restResult(null, code, msg);
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    private static <T> BossResponse<T> restResult(T data, int code, String msg) {
+        BossResponse<T> apiResult = new BossResponse<T>();
+        apiResult.setCode(code);
+        apiResult.setData(data);
+        apiResult.setMsg(msg);
+        return apiResult;
+    }
+}

+ 155 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/basic/utils/RSAUtils.java

@@ -0,0 +1,155 @@
+package com.persagy.adm.steward.basic.utils;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.apache.tomcat.util.codec.binary.Base64;
+
+import javax.crypto.Cipher;
+import java.security.*;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: RSAUtils
+ * @Author: qiaopengqiang
+ * @Date: 2022-01-10
+ * @Version:v1.0
+ */
+@Slf4j
+public class RSAUtils {
+
+    private static String KEY_RSA_TYPE = "RSA";
+    private static String KEY_RSA_TYPE_ALL = "RSA/ECB/PKCS1Padding";
+    private static int KEY_SIZE = 1024;//JDK方式RSA加密最大只有1024位
+    private static int ENCODE_PART_SIZE = KEY_SIZE/8;
+    public static final String PUBLIC_KEY_NAME = "bdtp";
+    public static final String PRIVATE_KEY_NAME = "boss";
+
+    /**
+     * 创建公钥秘钥
+     * @return
+     */
+
+    public static Map<String,String> createRSAKeys(){
+        Map<String,String> keyPairMap = new HashMap<>();//里面存放公私秘钥的Base64位加密
+        try {
+            KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_RSA_TYPE);
+            keyPairGenerator.initialize(KEY_SIZE,new SecureRandom());
+            KeyPair keyPair = keyPairGenerator.generateKeyPair();
+
+            //获取公钥秘钥
+            String publicKeyValue = Base64.encodeBase64String(keyPair.getPublic().getEncoded());
+            String privateKeyValue = Base64.encodeBase64String(keyPair.getPrivate().getEncoded());
+
+            //存入公钥秘钥,以便以后获取
+            keyPairMap.put(PUBLIC_KEY_NAME,publicKeyValue);
+            keyPairMap.put(PRIVATE_KEY_NAME,privateKeyValue);
+        } catch (NoSuchAlgorithmException e) {
+            log.error("当前JDK版本没找到RSA加密算法!");
+            e.printStackTrace();
+        }
+        return keyPairMap;
+    }
+
+    /**
+     * 公钥加密
+     * 描述:
+     *     1字节 = 8位;
+     *     最大加密长度如 1024位私钥时,最大加密长度为 128-11 = 117字节,不管多长数据,加密出来都是 128 字节长度。
+     * @param sourceStr
+     * @param publicKeyBase64Str
+     * @return
+     */
+    public static String encode(String sourceStr,String publicKeyBase64Str){
+        byte [] publicBytes = Base64.decodeBase64(publicKeyBase64Str);
+        //公钥加密
+        X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicBytes);
+        List<byte[]> alreadyEncodeListData = new LinkedList<>();
+
+        int maxEncodeSize = ENCODE_PART_SIZE - 11;
+        String encodeBase64Result = null;
+        try {
+            KeyFactory keyFactory = KeyFactory.getInstance(KEY_RSA_TYPE);
+            PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
+            Cipher cipher = Cipher.getInstance(KEY_RSA_TYPE_ALL);
+            cipher.init(Cipher.ENCRYPT_MODE,publicKey);
+            byte[] sourceBytes = sourceStr.getBytes("utf-8");
+            int sourceLen = sourceBytes.length;
+            for(int i=0;i<sourceLen;i+=maxEncodeSize){
+                int curPosition = sourceLen - i;
+                int tempLen = curPosition;
+                if(curPosition > maxEncodeSize){
+                    tempLen = maxEncodeSize;
+                }
+                byte[] tempBytes = new byte[tempLen];//待加密分段数据
+                System.arraycopy(sourceBytes,i,tempBytes,0,tempLen);
+                byte[] tempAlreadyEncodeData = cipher.doFinal(tempBytes);
+                alreadyEncodeListData.add(tempAlreadyEncodeData);
+            }
+            int partLen = alreadyEncodeListData.size();//加密次数
+
+            int allEncodeLen = partLen * ENCODE_PART_SIZE;
+            byte[] encodeData = new byte[allEncodeLen];//存放所有RSA分段加密数据
+            for (int i = 0; i < partLen; i++) {
+                byte[] tempByteList = alreadyEncodeListData.get(i);
+                System.arraycopy(tempByteList,0,encodeData,i*ENCODE_PART_SIZE,ENCODE_PART_SIZE);
+            }
+            encodeBase64Result = Base64.encodeBase64String(encodeData);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return encodeBase64Result;
+    }
+
+    /**
+     * 私钥解密
+     * @param sourceBase64RSA
+     * @param privateKeyBase64Str
+     */
+    public static String decode(String sourceBase64RSA,String privateKeyBase64Str){
+        byte[] privateBytes = Base64.decodeBase64(privateKeyBase64Str);
+        byte[] encodeSource = Base64.decodeBase64(sourceBase64RSA);
+        int encodePartLen = encodeSource.length/ENCODE_PART_SIZE;
+        List<byte[]> decodeListData = new LinkedList<>();//所有解密数据
+        String decodeStrResult = null;
+        //私钥解密
+        PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(privateBytes);
+        try {
+            KeyFactory keyFactory = KeyFactory.getInstance(KEY_RSA_TYPE);
+            PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
+            Cipher cipher = Cipher.getInstance(KEY_RSA_TYPE_ALL);
+            cipher.init(Cipher.DECRYPT_MODE,privateKey);
+            int allDecodeByteLen = 0;//初始化所有被解密数据长度
+            for (int i = 0; i < encodePartLen; i++) {
+                byte[] tempEncodedData = new byte[ENCODE_PART_SIZE];
+                System.arraycopy(encodeSource,i*ENCODE_PART_SIZE,tempEncodedData,0,ENCODE_PART_SIZE);
+                byte[] decodePartData = cipher.doFinal(tempEncodedData);
+                decodeListData.add(decodePartData);
+                allDecodeByteLen += decodePartData.length;
+            }
+            byte [] decodeResultBytes = new byte[allDecodeByteLen];
+            for (int i = 0,curPosition = 0; i < encodePartLen; i++) {
+                byte[] tempSorceBytes = decodeListData.get(i);
+                int tempSourceBytesLen = tempSorceBytes.length;
+                System.arraycopy(tempSorceBytes,0,decodeResultBytes,curPosition,tempSourceBytesLen);
+                curPosition += tempSourceBytesLen;
+            }
+            decodeStrResult = new String(decodeResultBytes,"UTF-8");
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return decodeStrResult;
+    }
+
+    public static void main(String[] args) {
+        Map<String, String> rsaKeys = RSAUtils.createRSAKeys();
+        String publicKey = rsaKeys.get(RSAUtils.PUBLIC_KEY_NAME);
+        System.out.println("publicKey:"+ publicKey);
+        String privateKey = rsaKeys.get(RSAUtils.PRIVATE_KEY_NAME);
+        System.out.println("privateKey:"+ privateKey);
+    }
+}

+ 31 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/entity/ProductFinishNumReq.java

@@ -0,0 +1,31 @@
+package com.persagy.adm.steward.entity;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @Description: ProductFinishNumReq 实施工具调用
+ * @Author: qiaopengqiang
+ * @Date: 2022-01-06
+ * @Version:v1.0
+ */
+@Data
+public class ProductFinishNumReq implements Serializable {
+
+    private static final long serialVersionUID = -8196236532619442356L;
+    /**
+     * 验收商品id
+     */
+    @NotNull(message = "验收商品id不能为空")
+    private Long planInfoId;
+
+    /**
+     * 本次已经完成的数量
+     */
+    @NotNull(message = "该商品已经完成的数量不能为空")
+    private Integer finishNum;
+
+
+}

+ 147 - 0
adm-comp/adm-steward-starter/src/main/java/com/persagy/adm/steward/entity/ProjectDeliverReq.java

@@ -0,0 +1,147 @@
+package com.persagy.adm.steward.entity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: ProjectDeliverReq 请求交付工具的接口
+ * @Author: qiaopengqiang
+ * @Date: 2022-01-17
+ * @Version:v1.0
+ */
+@Data
+public class ProjectDeliverReq implements Serializable {
+
+    private static final long serialVersionUID = 7257238883268681314L;
+
+    /**
+     * 项目id
+     */
+    private Long projectId;
+
+    /**
+     * 订单编号
+     */
+    private Long orderSn;
+
+    /**
+     * 管家账号
+     */
+    private String stewardAccount;
+
+    /**
+     * 项目名称(购买的商品名称)
+     */
+    private String projectName;
+
+    /**
+     * 下单时间
+     */
+    private Date orderTime;
+
+    /**
+     * 支付时间
+     */
+    private Date payTime;
+
+    /**
+     * 子交付计划汇总数量
+     */
+    private Integer planNumSum;
+
+    /**
+     * 实施人数
+     */
+    private Integer implManNum;
+
+    /**
+     * 集团编码
+     */
+    private String blocCode;
+
+    /**
+     * 集团name
+     */
+    private String blocName;
+
+    /**
+     * 每一个项目下都有一个或者多个计划
+     */
+    private List<PlanDeliverReq> planDeliverReqs;
+
+    /**
+     * 每一个项目都有一个或者多个楼层
+     */
+    private List<StoreyInfoReq> storeyInfoReqs;
+
+    @Data
+    public static class PlanDeliverReq implements Serializable {
+
+        private static final long serialVersionUID = 6855330552397128142L;
+        /**
+         * 主键id
+         */
+        private Long id;
+
+        /**
+         * 交付计划名称
+         */
+        private String planName;
+
+        /**
+         * 每一个计划下都有多个验收商品详情
+         */
+        private List<PlanInfoDeliverReq> planInfoDeliverReqList;
+
+    }
+
+    @Data
+    public static class PlanInfoDeliverReq implements Serializable {
+
+        private static final long serialVersionUID = 2232909478659794811L;
+
+        /**
+         * 验收商品id
+         */
+        private Long planInfoId;
+
+        /**
+         * 商品名称(规格名称,代表唯一的商品名称)
+         */
+        private String productName;
+
+        /**
+         * 商品编码
+         */
+        private String productSkuCode;
+
+        /**
+         * 商品对应的实施数量
+         */
+        private Long productNum;
+
+        /**
+         * 开始时间
+         */
+        private Date startTime;
+
+        /**
+         * 结束时间
+         */
+        private Date endTime;
+    }
+
+    @Data
+    public static class StoreyInfoReq implements Serializable {
+
+        private static final long serialVersionUID = 7645105006381797684L;
+        /**
+         * 楼层id
+         */
+        private Integer storeyId;
+
+        private String storeyName;
+    }
+}

File diff suppressed because it is too large
+ 4 - 0
adm-comp/adm-steward-starter/src/main/resources/application.yml


+ 19 - 0
adm-comp/pom.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>adm</artifactId>
+        <groupId>com.persagy</groupId>
+        <version>1.0.0</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>adm-comp</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>adm-steward-starter</module>
+    </modules>
+
+
+</project>

+ 1 - 0
pom.xml

@@ -14,6 +14,7 @@
 
     <modules>
         <module>adm-business</module>
+        <module>adm-comp</module>
     </modules>
 
 </project>