i皖送费用推送、Mybatis工程信息拦截器取消

This commit is contained in:
syruan 2025-01-23 15:51:16 +08:00
parent 758cd9f47d
commit ba45c87fb8
7 changed files with 273 additions and 1 deletions

View File

@ -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 {

View File

@ -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<IwsCostPushBean> list = iwsCostPushService.findAgreement(obj);
return getDataTable(list);
}
/**
* 导出协议推送匹配列表
*/
@PostMapping("/export")
@ApiOperation("导出协议推送匹配列表--后端处理")
public void export(HttpServletResponse response, IwsCostPushBean obj) {
List<IwsCostPushBean> list = iwsCostPushService.findAgreement(obj);
ExcelUtil<IwsCostPushBean> util = new ExcelUtil<>(IwsCostPushBean.class);
util.exportExcel(response, list, "协议推送匹配");
}
}

View File

@ -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<String> ids;
// 推送备注
private String pushRemark;
private String companyId;
}

View File

@ -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<IwsCostPushBean> findAgreement(IwsCostPushBean o);
}

View File

@ -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<IwsCostPushBean> findAgreement(IwsCostPushBean o);
}

View File

@ -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<IwsCostPushBean> findAgreement(IwsCostPushBean o) {
return iwsCostPushMapper.findAgreement(o);
}
}

View File

@ -0,0 +1,40 @@
<?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.bonus.material.push.mapper.IwsCostPushMapper">
<select id="findAgreement" resultType="com.bonus.material.push.domain.IwsCostPushBean">
SELECT
bp.PRO_ID AS projectId,
bp.pro_name AS projectName,
bu.unit_name AS unitName,
bma.`agreement_code` AS agreementCode,
bma.is_slt AS isSettlement,
bma.sign_time AS settlementTime,
bma.is_push AS isPush
FROM bm_agreement_info bma
LEFT JOIN bm_project bp ON bp.pro_id = bma.project_id
LEFT JOIN bm_unit bu ON bu.unit_id = bma.unit_id
<where>
<if test="agreementCode != null and agreementCode != ''">
AND bma.agreement_code LIKE CONCAT('%',#{agreementCode},'%')
</if>
<if test="projectId != null and projectId != ''">
AND bma.project_id = #{projectId}
</if>
<if test="unitId != null and unitId != ''">
AND bma.unit_id = #{unitId}
</if>
<if test="isPush != null and isPush != ''">
AND bma.is_push = #{isPush}
</if>
<if test="isSettlement != null and isSettlement != ''">
AND bma.is_slt = #{isSettlement}
</if>
</where>
</select>
</mapper>