From ba45c87fb882a35f500dfb50cd747fce31496177 Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Thu, 23 Jan 2025 15:51:16 +0800 Subject: [PATCH] =?UTF-8?q?i=E7=9A=96=E9=80=81=E8=B4=B9=E7=94=A8=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E3=80=81Mybatis=E5=B7=A5=E7=A8=8B=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E5=99=A8=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/DataEnDecryptInterceptor.java | 2 +- .../controller/IwsCostPushController.java | 56 +++++++++++ .../material/push/domain/IwsCostPushBean.java | 96 +++++++++++++++++++ .../push/mapper/IwsCostPushMapper.java | 23 +++++ .../push/service/IwsCostPushService.java | 21 ++++ .../service/impl/IwsCostPushServiceImpl.java | 36 +++++++ .../material/push/IwsCostPushMapper.xml | 40 ++++++++ 7 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/push/domain/IwsCostPushBean.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/push/mapper/IwsCostPushMapper.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/IwsCostPushService.java create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java create mode 100644 bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/interceptor/DataEnDecryptInterceptor.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/interceptor/DataEnDecryptInterceptor.java index 183a49ec..5f259906 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/interceptor/DataEnDecryptInterceptor.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/interceptor/DataEnDecryptInterceptor.java @@ -29,7 +29,7 @@ import java.util.Properties; }) public class DataEnDecryptInterceptor implements Interceptor { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); - final static String USER_MAPPER_ID = "com.bonus.material.basic.mapper.BmProjectMapper"; + final static String USER_MAPPER_ID = ""; final static String DEPT_MAPPER_ID = "com.bonus.material.basic.mapper.BmUnitMapper"; @Override public Object intercept(Invocation invocation) throws Throwable { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java new file mode 100644 index 00000000..ed698f06 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/controller/IwsCostPushController.java @@ -0,0 +1,56 @@ +package com.bonus.material.push.controller; + +import com.bonus.common.core.utils.poi.ExcelUtil; +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.page.TableDataInfo; +import com.bonus.material.push.domain.IwsCostPushBean; +import com.bonus.material.push.service.IwsCostPushService; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.push.controller + * @CreateTime: 2025-01-23 15:04 + * @Description: i皖送费用推送控制器 + */ +@RestController +@RequestMapping("/iws_cost_push") +public class IwsCostPushController extends BaseController { + + @Resource + private IwsCostPushService iwsCostPushService; + + + /** + * 查询协议推送匹配列表 + * @param obj 查询条件 + */ + @ApiOperation("查询协议推送匹配列表--分页") + @PostMapping("/findAgreementPushMatchList") + public TableDataInfo findAgreementPushMatchList(IwsCostPushBean obj) { + startPage(); + List list = iwsCostPushService.findAgreement(obj); + return getDataTable(list); + } + + /** + * 导出协议推送匹配列表 + */ + @PostMapping("/export") + @ApiOperation("导出协议推送匹配列表--后端处理") + public void export(HttpServletResponse response, IwsCostPushBean obj) { + List list = iwsCostPushService.findAgreement(obj); + ExcelUtil util = new ExcelUtil<>(IwsCostPushBean.class); + util.exportExcel(response, list, "协议推送匹配"); + } + + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/domain/IwsCostPushBean.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/domain/IwsCostPushBean.java new file mode 100644 index 00000000..b744a04f --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/domain/IwsCostPushBean.java @@ -0,0 +1,96 @@ +package com.bonus.material.push.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.push.domain + * @CreateTime: 2025-01-23 10:01 + * @Description: i皖送费用推送 + */ +@Data +public class IwsCostPushBean implements Serializable { + + private static final long serialVersionUID = -1473066593962126100L; + + private String id; + + // 协议号 + @Excel(name = "协议号") + private String agreementCode; + + // 协议id + private String agreementId; + + private String projectId; + + private String unitId; + + @Excel(name = "项目名称") + private String projectName; + + @Excel(name = "单位名称") + private String unitName; + + private String typeName; + + private String modelName; + + private String num; + + // 领料日期 + private String leaseDate; + + private String backDate; + + private String leaseMoney; + + private String lostMoney; + + private String scrapMoney; + + private String repairMoney; + + private String leasePrice; + + private String time; + + private String month; + + private String type; + + private String buyPrice; + + // 是否推送 + @Excel(name = "是否推送", readConverterExp = "0=未推送,1=已推送") + private String isPush; + + private String money; + + private String year; + + // 是否结算 + @Excel(name = "是否结算", readConverterExp = "0=未结算,1=已结算") + private Byte isSettlement; + + // 结算时间 + @Excel(name = "结算时间", dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime settlementTime; + + private String userName; + + private List ids; + + // 推送备注 + private String pushRemark; + + private String companyId; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/mapper/IwsCostPushMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/mapper/IwsCostPushMapper.java new file mode 100644 index 00000000..5ac4c74b --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/mapper/IwsCostPushMapper.java @@ -0,0 +1,23 @@ +package com.bonus.material.push.mapper; + +import com.bonus.material.push.domain.IwsCostPushBean; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.push.mapper + * @CreateTime: 2025-01-23 14:40 + * @Description: i皖送费用推送mapper + */ +@Mapper +public interface IwsCostPushMapper { + + /** + * 查询协议推送匹配列表 + */ + List findAgreement(IwsCostPushBean o); + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/IwsCostPushService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/IwsCostPushService.java new file mode 100644 index 00000000..3f5ec855 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/IwsCostPushService.java @@ -0,0 +1,21 @@ +package com.bonus.material.push.service; + +import com.bonus.material.push.domain.IwsCostPushBean; + +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.push.service + * @CreateTime: 2025-01-23 14:48 + * @Description: i皖送推送server 接口 + */ +public interface IwsCostPushService { + + /** + * 协议推送匹配列表 + */ + List findAgreement(IwsCostPushBean o); + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java new file mode 100644 index 00000000..07ae8fd1 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/push/service/impl/IwsCostPushServiceImpl.java @@ -0,0 +1,36 @@ +package com.bonus.material.push.service.impl; + +import com.bonus.material.push.domain.IwsCostPushBean; +import com.bonus.material.push.mapper.IwsCostPushMapper; +import com.bonus.material.push.service.IwsCostPushService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.push.service.impl + * @CreateTime: 2025-01-23 14:48 + * @Description: 描述 + */ +@Service +public class IwsCostPushServiceImpl implements IwsCostPushService { + + @Resource + private IwsCostPushMapper iwsCostPushMapper; + + + /** + * 根据给定的条件查找协议信息 + * + * @param o IwsCostPushBean对象,包含查找协议所需的条件 + * @return 返回一个IwsCostPushBean列表,包含符合查找条件的协议信息 + */ + @Override + public List findAgreement(IwsCostPushBean o) { + return iwsCostPushMapper.findAgreement(o); + } +} diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml new file mode 100644 index 00000000..144ac73b --- /dev/null +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file