Browse Source

feat: 导入公司对接数据开发

chenjianhua 1 month ago
parent
commit
81f8428a46

+ 1 - 0
service-base/src/main/java/com/simuwang/base/common/conts/ExcelConst.java

@@ -21,4 +21,5 @@ public class ExcelConst {
     public static final String ERROR_COMPANY_ID = "公司ID有误,无法查询公司名称";
     public static final String ERROR_DATE_FORMAT = "对接日期格式错误,请使用YYYY-MM-dd格式";
     public static final String ERROR_METHOD = "对接状态或者签约方式无法匹配";
+    public final static String CHANNEL_ID_ERROR= "渠道ID填写有误";
 }

+ 1 - 1
service-base/src/main/java/com/simuwang/base/pojo/dos/ContactInformationDO.java

@@ -68,7 +68,7 @@ public class ContactInformationDO {
 
     /**
      * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column contact_information.cantact_file_name
+     * This field corresponds to the database column contact_information.file_id
      */
     @TableField("file_id")
     private Integer fileId;

+ 4 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/DistributionExcelData.java

@@ -40,4 +40,8 @@ public class DistributionExcelData {
      * 分红/拆分比例
      */
     private String distribution;
+    /**
+     * 渠道ID
+     */
+    private String channelId;
 }

+ 1 - 1
service-base/src/main/resources/mapper/daq/ChannelMapper.xml

@@ -35,7 +35,7 @@
         select info.id,
                info.channel_name,
                info.channel_remark,
-               group_concat(e.email) as email,
+               wm_concat(e.email) as email,
                info.createtime,
                info.updatetime,
                info.isvalid,

+ 1 - 3
service-base/src/main/resources/mapper/daq/LastCompanyContactInfoMapper.xml

@@ -15,8 +15,6 @@
     <result column="contact_status" property="contactStatus" jdbcType="INTEGER" />
     <result column="sign_method" property="signMethod" jdbcType="INTEGER" />
     <result column="contact_remark" property="contactRemark" jdbcType="VARCHAR" />
-    <result column="cantact_file_name" property="contactFileName" jdbcType="VARCHAR" />
-    <result column="contact_file_path" property="contactFilePath" jdbcType="VARCHAR" />
     <result column="creatorid" property="creatorId" jdbcType="INTEGER" />
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="updaterid" property="updaterId" jdbcType="INTEGER" />
@@ -29,7 +27,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     id, company_id,contact_date, contactor, customer_manager, contact_id, contact_status, sign_method,
-    contact_remark, cantact_file_name, contact_file_path, creatorid, createtime, updaterid, 
+    contact_remark, creatorid, createtime, updaterid,
     updatetime, isvalid
   </sql>
   <delete id="deleteLastById">

+ 9 - 4
service-deploy/src/main/resources/application.yml

@@ -31,11 +31,16 @@ spring:
 #      url:  jdbc:oceanbase://192.168.1.28:2881/ppw_email?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
 #      username: root
 #      password: yIJ+L+WxdcugkhQEl+oM1t63Rpt+RnQ5
+#      type: com.zaxxer.hikari.HikariDataSource
+#      driver-class-name: com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
+#      url: jdbc:oceanbase://192.168.1.28:2881/ppw_email?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
+#      username: root
+#      password: Smppw@2024
       type: com.zaxxer.hikari.HikariDataSource
-      driver-class-name: com.alipay.oceanbase.obproxy.mysql.jdbc.Driver
-      url: jdbc:oceanbase://192.168.1.28:2881/ppw_email?serverTimezone=Asia/Shanghai&useLegacyDatetimeCode=false&useSSL=false&nullNamePatternMatchesAll=true&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
-      username: root
-      password: Smppw@2024
+      driver-class-name: dm.jdbc.driver.DmDriver
+      url: jdbc:dm://192.168.1.39:5236/?schema=PPW_EMAIL
+      username: PPW_EMAIL
+      password: Dmppw2024
       # hikari连接池配置 对应 HikariConfig 配置属性类
       hikari:
         pool-name: HikariCP-daq

+ 1 - 1
service-manage/src/main/java/com/simuwang/manage/init/CompleteScheduleConfig.java

@@ -151,7 +151,7 @@ public class CompleteScheduleConfig implements SchedulingConfigurer {
                 triggerContext -> {
                     String cron = sysConfigMapper.selectConfigByKey("ppw_send_task_time");
                     if(cron == null){
-                        cron = "0 0/5 8-22 * * ?";
+                        cron = "0 0 8-22 * * ?";
                     }
                     logger.info("计算排排缺失数据邮箱发送任务定时任务轮训时间:"+cron);
                     //2.2 返回执行周期(Date)

+ 10 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/DistributionServiceImpl.java

@@ -171,7 +171,7 @@ public class DistributionServiceImpl implements DistributionService {
                 if((StringUtil.isEmpty(excelData.getFundName()) && StringUtil.isEmpty(excelData.getFundId()))
                         || StringUtil.isEmpty(excelData.getPriceDate()) || StringUtil.isEmpty(excelData.getNav())
                         || StringUtil.isEmpty(excelData.getDistributeType()) || StringUtil.isEmpty(excelData.getDistribution())
-                        || StringUtil.isEmpty(excelData.getCumulativeNavWithdrawal())){
+                        || StringUtil.isEmpty(excelData.getCumulativeNavWithdrawal()) || StringUtil.isEmpty(excelData.getChannelId())){
                     ExcelFailDataVO failDataVO = toExcelFailDataVO(excelData,ExcelConst.REQUIRE_FIELD,dataIdx+startRow);
                     excelFailDataVOList.add(failDataVO);
                     continue;
@@ -209,9 +209,18 @@ public class DistributionServiceImpl implements DistributionService {
                         excelData.setFundId(fundId);
                     }
                 }
+                Integer channelId = null;
+                try{
+                    channelId = Integer.parseInt(excelData.getChannelId());
+                }catch (Exception e){
+                    ExcelFailDataVO failDataVO = toExcelFailDataVO(excelData,ExcelConst.CHANNEL_ID_ERROR,dataIdx+startRow);
+                    excelFailDataVOList.add(failDataVO);
+                    continue;
+                }
                 //开始处理成功数据
                 DistributionVO distributionVO = new DistributionVO();
                 distributionVO.setFundId(excelData.getFundId());
+                distributionVO.setChannelId(channelId);
                 distributionVO.setDistributeDate(excelData.getPriceDate());
                 distributionVO.setDistributeType(DistributeType.getDistributeTypeByInfo(excelData.getDistributeType()).getCode());
                 distributionVO.setDistribution(BigDecimal.valueOf(Double.valueOf(excelData.getDistribution())));

+ 1 - 1
service-manage/src/main/java/com/simuwang/manage/service/impl/ImageSeviceImpl.java

@@ -49,7 +49,7 @@ public class ImageSeviceImpl implements ImageSevice {
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
-        imageInfoDO.setFilePath(imagePath);
+        imageInfoDO.setFilePath(imagePath.replace(path,"/"));
         imageInfoDO.setUpdaterId(UserUtils.getLoginUser().getUserId());
         imageInfoDO.setCreatorId(UserUtils.getLoginUser().getUserId());
         imageInfoDO.setIsvalid(1);