Browse Source
应付账款 应付账款详情页面新增应付账款记录table 新增应付账款记录domain 新增应付账款记录service 新增应付账款记录serviceImpl 新增应付账款记录mapperdev
liuxiaoxu
7 months ago
8 changed files with 664 additions and 25 deletions
@ -0,0 +1,156 @@ |
|||
package com.ruoyi.financial.domain; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 财务应付账款记录对象 financial_payable_records |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-05-10 |
|||
*/ |
|||
public class FinancialPayableRecords extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 财务应付账款记录id */ |
|||
private Long payableRecordsId; |
|||
|
|||
/** 应付单号 */ |
|||
@Excel(name = "应付单号") |
|||
private String accountsPayableCode; |
|||
|
|||
/** 关联单号 */ |
|||
private String relevanceCode; |
|||
|
|||
/** 付款凭证编号 */ |
|||
@Excel(name = "付款凭证编号") |
|||
private String paidVoucherCode; |
|||
|
|||
/** 付款金额 */ |
|||
@Excel(name = "付款金额") |
|||
private BigDecimal paidPrice; |
|||
|
|||
/** 付款时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
private Date paidTime; |
|||
|
|||
/** 付款明细 */ |
|||
@Excel(name = "付款明细") |
|||
private String paidDetail; |
|||
|
|||
/** 付款图片 */ |
|||
@Excel(name = "付款图片") |
|||
private String paidPhotourl; |
|||
|
|||
/** 操作人 */ |
|||
@Excel(name = "操作人") |
|||
private String operatorPeople; |
|||
|
|||
public void setPayableRecordsId(Long payableRecordsId) |
|||
{ |
|||
this.payableRecordsId = payableRecordsId; |
|||
} |
|||
|
|||
public Long getPayableRecordsId() |
|||
{ |
|||
return payableRecordsId; |
|||
} |
|||
public void setAccountsPayableCode(String accountsPayableCode) |
|||
{ |
|||
this.accountsPayableCode = accountsPayableCode; |
|||
} |
|||
|
|||
public String getAccountsPayableCode() |
|||
{ |
|||
return accountsPayableCode; |
|||
} |
|||
public void setRelevanceCode(String relevanceCode) |
|||
{ |
|||
this.relevanceCode = relevanceCode; |
|||
} |
|||
|
|||
public String getRelevanceCode() |
|||
{ |
|||
return relevanceCode; |
|||
} |
|||
public void setPaidVoucherCode(String paidVoucherCode) |
|||
{ |
|||
this.paidVoucherCode = paidVoucherCode; |
|||
} |
|||
|
|||
public String getPaidVoucherCode() |
|||
{ |
|||
return paidVoucherCode; |
|||
} |
|||
public void setPaidPrice(BigDecimal paidPrice) |
|||
{ |
|||
this.paidPrice = paidPrice; |
|||
} |
|||
|
|||
public BigDecimal getPaidPrice() |
|||
{ |
|||
return paidPrice; |
|||
} |
|||
public void setPaidTime(Date paidTime) |
|||
{ |
|||
this.paidTime = paidTime; |
|||
} |
|||
|
|||
public Date getPaidTime() |
|||
{ |
|||
return paidTime; |
|||
} |
|||
public void setPaidDetail(String paidDetail) |
|||
{ |
|||
this.paidDetail = paidDetail; |
|||
} |
|||
|
|||
public String getPaidDetail() |
|||
{ |
|||
return paidDetail; |
|||
} |
|||
public void setPaidPhotourl(String paidPhotourl) |
|||
{ |
|||
this.paidPhotourl = paidPhotourl; |
|||
} |
|||
|
|||
public String getPaidPhotourl() |
|||
{ |
|||
return paidPhotourl; |
|||
} |
|||
public void setOperatorPeople(String operatorPeople) |
|||
{ |
|||
this.operatorPeople = operatorPeople; |
|||
} |
|||
|
|||
public String getOperatorPeople() |
|||
{ |
|||
return operatorPeople; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("payableRecordsId", getPayableRecordsId()) |
|||
.append("accountsPayableCode", getAccountsPayableCode()) |
|||
.append("relevanceCode", getRelevanceCode()) |
|||
.append("paidVoucherCode", getPaidVoucherCode()) |
|||
.append("paidPrice", getPaidPrice()) |
|||
.append("paidTime", getPaidTime()) |
|||
.append("paidDetail", getPaidDetail()) |
|||
.append("paidPhotourl", getPaidPhotourl()) |
|||
.append("operatorPeople", getOperatorPeople()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.ruoyi.financial.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialPayableRecords; |
|||
|
|||
/** |
|||
* 财务应付账款记录Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-05-10 |
|||
*/ |
|||
public interface FinancialPayableRecordsMapper |
|||
{ |
|||
/** |
|||
* 查询财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 财务应付账款记录 |
|||
*/ |
|||
public FinancialPayableRecords selectFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 查询财务应付账款记录列表 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 财务应付账款记录集合 |
|||
*/ |
|||
public List<FinancialPayableRecords> selectFinancialPayableRecordsList(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 新增财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialPayableRecords(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 修改财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialPayableRecords(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 删除财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 批量删除财务应付账款记录 |
|||
* |
|||
* @param payableRecordsIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialPayableRecordsByIds(String[] payableRecordsIds); |
|||
|
|||
/** |
|||
* 作废财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 恢复财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
|
|||
/** |
|||
* 查询财务应付账款记录列表 |
|||
* |
|||
* @param accountsPayableCode 财务应付单号 |
|||
* @return 财务应付账款记录集合 |
|||
*/ |
|||
List<FinancialPayableRecords> selectFinancialPayableRecordsListByCode(String accountsPayableCode); |
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.ruoyi.financial.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.financial.domain.FinancialPayableRecords; |
|||
|
|||
/** |
|||
* 财务应付账款记录Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-05-10 |
|||
*/ |
|||
public interface IFinancialPayableRecordsService |
|||
{ |
|||
/** |
|||
* 查询财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 财务应付账款记录 |
|||
*/ |
|||
public FinancialPayableRecords selectFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 查询财务应付账款记录列表 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 财务应付账款记录集合 |
|||
*/ |
|||
public List<FinancialPayableRecords> selectFinancialPayableRecordsList(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 新增财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertFinancialPayableRecords(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 修改财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateFinancialPayableRecords(FinancialPayableRecords financialPayableRecords); |
|||
|
|||
/** |
|||
* 批量删除财务应付账款记录 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialPayableRecordsByIds(String ids); |
|||
|
|||
/** |
|||
* 删除财务应付账款记录信息 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 作废财务应付账款记录 |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return |
|||
*/ |
|||
int cancelFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 恢复财务应付账款记录 |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return |
|||
*/ |
|||
int restoreFinancialPayableRecordsById(Long payableRecordsId); |
|||
|
|||
/** |
|||
* 查询财务应付账款记录列表 |
|||
* |
|||
* @param accountsPayableCode 财务应付单号 |
|||
* @return 财务应付账款记录集合 |
|||
*/ |
|||
List<FinancialPayableRecords> selectFinancialPayableRecordsListByCode(String accountsPayableCode); |
|||
} |
@ -0,0 +1,139 @@ |
|||
package com.ruoyi.financial.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.financial.mapper.FinancialPayableRecordsMapper; |
|||
import com.ruoyi.financial.domain.FinancialPayableRecords; |
|||
import com.ruoyi.financial.service.IFinancialPayableRecordsService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 财务应付账款记录Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-05-10 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class FinancialPayableRecordsServiceImpl implements IFinancialPayableRecordsService |
|||
{ |
|||
@Autowired |
|||
private FinancialPayableRecordsMapper financialPayableRecordsMapper; |
|||
|
|||
/** |
|||
* 查询财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 财务应付账款记录 |
|||
*/ |
|||
@Override |
|||
public FinancialPayableRecords selectFinancialPayableRecordsById(Long payableRecordsId) |
|||
{ |
|||
return financialPayableRecordsMapper.selectFinancialPayableRecordsById(payableRecordsId); |
|||
} |
|||
|
|||
/** |
|||
* 查询财务应付账款记录列表 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 财务应付账款记录 |
|||
*/ |
|||
@Override |
|||
public List<FinancialPayableRecords> selectFinancialPayableRecordsList(FinancialPayableRecords financialPayableRecords) |
|||
{ |
|||
return financialPayableRecordsMapper.selectFinancialPayableRecordsList(financialPayableRecords); |
|||
} |
|||
|
|||
/** |
|||
* 新增财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertFinancialPayableRecords(FinancialPayableRecords financialPayableRecords) |
|||
{ |
|||
financialPayableRecords.setCreateTime(DateUtils.getNowDate()); |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialPayableRecords.setCreateBy(loginName); |
|||
return financialPayableRecordsMapper.insertFinancialPayableRecords(financialPayableRecords); |
|||
} |
|||
|
|||
/** |
|||
* 修改财务应付账款记录 |
|||
* |
|||
* @param financialPayableRecords 财务应付账款记录 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateFinancialPayableRecords(FinancialPayableRecords financialPayableRecords) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
financialPayableRecords.setUpdateBy(loginName); |
|||
financialPayableRecords.setUpdateTime(DateUtils.getNowDate()); |
|||
return financialPayableRecordsMapper.updateFinancialPayableRecords(financialPayableRecords); |
|||
} |
|||
|
|||
/** |
|||
* 删除财务应付账款记录对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialPayableRecordsByIds(String ids) |
|||
{ |
|||
return financialPayableRecordsMapper.deleteFinancialPayableRecordsByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除财务应付账款记录信息 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteFinancialPayableRecordsById(Long payableRecordsId) |
|||
{ |
|||
return financialPayableRecordsMapper.deleteFinancialPayableRecordsById(payableRecordsId); |
|||
} |
|||
|
|||
/** |
|||
* 作废财务应付账款记录 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelFinancialPayableRecordsById(Long payableRecordsId) |
|||
{ |
|||
return financialPayableRecordsMapper.cancelFinancialPayableRecordsById(payableRecordsId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复财务应付账款记录信息 |
|||
* |
|||
* @param payableRecordsId 财务应付账款记录ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreFinancialPayableRecordsById(Long payableRecordsId) |
|||
{ |
|||
return financialPayableRecordsMapper.restoreFinancialPayableRecordsById(payableRecordsId); |
|||
} |
|||
|
|||
@Override |
|||
public List<FinancialPayableRecords> selectFinancialPayableRecordsListByCode(String accountsPayableCode) { |
|||
|
|||
List<FinancialPayableRecords> financialPayableRecordsList=financialPayableRecordsMapper.selectFinancialPayableRecordsListByCode(accountsPayableCode); |
|||
if (StringUtils.isEmpty(financialPayableRecordsList)){ |
|||
log.warn("未查找到付款记录信息:{}",accountsPayableCode); |
|||
} |
|||
return financialPayableRecordsList; |
|||
} |
|||
} |
@ -0,0 +1,113 @@ |
|||
<?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.ruoyi.financial.mapper.FinancialPayableRecordsMapper"> |
|||
|
|||
<resultMap type="FinancialPayableRecords" id="FinancialPayableRecordsResult"> |
|||
<result property="payableRecordsId" column="payable_records_id" /> |
|||
<result property="accountsPayableCode" column="accounts_payable_code" /> |
|||
<result property="relevanceCode" column="relevance_code" /> |
|||
<result property="paidVoucherCode" column="paid_voucher_code" /> |
|||
<result property="paidPrice" column="paid_price" /> |
|||
<result property="paidTime" column="paid_time" /> |
|||
<result property="paidDetail" column="paid_detail" /> |
|||
<result property="paidPhotourl" column="paid_photoUrl" /> |
|||
<result property="operatorPeople" column="operator_people" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectFinancialPayableRecordsVo"> |
|||
select payable_records_id, accounts_payable_code, relevance_code, paid_voucher_code, paid_price, paid_time, paid_detail, paid_photoUrl, operator_people, create_time, create_by, update_by, update_time from financial_payable_records |
|||
</sql> |
|||
|
|||
<select id="selectFinancialPayableRecordsList" parameterType="FinancialPayableRecords" resultMap="FinancialPayableRecordsResult"> |
|||
<include refid="selectFinancialPayableRecordsVo"/> |
|||
<where> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectFinancialPayableRecordsById" parameterType="Long" resultMap="FinancialPayableRecordsResult"> |
|||
<include refid="selectFinancialPayableRecordsVo"/> |
|||
where payable_records_id = #{payableRecordsId} |
|||
</select> |
|||
|
|||
<select id="selectFinancialPayableRecordsListByCode" parameterType="String" resultMap="FinancialPayableRecordsResult"> |
|||
<include refid="selectFinancialPayableRecordsVo"/> |
|||
where accounts_payable_code = #{accountsPayableCode} |
|||
</select> |
|||
|
|||
<insert id="insertFinancialPayableRecords" parameterType="FinancialPayableRecords" useGeneratedKeys="true" keyProperty="payableRecordsId"> |
|||
insert into financial_payable_records |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="accountsPayableCode != null">accounts_payable_code,</if> |
|||
<if test="relevanceCode != null">relevance_code,</if> |
|||
<if test="paidVoucherCode != null">paid_voucher_code,</if> |
|||
<if test="paidPrice != null">paid_price,</if> |
|||
<if test="paidTime != null">paid_time,</if> |
|||
<if test="paidDetail != null">paid_detail,</if> |
|||
<if test="paidPhotourl != null">paid_photoUrl,</if> |
|||
<if test="operatorPeople != null">operator_people,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="accountsPayableCode != null">#{accountsPayableCode},</if> |
|||
<if test="relevanceCode != null">#{relevanceCode},</if> |
|||
<if test="paidVoucherCode != null">#{paidVoucherCode},</if> |
|||
<if test="paidPrice != null">#{paidPrice},</if> |
|||
<if test="paidTime != null">#{paidTime},</if> |
|||
<if test="paidDetail != null">#{paidDetail},</if> |
|||
<if test="paidPhotourl != null">#{paidPhotourl},</if> |
|||
<if test="operatorPeople != null">#{operatorPeople},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateFinancialPayableRecords" parameterType="FinancialPayableRecords"> |
|||
update financial_payable_records |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="accountsPayableCode != null">accounts_payable_code = #{accountsPayableCode},</if> |
|||
<if test="relevanceCode != null">relevance_code = #{relevanceCode},</if> |
|||
<if test="paidVoucherCode != null">paid_voucher_code = #{paidVoucherCode},</if> |
|||
<if test="paidPrice != null">paid_price = #{paidPrice},</if> |
|||
<if test="paidTime != null">paid_time = #{paidTime},</if> |
|||
<if test="paidDetail != null">paid_detail = #{paidDetail},</if> |
|||
<if test="paidPhotourl != null">paid_photoUrl = #{paidPhotourl},</if> |
|||
<if test="operatorPeople != null">operator_people = #{operatorPeople},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
</trim> |
|||
where payable_records_id = #{payableRecordsId} |
|||
</update> |
|||
|
|||
<delete id="deleteFinancialPayableRecordsById" parameterType="Long"> |
|||
delete from financial_payable_records where payable_records_id = #{payableRecordsId} |
|||
</delete> |
|||
|
|||
<delete id="deleteFinancialPayableRecordsByIds" parameterType="String"> |
|||
delete from financial_payable_records where payable_records_id in |
|||
<foreach item="payableRecordsId" collection="array" open="(" separator="," close=")"> |
|||
#{payableRecordsId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelFinancialPayableRecordsById" parameterType="Long"> |
|||
update financial_payable_records set del_flag = '1' where payable_records_id = #{payableRecordsId} |
|||
</update> |
|||
|
|||
<update id="restoreFinancialPayableRecordsById" parameterType="Long"> |
|||
update financial_payable_records set del_flag = '0' where payable_records_id = #{payableRecordsId} |
|||
</update> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue