开发合同功能
This commit is contained in:
		| @@ -0,0 +1,114 @@ | ||||
| package com.ruoyi.custom.domain; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| 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; | ||||
|  | ||||
| /** | ||||
|  * 合同对象 sys_contract | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public class SysContract extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 合同编号 */ | ||||
|     @Excel(name = "合同编号") | ||||
|     private Long id; | ||||
|  | ||||
|     /** 客户姓名 */ | ||||
|     @Excel(name = "客户姓名") | ||||
|     private String name; | ||||
|  | ||||
|     /** 电话 */ | ||||
|     @Excel(name = "电话") | ||||
|     private String phone; | ||||
|  | ||||
|     /** 服务时间 */ | ||||
|     @Excel(name = "服务时间") | ||||
|     private Integer serveTime; | ||||
|  | ||||
|     /** 金额 */ | ||||
|     @Excel(name = "金额") | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     /** 文件路径 */ | ||||
|     @Excel(name = "文件路径") | ||||
|     private String path; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setName(String name)  | ||||
|     { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getName()  | ||||
|     { | ||||
|         return name; | ||||
|     } | ||||
|     public void setPhone(String phone)  | ||||
|     { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public String getPhone()  | ||||
|     { | ||||
|         return phone; | ||||
|     } | ||||
|     public void setServeTime(Integer serveTime)  | ||||
|     { | ||||
|         this.serveTime = serveTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getServeTime()  | ||||
|     { | ||||
|         return serveTime; | ||||
|     } | ||||
|     public void setAmount(BigDecimal amount)  | ||||
|     { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getAmount()  | ||||
|     { | ||||
|         return amount; | ||||
|     } | ||||
|     public void setPath(String path)  | ||||
|     { | ||||
|         this.path = path; | ||||
|     } | ||||
|  | ||||
|     public String getPath()  | ||||
|     { | ||||
|         return path; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("name", getName()) | ||||
|             .append("phone", getPhone()) | ||||
|             .append("serveTime", getServeTime()) | ||||
|             .append("amount", getAmount()) | ||||
|             .append("path", getPath()) | ||||
|             .append("createBy", getCreateBy()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .append("updateBy", getUpdateBy()) | ||||
|             .append("updateTime", getUpdateTime()) | ||||
|             .append("remark", getRemark()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.custom.domain.SysContract; | ||||
|  | ||||
| /** | ||||
|  * 合同Mapper接口 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public interface SysContractMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     public SysContract selectSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同集合 | ||||
|      */ | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 删除合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.custom.domain.SysContract; | ||||
|  | ||||
| /** | ||||
|  * 合同Service接口 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| public interface ISysContractService  | ||||
| { | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     public SysContract selectSysContractById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同集合 | ||||
|      */ | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysContract(SysContract sysContract); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      *  | ||||
|      * @param ids 需要删除的合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除合同信息 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysContractById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.ruoyi.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.common.utils.DateUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.ruoyi.custom.mapper.SysContractMapper; | ||||
| import com.ruoyi.custom.domain.SysContract; | ||||
| import com.ruoyi.custom.service.ISysContractService; | ||||
|  | ||||
| /** | ||||
|  * 合同Service业务层处理 | ||||
|  *  | ||||
|  * @author wonder | ||||
|  * @date 2020-10-23 | ||||
|  */ | ||||
| @Service | ||||
| public class SysContractServiceImpl implements ISysContractService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SysContractMapper sysContractMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询合同 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysContract selectSysContractById(Long id) | ||||
|     { | ||||
|         return sysContractMapper.selectSysContractById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询合同列表 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 合同 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysContract> selectSysContractList(SysContract sysContract) | ||||
|     { | ||||
|         return sysContractMapper.selectSysContractList(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysContract(SysContract sysContract) | ||||
|     { | ||||
|         sysContract.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysContractMapper.insertSysContract(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改合同 | ||||
|      *  | ||||
|      * @param sysContract 合同 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysContract(SysContract sysContract) | ||||
|     { | ||||
|         sysContract.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysContractMapper.updateSysContract(sysContract); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除合同 | ||||
|      *  | ||||
|      * @param ids 需要删除的合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysContractByIds(Long[] ids) | ||||
|     { | ||||
|         return sysContractMapper.deleteSysContractByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除合同信息 | ||||
|      *  | ||||
|      * @param id 合同ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysContractById(Long id) | ||||
|     { | ||||
|         return sysContractMapper.deleteSysContractById(id); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user