修改 月
parent
88eb022da3
commit
cc7cc61c07
@ -0,0 +1,127 @@
|
|||||||
|
package com.ruoyi.system.controller;
|
||||||
|
|
||||||
|
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.BaseQi;
|
||||||
|
import com.ruoyi.system.service.IBaseQiService;
|
||||||
|
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 2022-07-28
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/base_qi")
|
||||||
|
public class BaseQiController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/base_qi";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBaseQiService baseQiService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:base_qi:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String base_qi()
|
||||||
|
{
|
||||||
|
return prefix + "/base_qi";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseQi> list = baseQiService.selectBaseQiList(baseQi);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出月看板-品质提升维护列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:export")
|
||||||
|
@Log(title = "月看板-品质提升维护", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
List<BaseQi> list = baseQiService.selectBaseQiList(baseQi);
|
||||||
|
ExcelUtil<BaseQi> util = new ExcelUtil<BaseQi>(BaseQi.class);
|
||||||
|
return util.exportExcel(list, "月看板-品质提升维护数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:add")
|
||||||
|
@Log(title = "月看板-品质提升维护", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
return toAjax(baseQiService.insertBaseQi(baseQi));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
BaseQi baseQi = baseQiService.selectBaseQiById(id);
|
||||||
|
mmap.put("baseQi", baseQi);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:edit")
|
||||||
|
@Log(title = "月看板-品质提升维护", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
return toAjax(baseQiService.updateBaseQi(baseQi));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_qi:remove")
|
||||||
|
@Log(title = "月看板-品质提升维护", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseQiService.deleteBaseQiByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-品质提升维护对象 base_qi
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public class BaseQi extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 年份 */
|
||||||
|
@Excel(name = "年份")
|
||||||
|
private Long yearName;
|
||||||
|
|
||||||
|
/** 提升度 */
|
||||||
|
@Excel(name = "提升度")
|
||||||
|
private double rate;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@Excel(name = "名称")
|
||||||
|
private Long type;
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setYearName(Long yearName)
|
||||||
|
{
|
||||||
|
this.yearName = yearName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getYearName()
|
||||||
|
{
|
||||||
|
return yearName;
|
||||||
|
}
|
||||||
|
public void setRate(double rate)
|
||||||
|
{
|
||||||
|
this.rate = rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getRate()
|
||||||
|
{
|
||||||
|
return rate;
|
||||||
|
}
|
||||||
|
public void setType(Long type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeName() {
|
||||||
|
return typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeName(String typeName) {
|
||||||
|
this.typeName = typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("yearName", getYearName())
|
||||||
|
.append("rate", getRate())
|
||||||
|
.append("type", getType())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseQi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-品质提升维护Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public interface BaseQiMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
public BaseQi selectBaseQiById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护列表
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 月看板-品质提升维护集合
|
||||||
|
*/
|
||||||
|
public List<BaseQi> selectBaseQiList(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseQi(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseQi(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseQiById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseQiByIds(String[] ids);
|
||||||
|
|
||||||
|
List<BaseQi> selectBaseQiList1();
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseQi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-品质提升维护Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public interface IBaseQiService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
public BaseQi selectBaseQiById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护列表
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 月看板-品质提升维护集合
|
||||||
|
*/
|
||||||
|
public List<BaseQi> selectBaseQiList(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseQi(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseQi(BaseQi baseQi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的月看板-品质提升维护主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseQiByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-品质提升维护信息
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseQiById(Long id);
|
||||||
|
|
||||||
|
List<BaseQi> selectBaseQiList1();
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
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.BaseQiMapper;
|
||||||
|
import com.ruoyi.system.domain.BaseQi;
|
||||||
|
import com.ruoyi.system.service.IBaseQiService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-品质提升维护Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseQiServiceImpl implements IBaseQiService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseQiMapper baseQiMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseQi selectBaseQiById(Long id)
|
||||||
|
{
|
||||||
|
return baseQiMapper.selectBaseQiById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-品质提升维护列表
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 月看板-品质提升维护
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseQi> selectBaseQiList(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
return baseQiMapper.selectBaseQiList(baseQi);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseQi(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
return baseQiMapper.insertBaseQi(baseQi);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param baseQi 月看板-品质提升维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseQi(BaseQi baseQi)
|
||||||
|
{
|
||||||
|
return baseQiMapper.updateBaseQi(baseQi);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-品质提升维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的月看板-品质提升维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseQiByIds(String ids)
|
||||||
|
{
|
||||||
|
return baseQiMapper.deleteBaseQiByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-品质提升维护信息
|
||||||
|
*
|
||||||
|
* @param id 月看板-品质提升维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseQiById(Long id)
|
||||||
|
{
|
||||||
|
return baseQiMapper.deleteBaseQiById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BaseQi> selectBaseQiList1() {
|
||||||
|
return baseQiMapper.selectBaseQiList1();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(2105, '月看板-品质提升维护', '5', '1', '/system/base_qi', 'C', '0', 'system:base_qi:view', '#', 'admin', sysdate, '', null, '月看板-品质提升维护菜单');
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(seq_sys_menu.nextval, '月看板-品质提升维护查询', 2105, '1', '#', 'F', '0', 'system:base_qi:list', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(seq_sys_menu.nextval, '月看板-品质提升维护新增', 2105, '2', '#', 'F', '0', 'system:base_qi:add', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(seq_sys_menu.nextval, '月看板-品质提升维护修改', 2105, '3', '#', 'F', '0', 'system:base_qi:edit', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(seq_sys_menu.nextval, '月看板-品质提升维护删除', 2105, '4', '#', 'F', '0', 'system:base_qi:remove', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values(seq_sys_menu.nextval, '月看板-品质提升维护导出', 2105, '5', '#', 'F', '0', 'system:base_qi:export', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
-- base_qi主键序列
|
||||||
|
create sequence seq_base_qi
|
||||||
|
increment by 1
|
||||||
|
start with 10
|
||||||
|
nomaxvalue
|
||||||
|
nominvalue
|
||||||
|
cache 20;
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
<?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.BaseQiMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseQi" id="BaseQiResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="yearName" column="year_name" />
|
||||||
|
<result property="rate" column="rate" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="typeName" column="DICT_LABEL" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseQiVo">
|
||||||
|
select id, year_name, rate, type from base_qi
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBaseQiList1" resultMap="BaseQiResult">
|
||||||
|
select id, year_name, rate, sdd.DICT_LABEL
|
||||||
|
from base_qi bq
|
||||||
|
left join SYS_DICT_DATA sdd on TYPE = sdd.DICT_VALUE
|
||||||
|
and sdd.DICT_TYPE = 'quality_improvement_name'
|
||||||
|
order by year_name
|
||||||
|
</select>
|
||||||
|
<select id="selectBaseQiList" parameterType="BaseQi" resultMap="BaseQiResult">
|
||||||
|
<include refid="selectBaseQiVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="yearName != null "> and year_name = #{yearName}</if>
|
||||||
|
<if test="type != null "> and type = #{type}</if>
|
||||||
|
</where>
|
||||||
|
order by year_name desc ,rate asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBaseQiById" parameterType="Long" resultMap="BaseQiResult">
|
||||||
|
<include refid="selectBaseQiVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBaseQi" parameterType="BaseQi">
|
||||||
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||||
|
SELECT seq_base_qi.NEXTVAL as id FROM DUAL
|
||||||
|
</selectKey>
|
||||||
|
insert into base_qi
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="yearName != null">year_name,</if>
|
||||||
|
<if test="rate != null">rate,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="yearName != null">#{yearName},</if>
|
||||||
|
<if test="rate != null">#{rate},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBaseQi" parameterType="BaseQi">
|
||||||
|
update base_qi
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="yearName != null">year_name = #{yearName},</if>
|
||||||
|
<if test="rate != null">rate = #{rate},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBaseQiById" parameterType="Long">
|
||||||
|
delete from base_qi where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBaseQiByIds" parameterType="String">
|
||||||
|
delete from base_qi where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
<!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-base_qi-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">年份:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="yearName" 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 name="rate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('quality_improvement_name')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_qi"
|
||||||
|
$("#form-base_qi-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-base_qi-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
<!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="yearName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>名称:</label>
|
||||||
|
<select name="type" th:with="type=${@dict.getType('quality_improvement_name')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</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:base_qi:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_qi:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_qi:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_qi: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('system:base_qi:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:base_qi:remove')}]];
|
||||||
|
var typeDatas = [[${@dict.getType('quality_improvement_name')}]];
|
||||||
|
var prefix = ctx + "system/base_qi";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "月看板-品质提升维护",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '${comment}',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'yearName',
|
||||||
|
title: '年份'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'rate',
|
||||||
|
title: '提升度'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'type',
|
||||||
|
title: '名称',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(typeDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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,46 @@
|
|||||||
|
<!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-base_qi-edit" th:object="${baseQi}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">年份:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="yearName" th:field="*{yearName}" 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 name="rate" th:field="*{rate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('quality_improvement_name')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_qi";
|
||||||
|
$("#form-base_qi-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-base_qi-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue