修改 月
parent
df43d1d1d5
commit
88eb022da3
@ -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.BaseNumberQa;
|
||||||
|
import com.ruoyi.system.service.IBaseNumberQaService;
|
||||||
|
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_number_qa")
|
||||||
|
public class BaseNumberQaController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/base_number_qa";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBaseNumberQaService baseNumberQaService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:base_number_qa:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String base_number_qa()
|
||||||
|
{
|
||||||
|
return prefix + "/base_number_qa";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<BaseNumberQa> list = baseNumberQaService.selectBaseNumberQaList(baseNumberQa);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出月看板-数字化安全维护列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:export")
|
||||||
|
@Log(title = "月看板-数字化安全维护", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
List<BaseNumberQa> list = baseNumberQaService.selectBaseNumberQaList(baseNumberQa);
|
||||||
|
ExcelUtil<BaseNumberQa> util = new ExcelUtil<BaseNumberQa>(BaseNumberQa.class);
|
||||||
|
return util.exportExcel(list, "月看板-数字化安全维护数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:add")
|
||||||
|
@Log(title = "月看板-数字化安全维护", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
return toAjax(baseNumberQaService.insertBaseNumberQa(baseNumberQa));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
BaseNumberQa baseNumberQa = baseNumberQaService.selectBaseNumberQaById(id);
|
||||||
|
mmap.put("baseNumberQa", baseNumberQa);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:edit")
|
||||||
|
@Log(title = "月看板-数字化安全维护", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
return toAjax(baseNumberQaService.updateBaseNumberQa(baseNumberQa));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:base_number_qa:remove")
|
||||||
|
@Log(title = "月看板-数字化安全维护", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(baseNumberQaService.deleteBaseNumberQaByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
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_number_qa
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public class BaseNumberQa extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 年份 */
|
||||||
|
@Excel(name = "年份")
|
||||||
|
private Long yearName;
|
||||||
|
|
||||||
|
/** 月份 */
|
||||||
|
@Excel(name = "月份")
|
||||||
|
private Long monthName;
|
||||||
|
|
||||||
|
/** 隐患数 */
|
||||||
|
@Excel(name = "隐患数")
|
||||||
|
private Long qaNumber;
|
||||||
|
|
||||||
|
/** 闭环数 */
|
||||||
|
@Excel(name = "闭环数")
|
||||||
|
private Long bhNumber;
|
||||||
|
|
||||||
|
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 setMonthName(Long monthName)
|
||||||
|
{
|
||||||
|
this.monthName = monthName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMonthName()
|
||||||
|
{
|
||||||
|
return monthName;
|
||||||
|
}
|
||||||
|
public void setQaNumber(Long qaNumber)
|
||||||
|
{
|
||||||
|
this.qaNumber = qaNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQaNumber()
|
||||||
|
{
|
||||||
|
return qaNumber;
|
||||||
|
}
|
||||||
|
public void setBhNumber(Long bhNumber)
|
||||||
|
{
|
||||||
|
this.bhNumber = bhNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getBhNumber()
|
||||||
|
{
|
||||||
|
return bhNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("yearName", getYearName())
|
||||||
|
.append("monthName", getMonthName())
|
||||||
|
.append("qaNumber", getQaNumber())
|
||||||
|
.append("bhNumber", getBhNumber())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseNumberQa;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-数字化安全维护Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public interface BaseNumberQaMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
public BaseNumberQa selectBaseNumberQaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护列表
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 月看板-数字化安全维护集合
|
||||||
|
*/
|
||||||
|
public List<BaseNumberQa> selectBaseNumberQaList(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseNumberQa(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseNumberQa(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseNumberQaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseNumberQaByIds(String[] ids);
|
||||||
|
|
||||||
|
List<BaseNumberQa> selectMonthNumberQaS();
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.BaseNumberQa;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-数字化安全维护Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
public interface IBaseNumberQaService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
public BaseNumberQa selectBaseNumberQaById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护列表
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 月看板-数字化安全维护集合
|
||||||
|
*/
|
||||||
|
public List<BaseNumberQa> selectBaseNumberQaList(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBaseNumberQa(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBaseNumberQa(BaseNumberQa baseNumberQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的月看板-数字化安全维护主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseNumberQaByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-数字化安全维护信息
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBaseNumberQaById(Long id);
|
||||||
|
|
||||||
|
List<BaseNumberQa> selectMonthNumberQaS();
|
||||||
|
}
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
package com.ruoyi.system.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.system.mapper.BaseNumberQaMapper;
|
||||||
|
import com.ruoyi.system.domain.BaseNumberQa;
|
||||||
|
import com.ruoyi.system.service.IBaseNumberQaService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月看板-数字化安全维护Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-07-28
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BaseNumberQaServiceImpl implements IBaseNumberQaService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BaseNumberQaMapper baseNumberQaMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BaseNumberQa selectBaseNumberQaById(Long id)
|
||||||
|
{
|
||||||
|
return baseNumberQaMapper.selectBaseNumberQaById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月看板-数字化安全维护列表
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 月看板-数字化安全维护
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BaseNumberQa> selectBaseNumberQaList(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
return baseNumberQaMapper.selectBaseNumberQaList(baseNumberQa);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBaseNumberQa(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
baseNumberQa.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return baseNumberQaMapper.insertBaseNumberQa(baseNumberQa);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param baseNumberQa 月看板-数字化安全维护
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBaseNumberQa(BaseNumberQa baseNumberQa)
|
||||||
|
{
|
||||||
|
return baseNumberQaMapper.updateBaseNumberQa(baseNumberQa);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除月看板-数字化安全维护
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的月看板-数字化安全维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseNumberQaByIds(String ids)
|
||||||
|
{
|
||||||
|
return baseNumberQaMapper.deleteBaseNumberQaByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除月看板-数字化安全维护信息
|
||||||
|
*
|
||||||
|
* @param id 月看板-数字化安全维护主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBaseNumberQaById(Long id)
|
||||||
|
{
|
||||||
|
return baseNumberQaMapper.deleteBaseNumberQaById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BaseNumberQa> selectMonthNumberQaS() {
|
||||||
|
return baseNumberQaMapper.selectMonthNumberQaS();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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(2100, '月看板-数字化安全维护', '5', '1', '/system/base_number_qa', 'C', '0', 'system:base_number_qa: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, '月看板-数字化安全维护查询', 2100, '1', '#', 'F', '0', 'system:base_number_qa: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, '月看板-数字化安全维护新增', 2100, '2', '#', 'F', '0', 'system:base_number_qa: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, '月看板-数字化安全维护修改', 2100, '3', '#', 'F', '0', 'system:base_number_qa: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, '月看板-数字化安全维护删除', 2100, '4', '#', 'F', '0', 'system:base_number_qa: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, '月看板-数字化安全维护导出', 2100, '5', '#', 'F', '0', 'system:base_number_qa:export', '#', 'admin', sysdate, '', null, '');
|
||||||
|
|
||||||
|
-- base_number_qa主键序列
|
||||||
|
create sequence seq_base_number_qa
|
||||||
|
increment by 1
|
||||||
|
start with 10
|
||||||
|
nomaxvalue
|
||||||
|
nominvalue
|
||||||
|
cache 20;
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
<?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.BaseNumberQaMapper">
|
||||||
|
|
||||||
|
<resultMap type="BaseNumberQa" id="BaseNumberQaResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="yearName" column="year_name" />
|
||||||
|
<result property="monthName" column="month_name" />
|
||||||
|
<result property="qaNumber" column="qa_number" />
|
||||||
|
<result property="bhNumber" column="bh_number" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBaseNumberQaVo">
|
||||||
|
select id, year_name, month_name, qa_number, bh_number, create_time from base_number_qa
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMonthNumberQaS" resultMap="BaseNumberQaResult">
|
||||||
|
select id, year_name, month_name, qa_number, bh_number, create_time from base_number_qa
|
||||||
|
where year_name=TO_NUMBER(to_char(sysdate,'yyyy'))
|
||||||
|
order by month_name asc
|
||||||
|
</select>
|
||||||
|
<select id="selectBaseNumberQaList" parameterType="BaseNumberQa" resultMap="BaseNumberQaResult">
|
||||||
|
<include refid="selectBaseNumberQaVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="yearName != null "> and year_name = #{yearName}</if>
|
||||||
|
<if test="monthName != null "> and month_name = #{monthName}</if>
|
||||||
|
</where>
|
||||||
|
order by year_name desc ,month_name asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBaseNumberQaById" parameterType="Long" resultMap="BaseNumberQaResult">
|
||||||
|
<include refid="selectBaseNumberQaVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBaseNumberQa" parameterType="BaseNumberQa">
|
||||||
|
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||||
|
SELECT seq_base_number_qa.NEXTVAL as id FROM DUAL
|
||||||
|
</selectKey>
|
||||||
|
insert into base_number_qa
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="yearName != null">year_name,</if>
|
||||||
|
<if test="monthName != null">month_name,</if>
|
||||||
|
<if test="qaNumber != null">qa_number,</if>
|
||||||
|
<if test="bhNumber != null">bh_number,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="yearName != null">#{yearName},</if>
|
||||||
|
<if test="monthName != null">#{monthName},</if>
|
||||||
|
<if test="qaNumber != null">#{qaNumber},</if>
|
||||||
|
<if test="bhNumber != null">#{bhNumber},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBaseNumberQa" parameterType="BaseNumberQa">
|
||||||
|
update base_number_qa
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="yearName != null">year_name = #{yearName},</if>
|
||||||
|
<if test="monthName != null">month_name = #{monthName},</if>
|
||||||
|
<if test="qaNumber != null">qa_number = #{qaNumber},</if>
|
||||||
|
<if test="bhNumber != null">bh_number = #{bhNumber},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBaseNumberQaById" parameterType="Long">
|
||||||
|
delete from base_number_qa where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBaseNumberQaByIds" parameterType="String">
|
||||||
|
delete from base_number_qa where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
<!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_number_qa-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">年份:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="yearName" 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="monthName" 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="qaNumber" 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="bhNumber" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_number_qa"
|
||||||
|
$("#form-base_number_qa-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-base_number_qa-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
<!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>
|
||||||
|
<input type="text" name="monthName"/>
|
||||||
|
</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_number_qa:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_number_qa:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_number_qa:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_number_qa: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_number_qa:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:base_number_qa:remove')}]];
|
||||||
|
var prefix = ctx + "system/base_number_qa";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "月看板-数字化安全维护",
|
||||||
|
// sortName:'yearName,monthName',
|
||||||
|
// sortOrder:'desc',
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'yearName',
|
||||||
|
title: '年份'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'monthName',
|
||||||
|
title: '月份'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'qaNumber',
|
||||||
|
title: '隐患数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'bhNumber',
|
||||||
|
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.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,50 @@
|
|||||||
|
<!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_number_qa-edit" th:object="${baseNumberQa}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">年份:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="yearName" th:field="*{yearName}" 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="monthName" th:field="*{monthName}" 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="qaNumber" th:field="*{qaNumber}" 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="bhNumber" th:field="*{bhNumber}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/base_number_qa";
|
||||||
|
$("#form-base_number_qa-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-base_number_qa-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue