16 changed files with 870 additions and 0 deletions
@ -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; |
|||
} |
@ -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; |
|||
|
|||
} |
@ -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; |
|||
} |
@ -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<OneListFormDTO> 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<ContractFormDTO> 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<BidFormDTO> formDTO){ |
|||
formDTO.setCustomerId(customerId); |
|||
ofsService.collBid(formDTO); |
|||
return new Result(); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<ScreenBidInfoEntity> { |
|||
|
|||
int deleteBatch(@Param("customerId") String customerId); |
|||
|
|||
void insertBatch(@Param("list") List<BidFormDTO> list, @Param("customerId") String customerId, @Param("dateId") String dateId); |
|||
} |
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<ScreenContractInfoEntity> { |
|||
|
|||
int deleteBatch(@Param("customerId") String customerId); |
|||
|
|||
void insertBatch(@Param("list") List<ContractFormDTO> list, @Param("customerId") String customerId, @Param("dateId") String dateId); |
|||
} |
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<ScreenListInfoEntity> { |
|||
|
|||
int deleteBatch(@Param("customerId") String customerId); |
|||
|
|||
void insertBatch(@Param("list") List<OneListFormDTO> list, @Param("customerId") String customerId, @Param("dateId") String dateId); |
|||
} |
@ -0,0 +1,91 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -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<OneListFormDTO> formDTO); |
|||
|
|||
/** |
|||
* @return void |
|||
* @param formDTO |
|||
* @author yinzuomei |
|||
* @description 【146】合同监管 |
|||
* @Date 2021/1/22 10:19 |
|||
**/ |
|||
void collContract(ScreenCollFormDTO<ContractFormDTO> formDTO); |
|||
|
|||
/** |
|||
* @return void |
|||
* @param formDTO |
|||
* @author yinzuomei |
|||
* @description 【146】竞标管理 |
|||
* @Date 2021/1/22 10:19 |
|||
**/ |
|||
void collBid(ScreenCollFormDTO<BidFormDTO> formDTO); |
|||
} |
@ -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<OneListFormDTO> 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<ContractFormDTO> 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<BidFormDTO> 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()); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.plugins.ScreenBidInfoDao"> |
|||
<delete id="deleteBatch" parameterType="map"> |
|||
delete from screen_bid_info where CUSTOMER_ID=#{customerId} |
|||
</delete> |
|||
|
|||
<insert id="insertBatch" parameterType="map"> |
|||
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 |
|||
<foreach collection ="list" item="item" index= "index" separator =","> |
|||
( |
|||
(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() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,52 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.plugins.ScreenContractInfoDao"> |
|||
|
|||
<delete id="deleteBatch" parameterType="map"> |
|||
delete from screen_contract_info where CUSTOMER_ID=#{customerId} |
|||
</delete> |
|||
|
|||
<insert id="insertBatch" parameterType="map"> |
|||
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 |
|||
<foreach collection ="list" item="item" index= "index" separator =","> |
|||
( |
|||
(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() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
</mapper> |
@ -0,0 +1,32 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.plugins.ScreenListInfoDao"> |
|||
|
|||
<delete id="deleteBatch" parameterType="map"> |
|||
delete from screen_list_info where CUSTOMER_ID=#{customerId} |
|||
</delete> |
|||
|
|||
<insert id="insertBatch" parameterType="map"> |
|||
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 |
|||
<foreach collection ="list" item="item" index= "index" separator =","> |
|||
( |
|||
(SELECT REPLACE(UUID(), '-', '') AS id), |
|||
#{customerId}, |
|||
#{dateId}, |
|||
#{item.listId}, |
|||
#{item.listCode}, |
|||
#{item.listName}, |
|||
#{item.sort}, |
|||
'0', |
|||
0, |
|||
'APP_USER', |
|||
NOW(), |
|||
'APP_USER', |
|||
NOW() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue