修改登陆界面
parent
7e7974efb7
commit
4747d1bf3d
@ -1,178 +1,182 @@
|
||||
package com.ruoyi.web.controller.baseinfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.baseinfo.domain.BaseMaterialInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseMaterialInfoService;
|
||||
import com.ruoyi.baseinfo.service.IBaseMaterialtypeInfoService;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
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.BaseBomInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseBomInfoService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* BOM基础信息Controller
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseinfo/bominfo")
|
||||
public class BaseBomInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "baseinfo/bominfo";
|
||||
|
||||
@Autowired
|
||||
private IBaseBomInfoService baseBomInfoService;
|
||||
@Autowired
|
||||
private IBaseMaterialtypeInfoService baseMaterialtypeInfoService;
|
||||
@Autowired
|
||||
private IBaseMaterialInfoService baseMaterialInfoService;
|
||||
|
||||
@RequiresPermissions("baseinfo:bominfo:view")
|
||||
@GetMapping()
|
||||
public String bominfo()
|
||||
{
|
||||
return prefix + "/bominfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*/
|
||||
// @RequiresPermissions("baseinfo:bominfo:list")
|
||||
// @PostMapping("/list")
|
||||
// @ResponseBody
|
||||
// public TableDataInfo list1(BaseBomInfo baseBomInfo)
|
||||
// {
|
||||
// startPage();
|
||||
// List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
|
||||
@RequiresPermissions("baseinfo:bominfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<BaseBomInfo> list(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 导出BOM基础信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:export")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
ExcelUtil<BaseBomInfo> util = new ExcelUtil<BaseBomInfo>(BaseBomInfo.class);
|
||||
return util.exportExcel(list, "bominfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
BaseMaterialInfo BaseMaterialInfo = new BaseMaterialInfo();
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectAddBaseMaterialtypeInfoList());
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectBaseMaterialInfoList(BaseMaterialInfo));
|
||||
return prefix + "/addproduct";
|
||||
}
|
||||
/**
|
||||
* 新增保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:addproduct")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addproduct")
|
||||
@ResponseBody
|
||||
public AjaxResult addSaveproduct(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setpId(0L);
|
||||
return toAjax(baseBomInfoService.insertBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
/**
|
||||
* 新增BOM物料信息
|
||||
*/
|
||||
@GetMapping("/add/{parentId}")
|
||||
public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
|
||||
{
|
||||
BaseMaterialInfo BaseMaterialInfo = new BaseMaterialInfo();
|
||||
mmap.put("parent", baseBomInfoService.selectBaseBomInfoById(parentId));
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectAddBaseMaterialtypeInfoList());
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectBaseMaterialInfoList(BaseMaterialInfo));
|
||||
return prefix + "/add";
|
||||
}
|
||||
/**
|
||||
* 新增保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:add")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
BaseBomInfo pbaseBomInfo = new BaseBomInfo();
|
||||
pbaseBomInfo = baseBomInfoService.selectBaseBomInfoBymaterialName(baseBomInfo);
|
||||
baseBomInfo.setpId(pbaseBomInfo.getBomId());
|
||||
return toAjax(baseBomInfoService.insertBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*/
|
||||
@GetMapping("/edit/{objid}")
|
||||
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
|
||||
{
|
||||
BaseBomInfo baseBomInfo = baseBomInfoService.selectBaseBomInfoById(objid);
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectEditBaseMaterialtypeInfoList(baseBomInfo.getMaterialTypeId()));
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectEditBaseMaterialInfoList(baseBomInfo.getMaterialId()));
|
||||
mmap.put("baseBomInfo", baseBomInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:edit")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
return toAjax(baseBomInfoService.updateBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息
|
||||
*/
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.DELETE)
|
||||
@RequiresPermissions("system:dept:remove")
|
||||
@GetMapping("/remove/{bomId}")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(@PathVariable("bomId") Long bomId)
|
||||
{
|
||||
if (baseBomInfoService.selectBomCount(bomId) > 0)
|
||||
{
|
||||
return AjaxResult.warn("存在下级节点,不允许删除");
|
||||
}
|
||||
return toAjax(baseBomInfoService.deleteBaseBomInfoById(bomId));
|
||||
}
|
||||
}
|
||||
package com.ruoyi.web.controller.baseinfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.baseinfo.domain.BaseMaterialInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseMaterialInfoService;
|
||||
import com.ruoyi.baseinfo.service.IBaseMaterialtypeInfoService;
|
||||
import com.ruoyi.common.core.domain.CxSelect;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
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.BaseBomInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseBomInfoService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* BOM基础信息Controller
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseinfo/bominfo")
|
||||
public class BaseBomInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "baseinfo/bominfo";
|
||||
|
||||
@Autowired
|
||||
private IBaseBomInfoService baseBomInfoService;
|
||||
@Autowired
|
||||
private IBaseMaterialtypeInfoService baseMaterialtypeInfoService;
|
||||
@Autowired
|
||||
private IBaseMaterialInfoService baseMaterialInfoService;
|
||||
|
||||
@RequiresPermissions("baseinfo:bominfo:view")
|
||||
@GetMapping()
|
||||
public String bominfo()
|
||||
{
|
||||
return prefix + "/bominfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*/
|
||||
// @RequiresPermissions("baseinfo:bominfo:list")
|
||||
// @PostMapping("/list")
|
||||
// @ResponseBody
|
||||
// public TableDataInfo list1(BaseBomInfo baseBomInfo)
|
||||
// {
|
||||
// startPage();
|
||||
// List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
|
||||
@RequiresPermissions("baseinfo:bominfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<BaseBomInfo> list(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 导出BOM基础信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:export")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
List<BaseBomInfo> list = baseBomInfoService.selectBaseBomInfoList(baseBomInfo);
|
||||
ExcelUtil<BaseBomInfo> util = new ExcelUtil<BaseBomInfo>(BaseBomInfo.class);
|
||||
return util.exportExcel(list, "bominfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
BaseMaterialInfo BaseMaterialInfo = new BaseMaterialInfo();
|
||||
mmap.put("data",baseMaterialtypeInfoService.selectCxSelectList());
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectAddBaseMaterialtypeInfoList());
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectBaseMaterialInfoList(BaseMaterialInfo));
|
||||
return prefix + "/addproduct";
|
||||
}
|
||||
/**
|
||||
* 新增保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:addproduct")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addproduct")
|
||||
@ResponseBody
|
||||
public AjaxResult addSaveproduct(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setpId(0L);
|
||||
return toAjax(baseBomInfoService.insertBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
/**
|
||||
* 新增BOM物料信息
|
||||
*/
|
||||
@GetMapping("/add/{parentId}")
|
||||
public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
|
||||
{
|
||||
BaseMaterialInfo BaseMaterialInfo = new BaseMaterialInfo();
|
||||
mmap.put("data",baseMaterialtypeInfoService.selectCxSelectList());
|
||||
mmap.put("parent", baseBomInfoService.selectBaseBomInfoById(parentId));
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectAddBaseMaterialtypeInfoList());
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectBaseMaterialInfoList(BaseMaterialInfo));
|
||||
return prefix + "/add";
|
||||
}
|
||||
/**
|
||||
* 新增保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:add")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
// BaseBomInfo pbaseBomInfo = new BaseBomInfo();
|
||||
// pbaseBomInfo = baseBomInfoService.selectBaseBomInfoById(baseBomInfo.getBomId());
|
||||
// baseBomInfo.setpId(pbaseBomInfo.getBomId());
|
||||
return toAjax(baseBomInfoService.insertBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*/
|
||||
@GetMapping("/edit/{objid}")
|
||||
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
|
||||
{
|
||||
BaseBomInfo baseBomInfo = baseBomInfoService.selectBaseBomInfoById(objid);
|
||||
mmap.put("cbmaterialtypeInfo",baseMaterialtypeInfoService.selectEditBaseMaterialtypeInfoList(baseBomInfo.getMaterialTypeId()));
|
||||
mmap.put("cbmaterialInfo",baseMaterialInfoService.selectEditBaseMaterialInfoList(baseBomInfo.getMaterialId()));
|
||||
mmap.put("baseBomInfo", baseBomInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存BOM基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:bominfo:edit")
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
return toAjax(baseBomInfoService.updateBaseBomInfo(baseBomInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息
|
||||
*/
|
||||
@Log(title = "BOM基础信息", businessType = BusinessType.DELETE)
|
||||
@RequiresPermissions("system:dept:remove")
|
||||
@GetMapping("/remove/{bomId}")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(@PathVariable("bomId") Long bomId)
|
||||
{
|
||||
if (baseBomInfoService.selectBomCount(bomId) > 0)
|
||||
{
|
||||
return AjaxResult.warn("存在下级节点,不允许删除");
|
||||
}
|
||||
return toAjax(baseBomInfoService.deleteBaseBomInfoById(bomId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1 +1,174 @@
|
||||
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}
|
||||
html {
|
||||
height: 100%
|
||||
}
|
||||
|
||||
body.signin {
|
||||
height: auto;
|
||||
/*background: url(../img/login-background.jpg) no-repeat center fixed;*/
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
color: rgba(255, 255, 255, .95)
|
||||
}
|
||||
|
||||
.signinpanel {
|
||||
width: 750px;
|
||||
margin: 10% auto 0
|
||||
}
|
||||
|
||||
.signinpanel .logopanel {
|
||||
float: none;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
background: 0
|
||||
}
|
||||
|
||||
.signinpanel .signin-info ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 20px 0
|
||||
}
|
||||
|
||||
.signinpanel .form-control {
|
||||
display: block;
|
||||
margin-top: 15px
|
||||
}
|
||||
|
||||
.signinpanel .uname {
|
||||
background: #fff url(../img/user.png) no-repeat 95% center;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.signinpanel .pword {
|
||||
background: #fff url(../img/locked.png) no-repeat 95% center;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.signinpanel .code {
|
||||
background: #fff no-repeat 95% center;
|
||||
color: #333;
|
||||
margin: 0 0 15px 0
|
||||
}
|
||||
|
||||
.signinpanel .btn {
|
||||
margin-top: 15px
|
||||
}
|
||||
|
||||
.signinpanel form {
|
||||
background: rgba(255, 255, 255, .2);
|
||||
border: 1px solid rgba(255, 255, 255, .3);
|
||||
-moz-box-shadow: 0 3px 0 rgba(12, 12, 12, .03);
|
||||
-webkit-box-shadow: 0 3px 0 rgba(12, 12, 12, .03);
|
||||
box-shadow: 0 3px 0 rgba(12, 12, 12, .03);
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
padding: 30px
|
||||
}
|
||||
|
||||
.signup-footer {
|
||||
border-top: solid 1px rgba(255, 255, 255, .3);
|
||||
margin: 20px 0;
|
||||
padding-top: 15px
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.signinpanel, .signuppanel {
|
||||
margin: 0 auto;
|
||||
width: 420px !important;
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
.signinpanel form {
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
.signup-footer, .signuppanel .form-control {
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.signup-footer .pull-left, .signup-footer .pull-right {
|
||||
float: none !important;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.signinpanel .signin-info ul {
|
||||
display: none
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 320px) {
|
||||
.signinpanel, .signuppanel {
|
||||
margin: 0 20px;
|
||||
width: auto
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox-custom {
|
||||
position: relative;
|
||||
padding: 0 15px 0 25px;
|
||||
margin-bottom: 7px;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.checkbox-custom input[type="checkbox"] {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
margin: -6px 0 0 0;
|
||||
top: 50%;
|
||||
left: 3px
|
||||
}
|
||||
|
||||
.checkbox-custom label:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -9px;
|
||||
width: 18px;
|
||||
height: 17px;
|
||||
display: inline-block;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #bbb;
|
||||
background: #fff
|
||||
}
|
||||
|
||||
.checkbox-custom input[type="checkbox"]:checked + label:after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
content: "\e013";
|
||||
top: 42%;
|
||||
left: 3px;
|
||||
margin-top: -5px;
|
||||
font-size: 11px;
|
||||
line-height: 1;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.checkbox-custom label {
|
||||
cursor: pointer;
|
||||
line-height: 1.2;
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||
box-shadow: none
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border-radius: 1px !important;
|
||||
padding: 6px 12px !important;
|
||||
height: 34px !important
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
border-color: #1ab394 !important
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,77 +1,80 @@
|
||||
package com.ruoyi.baseinfo.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseBomInfo;
|
||||
|
||||
/**
|
||||
* BOM基础信息Mapper接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
public interface BaseBomInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
public BaseBomInfo selectBaseBomInfoById(Long objid);
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return BOM基础信息集合
|
||||
*/
|
||||
public List<BaseBomInfo> selectBaseBomInfoList(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBomInfo(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBomInfo(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBomInfoById(Long objid);
|
||||
|
||||
/**
|
||||
* 批量删除BOM基础信息
|
||||
*
|
||||
* @param objids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBomInfoByIds(String[] objids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param materialName BOM上级节点得物料名称
|
||||
* @return 结果
|
||||
*/
|
||||
public BaseBomInfo selectBaseBomInfoBymaterialName(BaseBomInfo baseBomInfo);
|
||||
/**
|
||||
* 查询BOM节点数量
|
||||
*
|
||||
* @param parentId 父部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int selectBomCount(BaseBomInfo baseBomInfo);
|
||||
}
|
||||
package com.ruoyi.baseinfo.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseBomInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* BOM基础信息Mapper接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
public interface BaseBomInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
public BaseBomInfo selectBaseBomInfoById(Long objid);
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return BOM基础信息集合
|
||||
*/
|
||||
public List<BaseBomInfo> selectBaseBomInfoList(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBomInfo(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBomInfo(BaseBomInfo baseBomInfo);
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBomInfoById(Long objid);
|
||||
|
||||
/**
|
||||
* 批量删除BOM基础信息
|
||||
*
|
||||
* @param objids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBomInfoByIds(String[] objids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param materialName BOM上级节点得物料名称
|
||||
* @param materialTypeId
|
||||
* @param materialId
|
||||
* @return 结果
|
||||
*/
|
||||
public BaseBomInfo selectBaseBomInfoBymaterialName(@Param("materialName") String materialName, @Param("materialTypeId") String materialTypeId,@Param("materialId") String materialId);
|
||||
/**
|
||||
* 查询BOM节点数量
|
||||
*
|
||||
* @param baseBomInfo 父部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int selectBomCount(BaseBomInfo baseBomInfo);
|
||||
}
|
||||
|
||||
@ -1,110 +1,112 @@
|
||||
package com.ruoyi.baseinfo.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseinfo.mapper.BaseBomInfoMapper;
|
||||
import com.ruoyi.baseinfo.domain.BaseBomInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseBomInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* BOM基础信息Service业务层处理
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
@Service
|
||||
public class BaseBomInfoServiceImpl implements IBaseBomInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseBomInfoMapper baseBomInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
@Override
|
||||
public BaseBomInfo selectBaseBomInfoById(Long objid)
|
||||
{
|
||||
return baseBomInfoMapper.selectBaseBomInfoById(objid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseBomInfo> selectBaseBomInfoList(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
return baseBomInfoMapper.selectBaseBomInfoList(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseBomInfo(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseBomInfoMapper.insertBaseBomInfo(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseBomInfo(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseBomInfoMapper.updateBaseBomInfo(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBomInfoByIds(String ids)
|
||||
{
|
||||
return baseBomInfoMapper.deleteBaseBomInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBomInfoById(Long objid)
|
||||
{
|
||||
return baseBomInfoMapper.deleteBaseBomInfoById(objid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBomInfo selectBaseBomInfoBymaterialName(BaseBomInfo baseBomInfo) {
|
||||
return baseBomInfoMapper.selectBaseBomInfoBymaterialName(baseBomInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectBomCount(Long parentId) {
|
||||
BaseBomInfo baseBomInfo = new BaseBomInfo();
|
||||
baseBomInfo.setpId(parentId);
|
||||
return baseBomInfoMapper.selectBomCount(baseBomInfo);
|
||||
}
|
||||
}
|
||||
package com.ruoyi.baseinfo.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.SysDept;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseinfo.mapper.BaseBomInfoMapper;
|
||||
import com.ruoyi.baseinfo.domain.BaseBomInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseBomInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* BOM基础信息Service业务层处理
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-11-04
|
||||
*/
|
||||
@Service
|
||||
public class BaseBomInfoServiceImpl implements IBaseBomInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseBomInfoMapper baseBomInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
@Override
|
||||
public BaseBomInfo selectBaseBomInfoById(Long objid)
|
||||
{
|
||||
return baseBomInfoMapper.selectBaseBomInfoById(objid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询BOM基础信息列表
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return BOM基础信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseBomInfo> selectBaseBomInfoList(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
return baseBomInfoMapper.selectBaseBomInfoList(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseBomInfo(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseBomInfoMapper.insertBaseBomInfo(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改BOM基础信息
|
||||
*
|
||||
* @param baseBomInfo BOM基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseBomInfo(BaseBomInfo baseBomInfo)
|
||||
{
|
||||
baseBomInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseBomInfoMapper.updateBaseBomInfo(baseBomInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBomInfoByIds(String ids)
|
||||
{
|
||||
return baseBomInfoMapper.deleteBaseBomInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除BOM基础信息信息
|
||||
*
|
||||
* @param objid BOM基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBomInfoById(Long objid)
|
||||
{
|
||||
return baseBomInfoMapper.deleteBaseBomInfoById(objid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBomInfo selectBaseBomInfoBymaterialName(BaseBomInfo baseBomInfo) {
|
||||
BaseBomInfo baseBomInfolist = new BaseBomInfo();
|
||||
baseBomInfolist = baseBomInfoMapper.selectBaseBomInfoBymaterialName(baseBomInfo.getMaterialName(),baseBomInfo.getMaterialTypeId(),baseBomInfo.getMaterialId());
|
||||
return baseBomInfolist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectBomCount(Long parentId) {
|
||||
BaseBomInfo baseBomInfo = new BaseBomInfo();
|
||||
baseBomInfo.setpId(parentId);
|
||||
return baseBomInfoMapper.selectBomCount(baseBomInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,124 +1,122 @@
|
||||
<?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.BaseBomInfoMapper">
|
||||
|
||||
<resultMap type="BaseBomInfo" id="BaseBomInfoResult">
|
||||
<result property="bomId" column="bom_id" />
|
||||
<result property="pId" column="p_id" />
|
||||
<result property="materialTypeId" column="material_type_id" />
|
||||
<result property="materialId" column="material_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="materialTypeName" column="material_type_name" />
|
||||
<result property="materialName" column="material_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseBomInfoVo">
|
||||
select bom_id, p_id, material_type_id, material_id, status, remark, create_by, create_time, update_by, update_time, del_flag from base_bom_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseBomInfoList" parameterType="BaseBomInfo" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
<where>
|
||||
<if test="pId != null and pId != ''"> and p_id = #{pId}</if>
|
||||
<if test="materialTypeId != null and materialTypeId != ''"> and material_type_id = #{materialTypeId}</if>
|
||||
<if test="materialId != null and materialId != ''"> and material_id = #{materialId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBomInfoById" parameterType="Long" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
where t1.bom_id = #{bomId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseBomInfo" parameterType="BaseBomInfo">
|
||||
insert into base_bom_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="bomId != null">bom_id,</if>
|
||||
<if test="pId != null">p_id,</if>
|
||||
<if test="materialTypeId != null">material_type_id,</if>
|
||||
<if test="materialId != null">material_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="bomId != null">#{bom_id},</if>
|
||||
<if test="pId != null">#{pId},</if>
|
||||
<if test="materialTypeId != null">#{materialTypeId},</if>
|
||||
<if test="materialId != null">#{materialId},</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="updateBaseBomInfo" parameterType="BaseBomInfo">
|
||||
update base_bom_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pId != null">p_id = #{pId},</if>
|
||||
<if test="materialTypeId != null">material_type_id = #{materialTypeId},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</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 bom_id = #{bomId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseBomInfoById" parameterType="Long">
|
||||
delete from base_bom_info where bom_id = #{bomId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseBomInfoByIds" parameterType="String">
|
||||
delete from base_bom_info where bom_id in
|
||||
<foreach item="bomId" collection="array" open="(" separator="," close=")">
|
||||
#{bomId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectBaseBomInfoBymaterialName" parameterType="BaseBomInfo" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
<where>
|
||||
<if test="pId != null and pId != ''"> and t1.p_id = #{pId}</if>
|
||||
<if test="materialName != null and materialName != ''"> and t3.material_name = #{materialName}</if>
|
||||
<if test="materialTypeId != null and materialTypeId != ''"> and t1.material_type_id = #{materialTypeId}</if>
|
||||
<if test="materialId != null and materialId != ''"> and t1.material_id = #{materialId}</if>
|
||||
<if test="status != null and status != ''"> and t1.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectBomCount" parameterType="BaseBomInfo" resultType="int">
|
||||
select count(1) from base_bom_info
|
||||
where del_flag = '0'
|
||||
<if test="bomId != null and bomId != 0"> and bom_id = #{bomId} </if>
|
||||
<if test="pId != null and pId != 0"> and p_id = #{pId} </if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
<?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.BaseBomInfoMapper">
|
||||
|
||||
<resultMap type="BaseBomInfo" id="BaseBomInfoResult">
|
||||
<result property="bomId" column="bom_id" />
|
||||
<result property="pId" column="p_id" />
|
||||
<result property="materialTypeId" column="material_type_id" />
|
||||
<result property="materialId" column="material_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="materialTypeName" column="material_type_name" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseBomInfoVo">
|
||||
select bom_id, p_id, material_type_id, material_id, status, remark, create_by, create_time, update_by, update_time, del_flag from base_bom_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseBomInfoList" parameterType="BaseBomInfo" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t3.material_code, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
<where>
|
||||
<if test="pId != null and pId != ''"> and p_id = #{pId}</if>
|
||||
<if test="materialTypeName != null and materialTypeName != ''"> and t2.material_type_name = #{materialTypeName}</if>
|
||||
<if test="materialName != null and materialName != ''"> and t3.material_name = #{materialName}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and t3.material_code = #{materialCode}</if>
|
||||
<if test="materialTypeId != null and materialTypeId != ''"> and t1.material_type_id = #{materialTypeId}</if>
|
||||
<if test="materialId != null and materialId != ''"> and t1.material_id = #{materialId}</if>
|
||||
<if test="status != null and status != ''"> and t1.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBomInfoById" parameterType="Long" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
where t1.bom_id = #{bomId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseBomInfo" parameterType="BaseBomInfo">
|
||||
insert into base_bom_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="bomId != null">bom_id,</if>
|
||||
<if test="pId != null">p_id,</if>
|
||||
<if test="materialTypeId != null">material_type_id,</if>
|
||||
<if test="materialId != null">material_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="bomId != null">#{bom_id},</if>
|
||||
<if test="pId != null">#{pId},</if>
|
||||
<if test="materialTypeId != null">#{materialTypeId},</if>
|
||||
<if test="materialId != null">#{materialId},</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="updateBaseBomInfo" parameterType="BaseBomInfo">
|
||||
update base_bom_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pId != null">p_id = #{pId},</if>
|
||||
<if test="materialTypeId != null">material_type_id = #{materialTypeId},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</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 bom_id = #{bomId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseBomInfoById" parameterType="Long">
|
||||
delete from base_bom_info where bom_id = #{bomId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseBomInfoByIds" parameterType="String">
|
||||
delete from base_bom_info where bom_id in
|
||||
<foreach item="bomId" collection="array" open="(" separator="," close=")">
|
||||
#{bomId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectBaseBomInfoBymaterialName" parameterType="BaseBomInfo" resultMap="BaseBomInfoResult">
|
||||
select t1.bom_id, t1.p_id, t1.material_type_id,t2.material_type_name, t1.material_id,t3.material_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_bom_info t1
|
||||
left join dbo.base_materialtype_info t2 on t1.material_type_id = t2.material_type_id
|
||||
left join dbo.base_material_info t3 on t1.material_id = t3.material_id
|
||||
where t3.material_name = #{materialName} and t1.material_type_id = #{materialTypeId} and t1.material_id = #{materialId}
|
||||
</select>
|
||||
<select id="selectBomCount" parameterType="BaseBomInfo" resultType="int">
|
||||
select count(1) from base_bom_info
|
||||
where del_flag = '0'
|
||||
<if test="bomId != null and bomId != 0"> and bom_id = #{bomId} </if>
|
||||
<if test="pId != null and pId != 0"> and p_id = #{pId} </if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue