| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | import javax.persistence.*; |
| | |
| | | private String companyId; |
| | | |
| | | /** å建人 */ |
| | | @Excel(name = "å建è
",sort = 25) |
| | | @Column(name = "create_by", columnDefinition = "VARCHAR(100) COMMENT 'å建人'", nullable = false) |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | /** å建æ¶é´ */ |
| | | @Excel(name = "å建æ¶é´",sort = 26, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Column(name = "create_time", columnDefinition = "DATETIME COMMENT 'å建æ¶é´'", nullable = false) |
| | | @Temporal(TemporalType.TIMESTAMP) |
| | |
| | | private Date createTime; |
| | | |
| | | /** æ´æ°äºº */ |
| | | @Excel(name = "æ´æ°è
",sort = 27) |
| | | @Column(name = "update_by", columnDefinition = "VARCHAR(100) COMMENT 'æ´æ°äºº'") |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | /** æ´æ°æ¶é´ */ |
| | | @Excel(name = "æ´æ°æ¶é´",sort = 28, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Column(name = "update_time", columnDefinition = "DATETIME COMMENT 'æ´æ°æ¶é´'") |
| | | @Temporal(TemporalType.TIMESTAMP) |
| | |
| | | package com.fzzy.igds.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | |
| | | @Id |
| | | @Column(name = "batch_id", columnDefinition = "varchar(40) COMMENT 'çæ¬¡ç¼å·'") |
| | | @TableId(value = "batch_id", type = IdType.NONE) |
| | | @TableField("batch_id") |
| | | private String batchId; |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface PatrolConfMapper extends BaseMapper<PatrolConf> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.fzzy.igds.domain.Patrol; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface PatrolMapper extends BaseMapper<Patrol> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.fzzy.igds.domain.PatrolRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface PatrolRecordMapper extends BaseMapper<PatrolRecord> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import com.fzzy.igds.mapper.PatrolConfMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class PatrolConfService { |
| | | |
| | | @Resource |
| | | private PatrolConfMapper patrolConfMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åè¡¨æ°æ® |
| | | * |
| | | * @param param æ¥è¯¢åæ° |
| | | * @return æ°æ®å表 |
| | | */ |
| | | public List<PatrolConf> selectList(PatrolConf param) { |
| | | QueryWrapper<PatrolConf> queryWrapper = getQueryWrapper(param); |
| | | return patrolConfMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * å°è£
æ¥è¯¢æ¡ä»¶ |
| | | * |
| | | * @param param æ¥è¯¢åæ° |
| | | * @return æ¥è¯¢æé å¨ |
| | | */ |
| | | public QueryWrapper<PatrolConf> getQueryWrapper(PatrolConf param) { |
| | | QueryWrapper<PatrolConf> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | // 设置å
¬å¸IDå¹¶ä½ä¸ºæ¥è¯¢æ¡ä»¶ |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | |
| | | |
| | | |
| | | // æå建æ¶é´ååºæåº |
| | | queryWrapper.orderByDesc("create_time"); |
| | | |
| | | return queryWrapper; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢è¯¦æ
|
| | | * |
| | | * @param id 主é®ID |
| | | * @return å®ä½å¯¹è±¡ |
| | | */ |
| | | public PatrolConf selectById(String id) { |
| | | return patrolConfMapper.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * æå
¥æ°æ°æ® |
| | | * |
| | | * @param param æ°æ®å®ä½ |
| | | * @return å½±åè¡æ° |
| | | */ |
| | | public int insertData(PatrolConf param) { |
| | | if (StringUtils.isEmpty(param.getBatchId())) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | } |
| | | return patrolConfMapper.insert(param); |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°å·²ææ°æ® |
| | | * |
| | | * @param param æ°æ®å®ä½ |
| | | * @return å½±åè¡æ° |
| | | */ |
| | | public int updateData(PatrolConf param) { |
| | | return patrolConfMapper.updateById(param); |
| | | } |
| | | |
| | | /** |
| | | * å 餿å®IDçæ°æ® |
| | | * |
| | | * @param ids è¦å é¤çè®°å½IDéåï¼éå·åéï¼ |
| | | */ |
| | | public void deleteDataById( String ids) { |
| | | String[] recordIds = Convert.toStrArray(ids); |
| | | for (String recordId : recordIds) { |
| | | patrolConfMapper.deleteById(recordId); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.igds.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.fzzy.igds.domain.Patrol; |
| | | import com.fzzy.igds.mapper.PatrolMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class PatrolService { |
| | | |
| | | @Resource |
| | | private PatrolMapper patrolMapper; |
| | | |
| | | public List<Patrol> selectList(Patrol param) { |
| | | QueryWrapper<Patrol> queryWrapper = getQueryWrapper(param); |
| | | return patrolMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * å°è£
æ¥è¯¢æ¡ä»¶ |
| | | * |
| | | * @param param |
| | | */ |
| | | public QueryWrapper<Patrol> getQueryWrapper(Patrol param) { |
| | | QueryWrapper<Patrol> queryWrapper = new QueryWrapper<>(); |
| | | |
| | | param.setCompanyId(ContextUtil.getCompanyId()); |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | |
| | | if (StringUtils.isNotBlank(param.getDeptId())) { |
| | | queryWrapper.eq("dept_id", param.getDeptId()); |
| | | } |
| | | queryWrapper.orderByDesc("create_time"); |
| | | |
| | | return queryWrapper; |
| | | } |
| | | |
| | | public Patrol selectById(String id) { |
| | | return patrolMapper.selectById(id); |
| | | } |
| | | |
| | | public int insertData(Patrol param) { |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | param.setId(ContextUtil.generateId()); |
| | | } |
| | | return patrolMapper.insert(param); |
| | | } |
| | | |
| | | public int updateData(Patrol param) { |
| | | return patrolMapper.updateById(param); |
| | | } |
| | | |
| | | public void deleteDataById( String ids) { |
| | | String[] recordIds = Convert.toStrArray(ids); |
| | | for (String recordId : recordIds) { |
| | | patrolMapper.deleteById(recordId); |
| | | } |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.sys.controller.patrol; |
| | | |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.sys.manager.patrol.PatrolConfManager; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.ShiroUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Controller |
| | | @RequestMapping("/patrol/patrolConf") |
| | | public class PatrolConfController extends BaseController { |
| | | |
| | | private static final String prefix = "patrol/patrolConf"; |
| | | |
| | | @Resource |
| | | private PatrolConfManager patrolConfManager; |
| | | |
| | | /** |
| | | * å·¡æ´é
ç½®é¡µé¢ |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:view") |
| | | @GetMapping() |
| | | public String patrolConf() { |
| | | return prefix + "/patrolConf"; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å·¡æ´é
ç½®å表 |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:list") |
| | | @PostMapping("/list") |
| | | @ResponseBody |
| | | public TableDataInfo list(PatrolConf param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | startPage(); |
| | | List<PatrolConf> list = patrolConfManager.selectList(param); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·¡æ´é
ç½®å表 |
| | | */ |
| | | @Log(title = "å·¡æ´é
置管ç", businessType = BusinessType.EXPORT) |
| | | @RequiresPermissions("web:patrol:patrolConf:export") |
| | | @PostMapping("/export") |
| | | @ResponseBody |
| | | public AjaxResult export(PatrolConf param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | List<PatrolConf> list = patrolConfManager.selectList(param); |
| | | ExcelUtil<PatrolConf> util = new ExcelUtil<>(PatrolConf.class); |
| | | return util.exportExcel(list, "å·¡æ´é
ç½®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¡æ´é
ç½®é¡µé¢ |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add(ModelMap mmap) { |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å·¡æ´é
ç½®æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:add") |
| | | @Log(title = "å·¡æ´é
置管ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ResponseBody |
| | | public AjaxResult addSave(@Validated PatrolConf param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | param.setCreateBy(getLoginName()); |
| | | param.setCreateTime(new Date()); |
| | | if (StringUtils.isEmpty(param.getBatchId())) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | } |
| | | return toAjax(patrolConfManager.insertData(param)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¡æ´é
ç½®é¡µé¢ |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:edit") |
| | | @GetMapping("/edit/{id}") |
| | | public String edit(@PathVariable("id") String id, ModelMap mmap) { |
| | | PatrolConf record = patrolConfManager.selectById(id); |
| | | mmap.put("patrolConf", record); |
| | | return prefix + "/edit"; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¡æ´é
ç½®æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:edit") |
| | | @Log(title = "å·¡æ´é
置管ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @ResponseBody |
| | | public AjaxResult editSave(@Validated PatrolConf param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | param.setUpdateBy(getLoginName()); |
| | | param.setUpdateTime(new Date()); |
| | | PatrolConf patrolConf = patrolConfManager.selectById(param.getBatchId()); |
| | | if (patrolConf == null) { |
| | | param.setBatchId(ContextUtil.generateId()); |
| | | return toAjax(patrolConfManager.insertData(param)); |
| | | } |
| | | |
| | | return toAjax(patrolConfManager.updateData(param)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¡æ´é
ç½®æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:patrolConf:remove") |
| | | @Log(title = "å·¡æ´é
置管ç", businessType = BusinessType.DELETE) |
| | | @PostMapping("/remove") |
| | | @ResponseBody |
| | | public AjaxResult remove(String ids) { |
| | | patrolConfManager.deleteDataById( ids); |
| | | return success(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.sys.controller.patrol; |
| | | |
| | | import com.fzzy.igds.domain.Patrol; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.sys.manager.patrol.PatrolManager; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.ShiroUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Controller |
| | | @RequestMapping("/patrol") |
| | | public class PatrolController extends BaseController { |
| | | |
| | | private static final String prefix = "patrol"; |
| | | |
| | | @Resource |
| | | private PatrolManager patrolManager; |
| | | |
| | | /** |
| | | * çµåå·¡æ´é¡µé¢ |
| | | * |
| | | * @author sgj |
| | | * @date 2025/12/06 |
| | | */ |
| | | @RequiresPermissions("web:patrol:view") |
| | | @GetMapping() |
| | | public String patrol() { |
| | | return prefix + "/patrol"; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢çµåå·¡æ´å表 |
| | | */ |
| | | @RequiresPermissions("web:patrol:list") |
| | | @PostMapping("/list") |
| | | @ResponseBody |
| | | public TableDataInfo list(Patrol param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | startPage(); |
| | | List<Patrol> list = patrolManager.selectList(param); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçµåå·¡æ´å表 |
| | | */ |
| | | @Log(title = "çµåå·¡æ´ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @RequiresPermissions("web:patrol:export") |
| | | @PostMapping("/export") |
| | | @ResponseBody |
| | | public AjaxResult export(Patrol param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | List<Patrol> list = patrolManager.selectList(param); |
| | | ExcelUtil<Patrol> util = new ExcelUtil<>(Patrol.class); |
| | | return util.exportExcel(list, "çµåå·¡æ´æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢çµåå·¡æ´é¡µé¢ |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add(ModelMap mmap) { |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢çµåå·¡æ´æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:add") |
| | | @Log(title = "çµåå·¡æ´ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ResponseBody |
| | | public AjaxResult addSave(@Validated Patrol param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | param.setCreateBy(getLoginName()); |
| | | param.setCreateTime(new Date()); |
| | | if (StringUtils.isEmpty(param.getId())) { |
| | | param.setId(ContextUtil.generateId()); |
| | | } |
| | | return toAjax(patrolManager.insertData(param)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹çµåå·¡æ´é¡µé¢ |
| | | */ |
| | | @RequiresPermissions("web:patrol:edit") |
| | | @GetMapping("/edit/{id}") |
| | | public String edit(@PathVariable("id") String id, ModelMap mmap) { |
| | | String companyId = ShiroUtils.getLoginUserCompanyId(); |
| | | Patrol record = patrolManager.selectById(id); |
| | | mmap.put("patrol", record); |
| | | return prefix + "/edit"; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹çµåå·¡æ´æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:edit") |
| | | @Log(title = "çµåå·¡æ´ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @ResponseBody |
| | | public AjaxResult editSave(@Validated Patrol param) { |
| | | if (null == param.getCompanyId()) { |
| | | param.setCompanyId(ShiroUtils.getLoginUserCompanyId()); |
| | | } |
| | | param.setUpdateBy(getLoginName()); |
| | | param.setUpdateTime(new Date()); |
| | | Patrol patrol = patrolManager.selectById(param.getId()); |
| | | if (patrol == null) { |
| | | param.setId(ContextUtil.generateId()); |
| | | return toAjax(patrolManager.insertData(param)); |
| | | } |
| | | |
| | | return toAjax(patrolManager.updateData(param)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤çµåå·¡æ´æ°æ® |
| | | */ |
| | | @RequiresPermissions("web:patrol:remove") |
| | | @Log(title = "çµåå·¡æ´ç®¡ç", businessType = BusinessType.DELETE) |
| | | @PostMapping("/remove") |
| | | @ResponseBody |
| | | public AjaxResult remove(String ids) { |
| | | patrolManager.deleteDataById(ids); |
| | | return success(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.sys.manager.patrol; |
| | | |
| | | import com.fzzy.igds.domain.PatrolConf; |
| | | import com.fzzy.igds.service.PatrolConfService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class PatrolConfManager { |
| | | |
| | | @Resource |
| | | private PatrolConfService patrolConfService; |
| | | |
| | | public List<PatrolConf> selectList(PatrolConf param) { |
| | | return patrolConfService.selectList(param); |
| | | } |
| | | |
| | | public PatrolConf selectById(String id) { |
| | | return patrolConfService.selectById(id); |
| | | } |
| | | |
| | | public int insertData(PatrolConf param) { |
| | | return patrolConfService.insertData(param); |
| | | } |
| | | |
| | | public int updateData(PatrolConf param) { |
| | | return patrolConfService.updateData(param); |
| | | } |
| | | |
| | | public void deleteDataById( String ids) { |
| | | patrolConfService.deleteDataById( ids); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.sys.manager.patrol; |
| | | |
| | | import com.fzzy.igds.domain.Patrol; |
| | | import com.fzzy.igds.service.PatrolService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class PatrolManager { |
| | | |
| | | @Resource |
| | | private PatrolService patrolService; |
| | | |
| | | public List<Patrol> selectList(Patrol param) { |
| | | return patrolService.selectList(param); |
| | | } |
| | | |
| | | public Patrol selectById( String id) { |
| | | return patrolService.selectById( id); |
| | | } |
| | | |
| | | public int insertData(Patrol param) { |
| | | return patrolService.insertData(param); |
| | | } |
| | | |
| | | public int updateData(Patrol param) { |
| | | return patrolService.updateData(param); |
| | | } |
| | | |
| | | public void deleteDataById( String ids) { |
| | | patrolService.deleteDataById(ids); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <th:block th:include="include :: header('æ°å¢çµåå·¡æ´ä¿¡æ¯')"/> |
| | | <th:block th:include="include :: select2-css"/> |
| | | </head> |
| | | <body> |
| | | <div class="main-content"> |
| | | <form id="form-patrol-add" class="form-horizontal"> |
| | | <input name="deptId" type="hidden" id="treeId"/> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">æå±åºåºï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="deptId" placeholder="请è¾å
¥åç§°" class="form-control " type="text" maxlength="100" |
| | | required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">çæ¬¡ç¼å·ï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchId" id="batchId" placeholder="请è¾å
¥" class="form-control " type="text" |
| | | maxlength="30"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">å·¡é»äººï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" placeholder="请è¾å
¥" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script> |
| | | var prefix = ctx + "patrol"; |
| | | |
| | | $("#form-cabinet-add").validate({ |
| | | onkeyup: false, |
| | | rules: {}, |
| | | messages: {}, |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | // ç¡®å®æé® æäº¤æ°æ® |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/add", $('#form-patrol-add').serialize()); |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <th:block th:include="include :: header('ä¿®æ¹çµåå·¡æ´ä¿¡æ¯')"/> |
| | | <th:block th:include="include :: select2-css"/> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-patrol-edit" th:object="${patrol}"> |
| | | <input id="id" name="id" th:field="*{id}" type="hidden"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">æå±åºåºï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="deptId" placeholder="请è¾å
¥åç§°" th:field="*{deptId}" class="form-control " type="text" |
| | | maxlength="100" |
| | | required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label">çæ¬¡ç¼å·ï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchId" id="batchId" th:field="*{batchId}" placeholder="请è¾å
¥" class="form-control " |
| | | type="text" maxlength="30"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">å·¡é»äººï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" th:field="*{userName}" placeholder="请è¾å
¥" class="form-control " |
| | | type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script type="text/javascript"> |
| | | |
| | | var prefix = ctx + "patrol"; |
| | | |
| | | |
| | | $("#form-cabinet-edit").validate({ |
| | | onkeyup: false, |
| | | rules: {}, |
| | | messages: {}, |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/edit", $('#form-patrol-edit').serialize()); |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!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('åæ°å表')" /> |
| | | <th:block th:include="include :: select2-css" /> |
| | | </head> |
| | | <body class="gray-bg"> |
| | | <div class="container-div"> |
| | | <div class="row"> |
| | | <div class="col-sm-12 search-collapse"> |
| | | <form id="property-form"> |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | åç§°ï¼<input type="text" name="name"/> |
| | | </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="web:patrol:add"> |
| | | <i class="fa fa-plus"></i> æ°å¢ |
| | | </a> |
| | | <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="web:patrol:edit"> |
| | | <i class="fa fa-edit"></i> ä¿®æ¹ |
| | | </a> |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="web:patrol:remove"> |
| | | <i class="fa fa-remove"></i> å é¤ |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="web:patrol:export"> |
| | | <i class="fa fa-download"></i> å¯¼åº |
| | | </a> |
| | | <a class="btn btn-success" onclick="openPatrolConf()" shiro:hasPermission="web:patrol:patrolConf:edit"> |
| | | <i class="fa fa-plus"></i> å·¡æ´é
ç½® |
| | | </a> |
| | | </div> |
| | | <div class="col-sm-12 select-table table-striped"> |
| | | <table id="bootstrap-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <th:block th:include="include :: select2-js" /> |
| | | <script th:inline="javascript"> |
| | | var editFlag = [[${@permission.hasPermi('web:patrol:edit')}]]; |
| | | var removeFlag = [[${@permission.hasPermi('web:patrol:remove')}]]; |
| | | var prefix = ctx + "patrol"; |
| | | |
| | | $(function() { |
| | | |
| | | var options = { |
| | | url: prefix + "/list", |
| | | createUrl: prefix + "/add", |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | | sortName: "id", |
| | | sortOrder: "asc", |
| | | modalName: "åæ°", |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | | { |
| | | field: 'id', |
| | | title: '主é®', |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'deptId', |
| | | title: 'æå±åºåº', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(value); |
| | | // } |
| | | }, |
| | | { |
| | | field: 'batchId', |
| | | title: 'çæ¬¡ç¼å·', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(value); |
| | | // } |
| | | }, |
| | | { |
| | | field: 'userName', |
| | | title: 'å·¡é»äºº', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(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); |
| | | }); |
| | | |
| | | function openPatrolConf() { |
| | | var url = ctx + "patrol/patrolConf"; |
| | | $.modal.openTab("å·¡æ´é
ç½®", url); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <th:block th:include="include :: header('æ°å¢å·¡æ´é
ç½®')"/> |
| | | <th:block th:include="include :: select2-css"/> |
| | | </head> |
| | | <body> |
| | | <div class="main-content"> |
| | | <form id="form-patrol-add" class="form-horizontal"> |
| | | <input name="deptId" type="hidden" id="treeId"/> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">çæ¬¡åç§°ï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchName" id="batchName" placeholder="请è¾å
¥" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">å·¡é»äººï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" placeholder="请è¾å
¥" class="form-control " type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script> |
| | | var prefix = ctx + "patrol/patrolConf"; |
| | | |
| | | $("#form-cabinet-add").validate({ |
| | | onkeyup: false, |
| | | rules: {}, |
| | | messages: {}, |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | // ç¡®å®æé® æäº¤æ°æ® |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/add", $('#form-patrol-add').serialize()); |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <th:block th:include="include :: header('ä¿®æ¹å·¡æ´é
ç½®')"/> |
| | | <th:block th:include="include :: select2-css"/> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-patrol-edit" th:object="${patrolConf}"> |
| | | <input id="id" name="id" th:field="*{batchId}" type="hidden"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">çæ¬¡åç§°ï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="batchName" id="batchName" th:field="*{batchName}" placeholder="请è¾å
¥" class="form-control " |
| | | type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label is-required">å·¡é»äººï¼</label> |
| | | <div class="col-sm-8"> |
| | | <input name="userName" id="userName" th:field="*{userName}" placeholder="请è¾å
¥" class="form-control " |
| | | type="text" |
| | | maxlength="30" required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer"/> |
| | | <th:block th:include="include :: select2-js"/> |
| | | <script type="text/javascript"> |
| | | |
| | | var prefix = ctx + "patrol/patrolConf"; |
| | | |
| | | |
| | | $("#form-cabinet-edit").validate({ |
| | | onkeyup: false, |
| | | rules: {}, |
| | | messages: {}, |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/edit", $('#form-patrol-edit').serialize()); |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!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('åæ°å表')" /> |
| | | <th:block th:include="include :: select2-css" /> |
| | | </head> |
| | | <body class="gray-bg"> |
| | | <div class="container-div"> |
| | | <div class="row"> |
| | | <div class="col-sm-12 search-collapse"> |
| | | <form id="property-form"> |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | åç§°ï¼<input type="text" name="name"/> |
| | | </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="web:patrol:patrolConf:add"> |
| | | <i class="fa fa-plus"></i> æ°å¢ |
| | | </a> |
| | | <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="web:patrol:patrolConf:edit"> |
| | | <i class="fa fa-edit"></i> ä¿®æ¹ |
| | | </a> |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="web:patrol:patrolConf:remove"> |
| | | <i class="fa fa-remove"></i> å é¤ |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="web:patrol:patrolConf: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" /> |
| | | <th:block th:include="include :: select2-js" /> |
| | | <script th:inline="javascript"> |
| | | var editFlag = [[${@permission.hasPermi('web:patrol:patrolConf:edit')}]]; |
| | | var removeFlag = [[${@permission.hasPermi('web:patrol:patrolConf:remove')}]]; |
| | | var prefix = ctx + "patrol/patrolConf"; |
| | | |
| | | $(function() { |
| | | |
| | | var options = { |
| | | url: prefix + "/list", |
| | | createUrl: prefix + "/add", |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | | sortName: "batchId", |
| | | sortOrder: "asc", |
| | | modalName: "åæ°", |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | | { |
| | | field: 'batchId', |
| | | title: '主é®', |
| | | visible: false, |
| | | }, |
| | | { |
| | | field: 'batchName', |
| | | title: 'çæ¬¡åç§°', |
| | | align: 'left', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(value); |
| | | // } |
| | | }, |
| | | { |
| | | field: 'userName', |
| | | title: 'å·¡é»äºº', |
| | | // formatter: function(value, row, index) { |
| | | // return $.table.tooltip(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.batchId + '\')"><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.batchId + '\')"><i class="fa fa-remove"></i>å é¤</a>'); |
| | | return actions.join(''); |
| | | } |
| | | }] |
| | | }; |
| | | $.table.init(options); |
| | | }); |
| | | |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |