修改 门体库
parent
7ae72fc90e
commit
12e1373748
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.web.controller.broad;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.json.JSONObject;
|
||||
import com.ruoyi.system.domain.BaseTeam;
|
||||
import com.ruoyi.system.service.IBaseTeamService;
|
||||
import com.ruoyi.system.service.IBroadDataService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2022/7/20 10:24
|
||||
*/
|
||||
@Controller("/broad/mtk")
|
||||
@ApiOperation("门体库")
|
||||
@ResponseBody
|
||||
public class MTKController {
|
||||
@Autowired
|
||||
IBroadDataService service;
|
||||
|
||||
@Autowired
|
||||
private IBaseTeamService baseTeamService;
|
||||
|
||||
@PostMapping("/team6s")
|
||||
public String list(BaseTeam baseTeam) {
|
||||
List<BaseTeam> list = baseTeamService.selectBaseTeamList(baseTeam);
|
||||
return JSONArray.toJSONString(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package com.ruoyi.common.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 全局配置类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "ruoyi")
|
||||
public class Global
|
||||
{
|
||||
/** 项目名称 */
|
||||
private static String name;
|
||||
|
||||
/** 版本 */
|
||||
private static String version;
|
||||
|
||||
/** 版权年份 */
|
||||
private static String copyrightYear;
|
||||
|
||||
/** 实例演示开关 */
|
||||
private static boolean demoEnabled;
|
||||
|
||||
/** 上传路径 */
|
||||
private static String profile;
|
||||
|
||||
/** 获取地址开关 */
|
||||
private static boolean addressEnabled;
|
||||
|
||||
public static String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
Global.name = name;
|
||||
}
|
||||
|
||||
public static String getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version)
|
||||
{
|
||||
Global.version = version;
|
||||
}
|
||||
|
||||
public static String getCopyrightYear()
|
||||
{
|
||||
return copyrightYear;
|
||||
}
|
||||
|
||||
public void setCopyrightYear(String copyrightYear)
|
||||
{
|
||||
Global.copyrightYear = copyrightYear;
|
||||
}
|
||||
|
||||
public static boolean isDemoEnabled()
|
||||
{
|
||||
return demoEnabled;
|
||||
}
|
||||
|
||||
public void setDemoEnabled(boolean demoEnabled)
|
||||
{
|
||||
Global.demoEnabled = demoEnabled;
|
||||
}
|
||||
|
||||
public static String getProfile()
|
||||
{
|
||||
return profile;
|
||||
}
|
||||
|
||||
public void setProfile(String profile)
|
||||
{
|
||||
Global.profile = profile;
|
||||
}
|
||||
|
||||
public static boolean isAddressEnabled()
|
||||
{
|
||||
return addressEnabled;
|
||||
}
|
||||
|
||||
public void setAddressEnabled(boolean addressEnabled)
|
||||
{
|
||||
Global.addressEnabled = addressEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像上传路径
|
||||
*/
|
||||
public static String getAvatarPath()
|
||||
{
|
||||
return getProfile() + "/avatar";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下载路径
|
||||
*/
|
||||
public static String getDownloadPath()
|
||||
{
|
||||
return getProfile() + "/download/";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上传路径
|
||||
*/
|
||||
public static String getUploadPath()
|
||||
{
|
||||
return getProfile() + "/upload";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上传路径修复
|
||||
*/
|
||||
public static String getUploadPathRecorrect()
|
||||
{
|
||||
return getProfile() + "/";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
|
||||
|
||||
import com.ruoyi.common.config.Global;
|
||||
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.BaseTeam;
|
||||
import com.ruoyi.system.service.IBaseTeamService;
|
||||
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;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 班组6S统计维护Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-20
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/base_team")
|
||||
public class BaseTeamController extends BaseController
|
||||
{
|
||||
private String prefix = "system/base_team";
|
||||
|
||||
@Autowired
|
||||
private IBaseTeamService baseTeamService;
|
||||
|
||||
@RequiresPermissions("system:base_team:view")
|
||||
@GetMapping()
|
||||
public String base_team()
|
||||
{
|
||||
return prefix + "/base_team";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班组6S统计维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseTeam baseTeam)
|
||||
{
|
||||
startPage();
|
||||
List<BaseTeam> list = baseTeamService.selectBaseTeamList(baseTeam);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出班组6S统计维护列表
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:export")
|
||||
@Log(title = "班组6S统计维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseTeam baseTeam)
|
||||
{
|
||||
List<BaseTeam> list = baseTeamService.selectBaseTeamList(baseTeam);
|
||||
ExcelUtil<BaseTeam> util = new ExcelUtil<BaseTeam>(BaseTeam.class);
|
||||
return util.exportExcel(list, "班组6S统计维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班组6S统计维护
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存班组6S统计维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:add")
|
||||
@Log(title = "班组6S统计维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(MultipartFile file,BaseTeam baseTeam)
|
||||
{
|
||||
|
||||
|
||||
String filePath = Global.getUploadPath();
|
||||
try {
|
||||
String pathName = FileUploadUtils.upload(filePath, file);
|
||||
List<BaseTeam> list = baseTeamService.selectBaseTeamList(null);
|
||||
int id=0;
|
||||
if (list!=null||!list.isEmpty()){
|
||||
id= Math.toIntExact(list.get(list.size() - 1).getId())+1;
|
||||
}
|
||||
baseTeam.setId(Long.valueOf(id));
|
||||
baseTeam.setPath(pathName);
|
||||
return toAjax(baseTeamService.insertBaseTeam(baseTeam));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班组6S统计维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
BaseTeam baseTeam = baseTeamService.selectBaseTeamById(id);
|
||||
mmap.put("baseTeam", baseTeam);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存班组6S统计维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:edit")
|
||||
@Log(title = "班组6S统计维护", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseTeam baseTeam)
|
||||
{
|
||||
return toAjax(baseTeamService.updateBaseTeam(baseTeam));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班组6S统计维护
|
||||
*/
|
||||
@RequiresPermissions("system:base_team:remove")
|
||||
@Log(title = "班组6S统计维护", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseTeamService.deleteBaseTeamByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 班组6S统计维护对象 base_team_s
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-20
|
||||
*/
|
||||
public class BaseTeam extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String teamName;
|
||||
|
||||
/** 分数 */
|
||||
@Excel(name = "分数")
|
||||
private Long teamNumber;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String path;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTeamName(String teamName)
|
||||
{
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getTeamName()
|
||||
{
|
||||
return teamName;
|
||||
}
|
||||
public void setTeamNumber(Long teamNumber)
|
||||
{
|
||||
this.teamNumber = teamNumber;
|
||||
}
|
||||
|
||||
public Long getTeamNumber()
|
||||
{
|
||||
return teamNumber;
|
||||
}
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("createTime", getCreateTime())
|
||||
.append("id", getId())
|
||||
.append("teamName", getTeamName())
|
||||
.append("teamNumber", getTeamNumber())
|
||||
.append("path", getPath())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseTeam;
|
||||
|
||||
/**
|
||||
* 班组6S统计维护Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-20
|
||||
*/
|
||||
public interface BaseTeamMapper
|
||||
{
|
||||
/**
|
||||
* 查询班组6S统计维护
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 班组6S统计维护
|
||||
*/
|
||||
public BaseTeam selectBaseTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班组6S统计维护列表
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 班组6S统计维护集合
|
||||
*/
|
||||
public List<BaseTeam> selectBaseTeamList(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 新增班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseTeam(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 修改班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseTeam(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 删除班组6S统计维护
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除班组6S统计维护
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTeamByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BaseTeam;
|
||||
|
||||
/**
|
||||
* 班组6S统计维护Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-20
|
||||
*/
|
||||
public interface IBaseTeamService
|
||||
{
|
||||
/**
|
||||
* 查询班组6S统计维护
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 班组6S统计维护
|
||||
*/
|
||||
public BaseTeam selectBaseTeamById(Long id);
|
||||
|
||||
/**
|
||||
* 查询班组6S统计维护列表
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 班组6S统计维护集合
|
||||
*/
|
||||
public List<BaseTeam> selectBaseTeamList(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 新增班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseTeam(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 修改班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseTeam(BaseTeam baseTeam);
|
||||
|
||||
/**
|
||||
* 批量删除班组6S统计维护
|
||||
*
|
||||
* @param ids 需要删除的班组6S统计维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTeamByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除班组6S统计维护信息
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseTeamById(Long id);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
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.BaseTeamMapper;
|
||||
import com.ruoyi.system.domain.BaseTeam;
|
||||
import com.ruoyi.system.service.IBaseTeamService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 班组6S统计维护Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2022-07-20
|
||||
*/
|
||||
@Service
|
||||
public class BaseTeamServiceImpl implements IBaseTeamService
|
||||
{
|
||||
@Autowired
|
||||
private BaseTeamMapper baseTeamMapper;
|
||||
|
||||
/**
|
||||
* 查询班组6S统计维护
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 班组6S统计维护
|
||||
*/
|
||||
@Override
|
||||
public BaseTeam selectBaseTeamById(Long id)
|
||||
{
|
||||
return baseTeamMapper.selectBaseTeamById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班组6S统计维护列表
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 班组6S统计维护
|
||||
*/
|
||||
@Override
|
||||
public List<BaseTeam> selectBaseTeamList(BaseTeam baseTeam)
|
||||
{
|
||||
return baseTeamMapper.selectBaseTeamList(baseTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseTeam(BaseTeam baseTeam)
|
||||
{
|
||||
baseTeam.setCreateTime(DateUtils.getNowDate());
|
||||
return baseTeamMapper.insertBaseTeam(baseTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班组6S统计维护
|
||||
*
|
||||
* @param baseTeam 班组6S统计维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseTeam(BaseTeam baseTeam)
|
||||
{
|
||||
return baseTeamMapper.updateBaseTeam(baseTeam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除班组6S统计维护
|
||||
*
|
||||
* @param ids 需要删除的班组6S统计维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseTeamByIds(String ids)
|
||||
{
|
||||
return baseTeamMapper.deleteBaseTeamByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班组6S统计维护信息
|
||||
*
|
||||
* @param id 班组6S统计维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseTeamById(Long id)
|
||||
{
|
||||
return baseTeamMapper.deleteBaseTeamById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
<?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.BaseTeamMapper">
|
||||
|
||||
<resultMap type="BaseTeam" id="BaseTeamResult">
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="id" column="id" />
|
||||
<result property="teamName" column="team_name" />
|
||||
<result property="teamNumber" column="team_number" />
|
||||
<result property="path" column="path" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseTeamVo">
|
||||
select create_time, id, team_name, team_number, path from base_team_s
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseTeamList" parameterType="BaseTeam" resultMap="BaseTeamResult">
|
||||
<include refid="selectBaseTeamVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseTeamById" parameterType="Long" resultMap="BaseTeamResult">
|
||||
<include refid="selectBaseTeamVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseTeam" parameterType="BaseTeam">
|
||||
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||
SELECT seq_base_team_s.NEXTVAL as id FROM DUAL
|
||||
</selectKey>
|
||||
insert into base_team_s
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="id != null">id,</if>
|
||||
<if test="teamName != null">team_name,</if>
|
||||
<if test="teamNumber != null">team_number,</if>
|
||||
<if test="path != null">path,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="teamName != null">#{teamName},</if>
|
||||
<if test="teamNumber != null">#{teamNumber},</if>
|
||||
<if test="path != null">#{path},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseTeam" parameterType="BaseTeam">
|
||||
update base_team_s
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="teamName != null">team_name = #{teamName},</if>
|
||||
<if test="teamNumber != null">team_number = #{teamNumber},</if>
|
||||
<if test="path != null">path = #{path},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseTeamById" parameterType="Long">
|
||||
delete from base_team_s where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseTeamByIds" parameterType="String">
|
||||
delete from base_team_s where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增班组6S统计维护')"/>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-base_team-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="teamName" 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="teamNumber" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">图片:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="fileinput fileinput-new" data-provides="fileinput">
|
||||
<div class="fileinput-preview fileinput-exists thumbnail"
|
||||
style="max-width: 140px; max-height: 140px;"></div>
|
||||
<div>
|
||||
<input type="file" id="imagepath" name="imagepath"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists" data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer"/>
|
||||
<th:block th:include="include :: datetimepicker-js"/>
|
||||
<th:block th:include="include :: jasny-bootstrap-js"/>
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_team"
|
||||
$("#form-base_team-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
// if ($.validate.form()) {
|
||||
// $.operate.save(prefix + "/add", $('#form-base_team-add').serialize());
|
||||
// }
|
||||
var formData = new FormData();
|
||||
formData.append('file', $('#imagepath')[0].files[0]);
|
||||
formData.append('teamNumber', $("input[name='teamNumber']").val());
|
||||
formData.append('teamName', $("input[name='teamName']").val());
|
||||
$.ajax({
|
||||
url: prefix + "/add",
|
||||
type: 'post',
|
||||
cache: false,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
$.operate.successCallback(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,101 @@
|
||||
<!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('班组6S统计维护列表')" />
|
||||
</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>-->
|
||||
<!-- <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_team:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_team:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_team:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_team: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_team:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:base_team:remove')}]];
|
||||
var prefix = ctx + "system/base_team";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "teamNumber",
|
||||
sortOrder: "desc",
|
||||
modalName: "班组6S统计维护",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'teamName',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'teamNumber',
|
||||
title: '分数'
|
||||
},
|
||||
{
|
||||
field: 'path',
|
||||
title: '图片',
|
||||
formatter: function (value, row, index) {
|
||||
|
||||
// return imageView(value, 540, 324);
|
||||
return $.table.imageView(value, 324);
|
||||
}
|
||||
},
|
||||
{
|
||||
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,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改班组6S统计维护')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-base_team-edit" th:object="${baseTeam}">
|
||||
<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="teamName" th:field="*{teamName}" 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="teamNumber" th:field="*{teamNumber}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/base_team";
|
||||
$("#form-base_team-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-base_team-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue