This commit is contained in:
lin 2020-12-15 17:53:17 +08:00
parent 02e2d3d4ca
commit 8facdd935f
20 changed files with 700 additions and 15 deletions

View File

@ -0,0 +1,126 @@
package com.ruoyi.web.controller.system;
import java.util.List;
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.SysBillNo;
import com.ruoyi.system.service.ISysBillNoService;
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 dalin
* @date 2020-12-15
*/
@Controller
@RequestMapping("/SysBillNo/bill")
public class SysBillNoController extends BaseController
{
private String prefix = "SysBillNo/bill";
@Autowired
private ISysBillNoService sysBillNoService;
@RequiresPermissions("SysBillNo:bill:view")
@GetMapping()
public String bill()
{
return prefix + "/bill";
}
/**
* 查询单据号迭代信息列表
*/
@RequiresPermissions("SysBillNo:bill:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysBillNo sysBillNo)
{
startPage();
List<SysBillNo> list = sysBillNoService.selectSysBillNoList(sysBillNo);
return getDataTable(list);
}
/**
* 导出单据号迭代信息列表
*/
@RequiresPermissions("SysBillNo:bill:export")
@Log(title = "单据号迭代信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysBillNo sysBillNo)
{
List<SysBillNo> list = sysBillNoService.selectSysBillNoList(sysBillNo);
ExcelUtil<SysBillNo> util = new ExcelUtil<SysBillNo>(SysBillNo.class);
return util.exportExcel(list, "bill");
}
/**
* 新增单据号迭代信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存单据号迭代信息
*/
@RequiresPermissions("SysBillNo:bill:add")
@Log(title = "单据号迭代信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysBillNo sysBillNo)
{
return toAjax(sysBillNoService.insertSysBillNo(sysBillNo));
}
/**
* 修改单据号迭代信息
*/
@GetMapping("/edit/{fperiod}")
public String edit(@PathVariable("fperiod") String fperiod, ModelMap mmap)
{
SysBillNo sysBillNo = sysBillNoService.selectSysBillNoById(fperiod);
mmap.put("sysBillNo", sysBillNo);
return prefix + "/edit";
}
/**
* 修改保存单据号迭代信息
*/
@RequiresPermissions("SysBillNo:bill:edit")
@Log(title = "单据号迭代信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysBillNo sysBillNo)
{
return toAjax(sysBillNoService.updateSysBillNo(sysBillNo));
}
/**
* 删除单据号迭代信息
*/
@RequiresPermissions("SysBillNo:bill:remove")
@Log(title = "单据号迭代信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysBillNoService.deleteSysBillNoByIds(ids));
}
}

View File

@ -75,6 +75,7 @@ $(window).bind("load resize", function() {
function syncMenuTab(dataId) {
if(isLinkage) {
var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) {
$('.nav ul').removeClass("in");
$dataObj.parents("ul").addClass("in")
@ -137,6 +138,8 @@ $(function() {
// 激活指定选项卡
function setActiveTab(element) {
if (!$(element).hasClass('active')) {
System.log($(element)) ;
System.log(" VVVVVVVVVVVVVVVVV ");
var currentId = $(element).data('id');
syncMenuTab(currentId);
// 显示tab对应的内容区

View File

@ -0,0 +1,43 @@
<!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-bill-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">迭代值:</label>
<div class="col-sm-8">
<input name="iterationValue" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">下一个值:</label>
<div class="col-sm-8">
<input name="nextValue" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "SysBillNo/bill"
$("#form-bill-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-bill-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,103 @@
<!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="iterationValue"/>
</li>
<li>
<label>下一个值:</label>
<input type="text" name="nextValue"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="SysBillNo:bill:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="SysBillNo:bill:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="SysBillNo:bill:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="SysBillNo:bill:export">
<i class="fa fa-download"></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('SysBillNo:bill:edit')}]];
var removeFlag = [[${@permission.hasPermi('SysBillNo:bill:remove')}]];
var prefix = ctx + "SysBillNo/bill";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "单据号迭代信息",
columns: [{
checkbox: true
},
{
field: 'fperiod',
title: '期间',
visible: false
},
{
field: 'billName',
title: '单据标识',
visible: false
},
{
field: 'iterationValue',
title: '迭代值'
},
{
field: 'nextValue',
title: '下一个值'
},
{
field: 'remark',
title: '备注'
},
{
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.fperiod + '\')"><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.fperiod + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,44 @@
<!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-bill-edit" th:object="${sysBillNo}">
<input name="fperiod" th:field="*{fperiod}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">迭代值:</label>
<div class="col-sm-8">
<input name="iterationValue" th:field="*{iterationValue}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">下一个值:</label>
<div class="col-sm-8">
<input name="nextValue" th:field="*{nextValue}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "SysBillNo/bill";
$("#form-bill-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-bill-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -24,6 +24,12 @@
<label class="radio-box"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单据前缀编号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="billPrefix" id="billPrefix" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">菜单名称:</label>
<div class="col-sm-8">

View File

@ -25,11 +25,17 @@
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
</div>
</div>
<div class="form-group">
<div class="form-group">`
<label class="col-sm-3 control-label is-required">单据前缀:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="billPrefix" id="billPrefix" th:field="*{billPrefix}" required>
</div>`
</div>
<div class="form-group">`
<label class="col-sm-3 control-label is-required">菜单名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="menuName" id="menuName" th:field="*{menuName}" required>
</div>
</div>`
</div>
<div class="form-group">
<label class="col-sm-3 control-label">请求地址:</label>

View File

@ -113,6 +113,12 @@
}
}
},
{
field: 'billPrefix',
title: '前缀',
width: '10%',
align: "left"
},
{
field: 'visible',
title: '可见',

View File

@ -40,6 +40,9 @@ public class SysMenu extends BaseEntity
/** 类型:0目录,1菜单,2按钮 */
private String menuType;
/** 单据前缀编号*/
private String billPrefix;
/** 菜单状态:0显示,1隐藏 */
private String visible;
@ -137,6 +140,16 @@ public class SysMenu extends BaseEntity
this.menuType = menuType;
}
public String getBillPrefix()
{
return billPrefix;
}
public void setBillPrefix(String billPrefix)
{
this.billPrefix = billPrefix;
}
public String getVisible()
{
return visible;
@ -188,6 +201,7 @@ public class SysMenu extends BaseEntity
.append("url", getUrl())
.append("target", getTarget())
.append("menuType", getMenuType())
.append("billPrefix", getBillPrefix())
.append("visible", getVisible())
.append("perms", getPerms())
.append("icon", getIcon())

View File

@ -67,6 +67,9 @@ public class GenTable extends BaseEntity
/** 界面上form的列数 1一列2二列3三列 4四列 */
private String formCols;
/** 单据前缀 生成 菜单脚本的时候插入 */
private String billPrefix;
/** 生成路径(不填默认项目路径) */
private String genPath;
@ -238,6 +241,16 @@ public class GenTable extends BaseEntity
this.formCols = formCols;
}
public String getBillPrefix()
{
return billPrefix;
}
public void setBillPrefix(String billPrefix)
{
this.billPrefix = billPrefix;
}
public String getGenPath()
{
return genPath;

View File

@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="formCols" column="form_cols" />
<result property="billPrefix" column="bill_prefix" />
<collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" />
</resultMap>
@ -56,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectGenTableVo">
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark,form_cols from gen_table
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark,
form_cols,bill_prefix from gen_table
</sql>
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
@ -100,7 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,t.form_cols,
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
t.form_cols,t.bill_prefix,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_readonly,c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
@ -108,7 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,t.form_cols,
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
t.form_cols,t.bill_prefix,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_readonly, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
@ -116,7 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,t.form_cols,
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
t.form_cols,t.bill_prefix,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_readonly,c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
@ -138,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="genPath != null and genPath != ''">gen_path,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="formCols != null and formCols != ''">form_cols,</if>
<if test="billPrefix != null and billPrefix != ''">bill_prefix,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
@ -154,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="genPath != null and genPath != ''">#{genPath},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="formCols != null and formCols != ''">#{formCols},</if>
<if test="billPrefix != null and billPrefix != ''">#{billPrefix},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
@ -179,6 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="formCols != null and formCols != ''">form_cols = #{formCols},</if>
<if test="billPrefix != null and billPrefix != ''">bill_prefix = #{billPrefix},</if>
update_time = sysdate()
</set>
where table_id = #{tableId}

View File

@ -30,7 +30,7 @@
<div class="row mt20">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">表名称A</label>
<label class="col-sm-4 control-label is-required">表名称:</label>
<div class="col-sm-8">
<input name="tableName" class="form-control" type="text" placeholder="请输入表名称" maxlength="200" th:field="*{tableName}" required>
</div>
@ -86,6 +86,16 @@
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">单据前缀编号A</label>
<div class="col-sm-8">
<input name="billPrefix" class="form-control" type="text" placeholder="请输入单据前缀编号" maxlength="100" th:field="*{billPrefix}" required>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark,bill_prefix)
values('${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', sysdate(), '', null, '${functionName}菜单', '${billPrefix}');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

View File

@ -0,0 +1,79 @@
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_bill_no
*
* @author dalin
* @date 2020-12-15
*/
public class SysBillNo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 期间 */
private String fperiod;
/** 单据标识 */
private String billName;
/** 迭代值 */
@Excel(name = "迭代值")
private String iterationValue;
/** 下一个值 */
@Excel(name = "下一个值")
private String nextValue;
public void setFperiod(String fperiod)
{
this.fperiod = fperiod;
}
public String getFperiod()
{
return fperiod;
}
public void setBillName(String billName)
{
this.billName = billName;
}
public String getBillName()
{
return billName;
}
public void setIterationValue(String iterationValue)
{
this.iterationValue = iterationValue;
}
public String getIterationValue()
{
return iterationValue;
}
public void setNextValue(String nextValue)
{
this.nextValue = nextValue;
}
public String getNextValue()
{
return nextValue;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fperiod", getFperiod())
.append("billName", getBillName())
.append("iterationValue", getIterationValue())
.append("nextValue", getNextValue())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysBillNo;
/**
* 单据号迭代信息Mapper接口
*
* @author dalin
* @date 2020-12-15
*/
public interface SysBillNoMapper
{
/**
* 查询单据号迭代信息
*
* @param fperiod 单据号迭代信息ID
* @return 单据号迭代信息
*/
public SysBillNo selectSysBillNoById(String fperiod);
/**
* 查询单据号迭代信息列表
*
* @param sysBillNo 单据号迭代信息
* @return 单据号迭代信息集合
*/
public List<SysBillNo> selectSysBillNoList(SysBillNo sysBillNo);
/**
* 新增单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
public int insertSysBillNo(SysBillNo sysBillNo);
/**
* 修改单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
public int updateSysBillNo(SysBillNo sysBillNo);
/**
* 删除单据号迭代信息
*
* @param fperiod 单据号迭代信息ID
* @return 结果
*/
public int deleteSysBillNoById(String fperiod);
/**
* 批量删除单据号迭代信息
*
* @param fperiods 需要删除的数据ID
* @return 结果
*/
public int deleteSysBillNoByIds(String[] fperiods);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SysBillNo;
/**
* 单据号迭代信息Service接口
*
* @author dalin
* @date 2020-12-15
*/
public interface ISysBillNoService
{
/**
* 查询单据号迭代信息
*
* @param fperiod 单据号迭代信息ID
* @return 单据号迭代信息
*/
public SysBillNo selectSysBillNoById(String fperiod);
/**
* 查询单据号迭代信息列表
*
* @param sysBillNo 单据号迭代信息
* @return 单据号迭代信息集合
*/
public List<SysBillNo> selectSysBillNoList(SysBillNo sysBillNo);
/**
* 新增单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
public int insertSysBillNo(SysBillNo sysBillNo);
/**
* 修改单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
public int updateSysBillNo(SysBillNo sysBillNo);
/**
* 批量删除单据号迭代信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysBillNoByIds(String ids);
/**
* 删除单据号迭代信息信息
*
* @param fperiod 单据号迭代信息ID
* @return 结果
*/
public int deleteSysBillNoById(String fperiod);
}

View File

@ -0,0 +1,94 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBillNoMapper;
import com.ruoyi.system.domain.SysBillNo;
import com.ruoyi.system.service.ISysBillNoService;
import com.ruoyi.common.core.text.Convert;
/**
* 单据号迭代信息Service业务层处理
*
* @author dalin
* @date 2020-12-15
*/
@Service
public class SysBillNoServiceImpl implements ISysBillNoService
{
@Autowired
private SysBillNoMapper sysBillNoMapper;
/**
* 查询单据号迭代信息
*
* @param fperiod 单据号迭代信息ID
* @return 单据号迭代信息
*/
@Override
public SysBillNo selectSysBillNoById(String fperiod)
{
return sysBillNoMapper.selectSysBillNoById(fperiod);
}
/**
* 查询单据号迭代信息列表
*
* @param sysBillNo 单据号迭代信息
* @return 单据号迭代信息
*/
@Override
public List<SysBillNo> selectSysBillNoList(SysBillNo sysBillNo)
{
return sysBillNoMapper.selectSysBillNoList(sysBillNo);
}
/**
* 新增单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
@Override
public int insertSysBillNo(SysBillNo sysBillNo)
{
return sysBillNoMapper.insertSysBillNo(sysBillNo);
}
/**
* 修改单据号迭代信息
*
* @param sysBillNo 单据号迭代信息
* @return 结果
*/
@Override
public int updateSysBillNo(SysBillNo sysBillNo)
{
return sysBillNoMapper.updateSysBillNo(sysBillNo);
}
/**
* 删除单据号迭代信息对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysBillNoByIds(String ids)
{
return sysBillNoMapper.deleteSysBillNoByIds(Convert.toStrArray(ids));
}
/**
* 删除单据号迭代信息信息
*
* @param fperiod 单据号迭代信息ID
* @return 结果
*/
@Override
public int deleteSysBillNoById(String fperiod)
{
return sysBillNoMapper.deleteSysBillNoById(fperiod);
}
}

View File

@ -13,6 +13,7 @@
<result property="url" column="url" />
<result property="target" column="target" />
<result property="menuType" column="menu_type" />
<result property="billPrefix" column="bill_prefix" />
<result property="visible" column="visible" />
<result property="perms" column="perms" />
<result property="icon" column="icon" />
@ -24,12 +25,12 @@
</resultMap>
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, ifnull(perms,'') as perms, icon, create_by, create_time
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, bill_prefix,visible, ifnull(perms,'') as perms, icon, create_by, create_time
from sys_menu
</sql>
<select id="selectMenusByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type,m.bill_prefix, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@ -39,7 +40,7 @@
</select>
<select id="selectMenuNormalAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type,m.bill_prefix, m.icon, m.order_num, m.create_time
from sys_menu m
where m.menu_type in ('M', 'C') and m.visible = 0
order by m.parent_id, m.order_num
@ -51,7 +52,7 @@
</select>
<select id="selectMenuAllByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type,m.bill_prefix, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@ -91,7 +92,7 @@
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, ifnull(m.perms,'') as perms, m.target, m.menu_type,m.bill_prefix, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@ -111,7 +112,7 @@
</delete>
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
SELECT t.menu_id, t.parent_id, t.menu_name, t.order_num, t.url, t.target, t.menu_type, t.visible, t.perms, t.icon, t.remark,
SELECT t.menu_id, t.parent_id, t.menu_name, t.order_num, t.url, t.target, t.menu_type, t.bill_prefix,t.visible, t.perms, t.icon, t.remark,
(SELECT menu_name FROM sys_menu WHERE menu_id = t.parent_id) parent_name
FROM sys_menu t
where t.menu_id = #{menuId}
@ -135,6 +136,7 @@
<if test="url != null">url = #{url},</if>
<if test="target != null and target != ''">target = #{target},</if>
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
<if test="billPrefix != null and billPrefix != ''">bill_prefix = #{billPrefix},</if>
<if test="visible != null">visible = #{visible},</if>
<if test="perms !=null">perms = #{perms},</if>
<if test="icon !=null and icon != ''">icon = #{icon},</if>
@ -154,6 +156,7 @@
<if test="url != null and url != ''">url,</if>
<if test="target != null and target != ''">target,</if>
<if test="menuType != null and menuType != ''">menu_type,</if>
<if test="billPrefix != null and billPrefix != ''">bill_prefix,</if>
<if test="visible != null">visible,</if>
<if test="perms !=null and perms != ''">perms,</if>
<if test="icon != null and icon != ''">icon,</if>
@ -168,6 +171,7 @@
<if test="url != null and url != ''">#{url},</if>
<if test="target != null and target != ''">#{target},</if>
<if test="menuType != null and menuType != ''">#{menuType},</if>
<if test="billPrefix != null and billPrefix != ''">#{billPrefix},</if>
<if test="visible != null">#{visible},</if>
<if test="perms !=null and perms != ''">#{perms},</if>
<if test="icon != null and icon != ''">#{icon},</if>

View File

@ -1,3 +1,7 @@
-- 生成代码
alter table gen_table add form_cols char(1) default '2' COMMENT '表单列示 1单列 2两列 3三列 4四列' ;
alter table gen_table_column add `is_readonly` char(1) DEFAULT 0 COMMENT '是否自读字段0否 1是' ;
alter table gen_table add bill_prefix char(6) default '' COMMENT '表单前缀编号' ;
-- 菜单
alter table sys_menu add bill_prefix char(6) default '' COMMENT '表单前缀编号' ;