md
This commit is contained in:
parent
ae6cbc46dc
commit
5a0168a9de
@ -0,0 +1,134 @@
|
||||
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettlePayInvoiceRelController.java
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 付款发票关联表 控制器 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisSettlePayInvoiceRel;
|
||||
import com.xdadan.erp.emis.service.IEmisSettlePayInvoiceRelService;
|
||||
|
||||
/**
|
||||
* 付款发票关联表Controller
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisSettlePayInvoiceRel")
|
||||
public class EmisSettlePayInvoiceRelController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEmisSettlePayInvoiceRelService emisSettlePayInvoiceRelService;
|
||||
|
||||
/**
|
||||
* 查询付款发票关联表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
startPage();
|
||||
List<EmisSettlePayInvoiceRel> list = emisSettlePayInvoiceRelService.selectEmisSettlePayInvoiceRelList(emisSettlePayInvoiceRel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return 数量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:list')")
|
||||
@GetMapping("/checkUnique")
|
||||
public AjaxResult checkUnique(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
int cnt=emisSettlePayInvoiceRelService.checkUnique(emisSettlePayInvoiceRel);
|
||||
return AjaxResult.success("检查成功",cnt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出付款发票关联表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:export')")
|
||||
@Log(title = "付款发票关联表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
List<EmisSettlePayInvoiceRel> list = emisSettlePayInvoiceRelService.selectEmisSettlePayInvoiceRelList(emisSettlePayInvoiceRel);
|
||||
ExcelUtil<EmisSettlePayInvoiceRel> util = new ExcelUtil<EmisSettlePayInvoiceRel>(EmisSettlePayInvoiceRel.class);
|
||||
util.exportExcel(response, list, "付款发票关联表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取付款发票关联表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(emisSettlePayInvoiceRelService.selectEmisSettlePayInvoiceRelById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增付款发票关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:add')")
|
||||
@Log(title = "付款发票关联表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return toAjax(emisSettlePayInvoiceRelService.insertEmisSettlePayInvoiceRel(emisSettlePayInvoiceRel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改付款发票关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:edit')")
|
||||
@Log(title = "付款发票关联表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return toAjax(emisSettlePayInvoiceRelService.updateEmisSettlePayInvoiceRel(emisSettlePayInvoiceRel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除付款发票关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisSettlePayInvoiceRel:remove')")
|
||||
@Log(title = "付款发票关联表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(emisSettlePayInvoiceRelService.deleteEmisSettlePayInvoiceRelByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettlePayInvoiceRel.java
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 付款发票关联表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xdadan.erp.common.annotation.Excel;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import com.xdadan.erp.common.core.domain.TreeEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName EmisSettlePayInvoiceRel
|
||||
* @Description 付款发票关联表
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
*/
|
||||
@Data
|
||||
public class EmisSettlePayInvoiceRel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 支付序号 */
|
||||
private String payId;
|
||||
/* 发票申请序号 */
|
||||
private String applySeqNo;
|
||||
|
||||
}
|
||||
@ -124,4 +124,7 @@ public class EmisSettlePayRecord extends BaseEntity
|
||||
|
||||
List<EmisSettlePayRel> payRelList;
|
||||
|
||||
// 开票记录关联
|
||||
List<EmisSettlePayInvoiceRel> payInvoiceRelList;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettlePayInvoiceRelMapper.java
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 付款发票关联表 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisSettlePayInvoiceRel;
|
||||
/**
|
||||
* @ClassName EmisSettlePayInvoiceRelMapper
|
||||
* @Description <p> 付款发票关联表 Mapper 接口 </p>
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
*/
|
||||
public interface EmisSettlePayInvoiceRelMapper extends BaseMapper<EmisSettlePayInvoiceRel>
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisSettlePayInvoiceRel selectEmisSettlePayInvoiceRelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisSettlePayInvoiceRel> selectEmisSettlePayInvoiceRelList(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return 数量
|
||||
*/
|
||||
public int checkUnique(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisSettlePayInvoiceRelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisSettlePayInvoiceRelByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettlePayInvoiceRelService.java
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 付款发票关联表 服务类接口 </p>
|
||||
*/
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xdadan.erp.emis.domain.EmisSettlePayInvoiceRel;
|
||||
|
||||
/**
|
||||
* @ClassName EmisSettlePayInvoiceRelService
|
||||
* @Description 付款发票关联表
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
*/
|
||||
public interface IEmisSettlePayInvoiceRelService
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisSettlePayInvoiceRel selectEmisSettlePayInvoiceRelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询付款发票关联表列表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 付款发票关联表集合
|
||||
*/
|
||||
public List<EmisSettlePayInvoiceRel> selectEmisSettlePayInvoiceRelList(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return 数量
|
||||
*/
|
||||
public int checkUnique(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
/**
|
||||
* 新增付款发票关联表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
/**
|
||||
* 修改付款发票关联表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel);
|
||||
|
||||
/**
|
||||
* 批量删除付款发票关联表
|
||||
*
|
||||
* @param ids 需要删除的付款发票关联表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisSettlePayInvoiceRelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除付款发票关联表信息
|
||||
*
|
||||
* @param id 付款发票关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisSettlePayInvoiceRelById(Long id);
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettlePayInvoiceRelServiceImpl.java
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 付款发票关联表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xdadan.erp.emis.domain.EmisSettlePayInvoiceRel;
|
||||
import com.xdadan.erp.emis.mapper.EmisSettlePayInvoiceRelMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisSettlePayInvoiceRelService;
|
||||
|
||||
/**
|
||||
* 付款发票关联表Service业务层处理
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2025-05-05 14:24:01
|
||||
*/
|
||||
@Service
|
||||
public class EmisSettlePayInvoiceRelServiceImpl implements IEmisSettlePayInvoiceRelService
|
||||
{
|
||||
@Autowired
|
||||
private EmisSettlePayInvoiceRelMapper emisSettlePayInvoiceRelMapper;
|
||||
|
||||
/**
|
||||
* 查询付款发票关联表
|
||||
*
|
||||
* @param id 付款发票关联表主键
|
||||
* @return 付款发票关联表
|
||||
*/
|
||||
@Override
|
||||
public EmisSettlePayInvoiceRel selectEmisSettlePayInvoiceRelById(Long id)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.selectEmisSettlePayInvoiceRelById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询付款发票关联表列表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 付款发票关联表
|
||||
*/
|
||||
@Override
|
||||
public List<EmisSettlePayInvoiceRel> selectEmisSettlePayInvoiceRelList(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.selectEmisSettlePayInvoiceRelList(emisSettlePayInvoiceRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel
|
||||
* @return 数量
|
||||
*/
|
||||
@Override
|
||||
public int checkUnique(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.checkUnique(emisSettlePayInvoiceRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增付款发票关联表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.insertEmisSettlePayInvoiceRel(emisSettlePayInvoiceRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改付款发票关联表
|
||||
*
|
||||
* @param emisSettlePayInvoiceRel 付款发票关联表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmisSettlePayInvoiceRel(EmisSettlePayInvoiceRel emisSettlePayInvoiceRel)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.updateEmisSettlePayInvoiceRel(emisSettlePayInvoiceRel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除付款发票关联表
|
||||
*
|
||||
* @param ids 需要删除的付款发票关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisSettlePayInvoiceRelByIds(Long[] ids)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.deleteEmisSettlePayInvoiceRelByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除付款发票关联表信息
|
||||
*
|
||||
* @param id 付款发票关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisSettlePayInvoiceRelById(Long id)
|
||||
{
|
||||
return emisSettlePayInvoiceRelMapper.deleteEmisSettlePayInvoiceRelById(id);
|
||||
}
|
||||
|
||||
}
|
||||
@ -59,6 +59,9 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
||||
private IEmisSettleBillService emisSettleBillService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private EmisSettlePayInvoiceRelMapper emisSettlePayInvoiceRelMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询账单收退款记录
|
||||
@ -110,8 +113,6 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0
|
||||
if("1".equals(emisSettlePayRecord.getRecType())) {
|
||||
if (emisSettlePayRecord.getPayMoney() == null ) {
|
||||
@ -158,6 +159,15 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
||||
}
|
||||
}
|
||||
|
||||
// 插入发票和收款的关系
|
||||
if(!CollectionUtils.isEmpty(emisSettlePayRecord.getPayInvoiceRelList())){
|
||||
for (EmisSettlePayInvoiceRel itemSettlePayInvoiceRel:emisSettlePayRecord.getPayInvoiceRelList()) {
|
||||
itemSettlePayInvoiceRel.setPayId(payId);
|
||||
emisSettlePayInvoiceRelMapper.insertEmisSettlePayInvoiceRel(itemSettlePayInvoiceRel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 记录收退款运单号
|
||||
List<EmisSettlePayRel> listRel=emisSettlePayRecord.getPayRelList();
|
||||
if(!CollectionUtils.isEmpty(listRel)){
|
||||
|
||||
@ -0,0 +1,111 @@
|
||||
<?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.xdadan.erp.emis.mapper.EmisSettlePayInvoiceRelMapper">
|
||||
|
||||
<resultMap type="EmisSettlePayInvoiceRel" id="EmisSettlePayInvoiceRelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="payId" column="pay_id" />
|
||||
<result property="applySeqNo" column="apply_seq_no" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisSettlePayInvoiceRelVo">
|
||||
select id, pay_id, apply_seq_no, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_settle_pay_invoice_rel
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisSettlePayInvoiceRelList" parameterType="EmisSettlePayInvoiceRel" resultMap="EmisSettlePayInvoiceRelResult">
|
||||
<include refid="selectEmisSettlePayInvoiceRelVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="payId != null and payId != ''"> and pay_id like concat('%', #{payId}, '%')</if>
|
||||
<if test="applySeqNo != null and applySeqNo != ''"> and apply_seq_no like concat('%', #{applySeqNo}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisSettlePayInvoiceRel" resultType="int">
|
||||
select count(1) from emis_settle_pay_invoice_rel
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and pay_id = #{payId}
|
||||
and apply_seq_no = #{applySeqNo}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisSettlePayInvoiceRelById" parameterType="Long" resultMap="EmisSettlePayInvoiceRelResult">
|
||||
select id, pay_id, apply_seq_no, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_settle_pay_invoice_rel a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisSettlePayInvoiceRel" parameterType="EmisSettlePayInvoiceRel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_settle_pay_invoice_rel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="payId != null and payId != ''">pay_id,</if>
|
||||
<if test="applySeqNo != null and applySeqNo != ''">apply_seq_no,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="payId != null and payId != ''">#{payId},</if>
|
||||
<if test="applySeqNo != null and applySeqNo != ''">#{applySeqNo},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisSettlePayInvoiceRel" parameterType="EmisSettlePayInvoiceRel">
|
||||
update emis_settle_pay_invoice_rel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="payId != null and payId != ''">pay_id = #{payId},</if>
|
||||
<if test="applySeqNo != null and applySeqNo != ''">apply_seq_no = #{applySeqNo},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisSettlePayInvoiceRelById" parameterType="Long">
|
||||
delete from emis_settle_pay_invoice_rel where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisSettlePayInvoiceRelByIds" parameterType="String">
|
||||
delete from emis_settle_pay_invoice_rel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user