实现主计划下添加子计划;未实现删除的业务逻辑

master
baogq 6 years ago
parent 1acbb27d25
commit 624dcac7f0

@ -1,6 +1,9 @@
package com.ruoyi.web.controller.baseinfo;
import java.util.List;
import com.ruoyi.baseinfo.domain.BaseWorkingprocedureInfo;
import com.ruoyi.baseinfo.service.IBaseWorkingprocedureInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -33,6 +36,8 @@ public class BaseDeviceInfoController extends BaseController
@Autowired
private IBaseDeviceInfoService baseDeviceInfoService;
@Autowired
private IBaseWorkingprocedureInfoService baseWorkingprocedureInfoService;
@RequiresPermissions("baseinfo:deviceinfo:view")
@GetMapping()
@ -72,8 +77,10 @@ public class BaseDeviceInfoController extends BaseController
*
*/
@GetMapping("/add")
public String add()
public String add(ModelMap mmap)
{
BaseWorkingprocedureInfo baseWorkingprocedureInfo = new BaseWorkingprocedureInfo();
mmap.put("cbWorkingprocedureInfo",baseWorkingprocedureInfoService.selectBaseWorkingprocedureInfoList(baseWorkingprocedureInfo));
return prefix + "/add";
}
@ -96,6 +103,7 @@ public class BaseDeviceInfoController extends BaseController
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
BaseDeviceInfo baseDeviceInfo = baseDeviceInfoService.selectBaseDeviceInfoById(objid);
mmap.put("cbEditWorkingProcedureInfo",baseWorkingprocedureInfoService.selectEditBaseWorkingprocedureInfoList(baseDeviceInfo.getWorkingProcedureId()));
mmap.put("baseDeviceInfo", baseDeviceInfo);
return prefix + "/edit";
}

@ -0,0 +1,159 @@
package com.ruoyi.web.controller.baseinfo;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;
import com.ruoyi.baseinfo.domain.BaseDeviceInfo;
import com.ruoyi.baseinfo.domain.BaseShiftInfo;
import com.ruoyi.baseinfo.service.IBaseDeviceInfoService;
import com.ruoyi.baseinfo.service.IBasePlandetailInfoService;
import com.ruoyi.baseinfo.service.IBaseShiftInfoService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.util.ShiroUtils;
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.baseinfo.domain.BasePlanInfo;
import com.ruoyi.baseinfo.service.IBasePlanInfoService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author CaesarBao
* @date 2020-10-23
*/
@Controller
@RequestMapping("/baseinfo/planinfo")
public class BasePlanInfoController extends BaseController
{
private String prefix = "baseinfo/planinfo";
@Autowired
private IBasePlanInfoService basePlanInfoService;
@Autowired
private IBaseDeviceInfoService baseDeviceInfoService;
@Autowired
private IBaseShiftInfoService baseShiftInfoService;
@Autowired
private IBasePlandetailInfoService basePlandetailInfoService;
@RequiresPermissions("baseinfo:planinfo:view")
@GetMapping()
public String planinfo(ModelMap mmap)
{
BaseDeviceInfo baseDeviceInfo = new BaseDeviceInfo();
BaseShiftInfo baseShiftInfo = new BaseShiftInfo();
mmap.put("cbdeviceInfo",baseDeviceInfoService.selectBaseDeviceInfoList(baseDeviceInfo));
mmap.put("cbshitfInfo",baseShiftInfoService.selectBaseShiftInfoList(baseShiftInfo));
return prefix + "/planinfo";
}
/**
*
*/
@RequiresPermissions("baseinfo:planinfo:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BasePlanInfo basePlanInfo)
{
startPage();
List<BasePlanInfo> list = basePlanInfoService.selectBasePlanInfoList(basePlanInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("baseinfo:planinfo:export")
@Log(title = "计划信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BasePlanInfo basePlanInfo)
{
List<BasePlanInfo> list = basePlanInfoService.selectBasePlanInfoList(basePlanInfo);
ExcelUtil<BasePlanInfo> util = new ExcelUtil<BasePlanInfo>(BasePlanInfo.class);
return util.exportExcel(list, "planinfo");
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap)
{
BaseDeviceInfo baseDeviceInfo = new BaseDeviceInfo();
BaseShiftInfo baseShiftInfo = new BaseShiftInfo();
mmap.put("cbdeviceInfo",baseDeviceInfoService.selectBaseDeviceInfoList(baseDeviceInfo));
mmap.put("cbshitfInfo",baseShiftInfoService.selectBaseShiftInfoList(baseShiftInfo));
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("baseinfo:planinfo:add")
@Log(title = "计划信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BasePlanInfo basePlanInfo)
{
Random rand = new Random();
String code = new SimpleDateFormat("yyMMddHHmmss").format(new Date()) + (rand.nextInt(9));
basePlanInfo.setPlanid(code);
basePlanInfo.setCreateBy(ShiroUtils.getLoginName());
basePlanInfo.setCreateTime(DateUtils.getNowDate());
return toAjax(basePlanInfoService.insertBasePlanInfo(basePlanInfo));
}
/**
*
*/
@GetMapping("/edit/{planid}")
public String edit(@PathVariable("planid") String planid, ModelMap mmap)
{
BasePlanInfo basePlanInfo = basePlanInfoService.selectBasePlanInfoById(planid);
mmap.put("cbdeviceInfo",baseDeviceInfoService.selectEditBaseDeviceInfoList(basePlanInfo.getDeviceid()));
mmap.put("cbshitfInfo",baseShiftInfoService.selectEditBaseShiftInfoList(basePlanInfo.getPlanShiftId()));
mmap.put("basePlanInfo", basePlanInfo);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("baseinfo:planinfo:edit")
@Log(title = "计划信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BasePlanInfo basePlanInfo)
{
return toAjax(basePlanInfoService.updateBasePlanInfo(basePlanInfo));
}
/**
*
*/
@RequiresPermissions("baseinfo:planinfo:remove")
@Log(title = "计划信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(basePlanInfoService.deleteBasePlanInfoByIds(ids));
}
}

@ -0,0 +1,158 @@
package com.ruoyi.web.controller.baseinfo;
import java.util.List;
import com.ruoyi.baseinfo.domain.BaseGroupInfo;
import com.ruoyi.baseinfo.domain.BaseMaterialInfo;
import com.ruoyi.baseinfo.domain.BasePlanInfo;
import com.ruoyi.baseinfo.service.IBaseGroupInfoService;
import com.ruoyi.baseinfo.service.IBaseMaterialInfoService;
import com.ruoyi.baseinfo.service.IBasePlanInfoService;
import com.ruoyi.framework.util.ShiroUtils;
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.baseinfo.domain.BasePlandetailInfo;
import com.ruoyi.baseinfo.service.IBasePlandetailInfoService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author CaesarBao
* @date 2020-10-23
*/
@Controller
@RequestMapping("/baseinfo/plandetailinfo")
public class BasePlandetailInfoController extends BaseController
{
private String prefix = "baseinfo/plandetailinfo";
@Autowired
private IBasePlandetailInfoService basePlandetailInfoService;
@Autowired
private IBasePlanInfoService basePlanInfoService;
@Autowired
private IBaseMaterialInfoService baseMaterialInfoService;
@Autowired
private IBaseGroupInfoService baseGroupInfoService;
@RequiresPermissions("baseinfo:plandetailinfo:view")
@GetMapping()
public String plandetailinfo()
{
return prefix + "/plandetailinfo";
}
/**
*
*/
@RequiresPermissions("baseinfo:plandetailinfo:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BasePlandetailInfo basePlandetailInfo)
{
startPage();
List<BasePlandetailInfo> list = basePlandetailInfoService.selectBasePlandetailInfoList(basePlandetailInfo);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("baseinfo:plandetailinfo:export")
@Log(title = "计划明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BasePlandetailInfo basePlandetailInfo)
{
List<BasePlandetailInfo> list = basePlandetailInfoService.selectBasePlandetailInfoList(basePlandetailInfo);
ExcelUtil<BasePlandetailInfo> util = new ExcelUtil<BasePlandetailInfo>(BasePlandetailInfo.class);
return util.exportExcel(list, "plandetailinfo");
}
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("baseinfo:plandetailinfo:add")
@Log(title = "计划明细", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BasePlandetailInfo basePlandetailInfo)
{
basePlandetailInfo.setCreateBy(ShiroUtils.getLoginName());
return toAjax(basePlandetailInfoService.insertBasePlandetailInfo(basePlandetailInfo));
}
/**
*
*/
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
BasePlandetailInfo basePlandetailInfo = basePlandetailInfoService.selectBasePlandetailInfoById(objid);
mmap.put("basePlandetailInfo", basePlandetailInfo);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("baseinfo:plandetailinfo:edit")
@Log(title = "计划明细", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BasePlandetailInfo basePlandetailInfo)
{
return toAjax(basePlandetailInfoService.updateBasePlandetailInfo(basePlandetailInfo));
}
/**
*
*/
@RequiresPermissions("baseinfo:plandetailinfo:remove")
@Log(title = "计划明细", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(basePlandetailInfoService.deleteBasePlandetailInfoByIds(ids));
}
/**
*
*/
@GetMapping("/plandetail/{planid}")
public String planedit(@PathVariable("planid") String planid, ModelMap mmap)
{
// BasePlanInfo basePlanInfo = basePlanInfoService.selectBasePlanInfoById(planid);
// mmap.put("basePlanInfo", basePlanInfo);
BaseMaterialInfo baseMaterialInfo = new BaseMaterialInfo();
BaseGroupInfo baseGroupInfo = new BaseGroupInfo();
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectBaseMaterialInfoList(baseMaterialInfo));
mmap.put("cbGroupInfo",baseGroupInfoService.selectBaseGroupInfoList(baseGroupInfo));
mmap.put("planid", planid);
return prefix + "/add";
}
}

@ -18,6 +18,15 @@
<input name="deviceName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属工序:</label>
<div class="col-sm-8">
<select name="workingProcedureId" id="workingProcedureId" class="form-control ">
<option value="">--请选择工序--</option>
<option name="cbWorkingprocedureInfo" th:each="workingProcedureId:${cbWorkingprocedureInfo}" th:value="${workingProcedureId.workingProcedureId}" th:text="${workingProcedureId.workingProcedureName}" th:disabled="${workingProcedureId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">价格:</label>
<div class="col-sm-8">

@ -2,6 +2,7 @@
<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">
@ -75,6 +76,7 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "设备基础信息",
columns: [{
checkbox: true
@ -92,6 +94,10 @@
field: 'deviceName',
title: '设备名称'
},
{
field: 'workingProcedureName',
title: '所属工序'
},
{
field: 'price',
title: '价格'
@ -124,6 +130,7 @@
};
$.table.init(options);
});
</script>
</body>
</html>

@ -19,6 +19,14 @@
<input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属工序:</label>
<div class="col-sm-8">
<select name="workingProcedureId" id="workingProcedureId" th:id="postId" class="form-control m-b">
<option name="cbEditWorkingProcedureInfo" th:each="workingProcedureId:${cbEditWorkingProcedureInfo}" th:value="${workingProcedureId.workingProcedureId}" th:text="${workingProcedureId.workingProcedureName}" th:selected="${workingProcedureId.flag}" th:disabled="${workingProcedureId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">价格:</label>
<div class="col-sm-8">

@ -0,0 +1,75 @@
<!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-plandetailinfo-add">
<div class="form-group">
<label class="col-sm-3 control-label">计划ID</label>
<div class="col-sm-8">
<input name="planid" th:value="*{planid}" class="form-control" type="text" readonly="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料ID</label>
<div class="col-sm-8">
<select name="materialId" id="materialId" class="form-control ">
<option value="">--请选择物料--</option>
<option name="cbmaterialInfo" th:each="materialId:${cbmaterialInfo}" th:value="${materialId.materialId}" th:text="${materialId.materialName}" th:disabled="${materialId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计划产量:</label>
<div class="col-sm-8">
<input name="planAmount" 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="realAmount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unitId" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_info')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">班组:</label>
<div class="col-sm-8">
<select name="groupId" id="groupId" class="form-control ">
<option value="">--请选择班组--</option>
<option name="cbGroupInfo" th:each="groupId:${cbGroupInfo}" th:value="${groupId.groupid}" th:text="${groupId.groupname}" th:disabled="${groupId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "baseinfo/plandetailinfo"
$("#form-plandetailinfo-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-plandetailinfo-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,88 @@
<!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-plandetailinfo-edit" th:object="${basePlandetailInfo}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">计划ID</label>
<div class="col-sm-8">
<input name="planid" th:field="*{planid}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工序ID</label>
<div class="col-sm-8">
<select name="planDetailId" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料ID</label>
<div class="col-sm-8">
<select name="materialId" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计划产量:</label>
<div class="col-sm-8">
<input name="planAmount" th:field="*{planAmount}" 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="realAmount" th:field="*{realAmount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unitId" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_info')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unitId}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">班组ID</label>
<div class="col-sm-8">
<select name="groupId" class="form-control m-b">
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</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('sys_status_info')}">
<input 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 + "baseinfo/plandetailinfo";
$("#form-plandetailinfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-plandetailinfo-edit').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,169 @@
<!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>计划ID</label>
<input type="text" name="planid"/>
</li>
<li>
<label>工序ID</label>
<select name="planDetailId">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>物料ID</label>
<select name="materialId">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>计划产量:</label>
<input type="text" name="planAmount"/>
</li>
<li>
<label>实际产量:</label>
<input type="text" name="realAmount"/>
</li>
<li>
<label>单位:</label>
<select name="unitId" th:with="type=${@dict.getType('sys_unit_info')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>班组ID</label>
<select name="groupId">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>状态标志:</label>
<select name="status" th:with="type=${@dict.getType('sys_status_info')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="baseinfo:plandetailinfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseinfo:plandetailinfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseinfo:plandetailinfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseinfo:plandetailinfo: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('baseinfo:plandetailinfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('baseinfo:plandetailinfo:remove')}]];
var unitIdDatas = [[${@dict.getType('sys_unit_info')}]];
var statusDatas = [[${@dict.getType('sys_status_info')}]];
var prefix = ctx + "baseinfo/plandetailinfo";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "计划明细",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '主键ID',
visible: false
},
{
field: 'planid',
title: '计划ID'
},
{
field: 'planDetailId',
title: '工序ID'
},
{
field: 'materialId',
title: '物料ID'
},
{
field: 'planAmount',
title: '计划产量'
},
{
field: 'realAmount',
title: '实际产量'
},
{
field: 'unitId',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(unitIdDatas, value);
}
},
{
field: 'groupId',
title: '班组ID'
},
{
field: 'remark',
title: '备注'
},
{
field: 'status',
title: '状态标志',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, 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.objid + '\')"><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.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增计划信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-planinfo-add">
<div class="form-group">
<label class="col-sm-3 control-label">设备基台:</label>
<div class="col-sm-8">
<select name="deviceid" id="deviceid" class="form-control ">
<option value="">--请选择设备基台--</option>
<option name="cbdeviceInfo" th:each="deviceid:${cbdeviceInfo}" th:value="${deviceid.deviceId}" th:text="${deviceid.deviceName}" th:disabled="${deviceid.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计划班次:</label>
<div class="col-sm-8">
<select name="planShiftId" id="planShiftId" class="form-control ">
<option value="">--请选择计划班次--</option>
<option name="cbshitfInfo" th:each="planShiftId:${cbshitfInfo}" th:value="${planShiftId.shiftid}" th:text="${planShiftId.shiftname}" th:disabled="${planShiftId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "baseinfo/planinfo"
$("#form-planinfo-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-planinfo-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,65 @@
<!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-planinfo-edit" th:object="${basePlanInfo}">
<!-- <input name="planid" th:field="*{planid}" type="hidden">-->
<div class="form-group">
<label class="col-sm-3 control-label">计划ID</label>
<div class="col-sm-8">
<input name="planid" th:field="*{planid}" class="form-control" type="text" readonly="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备基台:</label>
<div class="col-sm-8">
<select name="deviceId" id="deviceId" th:id="deviceId" class="form-control m-b">
<option name="cbdeviceInfo" th:each="deviceId:${cbdeviceInfo}" th:value="${deviceId.deviceId}" th:text="${deviceId.deviceName}" th:selected="${deviceId.flag}" th:disabled="${deviceId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计划班次:</label>
<div class="col-sm-8">
<select name="planShiftId" id="planShiftId" th:id="planShiftId" class="form-control m-b">
<option name="cbshitfInfo" th:each="planShiftId:${cbshitfInfo}" th:value="${planShiftId.shiftid}" th:text="${planShiftId.shiftname}" th:selected="${planShiftId.flag}" th:disabled="${planShiftId.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计划状态:</label>
<div class="col-sm-8">
<select name="planStateId" id="planStateId" class="form-control m-b" th:with="type=${@dict.getType('sys_planstate_info')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{planStateId}"></option>
</select>
</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('sys_status_info')}">
<input 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 + "baseinfo/planinfo";
$("#form-planinfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-planinfo-edit').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,206 @@
<!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>
<select name="deviceid" class="form-control ">
<option value="">--请选择设备基台--</option>
<option name="cbdeviceInfo" th:each="deviceid:${cbdeviceInfo}" th:value="${deviceid.deviceId}" th:text="${deviceid.deviceName}" th:disabled="${deviceid.status == '1'}"></option>
</select>
</li>
<li>
<label>计划班次:</label>
<select name="planShiftId" class="form-control ">
<option value="">--请选择计划班次--</option>
<option name="cbshitfInfo" th:each="planShiftId:${cbshitfInfo}" th:value="${planShiftId.shiftid}" th:text="${planShiftId.shiftname}" th:disabled="${planShiftId.status == '1'}"></option>
</select>
</li>
<li>
<label>计划状态:</label>
<select name="planStateId" th:with="type=${@dict.getType('sys_planstate_info')}" class="form-control ">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>状态标志:</label>
<select name="status" th:with="type=${@dict.getType('sys_status_info')}" class="form-control ">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="baseinfo:planinfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseinfo:planinfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseinfo:planinfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseinfo:planinfo: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('baseinfo:planinfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('baseinfo:planinfo:remove')}]];
var planStateIdDatas = [[${@dict.getType('sys_planstate_info')}]];
var unitIdDatas = [[${@dict.getType('sys_unit_info')}]];
var statusDatas = [[${@dict.getType('sys_status_info')}]];
var prefix = ctx + "baseinfo/planinfo";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
striped: true,//隔行变色
detailView: true,
onExpandRow: function(index, row, $detail) {
initChildTable(index, row, $detail);
},
modalName: "计划信息",
columns: [{
checkbox: true
},
{
field: 'planid',
title: '计划ID',
visible: true
},
{
field: 'deviceName',
title: '设备基台'
},
{
field: 'shiftname',
title: '计划班次'
},
{
field: 'planStateId',
title: '计划状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(planStateIdDatas, value);
}
},
{
field: 'status',
title: '状态标志',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, value);
}
},
{
field: 'remark',
title: '备注'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="addPlanDetailInfo(\'' + row.planid + '\')"><i class="fa fa-edit"></i>新增计划明细</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.planid + '\')"><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.planid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function addPlanDetailInfo(row) {
console.log(row);
$.modal.open("计划明细", ctx +"baseinfo/plandetailinfo/plandetail/"+row);
};
initChildTable = function(index, row, $detail) {
var parentid = row.planid;
console.log(parentid)
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childTable).bootstrapTable({
url: ctx + "baseinfo/plandetailinfo/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
planid: row.planid
},
columns: [{
field : 'objid',
title : '子计划ID'
},
{
field : 'materialId',
title : '物料ID'
},
{
field : 'planAmount',
title : '计划产量'
},
{
field : 'realAmount',
title : '实际产量'
},
{
field: 'unitId',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(unitIdDatas, value);
}
},
{
field: 'groupId',
title: '班组ID'
},
{
field: 'remark',
title: '备注'
},
{
field: 'status',
title: '状态标志',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, 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.objid + '\')"><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.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
});
};
</script>
</body>
</html>

@ -1,5 +1,6 @@
package com.ruoyi.baseinfo.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -9,8 +10,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
* base_device_info
*
* @author CaesarBao
* @date 2020-10-22
* @date 2020-10-26
*/
@Data
public class BaseDeviceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -22,6 +24,10 @@ public class BaseDeviceInfo extends BaseEntity
@Excel(name = "设备ID")
private String deviceId;
/** 工序ID */
@Excel(name = "工序ID")
private String workingProcedureId;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
@ -41,7 +47,11 @@ public class BaseDeviceInfo extends BaseEntity
/** 删除标志0代表存在 1代表删除 */
private String delFlag;
public void setObjid(Long objid)
private String workingProcedureName;
private boolean flag = false;
public void setObjid(Long objid)
{
this.objid = objid;
}
@ -59,6 +69,15 @@ public class BaseDeviceInfo extends BaseEntity
{
return deviceId;
}
public void setWorkingProcedureId(String workingProcedureId)
{
this.workingProcedureId = workingProcedureId;
}
public String getWorkingProcedureId()
{
return workingProcedureId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
@ -110,6 +129,7 @@ public class BaseDeviceInfo extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("deviceId", getDeviceId())
.append("workingProcedureId", getWorkingProcedureId())
.append("deviceName", getDeviceName())
.append("price", getPrice())
.append("deviceType", getDeviceType())

@ -0,0 +1,118 @@
package com.ruoyi.baseinfo.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* base_plan_info
*
* @author CaesarBao
* @date 2020-10-23
*/
@Data
public class BasePlanInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 计划ID */
@Excel(name = "计划ID")
private String planid;
/** 设备基台ID */
@Excel(name = "设备基台ID")
private String deviceid;
/** 计划班次ID */
@Excel(name = "计划班次ID")
private String planShiftId;
/** 计划状态ID */
@Excel(name = "计划状态ID")
private String planStateId;
/** 状态标志0代表可用 1代表停用 */
@Excel(name = "状态标志", readConverterExp = "0=代表可用,1=代表停用")
private String status;
/** 删除标志0代表存在 1代表删除 */
private String delFlag;
private String deviceName;
private String shiftname;
public void setPlanid(String planid)
{
this.planid = planid;
}
public String getPlanid()
{
return planid;
}
public void setDeviceid(String deviceid)
{
this.deviceid = deviceid;
}
public String getDeviceid()
{
return deviceid;
}
public void setPlanShiftId(String planShiftId)
{
this.planShiftId = planShiftId;
}
public String getPlanShiftId()
{
return planShiftId;
}
public void setPlanStateId(String planStateId)
{
this.planStateId = planStateId;
}
public String getPlanStateId()
{
return planStateId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("planid", getPlanid())
.append("deviceid", getDeviceid())
.append("planShiftId", getPlanShiftId())
.append("planStateId", getPlanStateId())
.append("status", getStatus())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -0,0 +1,154 @@
package com.ruoyi.baseinfo.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* base_plandetail_info
*
* @author CaesarBao
* @date 2020-10-23
*/
public class BasePlandetailInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long objid;
/** 计划ID */
@Excel(name = "计划ID")
private String planid;
/** 物料ID */
@Excel(name = "物料ID")
private String materialId;
/** 计划产量 */
@Excel(name = "计划产量")
private Long planAmount;
/** 实际产量 */
@Excel(name = "实际产量")
private Long realAmount;
/** 单位 */
@Excel(name = "单位")
private String unitId;
/** 班组ID */
@Excel(name = "班组ID")
private String groupId;
/** 状态标志0代表可用 1代表停用 */
@Excel(name = "状态标志", readConverterExp = "0=代表可用,1=代表停用")
private String status;
/** 删除标志0代表存在 1代表删除 */
private String delFlag;
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setPlanid(String planid)
{
this.planid = planid;
}
public String getPlanid()
{
return planid;
}
public void setMaterialId(String materialId)
{
this.materialId = materialId;
}
public String getMaterialId()
{
return materialId;
}
public void setPlanAmount(Long planAmount)
{
this.planAmount = planAmount;
}
public Long getPlanAmount()
{
return planAmount;
}
public void setRealAmount(Long realAmount)
{
this.realAmount = realAmount;
}
public Long getRealAmount()
{
return realAmount;
}
public void setUnitId(String unitId)
{
this.unitId = unitId;
}
public String getUnitId()
{
return unitId;
}
public void setGroupId(String groupId)
{
this.groupId = groupId;
}
public String getGroupId()
{
return groupId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("planid", getPlanid())
.append("materialId", getMaterialId())
.append("planAmount", getPlanAmount())
.append("realAmount", getRealAmount())
.append("unitId", getUnitId())
.append("groupId", getGroupId())
.append("remark", getRemark())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -1,5 +1,6 @@
package com.ruoyi.baseinfo.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author CaesarBao
* @date 2020-10-21
*/
@Data
public class BaseShiftInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -33,6 +35,8 @@ public class BaseShiftInfo extends BaseEntity
/** 删除标志0代表存在 1代表删除 */
private String delFlag;
private boolean flag;
public void setObjid(Long objid)
{
this.objid = objid;

@ -58,4 +58,5 @@ public interface BaseDeviceInfoMapper
* @return
*/
public int deleteBaseDeviceInfoByIds(String[] objids);
}

@ -0,0 +1,61 @@
package com.ruoyi.baseinfo.mapper;
import java.util.List;
import com.ruoyi.baseinfo.domain.BasePlanInfo;
/**
* Mapper
*
* @author CaesarBao
* @date 2020-10-23
*/
public interface BasePlanInfoMapper
{
/**
*
*
* @param planid ID
* @return
*/
public BasePlanInfo selectBasePlanInfoById(String planid);
/**
*
*
* @param basePlanInfo
* @return
*/
public List<BasePlanInfo> selectBasePlanInfoList(BasePlanInfo basePlanInfo);
/**
*
*
* @param basePlanInfo
* @return
*/
public int insertBasePlanInfo(BasePlanInfo basePlanInfo);
/**
*
*
* @param basePlanInfo
* @return
*/
public int updateBasePlanInfo(BasePlanInfo basePlanInfo);
/**
*
*
* @param planid ID
* @return
*/
public int deleteBasePlanInfoById(String planid);
/**
*
*
* @param planids ID
* @return
*/
public int deleteBasePlanInfoByIds(String[] planids);
}

@ -0,0 +1,61 @@
package com.ruoyi.baseinfo.mapper;
import java.util.List;
import com.ruoyi.baseinfo.domain.BasePlandetailInfo;
/**
* Mapper
*
* @author CaesarBao
* @date 2020-10-23
*/
public interface BasePlandetailInfoMapper
{
/**
*
*
* @param objid ID
* @return
*/
public BasePlandetailInfo selectBasePlandetailInfoById(Long objid);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public List<BasePlandetailInfo> selectBasePlandetailInfoList(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public int insertBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public int updateBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param objid ID
* @return
*/
public int deleteBasePlandetailInfoById(Long objid);
/**
*
*
* @param objids ID
* @return
*/
public int deleteBasePlandetailInfoByIds(String[] objids);
}

@ -58,4 +58,5 @@ public interface BaseShiftInfoMapper
* @return
*/
public int deleteBaseShiftInfoByIds(String[] objids);
}

@ -58,4 +58,6 @@ public interface IBaseDeviceInfoService
* @return
*/
public int deleteBaseDeviceInfoById(Long objid);
public List<BaseDeviceInfo> selectEditBaseDeviceInfoList(String deviceId);
}

@ -0,0 +1,61 @@
package com.ruoyi.baseinfo.service;
import java.util.List;
import com.ruoyi.baseinfo.domain.BasePlanInfo;
/**
* Service
*
* @author CaesarBao
* @date 2020-10-23
*/
public interface IBasePlanInfoService
{
/**
*
*
* @param planid ID
* @return
*/
public BasePlanInfo selectBasePlanInfoById(String planid);
/**
*
*
* @param basePlanInfo
* @return
*/
public List<BasePlanInfo> selectBasePlanInfoList(BasePlanInfo basePlanInfo);
/**
*
*
* @param basePlanInfo
* @return
*/
public int insertBasePlanInfo(BasePlanInfo basePlanInfo);
/**
*
*
* @param basePlanInfo
* @return
*/
public int updateBasePlanInfo(BasePlanInfo basePlanInfo);
/**
*
*
* @param ids ID
* @return
*/
public int deleteBasePlanInfoByIds(String ids);
/**
*
*
* @param planid ID
* @return
*/
public int deleteBasePlanInfoById(String planid);
}

@ -0,0 +1,61 @@
package com.ruoyi.baseinfo.service;
import java.util.List;
import com.ruoyi.baseinfo.domain.BasePlandetailInfo;
/**
* Service
*
* @author CaesarBao
* @date 2020-10-23
*/
public interface IBasePlandetailInfoService
{
/**
*
*
* @param objid ID
* @return
*/
public BasePlandetailInfo selectBasePlandetailInfoById(Long objid);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public List<BasePlandetailInfo> selectBasePlandetailInfoList(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public int insertBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param basePlandetailInfo
* @return
*/
public int updateBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo);
/**
*
*
* @param ids ID
* @return
*/
public int deleteBasePlandetailInfoByIds(String ids);
/**
*
*
* @param objid ID
* @return
*/
public int deleteBasePlandetailInfoById(Long objid);
}

@ -58,4 +58,6 @@ public interface IBaseShiftInfoService
* @return
*/
public int deleteBaseShiftInfoById(Long objid);
public List<BaseShiftInfo> selectEditBaseShiftInfoList(String shiftid);
}

@ -94,4 +94,19 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService
{
return baseDeviceInfoMapper.deleteBaseDeviceInfoById(objid);
}
@Override
public List<BaseDeviceInfo> selectEditBaseDeviceInfoList(String deviceId)
{
BaseDeviceInfo baseDeviceInfos = new BaseDeviceInfo();
List<BaseDeviceInfo> baseDeviceInfoList = baseDeviceInfoMapper.selectBaseDeviceInfoList(baseDeviceInfos);
for (BaseDeviceInfo baseDeviceInfo:baseDeviceInfoList
) {
if(baseDeviceInfo.getDeviceId().equals(deviceId)){
baseDeviceInfo.setFlag(true);
break;
}
}
return baseDeviceInfoList;
}
}

@ -0,0 +1,97 @@
package com.ruoyi.baseinfo.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.baseinfo.mapper.BasePlanInfoMapper;
import com.ruoyi.baseinfo.domain.BasePlanInfo;
import com.ruoyi.baseinfo.service.IBasePlanInfoService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author CaesarBao
* @date 2020-10-23
*/
@Service
public class BasePlanInfoServiceImpl implements IBasePlanInfoService
{
@Autowired
private BasePlanInfoMapper basePlanInfoMapper;
/**
*
*
* @param planid ID
* @return
*/
@Override
public BasePlanInfo selectBasePlanInfoById(String planid)
{
return basePlanInfoMapper.selectBasePlanInfoById(planid);
}
/**
*
*
* @param basePlanInfo
* @return
*/
@Override
public List<BasePlanInfo> selectBasePlanInfoList(BasePlanInfo basePlanInfo)
{
return basePlanInfoMapper.selectBasePlanInfoList(basePlanInfo);
}
/**
*
*
* @param basePlanInfo
* @return
*/
@Override
public int insertBasePlanInfo(BasePlanInfo basePlanInfo)
{
basePlanInfo.setCreateTime(DateUtils.getNowDate());
return basePlanInfoMapper.insertBasePlanInfo(basePlanInfo);
}
/**
*
*
* @param basePlanInfo
* @return
*/
@Override
public int updateBasePlanInfo(BasePlanInfo basePlanInfo)
{
basePlanInfo.setUpdateTime(DateUtils.getNowDate());
return basePlanInfoMapper.updateBasePlanInfo(basePlanInfo);
}
/**
*
*
* @param ids ID
* @return
*/
@Override
public int deleteBasePlanInfoByIds(String ids)
{
return basePlanInfoMapper.deleteBasePlanInfoByIds(Convert.toStrArray(ids));
}
/**
*
*
* @param planid ID
* @return
*/
@Override
public int deleteBasePlanInfoById(String planid)
{
return basePlanInfoMapper.deleteBasePlanInfoById(planid);
}
}

@ -0,0 +1,97 @@
package com.ruoyi.baseinfo.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.baseinfo.mapper.BasePlandetailInfoMapper;
import com.ruoyi.baseinfo.domain.BasePlandetailInfo;
import com.ruoyi.baseinfo.service.IBasePlandetailInfoService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author CaesarBao
* @date 2020-10-23
*/
@Service
public class BasePlandetailInfoServiceImpl implements IBasePlandetailInfoService
{
@Autowired
private BasePlandetailInfoMapper basePlandetailInfoMapper;
/**
*
*
* @param objid ID
* @return
*/
@Override
public BasePlandetailInfo selectBasePlandetailInfoById(Long objid)
{
return basePlandetailInfoMapper.selectBasePlandetailInfoById(objid);
}
/**
*
*
* @param basePlandetailInfo
* @return
*/
@Override
public List<BasePlandetailInfo> selectBasePlandetailInfoList(BasePlandetailInfo basePlandetailInfo)
{
return basePlandetailInfoMapper.selectBasePlandetailInfoList(basePlandetailInfo);
}
/**
*
*
* @param basePlandetailInfo
* @return
*/
@Override
public int insertBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo)
{
basePlandetailInfo.setCreateTime(DateUtils.getNowDate());
return basePlandetailInfoMapper.insertBasePlandetailInfo(basePlandetailInfo);
}
/**
*
*
* @param basePlandetailInfo
* @return
*/
@Override
public int updateBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo)
{
basePlandetailInfo.setUpdateTime(DateUtils.getNowDate());
return basePlandetailInfoMapper.updateBasePlandetailInfo(basePlandetailInfo);
}
/**
*
*
* @param ids ID
* @return
*/
@Override
public int deleteBasePlandetailInfoByIds(String ids)
{
return basePlandetailInfoMapper.deleteBasePlandetailInfoByIds(Convert.toStrArray(ids));
}
/**
*
*
* @param objid ID
* @return
*/
@Override
public int deleteBasePlandetailInfoById(Long objid)
{
return basePlandetailInfoMapper.deleteBasePlandetailInfoById(objid);
}
}

@ -94,4 +94,19 @@ public class BaseShiftInfoServiceImpl implements IBaseShiftInfoService
{
return baseShiftInfoMapper.deleteBaseShiftInfoById(objid);
}
@Override
public List<BaseShiftInfo> selectEditBaseShiftInfoList(String shiftid)
{
BaseShiftInfo baseShiftInfos = new BaseShiftInfo();
List<BaseShiftInfo> baseShiftInfoList = baseShiftInfoMapper.selectBaseShiftInfoList(baseShiftInfos);
for (BaseShiftInfo baseShiftInfo:baseShiftInfoList
) {
if(baseShiftInfo.getShiftid().equals(shiftid)){
baseShiftInfo.setFlag(true);
break;
}
}
return baseShiftInfoList;
}
}

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BaseDeviceInfo" id="BaseDeviceInfoResult">
<result property="objid" column="objid" />
<result property="deviceId" column="device_id" />
<result property="workingProcedureId" column="working_procedure_id" />
<result property="deviceName" column="device_name" />
<result property="price" column="price" />
<result property="deviceType" column="device_type" />
@ -17,20 +18,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="workingProcedureName" column="working_procedure_name" />
</resultMap>
<sql id="selectBaseDeviceInfoVo">
select objid, device_id, device_name, price, device_type, status, remark, create_by, create_time, update_by, update_time, del_flag from base_device_info
select objid, device_id, working_procedure_id, device_name, price, device_type, status, remark, create_by, create_time, update_by, update_time, del_flag from base_device_info
</sql>
<select id="selectBaseDeviceInfoList" parameterType="BaseDeviceInfo" resultMap="BaseDeviceInfoResult">
<include refid="selectBaseDeviceInfoVo"/>
select t1.objid, t1.device_id, t1.working_procedure_id,t2.working_procedure_name, t1.device_name, t1.price, t1.device_type, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_device_info t1
left join base_workingprocedure_info t2 on t1.working_procedure_id = t2.working_procedure_id
<where>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like ('%' + #{deviceName} + '%')</if>
<if test="price != null "> and price = #{price}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="deviceId != null and deviceId != ''"> and t1.device_id = #{deviceId}</if>
<if test="workingProcedureId != null and workingProcedureId != ''"> and t1.working_procedure_id = #{workingProcedureId}</if>
<if test="deviceName != null and deviceName != ''"> and t1.device_name like ('%' + #{deviceName} + '%')</if>
<if test="price != null "> and t1.price = #{price}</if>
<if test="deviceType != null and deviceType != ''"> and t1.device_type = #{deviceType}</if>
<if test="status != null and status != ''"> and t1.status = #{status}</if>
</where>
</select>
@ -44,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objid != null">objid,</if>
<if test="deviceId != null">device_id,</if>
<if test="workingProcedureId != null">working_procedure_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="price != null">price,</if>
<if test="deviceType != null">device_type,</if>
@ -58,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objid != null">#{objid},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="workingProcedureId != null">#{workingProcedureId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="price != null">#{price},</if>
<if test="deviceType != null">#{deviceType},</if>
@ -75,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update base_device_info
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="workingProcedureId != null">working_procedure_id = #{workingProcedureId},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="price != null">price = #{price},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>

@ -0,0 +1,102 @@
<?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.baseinfo.mapper.BasePlanInfoMapper">
<resultMap type="BasePlanInfo" id="BasePlanInfoResult">
<result property="planid" column="planid" />
<result property="deviceid" column="deviceid" />
<result property="planShiftId" column="plan_shift_id" />
<result property="planStateId" column="plan_state_id" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<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="delFlag" column="del_flag" />
<result property="deviceName" column="device_name" />
<result property="shiftname" column="shiftname" />
</resultMap>
<sql id="selectBasePlanInfoVo">
select planid, deviceid, plan_shift_id, plan_state_id, status, remark, create_by, create_time, update_by, update_time, del_flag from base_plan_info
</sql>
<select id="selectBasePlanInfoList" parameterType="BasePlanInfo" resultMap="BasePlanInfoResult">
select t1.planid, t1.deviceid,t2.device_name, t1.plan_shift_id,t3.shiftname, t1.plan_state_id, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_plan_info t1
left join base_device_info t2 on t1.deviceid = t2.device_id
left join base_shift_info t3 on t1.plan_shift_id = t3.shiftid
<where>
<if test="deviceid != null and deviceid != ''"> and deviceid = #{deviceid}</if>
<if test="planShiftId != null and planShiftId != ''"> and plan_shift_id = #{planShiftId}</if>
<if test="planStateId != null and planStateId != ''"> and plan_state_id = #{planStateId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectBasePlanInfoById" parameterType="String" resultMap="BasePlanInfoResult">
<include refid="selectBasePlanInfoVo"/>
where planid = #{planid}
</select>
<insert id="insertBasePlanInfo" parameterType="BasePlanInfo">
insert into base_plan_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planid != null">planid,</if>
<if test="deviceid != null">deviceid,</if>
<if test="planShiftId != null">plan_shift_id,</if>
<if test="planStateId != null">plan_state_id,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</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>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="planid != null">#{planid},</if>
<if test="deviceid != null">#{deviceid},</if>
<if test="planShiftId != null">#{planShiftId},</if>
<if test="planStateId != null">#{planStateId},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</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>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateBasePlanInfo" parameterType="BasePlanInfo">
update base_plan_info
<trim prefix="SET" suffixOverrides=",">
<if test="deviceid != null">deviceid = #{deviceid},</if>
<if test="planShiftId != null">plan_shift_id = #{planShiftId},</if>
<if test="planStateId != null">plan_state_id = #{planStateId},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</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>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where planid = #{planid}
</update>
<delete id="deleteBasePlanInfoById" parameterType="String">
delete from base_plan_info where planid = #{planid}
</delete>
<delete id="deleteBasePlanInfoByIds" parameterType="String">
delete from base_plan_info where planid in
<foreach item="planid" collection="array" open="(" separator="," close=")">
#{planid}
</foreach>
</delete>
</mapper>

@ -0,0 +1,113 @@
<?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.baseinfo.mapper.BasePlandetailInfoMapper">
<resultMap type="BasePlandetailInfo" id="BasePlandetailInfoResult">
<result property="objid" column="objid" />
<result property="planid" column="planid" />
<result property="materialId" column="material_id" />
<result property="planAmount" column="plan_amount" />
<result property="realAmount" column="real_amount" />
<result property="unitId" column="unit_id" />
<result property="groupId" column="group_id" />
<result property="remark" column="remark" />
<result property="status" column="status" />
<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="delFlag" column="del_flag" />
</resultMap>
<sql id="selectBasePlandetailInfoVo">
select objid, planid, material_id, plan_amount, real_amount, unit_id, group_id, remark, status, create_by, create_time, update_by, update_time, del_flag from base_plandetail_info
</sql>
<select id="selectBasePlandetailInfoList" parameterType="BasePlandetailInfo" resultMap="BasePlandetailInfoResult">
<include refid="selectBasePlandetailInfoVo"/>
<where>
<if test="planid != null and planid != ''"> and planid = #{planid}</if>
<if test="materialId != null and materialId != ''"> and material_id = #{materialId}</if>
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
<if test="realAmount != null "> and real_amount = #{realAmount}</if>
<if test="unitId != null and unitId != ''"> and unit_id = #{unitId}</if>
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectBasePlandetailInfoById" parameterType="Long" resultMap="BasePlandetailInfoResult">
<include refid="selectBasePlandetailInfoVo"/>
where objid = #{objid}
</select>
<insert id="insertBasePlandetailInfo" parameterType="BasePlandetailInfo">
insert into base_plandetail_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objid != null">objid,</if>
<if test="planid != null">planid,</if>
<if test="materialId != null">material_id,</if>
<if test="planAmount != null">plan_amount,</if>
<if test="realAmount != null">real_amount,</if>
<if test="unitId != null">unit_id,</if>
<if test="groupId != null">group_id,</if>
<if test="remark != null">remark,</if>
<if test="status != null">status,</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>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objid != null">#{objid},</if>
<if test="planid != null">#{planid},</if>
<if test="materialId != null">#{materialId},</if>
<if test="planAmount != null">#{planAmount},</if>
<if test="realAmount != null">#{realAmount},</if>
<if test="unitId != null">#{unitId},</if>
<if test="groupId != null">#{groupId},</if>
<if test="remark != null">#{remark},</if>
<if test="status != null">#{status},</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>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateBasePlandetailInfo" parameterType="BasePlandetailInfo">
update base_plandetail_info
<trim prefix="SET" suffixOverrides=",">
<if test="planid != null">planid = #{planid},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="planAmount != null">plan_amount = #{planAmount},</if>
<if test="realAmount != null">real_amount = #{realAmount},</if>
<if test="unitId != null">unit_id = #{unitId},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="status != null">status = #{status},</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>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where objid = #{objid}
</update>
<delete id="deleteBasePlandetailInfoById" parameterType="Long">
delete from base_plandetail_info where objid = #{objid}
</delete>
<delete id="deleteBasePlandetailInfoByIds" parameterType="String">
delete from base_plandetail_info where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
</delete>
</mapper>

@ -90,4 +90,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

Loading…
Cancel
Save