From 5784c39b99f976d656b8a05f35aedbccb67c3c58 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jan 2021 12:53:57 +0800 Subject: [PATCH] =?UTF-8?q?146=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/plugins/BidFormDTO.java | 60 ++++++++++ .../epmet/dto/plugins/ContractFormDTO.java | 56 ++++++++++ .../com/epmet/dto/plugins/OneListFormDTO.java | 35 ++++++ .../dto/screencoll/ScreenCollFormDTO.java | 5 + .../controller/plugins/OfsController.java | 66 +++++++++++ .../epmet/dao/plugins/ScreenBidInfoDao.java | 40 +++++++ .../dao/plugins/ScreenContractInfoDao.java | 40 +++++++ .../epmet/dao/plugins/ScreenListInfoDao.java | 40 +++++++ .../entity/plugins/ScreenBidInfoEntity.java | 91 +++++++++++++++ .../plugins/ScreenContractInfoEntity.java | 86 +++++++++++++++ .../entity/plugins/ScreenListInfoEntity.java | 68 ++++++++++++ .../com/epmet/service/plugins/OfsService.java | 41 +++++++ .../service/plugins/impl/OfsServiceImpl.java | 104 ++++++++++++++++++ .../mapper/plugins/ScreenBidInfoDao.xml | 54 +++++++++ .../mapper/plugins/ScreenContractInfoDao.xml | 52 +++++++++ .../mapper/plugins/ScreenListInfoDao.xml | 32 ++++++ 16 files changed, 870 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java new file mode 100644 index 0000000000..154d6c87a0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/BidFormDTO.java @@ -0,0 +1,60 @@ +package com.epmet.dto.plugins; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 【146】竞标管理 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:54 + */ +@Data +public class BidFormDTO implements Serializable { + private static final long serialVersionUID = -9132608534627587213L; + /** + * 竞标项目id + */ + private String bidId; + + /** + * 竞标项目名称 + */ + private String bidName; + + /** + * 状态编码 + */ + private String statusCode; + + /** + * 状态描述eg:已中标、未中标、投标中、 + */ + private String statusDesc; + + /** + * 金额单位万元 + */ + private Double amount; + + /** + * 发布时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date releaseTime; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java new file mode 100644 index 0000000000..445885e04c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/ContractFormDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.plugins; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 【146】合同监管入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:43 + */ +@Data +public class ContractFormDTO implements Serializable { + private static final long serialVersionUID = 971064596156093552L; + /** + * 合同id + */ + private String contractId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同所属类别编码 + */ + private String categoryCode; + + /** + * 合同所属类别名称 + */ + private String categoryName; + + /** + * 合同到期日期:2020-12-31 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date dueDate; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java new file mode 100644 index 0000000000..992e62d2d3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/plugins/OneListFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.plugins; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 【146】一张清单 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:12 + */ +@Data +public class OneListFormDTO implements Serializable { + private static final long serialVersionUID = 8350552654881582654L; + /** + * 清单id + */ + private String listId; + + /** + * 清单编码 + */ + private String listCode; + + /** + * 名称 + */ + private String listName; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java index 760e48b3da..fa3e97d11d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java @@ -45,4 +45,9 @@ public class ScreenCollFormDTO implements Serializable { public String toString() { return JSON.toJSONString(this); } + + /** + * 当前客户id + */ + private String customerId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java new file mode 100644 index 0000000000..a7936de52a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java @@ -0,0 +1,66 @@ +package com.epmet.controller.plugins; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.plugins.OfsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 146体系数据采集 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:10 + */ +@RestController +@RequestMapping("ofs") +public class OfsController { + + @Autowired + private OfsService ofsService; + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + @PostMapping("onelist") + public Result collOneList(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collOneList(formDTO); + return new Result(); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】合同监管 + * @Date 2021/1/22 10:42 + **/ + @PostMapping("contract") + public Result collContract(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collContract(formDTO); + return new Result(); + } + + /** + * @param customerId + * @param formDTO + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:53 + **/ + @PostMapping("bid") + public Result collBid(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ + formDTO.setCustomerId(customerId); + ofsService.collBid(formDTO); + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java new file mode 100644 index 0000000000..b269279cfb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenBidInfoDao.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.entity.plugins.ScreenBidInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:竞标管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenBidInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java new file mode 100644 index 0000000000..c24ae1026e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenContractInfoDao.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.entity.plugins.ScreenContractInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:合同基本信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenContractInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java new file mode 100644 index 0000000000..45627c662b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/plugins/ScreenListInfoDao.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.plugins; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.entity.plugins.ScreenListInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 146:一张清单列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Mapper +public interface ScreenListInfoDao extends BaseDao { + + int deleteBatch(@Param("customerId") String customerId); + + void insertBatch(@Param("list") List list, @Param("customerId") String customerId, @Param("dateId") String dateId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java new file mode 100644 index 0000000000..c9d8658f10 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenBidInfoEntity.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 146:竞标管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_bid_info") +public class ScreenBidInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 竞标项目id + */ + private String bidId; + + /** + * 竞标项目名称 + */ + private String bidName; + + /** + * 状态编码 + */ + private String statusCode; + + /** + * 状态描述eg:已中标、未中标、投标中、 + */ + private String statusDesc; + + /** + * 金额单位万元 + */ + private Double amount; + + /** + * 发布时间 + */ + private Date releaseTime; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java new file mode 100644 index 0000000000..6d7d69ce3e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenContractInfoEntity.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 146:合同基本信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_contract_info") +public class ScreenContractInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 合同id + */ + private String contractId; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同所属类别编码 + */ + private String categoryCode; + + /** + * 合同所属类别名称 + */ + private String categoryName; + + /** + * 合同到期日期:2020-12-31 + */ + private Date dueDate; + + /** + * 发布村镇,以英文逗号隔开 + */ + private String townIds; + + /** + * 发布村镇名称,以英文逗号隔开 + */ + private String townNames; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java new file mode 100644 index 0000000000..08e7c7e7ff --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/plugins/ScreenListInfoEntity.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.plugins; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 146:一张清单列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-01-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_list_info") +public class ScreenListInfoEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 截止日期eg:20200101 + */ + private String dateId; + + /** + * 清单id + */ + private String listId; + + /** + * 清单编码 + */ + private String listCode; + + /** + * 名称 + */ + private String listName; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java new file mode 100644 index 0000000000..e2aa01aced --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/OfsService.java @@ -0,0 +1,41 @@ +package com.epmet.service.plugins; + +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; + +/** + * 146体系数据采集 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:18 + */ +public interface OfsService { + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + void collOneList(ScreenCollFormDTO formDTO); + + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】合同监管 + * @Date 2021/1/22 10:19 + **/ + void collContract(ScreenCollFormDTO formDTO); + + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:19 + **/ + void collBid(ScreenCollFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java new file mode 100644 index 0000000000..cb05167baa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/OfsServiceImpl.java @@ -0,0 +1,104 @@ +package com.epmet.service.plugins.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.plugins.ScreenBidInfoDao; +import com.epmet.dao.plugins.ScreenContractInfoDao; +import com.epmet.dao.plugins.ScreenListInfoDao; +import com.epmet.dto.plugins.BidFormDTO; +import com.epmet.dto.plugins.ContractFormDTO; +import com.epmet.dto.plugins.OneListFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.service.plugins.OfsService; +import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/1/22 10:20 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class OfsServiceImpl implements OfsService { + @Autowired + private ScreenBidInfoDao screenBidInfoDao; + @Autowired + private ScreenContractInfoDao screenContractInfoDao; + @Autowired + private ScreenListInfoDao screenListInfoDao; + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description 【146】一张清单 + * @Date 2021/1/22 10:19 + **/ + @Override + public void collOneList(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenListInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenListInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenListInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } + + @Override + public void collContract(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenContractInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenContractInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenContractInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description 【146】竞标管理 + * @Date 2021/1/22 10:19 + **/ + @Override + public void collBid(ScreenCollFormDTO formDTO) { + if (CollectionUtils.isEmpty(formDTO.getDataList())) { + return; + } + if (formDTO.getIsFirst()) { + int affectRows = screenBidInfoDao.deleteBatch(formDTO.getCustomerId()); + while (affectRows >= NumConstant.ONE) { + affectRows = screenBidInfoDao.deleteBatch(formDTO.getCustomerId()); + } + } + Lists.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { + screenBidInfoDao.insertBatch(list, + formDTO.getCustomerId(), + formDTO.getDateId()); + }); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml new file mode 100644 index 0000000000..cb3d221dc5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenBidInfoDao.xml @@ -0,0 +1,54 @@ + + + + + + delete from screen_bid_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_bid_info` ( + `ID`, + `CUSTOMER_ID`, + `DATE_ID`, + `BID_ID`, + `BID_NAME`, + `STATUS_CODE`, + `STATUS_DESC`, + `AMOUNT`, + `RELEASE_TIME`, + `TOWN_IDS`, + `TOWN_NAMES`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.bidId}, + #{item.bidName}, + #{item.statusCode}, + #{item.statusDesc}, + #{item.amount}, + #{item.releaseTime}, + #{item.townIds}, + #{item.townNames}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml new file mode 100644 index 0000000000..24abf9f9f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenContractInfoDao.xml @@ -0,0 +1,52 @@ + + + + + + + delete from screen_contract_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_contract_info` ( + `ID`, + `CUSTOMER_ID`, + `DATE_ID`, + `CONTRACT_ID`, + `CONTRACT_NAME`, + `CATEGORY_CODE`, + `CATEGORY_NAME`, + `DUE_DATE`, + `TOWN_IDS`, + `TOWN_NAMES`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.contractId}, + #{item.contractName}, + #{item.categoryCode}, + #{item.categoryName}, + #{item.dueDate}, + #{item.townIds}, + #{item.townNames}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml new file mode 100644 index 0000000000..1695f1a726 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenListInfoDao.xml @@ -0,0 +1,32 @@ + + + + + + + delete from screen_list_info where CUSTOMER_ID=#{customerId} + + + + INSERT INTO `screen_list_info` ( `ID`, `CUSTOMER_ID`, `DATE_ID`, `LIST_ID`, `LIST_CODE`, `LIST_NAME`, `SORT`, + `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME` ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{dateId}, + #{item.listId}, + #{item.listCode}, + #{item.listName}, + #{item.sort}, + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + \ No newline at end of file