13 changed files with 370 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||
|
package com.epmet.dto.result.plugins; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 【146体系】竞标管理-列表 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/1/22 13:37 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BidInfoResultDTO { |
||||
|
private String bidName; |
||||
|
private String statusDesc; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dto.result.plugins; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 【146体系】合同监督-列表 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/1/22 13:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ContractResultDTO { |
||||
|
private String contractListName; |
||||
|
@JsonFormat(pattern = "yyyy.MM.dd", timezone = "GMT+8") |
||||
|
private Date dueDate; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.result.plugins; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 【146体系】清单列表 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/1/22 13:23 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OneListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1578923862757670664L; |
||||
|
private String listName; |
||||
|
private String listId; |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
package com.epmet.datareport.controller.plugins; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.datareport.service.plugins.OfsService; |
||||
|
import com.epmet.dto.result.plugins.BidInfoResultDTO; |
||||
|
import com.epmet.dto.result.plugins.ContractResultDTO; |
||||
|
import com.epmet.dto.result.plugins.OneListResultDTO; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestHeader; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146体系数据查询 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/1/22 12:58 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("plugins/ofs") |
||||
|
public class OfsController { |
||||
|
@Autowired |
||||
|
private OfsService ofsService; |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @author yinzuomei |
||||
|
* @description 【146体系】清单列表 |
||||
|
* @Date 2021/1/22 13:36 |
||||
|
**/ |
||||
|
@PostMapping("list") |
||||
|
public Result<List<OneListResultDTO>> oneList(@RequestHeader("CustomerId") String customerId){ |
||||
|
if(StringUtils.isNotBlank(customerId)){ |
||||
|
return new Result().ok(ofsService.queryOneList(customerId)); |
||||
|
} |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @author yinzuomei |
||||
|
* @description 【146体系】合同监督-列表 |
||||
|
* @Date 2021/1/22 13:36 |
||||
|
**/ |
||||
|
@PostMapping("contractlist") |
||||
|
public Result<List<ContractResultDTO>> queryContractList(@RequestHeader("CustomerId") String customerId){ |
||||
|
if(StringUtils.isNotBlank(customerId)){ |
||||
|
return new Result().ok(ofsService.queryContractList(customerId)); |
||||
|
} |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("bidlist") |
||||
|
public Result<List<BidInfoResultDTO>> bidList(@RequestHeader("CustomerId") String customerId){ |
||||
|
if(StringUtils.isNotBlank(customerId)){ |
||||
|
return new Result().ok(ofsService.queryBidList(customerId)); |
||||
|
} |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
/** |
||||
|
* 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.datareport.dao.plugins; |
||||
|
|
||||
|
import com.epmet.dto.result.plugins.BidInfoResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146:竞标管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-01-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ScreenBidInfoDao{ |
||||
|
|
||||
|
|
||||
|
List<BidInfoResultDTO> selectList(String customerId); |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
/** |
||||
|
* 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.datareport.dao.plugins; |
||||
|
|
||||
|
import com.epmet.dto.result.plugins.ContractResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146:合同基本信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-01-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ScreenContractInfoDao { |
||||
|
|
||||
|
List<ContractResultDTO> selectList(String customerId); |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
/** |
||||
|
* 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.datareport.dao.plugins; |
||||
|
|
||||
|
import com.epmet.dto.result.plugins.OneListResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146:一张清单列表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-01-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ScreenListInfoDao { |
||||
|
|
||||
|
List<OneListResultDTO> selectList(String customerId); |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.datareport.service.plugins; |
||||
|
|
||||
|
import com.epmet.dto.result.plugins.BidInfoResultDTO; |
||||
|
import com.epmet.dto.result.plugins.ContractResultDTO; |
||||
|
import com.epmet.dto.result.plugins.OneListResultDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146体系数据查询 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/1/22 10:18 |
||||
|
*/ |
||||
|
public interface OfsService { |
||||
|
|
||||
|
List<OneListResultDTO> queryOneList(String customerId); |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @author yinzuomei |
||||
|
* @description 【146体系】合同监督-列表 |
||||
|
* @Date 2021/1/22 13:36 |
||||
|
**/ |
||||
|
List<ContractResultDTO> queryContractList(String customerId); |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @author yinzuomei |
||||
|
* @description 【146体系】竞标管理-列表 |
||||
|
* @Date 2021/1/22 13:38 |
||||
|
**/ |
||||
|
List<BidInfoResultDTO> queryBidList(String customerId); |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.epmet.datareport.service.plugins.impl; |
||||
|
|
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.constant.DataSourceConstant; |
||||
|
import com.epmet.datareport.dao.plugins.ScreenBidInfoDao; |
||||
|
import com.epmet.datareport.dao.plugins.ScreenContractInfoDao; |
||||
|
import com.epmet.datareport.dao.plugins.ScreenListInfoDao; |
||||
|
import com.epmet.datareport.service.plugins.OfsService; |
||||
|
import com.epmet.dto.result.plugins.BidInfoResultDTO; |
||||
|
import com.epmet.dto.result.plugins.ContractResultDTO; |
||||
|
import com.epmet.dto.result.plugins.OneListResultDTO; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 146体系数据查询 |
||||
|
* |
||||
|
* @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; |
||||
|
|
||||
|
|
||||
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
||||
|
@Override |
||||
|
public List<OneListResultDTO> queryOneList(String customerId) { |
||||
|
return screenListInfoDao.selectList(customerId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) |
||||
|
@Override |
||||
|
public List<ContractResultDTO> queryContractList(String customerId) { |
||||
|
return screenContractInfoDao.selectList(customerId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @author yinzuomei |
||||
|
* @description 【146体系】竞标管理-列表 |
||||
|
* @Date 2021/1/22 13:38 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<BidInfoResultDTO> queryBidList(String customerId) { |
||||
|
return screenBidInfoDao.selectList(customerId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
<?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.datareport.dao.plugins.ScreenBidInfoDao"> |
||||
|
|
||||
|
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.BidInfoResultDTO"> |
||||
|
SELECT |
||||
|
sbi.BID_NAME AS bidName, |
||||
|
sbi.STATUS_DESC AS statusDesc |
||||
|
FROM |
||||
|
screen_bid_info sbi |
||||
|
WHERE |
||||
|
sbi.DEL_FLAG = '0' |
||||
|
AND sbi.CUSTOMER_ID =#{customerId} |
||||
|
ORDER BY |
||||
|
sbi.RELEASE_TIME DESC |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,18 @@ |
|||||
|
<?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.datareport.dao.plugins.ScreenContractInfoDao"> |
||||
|
|
||||
|
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.ContractResultDTO"> |
||||
|
SELECT |
||||
|
sci.CONTRACT_NAME AS contractListName, |
||||
|
sci.DUE_DATE AS dueDate |
||||
|
FROM |
||||
|
screen_contract_info sci |
||||
|
WHERE |
||||
|
sci.DEL_FLAG = '0' |
||||
|
and sci.CUSTOMER_ID=#{customerId} |
||||
|
order by sci.DUE_DATE desc |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,17 @@ |
|||||
|
<?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.datareport.dao.plugins.ScreenListInfoDao"> |
||||
|
<select id="selectList" parameterType="java.lang.String" resultType="com.epmet.dto.result.plugins.OneListResultDTO"> |
||||
|
SELECT |
||||
|
sli.LIST_ID AS listId, |
||||
|
sli.LIST_NAME AS listName |
||||
|
FROM |
||||
|
screen_list_info sli |
||||
|
WHERE |
||||
|
sli.DEL_FLAG = '0' |
||||
|
AND sli.CUSTOMER_ID = #{customerId} |
||||
|
ORDER BY |
||||
|
sli.SORT ASC |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue