监区和产线功能初始化
This commit is contained in:
parent
e6eec0c6a2
commit
489ebe6967
|
|
@ -0,0 +1,152 @@
|
||||||
|
package com.ruoyi.busi.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.*;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.busi.domain.BusiPrisonLine;
|
||||||
|
import com.ruoyi.busi.service.IBusiPrisonLineService;
|
||||||
|
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.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监区产线Controller
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-17
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/busi/prisonLine")
|
||||||
|
public class BusiPrisonLineController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "busi/prisonLine";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusiPrisonLineService busiPrisonLineService;
|
||||||
|
|
||||||
|
@RequiresPermissions("busi:prisonLine:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String prisonLine()
|
||||||
|
{
|
||||||
|
return prefix + "/prisonLine";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线树列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:prisonLine:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public List<BusiPrisonLine> list(BusiPrisonLine busiPrisonLine)
|
||||||
|
{
|
||||||
|
List<BusiPrisonLine> list = busiPrisonLineService.selectBusiPrisonLineList(busiPrisonLine);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出监区产线列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:prisonLine:export")
|
||||||
|
@Log(title = "监区产线", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(BusiPrisonLine busiPrisonLine)
|
||||||
|
{
|
||||||
|
List<BusiPrisonLine> list = busiPrisonLineService.selectBusiPrisonLineList(busiPrisonLine);
|
||||||
|
ExcelUtil<BusiPrisonLine> util = new ExcelUtil<BusiPrisonLine>(BusiPrisonLine.class);
|
||||||
|
return util.exportExcel(list, "监区产线数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增监区产线
|
||||||
|
*/
|
||||||
|
@GetMapping(value = { "/add/{id}", "/add/" })
|
||||||
|
public String add(@PathVariable(value = "id", required = false) Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotNull(id))
|
||||||
|
{
|
||||||
|
mmap.put("busiPrisonLine", busiPrisonLineService.selectBusiPrisonLineById(id));
|
||||||
|
}
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存监区产线
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:prisonLine:add")
|
||||||
|
@Log(title = "监区产线", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(BusiPrisonLine busiPrisonLine)
|
||||||
|
{
|
||||||
|
return toAjax(busiPrisonLineService.insertBusiPrisonLine(busiPrisonLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监区产线
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
BusiPrisonLine busiPrisonLine = busiPrisonLineService.selectBusiPrisonLineById(id);
|
||||||
|
mmap.put("busiPrisonLine", busiPrisonLine);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存监区产线
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:prisonLine:edit")
|
||||||
|
@Log(title = "监区产线", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(BusiPrisonLine busiPrisonLine)
|
||||||
|
{
|
||||||
|
return toAjax(busiPrisonLineService.updateBusiPrisonLine(busiPrisonLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("busi:prisonLine:remove")
|
||||||
|
@Log(title = "监区产线", businessType = BusinessType.DELETE)
|
||||||
|
@GetMapping("/remove/{id}")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return toAjax(busiPrisonLineService.deleteBusiPrisonLineById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择监区产线树
|
||||||
|
*/
|
||||||
|
@GetMapping(value = { "/selectPrisonLineTree/{id}", "/selectPrisonLineTree/" })
|
||||||
|
public String selectPrisonLineTree(@PathVariable(value = "id", required = false) Long id, @RequestParam(name = "JCOnly",required = false) String JCOnly, ModelMap mmap)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotNull(id))
|
||||||
|
{
|
||||||
|
mmap.put("busiPrisonLine", busiPrisonLineService.selectBusiPrisonLineById(id));
|
||||||
|
}
|
||||||
|
mmap.put("JCOnly", JCOnly);
|
||||||
|
return prefix + "/tree";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载监区产线树列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/treeData")
|
||||||
|
@ResponseBody
|
||||||
|
public List<Ztree> treeData(@RequestParam(name = "JCOnly",required = false) String JCOnly)
|
||||||
|
{
|
||||||
|
System.out.println(JCOnly);
|
||||||
|
List<Ztree> ztrees = busiPrisonLineService.selectBusiPrisonLineTree(JCOnly);
|
||||||
|
return ztrees;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
package com.ruoyi.busi.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.TreeEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监区产线对象 busi_prison_line
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-17
|
||||||
|
*/
|
||||||
|
public class BusiPrisonLine extends TreeEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** ID主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 所属监区 */
|
||||||
|
@Excel(name = "所属监区")
|
||||||
|
private Long pid;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@Excel(name = "名称")
|
||||||
|
private String disname;
|
||||||
|
|
||||||
|
/** 负责人 */
|
||||||
|
@Excel(name = "负责人")
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/** 人员数量 */
|
||||||
|
@Excel(name = "人员数量")
|
||||||
|
private Integer personNumber;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@Excel(name = "类型")
|
||||||
|
private String classify;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setPid(Long pid)
|
||||||
|
{
|
||||||
|
this.pid = pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPid()
|
||||||
|
{
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
public void setDisname(String disname)
|
||||||
|
{
|
||||||
|
this.disname = disname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisname()
|
||||||
|
{
|
||||||
|
return disname;
|
||||||
|
}
|
||||||
|
public void setLeader(String leader)
|
||||||
|
{
|
||||||
|
this.leader = leader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeader()
|
||||||
|
{
|
||||||
|
return leader;
|
||||||
|
}
|
||||||
|
public void setPersonNumber(Integer personNumber)
|
||||||
|
{
|
||||||
|
this.personNumber = personNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPersonNumber()
|
||||||
|
{
|
||||||
|
return personNumber;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setClassify(String classify)
|
||||||
|
{
|
||||||
|
this.classify = classify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassify()
|
||||||
|
{
|
||||||
|
return classify;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("pid", getPid())
|
||||||
|
.append("disname", getDisname())
|
||||||
|
.append("leader", getLeader())
|
||||||
|
.append("personNumber", getPersonNumber())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("classify", getClassify())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.busi.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.busi.domain.BusiPrisonLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监区产线Mapper接口
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-17
|
||||||
|
*/
|
||||||
|
public interface BusiPrisonLineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询监区产线
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 监区产线
|
||||||
|
*/
|
||||||
|
public BusiPrisonLine selectBusiPrisonLineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线列表
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 监区产线集合
|
||||||
|
*/
|
||||||
|
public List<BusiPrisonLine> selectBusiPrisonLineList(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBusiPrisonLine(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBusiPrisonLine(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除监区产线
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiPrisonLineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除监区产线
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiPrisonLineByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ruoyi.busi.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.busi.domain.BusiPrisonLine;
|
||||||
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监区产线Service接口
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-17
|
||||||
|
*/
|
||||||
|
public interface IBusiPrisonLineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询监区产线
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 监区产线
|
||||||
|
*/
|
||||||
|
public BusiPrisonLine selectBusiPrisonLineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线列表
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 监区产线集合
|
||||||
|
*/
|
||||||
|
public List<BusiPrisonLine> selectBusiPrisonLineList(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBusiPrisonLine(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBusiPrisonLine(BusiPrisonLine busiPrisonLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除监区产线
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的监区产线主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiPrisonLineByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除监区产线信息
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBusiPrisonLineById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线树列表
|
||||||
|
*
|
||||||
|
* JCOnly 是否只要监区
|
||||||
|
*
|
||||||
|
* @return 所有监区产线信息
|
||||||
|
*/
|
||||||
|
public List<Ztree> selectBusiPrisonLineTree(String JCOnly);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
package com.ruoyi.busi.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.busi.mapper.BusiPrisonLineMapper;
|
||||||
|
import com.ruoyi.busi.domain.BusiPrisonLine;
|
||||||
|
import com.ruoyi.busi.service.IBusiPrisonLineService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监区产线Service业务层处理
|
||||||
|
*
|
||||||
|
* @author WangCL
|
||||||
|
* @date 2021-12-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BusiPrisonLineServiceImpl implements IBusiPrisonLineService {
|
||||||
|
@Autowired
|
||||||
|
private BusiPrisonLineMapper busiPrisonLineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 监区产线
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BusiPrisonLine selectBusiPrisonLineById(Long id) {
|
||||||
|
return busiPrisonLineMapper.selectBusiPrisonLineById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线列表
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 监区产线
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BusiPrisonLine> selectBusiPrisonLineList(BusiPrisonLine busiPrisonLine) {
|
||||||
|
return busiPrisonLineMapper.selectBusiPrisonLineList(busiPrisonLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBusiPrisonLine(BusiPrisonLine busiPrisonLine) {
|
||||||
|
busiPrisonLine.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return busiPrisonLineMapper.insertBusiPrisonLine(busiPrisonLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改监区产线
|
||||||
|
*
|
||||||
|
* @param busiPrisonLine 监区产线
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBusiPrisonLine(BusiPrisonLine busiPrisonLine) {
|
||||||
|
busiPrisonLine.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return busiPrisonLineMapper.updateBusiPrisonLine(busiPrisonLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除监区产线
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的监区产线主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBusiPrisonLineByIds(String ids) {
|
||||||
|
return busiPrisonLineMapper.deleteBusiPrisonLineByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除监区产线信息
|
||||||
|
*
|
||||||
|
* @param id 监区产线主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBusiPrisonLineById(Long id) {
|
||||||
|
return busiPrisonLineMapper.deleteBusiPrisonLineById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监区产线树列表
|
||||||
|
*
|
||||||
|
* @return 所有监区产线信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Ztree> selectBusiPrisonLineTree(String JCOnly) {
|
||||||
|
List<BusiPrisonLine> busiPrisonLineList = busiPrisonLineMapper.selectBusiPrisonLineList(new BusiPrisonLine());
|
||||||
|
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||||
|
for (BusiPrisonLine busiPrisonLine : busiPrisonLineList) {
|
||||||
|
// 只查监区,只查查监区时过滤掉产线
|
||||||
|
if ("yes".equals(JCOnly) && "C".equals(busiPrisonLine.getClassify())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Ztree ztree = new Ztree();
|
||||||
|
ztree.setId(busiPrisonLine.getId());
|
||||||
|
ztree.setpId(busiPrisonLine.getPid());
|
||||||
|
ztree.setName(busiPrisonLine.getDisname());
|
||||||
|
ztree.setTitle(busiPrisonLine.getDisname());
|
||||||
|
ztrees.add(ztree);
|
||||||
|
}
|
||||||
|
return ztrees;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?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.busi.mapper.BusiPrisonLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="BusiPrisonLine" id="BusiPrisonLineResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pid" column="pid" />
|
||||||
|
<result property="disname" column="disname" />
|
||||||
|
<result property="leader" column="leader" />
|
||||||
|
<result property="personNumber" column="person_number" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="classify" column="classify" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="parentName" column="parent_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBusiPrisonLineVo">
|
||||||
|
select id, pid, disname, leader, person_number, status, classify, create_by, create_time, update_by, update_time from busi_prison_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBusiPrisonLineList" parameterType="BusiPrisonLine" resultMap="BusiPrisonLineResult">
|
||||||
|
<include refid="selectBusiPrisonLineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="disname != null and disname != ''"> and disname like concat('%', #{disname}, '%')</if>
|
||||||
|
<if test="leader != null and leader != ''"> and leader like concat('%', #{leader}, '%')</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
order by pid
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBusiPrisonLineById" parameterType="Long" resultMap="BusiPrisonLineResult">
|
||||||
|
select t.id, t.pid, t.disname, t.leader, t.person_number, t.status, t.classify, t.create_by, t.create_time, t.update_by, t.update_time, p.disname as parent_name
|
||||||
|
from busi_prison_line t
|
||||||
|
left join busi_prison_line p on p.id = t.pid
|
||||||
|
where t.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBusiPrisonLine" parameterType="BusiPrisonLine" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into busi_prison_line
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pid != null">pid,</if>
|
||||||
|
<if test="disname != null and disname != ''">disname,</if>
|
||||||
|
<if test="leader != null">leader,</if>
|
||||||
|
<if test="personNumber != null">person_number,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="classify != null">classify,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pid != null">#{pid},</if>
|
||||||
|
<if test="disname != null and disname != ''">#{disname},</if>
|
||||||
|
<if test="leader != null">#{leader},</if>
|
||||||
|
<if test="personNumber != null">#{personNumber},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="classify != null">#{classify},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBusiPrisonLine" parameterType="BusiPrisonLine">
|
||||||
|
update busi_prison_line
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="pid != null">pid = #{pid},</if>
|
||||||
|
<if test="disname != null and disname != ''">disname = #{disname},</if>
|
||||||
|
<if test="leader != null">leader = #{leader},</if>
|
||||||
|
<if test="personNumber != null">person_number = #{personNumber},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="classify != null">classify = #{classify},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBusiPrisonLineById" parameterType="Long">
|
||||||
|
delete from busi_prison_line where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBusiPrisonLineByIds" parameterType="String">
|
||||||
|
delete from busi_prison_line where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
<!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-prisonLine-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">类型:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('busi_line_type')}">
|
||||||
|
<input type="radio" th:id="${'classify_' + dict.dictCode}" name="classify" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||||
|
<label th:for="${'classify_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">所属监区:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="treeId" name="pid" type="hidden" th:value="${busiPrisonLine?.id}"/>
|
||||||
|
<input class="form-control" type="text" onclick="selectPrisonLineTree()" id="treeName" readonly="true" th:value="${busiPrisonLine?.disname}" required>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="disname" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">负责人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="leader" 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 id="personNumber" name="personNumber" 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="radio-box" th:each="dict : ${@dict.getType('busi_line_status')}">-->
|
||||||
|
<!-- <input id="status" type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">-->
|
||||||
|
<!-- <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "busi/prisonLine"
|
||||||
|
$("#form-prisonLine-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-prisonLine-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*监区产线-新增-选择父监区产线树*/
|
||||||
|
function selectPrisonLineTree() {
|
||||||
|
var options = {
|
||||||
|
title: '监区产线选择',
|
||||||
|
width: "380",
|
||||||
|
url: prefix + "/selectPrisonLineTree/" + $("#treeId").val()+ "?JCOnly=yes",
|
||||||
|
callBack: doSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doSubmit(index, layero){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='classify']").on('ifChecked', function(event){
|
||||||
|
var menuType = $(event.target).val();
|
||||||
|
if (menuType == "J") { // 监区
|
||||||
|
$("#treeId").parents(".form-group").hide();
|
||||||
|
$("#personNumber").parents(".form-group").hide();
|
||||||
|
$("#status").parents(".form-group").hide();
|
||||||
|
} else if (menuType == "C") { // 产线
|
||||||
|
$("#treeId").parents(".form-group").show();
|
||||||
|
$("#personNumber").parents(".form-group").show();
|
||||||
|
$("#status").parents(".form-group").show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<!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-prisonLine-edit" th:object="${busiPrisonLine}">
|
||||||
|
<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">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('busi_line_type')}">
|
||||||
|
<input disabled type="radio" th:id="${'classify_' + dict.dictCode}" name="classify" th:value="${dict.dictValue}" th:field="*{classify}">
|
||||||
|
<label th:for="${'classify_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div >
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">所属监区:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="treeId" name="pid" type="hidden" th:field="*{pid}" />
|
||||||
|
<input class="form-control" type="text" onclick="selectPrisonLineTree()" id="treeName" readonly="true" disabled th:field="*{parentName}" >
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="disname" th:field="*{disname}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">负责人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="leader" th:field="*{leader}" 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 id="personNumber" name="personNumber" th:field="*{personNumber}" 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="radio-box" th:each="dict : ${@dict.getType('busi_line_status')}">-->
|
||||||
|
<!-- <input id="status" type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">-->
|
||||||
|
<!-- <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "busi/prisonLine";
|
||||||
|
$("#form-prisonLine-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-prisonLine-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*监区产线-编辑-选择父监区产线树*/
|
||||||
|
function selectPrisonLineTree() {
|
||||||
|
var options = {
|
||||||
|
title: '监区产线选择',
|
||||||
|
width: "380",
|
||||||
|
url: prefix + "/selectPrisonLineTree/" + $("#treeId").val() + "?JCOnly=yes",
|
||||||
|
callBack: doSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doSubmit(index, layero){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayInput(){
|
||||||
|
var menuType = $("input[name='classify']:checked").val();;
|
||||||
|
if (menuType == "J") { // 监区
|
||||||
|
$("#treeId").parents(".form-group").hide();
|
||||||
|
$("#personNumber").parents(".form-group").hide();
|
||||||
|
$("#status").parents(".form-group").hide();
|
||||||
|
} else if (menuType == "C") { // 产线
|
||||||
|
$("#treeId").parents(".form-group").show();
|
||||||
|
$("#personNumber").parents(".form-group").show();
|
||||||
|
$("#status").parents(".form-group").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(function (){
|
||||||
|
displayInput();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
<!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="disname"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>负责人:</label>
|
||||||
|
<input type="text" name="leader"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>状态:</label>
|
||||||
|
<select name="status" th:with="type=${@dict.getType('busi_line_status')}">
|
||||||
|
<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="$.treeTable.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="busi:prisonLine:add">
|
||||||
|
<i class="fa fa-plus"></i> 新增
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="busi:prisonLine:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" id="expandAllBtn">
|
||||||
|
<i class="fa fa-exchange"></i> 展开/折叠
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-tree-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var addFlag = [[${@permission.hasPermi('busi:prisonLine:add')}]];
|
||||||
|
var editFlag = [[${@permission.hasPermi('busi:prisonLine:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('busi:prisonLine:remove')}]];
|
||||||
|
var statusDatas = [[${@dict.getType('busi_line_status')}]];
|
||||||
|
var classifyDatas = [[${@dict.getType('busi_line_type')}]];
|
||||||
|
var prefix = ctx + "busi/prisonLine";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
code: "id",
|
||||||
|
parentCode: "pid",
|
||||||
|
expandColumn: "2",
|
||||||
|
uniqueId: "id",
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add/{id}",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove/{id}",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "监区产线",
|
||||||
|
columns: [{
|
||||||
|
field: 'selectItem',
|
||||||
|
radio: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'pid',
|
||||||
|
title: '所属监区',
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'disname',
|
||||||
|
title: '名称',
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'leader',
|
||||||
|
title: '负责人',
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'personNumber',
|
||||||
|
title: '人员数量',
|
||||||
|
align: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态',
|
||||||
|
align: 'left',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(statusDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'classify',
|
||||||
|
title: '类型',
|
||||||
|
align: 'left',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(classifyDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
align: 'left',
|
||||||
|
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> ');
|
||||||
|
if (row.classify == "J") { // 类型为监区时显示
|
||||||
|
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.id + '\')"><i class="fa fa-plus"></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('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.treeTable.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('监区产线树选择')" />
|
||||||
|
<th:block th:include="include :: ztree-css" />
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
body{height:auto;font-family: "Microsoft YaHei";}
|
||||||
|
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||||
|
</style>
|
||||||
|
<body class="hold-transition box box-main">
|
||||||
|
<input id="treeId" name="treeId" type="hidden" th:value="${busiPrisonLine?.id}"/>
|
||||||
|
<input id="treeName" name="treeName" type="hidden" th:value="${busiPrisonLine?.disname}"/>
|
||||||
|
<input id="JCOnly" type="hidden" th:value="${JCOnly}"/>
|
||||||
|
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||||
|
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||||
|
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||||
|
</div>
|
||||||
|
<div class="treeSearchInput" id="search">
|
||||||
|
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||||
|
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||||
|
</div>
|
||||||
|
<div class="treeExpandCollapse">
|
||||||
|
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||||
|
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||||
|
</div>
|
||||||
|
<div id="tree" class="ztree treeselect"></div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: ztree-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
$(function() {
|
||||||
|
var url = ctx + "busi/prisonLine/treeData?JCOnly=" + $("#JCOnly").val();
|
||||||
|
var options = {
|
||||||
|
url: url,
|
||||||
|
expandLevel: 2,
|
||||||
|
onClick : zOnClick
|
||||||
|
};
|
||||||
|
$.tree.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function zOnClick(event, treeId, treeNode) {
|
||||||
|
var treeId = treeNode.id;
|
||||||
|
var treeName = treeNode.name;
|
||||||
|
$("#treeId").val(treeId);
|
||||||
|
$("#treeName").val(treeName);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
insert into sys_dict_type values(11, '尺码', 'busi_size', '0', 'admin', sysdate(), '', null, '尺码列表');
|
insert into sys_dict_type values(11, '尺码', 'busi_size', '0', 'admin', sysdate(), '', null, '尺码列表');
|
||||||
insert into sys_dict_type values(12, '颜色', 'busi_color', '0', 'admin', sysdate(), '', null, '颜色列表');
|
insert into sys_dict_type values(12, '颜色', 'busi_color', '0', 'admin', sysdate(), '', null, '颜色列表');
|
||||||
insert into sys_dict_type values(13, '客户角色', 'busi_role', '0', 'admin', sysdate(), '', null, '客户角色列表');
|
insert into sys_dict_type values(13, '客户角色', 'busi_role', '0', 'admin', sysdate(), '', null, '客户角色列表');
|
||||||
|
insert into sys_dict_type values(14, '产线状态', 'busi_line_status', '0', 'admin', sysdate(), '', null, '产线状态');
|
||||||
|
insert into sys_dict_type values(15, '类型', 'busi_line_type', '0', 'admin', sysdate(), '', null, '监区产线类型');
|
||||||
|
|
||||||
-- 尺码字典
|
-- 尺码字典
|
||||||
insert into sys_dict_data values (30, 1, 'XXXXXS', '1', 'busi_size', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
insert into sys_dict_data values (30, 1, 'XXXXXS', '1', 'busi_size', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
|
@ -38,6 +40,14 @@ insert into sys_dict_data values (58, 14, '粉色', '14', 'busi_color', '', '',
|
||||||
insert into sys_dict_data values (59, 1, '负责人', '1', 'busi_role', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
insert into sys_dict_data values (59, 1, '负责人', '1', 'busi_role', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
||||||
insert into sys_dict_data values (60, 2, '跟单人员', '2', 'busi_role', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
insert into sys_dict_data values (60, 2, '跟单人员', '2', 'busi_role', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
-- 产线状态字典
|
||||||
|
insert into sys_dict_data values (61, 0, '空闲', '0', 'busi_line_status', '', '', 'Y', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
insert into sys_dict_data values (62, 1, '生产中', '1', 'busi_line_status', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
-- 产线类型字典
|
||||||
|
insert into sys_dict_data values (63, 1, '监区', 'J', 'busi_line_type', '', '', 'N', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
insert into sys_dict_data values (64, 2, '产线', 'C', 'busi_line_type', '', '', 'Y', '0', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
-- 一级菜单
|
-- 一级菜单
|
||||||
insert into sys_menu values ('117', '生产信息', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-wrench', 'admin', sysdate(), '', null, '生产信息菜单');
|
insert into sys_menu values ('117', '生产信息', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-wrench', 'admin', sysdate(), '', null, '生产信息菜单');
|
||||||
insert into sys_menu values ('118', '物料信息', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-cubes', 'admin', sysdate(), '', null, '物料信息菜单');
|
insert into sys_menu values ('118', '物料信息', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-cubes', 'admin', sysdate(), '', null, '物料信息菜单');
|
||||||
|
|
|
||||||
26
sql/tmp.sql
26
sql/tmp.sql
|
|
@ -1,6 +1,6 @@
|
||||||
-- 菜单 SQL
|
-- 菜单 SQL
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('客户公司人员管理', '121', '1', '/busi/person', 'C', '0', 'busi:person:view', '#', 'admin', sysdate(), '', null, '客户公司人员管理菜单');
|
values('客户公司人员管理', '121', '1', '/busi/person/{0}', 'C', '0', 'busi:person:view', '#', 'admin', sysdate(), '', null, '客户公司人员管理菜单');
|
||||||
|
|
||||||
-- 按钮父菜单ID
|
-- 按钮父菜单ID
|
||||||
SELECT @parentId := LAST_INSERT_ID();
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
@ -45,3 +45,27 @@ values('客户公司管理删除', @parentId, '4', '#', 'F', '0', 'busi:compan
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('客户公司管理导出', @parentId, '5', '#', 'F', '0', 'busi:company:export', '#', 'admin', sysdate(), '', null, '');
|
values('客户公司管理导出', @parentId, '5', '#', 'F', '0', 'busi:company:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线', '117', '1', '/busi/prisonLine', 'C', '0', 'busi:prisonLine:view', '#', 'admin', sysdate(), '', null, '监区产线菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线查询', @parentId, '1', '#', 'F', '0', 'busi:prisonLine:list', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线新增', @parentId, '2', '#', 'F', '0', 'busi:prisonLine:add', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线修改', @parentId, '3', '#', 'F', '0', 'busi:prisonLine:edit', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线删除', @parentId, '4', '#', 'F', '0', 'busi:prisonLine:remove', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('监区产线导出', @parentId, '5', '#', 'F', '0', 'busi:prisonLine:export', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue