9 changed files with 948 additions and 0 deletions
@ -0,0 +1,164 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.system.domain.SysCompanyInformation; |
|||
import com.ruoyi.system.service.ISysCompanyInformationService; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.system.domain.SysCompanyBankInfo; |
|||
import com.ruoyi.system.service.ISysCompanyBankInfoService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 公司银行账户信息Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-12-11 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/companyBankInfo") |
|||
public class SysCompanyBankInfoController extends BaseController |
|||
{ |
|||
private String prefix = "system/companyBankInfo"; |
|||
|
|||
@Autowired |
|||
private ISysCompanyBankInfoService sysCompanyBankInfoService; |
|||
|
|||
@Autowired |
|||
private ISysCompanyInformationService companyInformationService; |
|||
|
|||
@RequiresPermissions("system:companyBankInfo:view") |
|||
@GetMapping() |
|||
public String companyBankInfo() |
|||
{ |
|||
return prefix + "/companyBankInfo"; |
|||
} |
|||
|
|||
/** |
|||
* 查询公司银行账户信息列表 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
startPage(); |
|||
List<SysCompanyBankInfo> list = sysCompanyBankInfoService.selectSysCompanyBankInfoList(sysCompanyBankInfo); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出公司银行账户信息列表 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:export") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
List<SysCompanyBankInfo> list = sysCompanyBankInfoService.selectSysCompanyBankInfoList(sysCompanyBankInfo); |
|||
ExcelUtil<SysCompanyBankInfo> util = new ExcelUtil<SysCompanyBankInfo>(SysCompanyBankInfo.class); |
|||
return util.exportExcel(list, "公司银行账户信息数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增公司银行账户信息 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add(ModelMap mmap) |
|||
{ |
|||
SysCompanyInformation temp = new SysCompanyInformation(); |
|||
SysCompanyInformation company = companyInformationService.selectSysCompanyInformationList(temp).get(0); |
|||
SysCompanyBankInfo sysCompanyBankInfo = new SysCompanyBankInfo(); |
|||
sysCompanyBankInfo.setCompanyId(company.getCompanyId()); |
|||
sysCompanyBankInfo.setEnterpriseName(company.getEnterpriseName()); |
|||
sysCompanyBankInfo.setEnglishName(company.getEnglishName()); |
|||
mmap.put("sysCompanyBankInfo", sysCompanyBankInfo); |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存公司银行账户信息 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:add") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
return toAjax(sysCompanyBankInfoService.insertSysCompanyBankInfo(sysCompanyBankInfo)); |
|||
} |
|||
|
|||
/** |
|||
* 修改公司银行账户信息 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
|||
{ |
|||
SysCompanyBankInfo sysCompanyBankInfo = sysCompanyBankInfoService.selectSysCompanyBankInfoById(id); |
|||
mmap.put("sysCompanyBankInfo", sysCompanyBankInfo); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存公司银行账户信息 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:edit") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
return toAjax(sysCompanyBankInfoService.updateSysCompanyBankInfo(sysCompanyBankInfo)); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司银行账户信息 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:remove") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(sysCompanyBankInfoService.deleteSysCompanyBankInfoByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废公司银行账户信息 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:cancel") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(sysCompanyBankInfoService.cancelSysCompanyBankInfoById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复公司银行账户信息 |
|||
*/ |
|||
@RequiresPermissions("system:companyBankInfo:restore") |
|||
@Log(title = "公司银行账户信息", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(sysCompanyBankInfoService.restoreSysCompanyBankInfoById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,124 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
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_company_bank_info |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-12-11 |
|||
*/ |
|||
public class SysCompanyBankInfo extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 公司银行信息id */ |
|||
private Long id; |
|||
|
|||
/** 公司id */ |
|||
private Long companyId; |
|||
|
|||
/** 公司名称 */ |
|||
@Excel(name = "公司名称") |
|||
private String enterpriseName; |
|||
|
|||
/** 英文名称 */ |
|||
@Excel(name = "英文名称") |
|||
private String englishName; |
|||
|
|||
/** 借方科目 */ |
|||
@Excel(name = "借方科目") |
|||
private String debitAccount; |
|||
|
|||
/** 开户银行 */ |
|||
@Excel(name = "开户银行") |
|||
private String depositBank; |
|||
|
|||
/** 开户银行账号 */ |
|||
@Excel(name = "开户银行账号") |
|||
private String bankAccount; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setCompanyId(Long companyId) |
|||
{ |
|||
this.companyId = companyId; |
|||
} |
|||
|
|||
public Long getCompanyId() |
|||
{ |
|||
return companyId; |
|||
} |
|||
public void setEnterpriseName(String enterpriseName) |
|||
{ |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getEnterpriseName() |
|||
{ |
|||
return enterpriseName; |
|||
} |
|||
public void setEnglishName(String englishName) |
|||
{ |
|||
this.englishName = englishName; |
|||
} |
|||
|
|||
public String getEnglishName() |
|||
{ |
|||
return englishName; |
|||
} |
|||
public void setDebitAccount(String debitAccount) |
|||
{ |
|||
this.debitAccount = debitAccount; |
|||
} |
|||
|
|||
public String getDebitAccount() |
|||
{ |
|||
return debitAccount; |
|||
} |
|||
public void setDepositBank(String depositBank) |
|||
{ |
|||
this.depositBank = depositBank; |
|||
} |
|||
|
|||
public String getDepositBank() |
|||
{ |
|||
return depositBank; |
|||
} |
|||
public void setBankAccount(String bankAccount) |
|||
{ |
|||
this.bankAccount = bankAccount; |
|||
} |
|||
|
|||
public String getBankAccount() |
|||
{ |
|||
return bankAccount; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("companyId", getCompanyId()) |
|||
.append("enterpriseName", getEnterpriseName()) |
|||
.append("englishName", getEnglishName()) |
|||
.append("debitAccount", getDebitAccount()) |
|||
.append("depositBank", getDepositBank()) |
|||
.append("bankAccount", getBankAccount()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysCompanyBankInfo; |
|||
|
|||
/** |
|||
* 公司银行账户信息Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-12-11 |
|||
*/ |
|||
public interface SysCompanyBankInfoMapper |
|||
{ |
|||
/** |
|||
* 查询公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 公司银行账户信息 |
|||
*/ |
|||
public SysCompanyBankInfo selectSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 查询公司银行账户信息列表 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 公司银行账户信息集合 |
|||
*/ |
|||
public List<SysCompanyBankInfo> selectSysCompanyBankInfoList(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 新增公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 修改公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 删除公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 批量删除公司银行账户信息 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysCompanyBankInfoByIds(String[] ids); |
|||
|
|||
/** |
|||
* 作废公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 恢复公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreSysCompanyBankInfoById(Long id); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysCompanyBankInfo; |
|||
|
|||
/** |
|||
* 公司银行账户信息Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-12-11 |
|||
*/ |
|||
public interface ISysCompanyBankInfoService |
|||
{ |
|||
/** |
|||
* 查询公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 公司银行账户信息 |
|||
*/ |
|||
public SysCompanyBankInfo selectSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 查询公司银行账户信息列表 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 公司银行账户信息集合 |
|||
*/ |
|||
public List<SysCompanyBankInfo> selectSysCompanyBankInfoList(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 新增公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 修改公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo); |
|||
|
|||
/** |
|||
* 批量删除公司银行账户信息 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysCompanyBankInfoByIds(String ids); |
|||
|
|||
/** |
|||
* 删除公司银行账户信息信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 作废公司银行账户信息 |
|||
* @param id 公司银行账户信息ID |
|||
* @return |
|||
*/ |
|||
int cancelSysCompanyBankInfoById(Long id); |
|||
|
|||
/** |
|||
* 恢复公司银行账户信息 |
|||
* @param id 公司银行账户信息ID |
|||
* @return |
|||
*/ |
|||
int restoreSysCompanyBankInfoById(Long id); |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.system.mapper.SysCompanyBankInfoMapper; |
|||
import com.ruoyi.system.domain.SysCompanyBankInfo; |
|||
import com.ruoyi.system.service.ISysCompanyBankInfoService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 公司银行账户信息Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-12-11 |
|||
*/ |
|||
@Service |
|||
public class SysCompanyBankInfoServiceImpl implements ISysCompanyBankInfoService |
|||
{ |
|||
@Autowired |
|||
private SysCompanyBankInfoMapper sysCompanyBankInfoMapper; |
|||
|
|||
/** |
|||
* 查询公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 公司银行账户信息 |
|||
*/ |
|||
@Override |
|||
public SysCompanyBankInfo selectSysCompanyBankInfoById(Long id) |
|||
{ |
|||
return sysCompanyBankInfoMapper.selectSysCompanyBankInfoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询公司银行账户信息列表 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 公司银行账户信息 |
|||
*/ |
|||
@Override |
|||
public List<SysCompanyBankInfo> selectSysCompanyBankInfoList(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
return sysCompanyBankInfoMapper.selectSysCompanyBankInfoList(sysCompanyBankInfo); |
|||
} |
|||
|
|||
/** |
|||
* 新增公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysCompanyBankInfo.setCreateBy(loginName); |
|||
sysCompanyBankInfo.setCreateTime(DateUtils.getNowDate()); |
|||
return sysCompanyBankInfoMapper.insertSysCompanyBankInfo(sysCompanyBankInfo); |
|||
} |
|||
|
|||
/** |
|||
* 修改公司银行账户信息 |
|||
* |
|||
* @param sysCompanyBankInfo 公司银行账户信息 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSysCompanyBankInfo(SysCompanyBankInfo sysCompanyBankInfo) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysCompanyBankInfo.setUpdateBy(loginName); |
|||
sysCompanyBankInfo.setUpdateTime(DateUtils.getNowDate()); |
|||
return sysCompanyBankInfoMapper.updateSysCompanyBankInfo(sysCompanyBankInfo); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司银行账户信息对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysCompanyBankInfoByIds(String ids) |
|||
{ |
|||
return sysCompanyBankInfoMapper.deleteSysCompanyBankInfoByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除公司银行账户信息信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysCompanyBankInfoById(Long id) |
|||
{ |
|||
return sysCompanyBankInfoMapper.deleteSysCompanyBankInfoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 作废公司银行账户信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelSysCompanyBankInfoById(Long id) |
|||
{ |
|||
return sysCompanyBankInfoMapper.cancelSysCompanyBankInfoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 恢复公司银行账户信息信息 |
|||
* |
|||
* @param id 公司银行账户信息ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreSysCompanyBankInfoById(Long id) |
|||
{ |
|||
return sysCompanyBankInfoMapper.restoreSysCompanyBankInfoById(id); |
|||
} |
|||
} |
@ -0,0 +1,107 @@ |
|||
<?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.system.mapper.SysCompanyBankInfoMapper"> |
|||
|
|||
<resultMap type="SysCompanyBankInfo" id="SysCompanyBankInfoResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="companyId" column="company_id" /> |
|||
<result property="enterpriseName" column="enterprise_name" /> |
|||
<result property="englishName" column="english_name" /> |
|||
<result property="debitAccount" column="debit_account" /> |
|||
<result property="depositBank" column="deposit_bank" /> |
|||
<result property="bankAccount" column="bank_account" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSysCompanyBankInfoVo"> |
|||
select id, company_id, enterprise_name, english_name, debit_account, deposit_bank, bank_account, create_by, create_time, update_by, update_time from sys_company_bank_info |
|||
</sql> |
|||
|
|||
<select id="selectSysCompanyBankInfoList" parameterType="SysCompanyBankInfo" resultMap="SysCompanyBankInfoResult"> |
|||
<include refid="selectSysCompanyBankInfoVo"/> |
|||
<where> |
|||
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|||
<if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if> |
|||
<if test="debitAccount != null and debitAccount != ''"> and debit_account = #{debitAccount}</if> |
|||
<if test="depositBank != null and depositBank != ''"> and deposit_bank = #{depositBank}</if> |
|||
<if test="bankAccount != null and bankAccount != ''"> and bank_account like concat('%', #{bankAccount}, '%')</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysCompanyBankInfoById" parameterType="Long" resultMap="SysCompanyBankInfoResult"> |
|||
<include refid="selectSysCompanyBankInfoVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertSysCompanyBankInfo" parameterType="SysCompanyBankInfo"> |
|||
insert into sys_company_bank_info |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null">id,</if> |
|||
<if test="companyId != null">company_id,</if> |
|||
<if test="enterpriseName != null">enterprise_name,</if> |
|||
<if test="englishName != null">english_name,</if> |
|||
<if test="debitAccount != null">debit_account,</if> |
|||
<if test="depositBank != null">deposit_bank,</if> |
|||
<if test="bankAccount != null">bank_account,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null">#{id},</if> |
|||
<if test="companyId != null">#{companyId},</if> |
|||
<if test="enterpriseName != null">#{enterpriseName},</if> |
|||
<if test="englishName != null">#{englishName},</if> |
|||
<if test="debitAccount != null">#{debitAccount},</if> |
|||
<if test="depositBank != null">#{depositBank},</if> |
|||
<if test="bankAccount != null">#{bankAccount},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysCompanyBankInfo" parameterType="SysCompanyBankInfo"> |
|||
update sys_company_bank_info |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="companyId != null">company_id = #{companyId},</if> |
|||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> |
|||
<if test="englishName != null">english_name = #{englishName},</if> |
|||
<if test="debitAccount != null">debit_account = #{debitAccount},</if> |
|||
<if test="depositBank != null">deposit_bank = #{depositBank},</if> |
|||
<if test="bankAccount != null">bank_account = #{bankAccount},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteSysCompanyBankInfoById" parameterType="Long"> |
|||
delete from sys_company_bank_info where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysCompanyBankInfoByIds" parameterType="String"> |
|||
delete from sys_company_bank_info where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelSysCompanyBankInfoById" parameterType="Long"> |
|||
update sys_company_bank_info set del_flag = '1' where id = #{id} |
|||
</update> |
|||
|
|||
<update id="restoreSysCompanyBankInfoById" parameterType="Long"> |
|||
update sys_company_bank_info set del_flag = '0' where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,71 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增公司银行账户信息')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-companyBankInfo-add" th:object="${sysCompanyBankInfo}"> |
|||
<input name="companyId" class="form-control" th:field="*{companyId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">公司名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input readonly name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label">英文名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input readonly name="englishName" th:field="*{englishName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label is-required">借方科目:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="debitAccount" name="debitAccount" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label is-required">开户银行:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="depositBank" name="depositBank" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-4 control-label is-required">开户银行账号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="bankAccount" name="bankAccount" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/companyBankInfo" |
|||
$("#form-companyBankInfo-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
var debitAccount = $("#debitAccount").val(); |
|||
var depositBank = $("#depositBank").val(); |
|||
var bankAccount = $("#bankAccount").val(); |
|||
if(debitAccount === ''||debitAccount === null){ |
|||
$.modal.msgError("借方科目为空,请输入"); |
|||
return; |
|||
} |
|||
if(depositBank === ''||depositBank === null){ |
|||
$.modal.msgError("开户银行为空,请输入"); |
|||
return; |
|||
} |
|||
if(bankAccount === ''||bankAccount === null){ |
|||
$.modal.msgError("开户银行账号为空,请输入"); |
|||
return; |
|||
} |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-companyBankInfo-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,131 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('公司银行账户信息列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>借方科目:</label> |
|||
<input type="text" name="debitAccount"/> |
|||
</li> |
|||
<li> |
|||
<label>开户银行:</label> |
|||
<input type="text" name="depositBank"/> |
|||
</li> |
|||
<li> |
|||
<label>开户银行账号:</label> |
|||
<input type="text" name="bankAccount"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:companyBankInfo:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:companyBankInfo:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:companyBankInfo:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('system:companyBankInfo:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('system:companyBankInfo:restore')}]]; |
|||
var prefix = ctx + "system/companyBankInfo"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "公司银行账户信息", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '公司银行信息id', |
|||
field: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '公司名称', |
|||
field: 'enterpriseName', |
|||
align: 'center', |
|||
}, |
|||
{ |
|||
title: '英文名称', |
|||
align: 'center', |
|||
field: 'englishName', |
|||
visible: false, |
|||
}, |
|||
{ |
|||
title: '借方科目', |
|||
align: 'center', |
|||
field: 'debitAccount', |
|||
}, |
|||
{ |
|||
title: '开户银行', |
|||
align: 'center', |
|||
field: 'depositBank', |
|||
}, |
|||
{ |
|||
title: '开户银行账号', |
|||
align: 'center', |
|||
field: 'bankAccount', |
|||
}, |
|||
{ |
|||
title: '录入人', |
|||
align: 'center', |
|||
field: 'createBy', |
|||
}, |
|||
{ |
|||
title: '录入时间', |
|||
align: 'center', |
|||
field: 'createTime', |
|||
}, |
|||
{ |
|||
title: '更新人', |
|||
align: 'center', |
|||
field: 'updateBy', |
|||
}, |
|||
{ |
|||
title: '更新时间', |
|||
align: 'center', |
|||
field: 'updateTime', |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,73 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改公司银行账户信息')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-companyBankInfo-edit" th:object="${sysCompanyBankInfo}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="companyId" th:field="*{companyId}" type="hidden"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">公司名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input readonly name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">英文名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input readonly name="englishName" th:field="*{englishName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">借方科目:</label> |
|||
<div class="col-sm-8"> |
|||
<input required id="debitAccount" name="debitAccount" th:field="*{debitAccount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">开户银行:</label> |
|||
<div class="col-sm-8"> |
|||
<input required id="depositBank" name="depositBank" th:field="*{depositBank}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">开户银行账号:</label> |
|||
<div class="col-sm-8"> |
|||
<input required id="bankAccount" name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/companyBankInfo"; |
|||
$("#form-companyBankInfo-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
var debitAccount = $("#debitAccount").val(); |
|||
var depositBank = $("#depositBank").val(); |
|||
var bankAccount = $("#bankAccount").val(); |
|||
if(debitAccount === ''||debitAccount === null){ |
|||
$.modal.msgError("借方科目为空,请输入"); |
|||
return; |
|||
} |
|||
if(depositBank === ''||depositBank === null){ |
|||
$.modal.msgError("开户银行为空,请输入"); |
|||
return; |
|||
} |
|||
if(bankAccount === ''||bankAccount === null){ |
|||
$.modal.msgError("开户银行账号为空,请输入"); |
|||
return; |
|||
} |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-companyBankInfo-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue