3
1

2 Ревизии 6035eadeb8 ... 3495b8d74e

Автор SHA1 Съобщение Дата
  linhuili 3495b8d74e Merge remote-tracking branch 'origin/develop' into develop преди 2 години
  linhuili dff58defaf 项目交付范围设定 преди 2 години

+ 20 - 1
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/controller/ObjectTypeCollectController.java

@@ -11,6 +11,7 @@ import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.exception.BusinessException;
 import com.persagy.dmp.common.model.response.CommonResult;
 import com.persagy.dmp.common.utils.ResultHelper;
+import com.persagy.dmp.delivery.dto.boss.DeliveryOrderDTO;
 import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
 import com.persagy.dmp.rwd.delivery.service.IObjectTypeCollectService;
 import org.apache.commons.lang.StringUtils;
@@ -35,7 +36,6 @@ public class ObjectTypeCollectController {
     @Autowired
     private IObjectTypeCollectService service;
 
-
     /**
      * 查询对象类型交付范围
      * @param criteria
@@ -60,6 +60,25 @@ public class ObjectTypeCollectController {
     }
 
     /**
+     * 设置项目交付范围信息
+     * @param voList
+     * @return
+     */
+    @PostMapping("/setting")
+    public CommonResult<List<DeliveryOrderDTO>> settingProjectDelivery(@RequestBody List<DeliveryOrderDTO> voList) throws Exception{
+        if(CollUtil.isEmpty(voList)){
+            throw new BusinessException(ResponseCode.A0400.getCode(), ResponseCode.A0400.getDesc());
+        }
+        for (DeliveryOrderDTO deliveryOrderDTO : voList) {
+            if(CollUtil.isEmpty(deliveryOrderDTO.getGoodsCode())){
+                throw new BusinessException(ResponseCode.A0400.getCode(), "商品编码不允许为空");
+            }
+        }
+        service.settingProjectDelivery(voList);
+        return ResultHelper.multi(voList);
+    }
+
+    /**
      * 添加对象类型交付范围
      * @param vo
      * @return

+ 12 - 0
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/dao/BossBdtpTypeRelMapper.java

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

+ 20 - 0
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/IBossBdtpTypeRelService.java

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

+ 4 - 0
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/IObjectTypeCollectService.java

@@ -3,7 +3,9 @@ package com.persagy.dmp.rwd.delivery.service;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.persagy.dmp.delivery.dto.boss.DeliveryOrderDTO;
 import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.List;
 
@@ -55,4 +57,6 @@ public interface IObjectTypeCollectService extends IService<ObjectTypeCollect> {
      * @param idList 主键
      */
     void delete(List<String> idList);
+
+    List<DeliveryOrderDTO> settingProjectDelivery(@RequestBody List<DeliveryOrderDTO> voList) throws Exception;
 }

+ 31 - 0
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/impl/BossBdtpTypeRelServiceImpl.java

@@ -0,0 +1,31 @@
+package com.persagy.dmp.rwd.delivery.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.persagy.dmp.delivery.entity.BossBdtpTypeRel;
+import com.persagy.dmp.rwd.delivery.dao.BossBdtpTypeRelMapper;
+import com.persagy.dmp.rwd.delivery.service.IBossBdtpTypeRelService;
+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 BossBdtpTypeRelServiceImpl implements IBossBdtpTypeRelService {
+
+    @Autowired
+    private BossBdtpTypeRelMapper boosBdtpTypeRelMapper;
+
+    /**
+     * 条件查询BOSS-BDTP商品映射关系
+     * @param queryWrapper 查询条件
+     * @return
+     */
+    @Override
+    public List<BossBdtpTypeRel> queryByCondition(Wrapper<BossBdtpTypeRel> queryWrapper) {
+        return boosBdtpTypeRelMapper.selectList(queryWrapper);
+    }
+}

+ 237 - 37
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/impl/ObjectTypeCollectServiceImpl.java

@@ -8,15 +8,23 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.common.model.entity.BaseEntity;
-import com.persagy.dmp.define.entity.ObjectInfoDefine;
 import com.persagy.dmp.define.entity.ObjectTypeDefine;
 import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
+import com.persagy.dmp.delivery.dto.boss.DeliveryOrderDTO;
+import com.persagy.dmp.delivery.entity.BossBdtpTypeRel;
+import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
 import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
+import com.persagy.dmp.delivery.entity.RelationDefineCollect;
 import com.persagy.dmp.rwd.define.service.IObjectTypeService;
 import com.persagy.dmp.rwd.delivery.dao.ObjectTypeCollectMapper;
+import com.persagy.dmp.rwd.delivery.service.IBossBdtpTypeRelService;
+import com.persagy.dmp.rwd.delivery.service.IObjectInfoCollectService;
 import com.persagy.dmp.rwd.delivery.service.IObjectTypeCollectService;
+import com.persagy.dmp.rwd.delivery.service.IRelationDefineCollectService;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,7 +39,8 @@ import java.util.stream.Collectors;
  * @date:2021/10/13
  */
 @Service
-public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rwd.delivery.dao.ObjectTypeCollectMapper, ObjectTypeCollect> implements IObjectTypeCollectService {
+@Slf4j
+public class ObjectTypeCollectServiceImpl extends ServiceImpl<ObjectTypeCollectMapper, ObjectTypeCollect> implements IObjectTypeCollectService {
 
     @Autowired
     private com.persagy.dmp.rwd.delivery.dao.ObjectTypeCollectMapper ObjectTypeCollectMapper;
@@ -39,6 +48,18 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
     @Autowired
     private IObjectTypeService objectTypeService;
 
+    @Autowired
+    private IBossBdtpTypeRelService bossBdtpTypeRelService;
+
+    @Autowired
+    private IObjectTypeCollectService objectTypeCollectService;
+
+    @Autowired
+    private IObjectInfoCollectService objectInfoCollectService;
+
+    @Autowired
+    private IRelationDefineCollectService relationDefineCollectService;
+
     /**
      * 数量统计
      * @param queryWrapper 查询条件
@@ -60,53 +81,108 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
     }
 
     /**
-     * 分页查询对象类型交付范围
-     * @param page 分页条件
-     * @param queryWrapper 查询条件
+     * 设置项目交付范围信息
+     * @param voList
      * @return
+     * @throws Exception
      */
     @Override
-    public Page queryByCondition(Page page, Wrapper<ObjectTypeCollect> queryWrapper) {
-        //查询交付范围内的对象类型信息
-        Page selectPage = ObjectTypeCollectMapper.selectPage(page, queryWrapper);
-        List<ObjectTypeCollect> records = (List<ObjectTypeCollect>)selectPage.getRecords();
-        if(CollUtil.isEmpty(records)){
-            return selectPage;
+    public List<DeliveryOrderDTO> settingProjectDelivery(List<DeliveryOrderDTO> voList) throws Exception {
+        //1. 查询商品映射关系
+        Map<String, Set<String>> typeRelMap = queryBossBdtpTypeRel();
+        if(CollUtil.isEmpty(typeRelMap)){
+            return voList;
         }
-        Map<String, ObjectTypeDefine> typeDefineMap = queryDefineObjectType(records);
+        //2. 查询BDTP标准交付范围-对象类型
+        Map<String, ObjectTypeCollect> typeCollectMap = queryBdtpObjectTypeCollect();
+        //3. 查询BDTP标准交付范围-信息点
+        Map<String, List<ObjectInfoCollect>> infoCollectMap = queryBdtpObjectInfoCollect();
+        //4. 查询BDTP标准交付范围- 关系
+        Map<String, List<RelationDefineCollect>> relationCollectMap = queryBdtpObjectRelCollect();
 
-        List<ObjectTypeCollectDTO> result = new ArrayList<>();
-        records.forEach(item->{
-            ObjectTypeCollectDTO collectType = new ObjectTypeCollectDTO();
-            //设置标准类型定义信息
-            String defineTypeId = item.getDefineTypeId();
-            if(StringUtils.isNotEmpty(defineTypeId)){
-                ObjectTypeDefine objectTypeDefine = typeDefineMap.get(defineTypeId);
-                if(objectTypeDefine != null){
-                    BeanUtils.copyProperties(objectTypeDefine,collectType);
+        //5. 初始化项目交付范围
+        for (DeliveryOrderDTO deliveryOrderDTO : voList) {
+            ArrayNode goodsCode = deliveryOrderDTO.getGoodsCode();
+            if(CollUtil.isEmpty(goodsCode)){
+                continue;
+            }
+            //获取项目需交付类型编码
+            Set<String> allTypeCodes = new HashSet<>();
+            goodsCode.forEach(item->{
+                Set<String> typecodes = typeRelMap.get(item);
+                if(CollUtil.isEmpty(typecodes)){
+                    allTypeCodes.addAll(typecodes);
                 }
+            });
+            //初始化对象类型交付范围
+            initDelivertyObjectType(deliveryOrderDTO,allTypeCodes,typeCollectMap);
+            //初始化信息点交付范围
+            initDelivertyObjectInfo(deliveryOrderDTO,allTypeCodes,infoCollectMap);
+            //初始化关系交付范围
+            //存储原订单信息
+        }
+        return null;
+    }
+
+    /**
+     * 初始化对象类型交付范围
+     * @param deliveryOrderDTO
+     * @param allTypeCodes
+     */
+    private void initDelivertyObjectType(DeliveryOrderDTO deliveryOrderDTO,Set<String> allTypeCodes,Map<String, ObjectTypeCollect> typeCollectMap) throws Exception{
+       if(CollUtil.isEmpty(allTypeCodes) || CollUtil.isEmpty(typeCollectMap)){
+           return;
+       }
+       //组装类型交付信息
+       List<ObjectTypeCollect> content = new ArrayList<>();
+       for (String typeCode : allTypeCodes) {
+            ObjectTypeCollect typeCollect = typeCollectMap.get(typeCode);
+            if(typeCollect == null){
+                log.info("BOSS项目范围交付:交付类型不在BDTP标准交付范围内:{}"+typeCode);
+                continue;
             }
-            BeanUtils.copyProperties(item,collectType);
-            result.add(collectType);
-        });
-        selectPage.setRecords(result);
-        return selectPage;
+            typeCollect.setProjectId(deliveryOrderDTO.getProjectId());
+            typeCollect.setIsDelivery(1);
+            content.add(typeCollect);
+        }
+       if(CollUtil.isEmpty(content)){
+           log.info("BOSS项目范围交付:无类型交付信息");
+           return;
+       }
+       //类型信息交付
+       objectTypeCollectService.insert(content);
     }
 
+
     /**
-     * 查询标准类型定义
-     * @return
+     * 初始化对象类型交付范围
+     * @param deliveryOrderDTO
+     * @param allTypeCodes
      */
-    private Map<String, ObjectTypeDefine> queryDefineObjectType(List<ObjectTypeCollect> records){
-        Set<String> ids = records.stream().map(ObjectTypeCollect::getDefineTypeId).collect(Collectors.toSet());
-        QueryWrapper<ObjectTypeDefine> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("id",ids);
-        //queryWrapper.select("id","name");
-        List<ObjectTypeDefine> objectTypeDefines = objectTypeService.queryByCondition(queryWrapper);
-        if(CollUtil.isEmpty(objectTypeDefines)){
-            return new HashMap<>();
+    private void initDelivertyObjectInfo(DeliveryOrderDTO deliveryOrderDTO,Set<String> allTypeCodes,Map<String, List<ObjectInfoCollect>> infoCollectMap) throws Exception{
+        if(CollUtil.isEmpty(allTypeCodes) || CollUtil.isEmpty(infoCollectMap)){
+            return;
         }
-        return objectTypeDefines.stream().collect(Collectors.toMap(ObjectTypeDefine::getId, item->item, (k1, k2) -> k1));
+        //组装信息点交付信息
+        List<ObjectInfoCollect> content = new ArrayList<>();
+        for (String typeCode : allTypeCodes) {
+            List<ObjectInfoCollect> infoCollectList = infoCollectMap.get(typeCode);
+            if(CollUtil.isEmpty(infoCollectList)){
+                log.info("该类型下无需交付的信息点:{}"+typeCode);
+                continue;
+            }
+            infoCollectList.forEach(item->{
+                item.setProjectId(deliveryOrderDTO.getProjectId());
+                item.setIsDelivery(true);
+                content.add(item);
+            });
+        }
+        if(CollUtil.isEmpty(content)){
+            log.info("BOSS项目范围交付:无信息点交付信息");
+            return;
+        }
+        //类型信息交付
+        objectInfoCollectService.insert(content);
     }
 
     /**
@@ -162,6 +238,7 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
         });
     }
 
+
     /**
      * 填充已交付的对象类ID
      * @param voList
@@ -191,4 +268,127 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
             }
         }
     }
+
+    /**
+     * 分页查询对象类型交付范围
+     * @param page 分页条件
+     * @param queryWrapper 查询条件
+     * @return
+     */
+    @Override
+    public Page queryByCondition(Page page, Wrapper<ObjectTypeCollect> queryWrapper) {
+        //查询交付范围内的对象类型信息
+        Page selectPage = ObjectTypeCollectMapper.selectPage(page, queryWrapper);
+        List<ObjectTypeCollect> records = (List<ObjectTypeCollect>)selectPage.getRecords();
+        if(CollUtil.isEmpty(records)){
+            return selectPage;
+        }
+        Map<String, ObjectTypeDefine> typeDefineMap = queryDefineObjectType(records);
+
+        List<ObjectTypeCollectDTO> result = new ArrayList<>();
+        records.forEach(item->{
+            ObjectTypeCollectDTO collectType = new ObjectTypeCollectDTO();
+            //设置标准类型定义信息
+            String defineTypeId = item.getDefineTypeId();
+            if(StringUtils.isNotEmpty(defineTypeId)){
+                ObjectTypeDefine objectTypeDefine = typeDefineMap.get(defineTypeId);
+                if(objectTypeDefine != null){
+                    BeanUtils.copyProperties(objectTypeDefine,collectType);
+                }
+            }
+            BeanUtils.copyProperties(item,collectType);
+            result.add(collectType);
+        });
+        selectPage.setRecords(result);
+        return selectPage;
+    }
+
+    /**
+     * 查询标准类型定义
+     * @return
+     */
+    private Map<String, ObjectTypeDefine> queryDefineObjectType(List<ObjectTypeCollect> records){
+        Set<String> ids = records.stream().map(ObjectTypeCollect::getDefineTypeId).collect(Collectors.toSet());
+        QueryWrapper<ObjectTypeDefine> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("id",ids);
+        //queryWrapper.select("id","name");
+        List<ObjectTypeDefine> objectTypeDefines = objectTypeService.queryByCondition(queryWrapper);
+        if(CollUtil.isEmpty(objectTypeDefines)){
+            return new HashMap<>();
+        }
+        return objectTypeDefines.stream().collect(Collectors.toMap(ObjectTypeDefine::getId, item->item, (k1, k2) -> k1));
+    }
+
+    /**
+     * 查询商品类型映射关系
+     * @return
+     */
+    private Map<String,Set<String>> queryBossBdtpTypeRel(){
+       List<BossBdtpTypeRel> typeRelList = bossBdtpTypeRelService.queryByCondition(new QueryWrapper<>());
+       if(CollUtil.isEmpty(typeRelList)){
+           return new HashMap<>();
+       }
+        return typeRelList.stream().collect(Collectors.groupingBy(BossBdtpTypeRel::getGoodCode,
+               Collectors.mapping(BossBdtpTypeRel::getTypeCode, Collectors.toSet())));
+    }
+
+    /**
+     * 查询BDTP标准交付范围-对象类型
+     */
+    private Map<String,ObjectTypeCollect> queryBdtpObjectTypeCollect(){
+        LambdaQueryWrapper<ObjectTypeCollect> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ObjectTypeCollect::getGroupCode,"0");
+        wrapper.eq(ObjectTypeCollect::getProjectId,"0");
+        wrapper.eq(ObjectTypeCollect::getIsDelivery,1);
+        wrapper.eq(ObjectTypeCollect::getValid,ValidEnum.TRUE.getType());
+        List<ObjectTypeCollect> objectTypeCollects = objectTypeCollectService.queryByCondition(wrapper);
+        if(CollUtil.isEmpty(objectTypeCollects)){
+            return new HashMap<>();
+        }
+        return objectTypeCollects.stream().collect(Collectors.toMap(ObjectTypeCollect::getCode, item->item, (k1, k2) -> k1));
+    }
+
+    /**
+     * 查询BDTP标准交付范围-信息点
+     */
+    private Map<String, List<ObjectInfoCollect>> queryBdtpObjectInfoCollect(){
+        LambdaQueryWrapper<ObjectInfoCollect> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ObjectInfoCollect::getGroupCode,"0");
+        wrapper.eq(ObjectInfoCollect::getProjectId,"0");
+        wrapper.eq(ObjectInfoCollect::getIsDelivery,1);
+        wrapper.eq(ObjectInfoCollect::getValid,ValidEnum.TRUE.getType());
+        List<ObjectInfoCollect> objectInfoCollects = objectInfoCollectService.queryByCondition(wrapper);
+        if(CollUtil.isEmpty(objectInfoCollects)){
+            return new HashMap<>();
+        }
+        return objectInfoCollects.stream().collect(Collectors.groupingBy(ObjectInfoCollect::getClassCode));
+    }
+
+    /**
+     * 查询BDTP标准交付范围-关系
+     */
+    private Map<String,List<RelationDefineCollect>> queryBdtpObjectRelCollect(){
+        LambdaQueryWrapper<RelationDefineCollect> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(RelationDefineCollect::getGroupCode,"0");
+        wrapper.eq(RelationDefineCollect::getProjectId,"0");
+        wrapper.eq(RelationDefineCollect::getValid,ValidEnum.TRUE.getType());
+        List<RelationDefineCollect> relationCollects = relationDefineCollectService.queryByCondition(wrapper);
+        if(CollUtil.isEmpty(relationCollects)){
+            return new HashMap<>();
+        }/*
+
+        Map<String,List<RelationDefineCollect>> resultMap = new HashMap<>();
+        for (RelationDefineCollect relationCollect : relationCollects) {
+            ArrayNode sourceTypeCodes = relationCollect.getSourceTypeCodes();
+            if(CollUtil.isNotEmpty(sourceTypeCodes)){
+                sourceTypeCodes.forEach(item->{
+                    List<RelationDefineCollect> list = new ArrayList<>();
+                });
+            }
+            ArrayNode endTypeCodes = relationCollect.getEndTypeCodes();
+        }
+        */
+        return new HashMap<>();
+    }
+
 }

+ 15 - 1
dmp-business/dmp-rwd/src/main/resources/db/init/schema.sql

@@ -375,4 +375,18 @@ CREATE TABLE IF NOT EXISTS `dt_define_relation_delivery` (
   `valid` tinyint DEFAULT '1' COMMENT '合法标识',
   `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '乐观锁',
   PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
+
+CREATE TABLE `boss_bdtp_type_rel` (
+  `id` varchar(40) COLLATE utf8mb4_general_ci NOT NULL,
+  `good_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;

+ 0 - 6
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/dto/RelationDefineCollectDTO.java

@@ -1,14 +1,8 @@
 package com.persagy.dmp.delivery.dto;
 
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
-import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.persagy.dmp.basic.dto.RelationCalDTO;
 import com.persagy.dmp.basic.dto.RelationCalRuleDTO;
-import com.persagy.dmp.common.model.entity.AuditableEntity;
 import com.persagy.dmp.delivery.entity.RelationDefineCollect;
-import com.persagy.dmp.typehandler.RelationCalTypeHandler;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 

+ 42 - 0
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/dto/boss/DeliveryOrderDTO.java

@@ -0,0 +1,42 @@
+package com.persagy.dmp.delivery.dto.boss;
+
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author:linhuili
+ * @date:2022/1/18
+ */
+@Data
+public class DeliveryOrderDTO {
+
+    /** 交付计划总ID */
+    private String id;
+
+    /** 交付计划ID */
+    private String planId;
+
+    /** 商品编码 */
+    private ArrayNode goodsCode;
+
+    /** 商品数量 */
+    private Integer goodsNum;
+
+    /** 开始时间 */
+    private String startTime;
+
+    /** 结束时间 */
+    private String endTime;
+
+    /** 项目ID */
+    private String projectId;
+
+    /** 项目名称 */
+    private String projectName;
+
+    /** 管家账户 */
+    private String account;
+
+}

+ 28 - 0
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/entity/BossBdtpTypeRel.java

@@ -0,0 +1,28 @@
+package com.persagy.dmp.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_bdtp_type_rel", autoResultMap = true)
+public class BossBdtpTypeRel extends AuditableEntity {
+
+    /** 商品编码 */
+    private String goodCode;
+
+    /** 类型编码 */
+    private String typeCode;
+
+    /** 对象类型 */
+    private String objType;
+
+}