change -库存台账显示样式修改
parent
6c95bc911c
commit
aa782aa279
@ -0,0 +1,127 @@
|
||||
package com.bgs.web.controller.base;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.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.bgs.common.annotation.Log;
|
||||
import com.bgs.common.enums.BusinessType;
|
||||
import com.bgs.system.domain.BaseBasketInfo;
|
||||
import com.bgs.system.service.IBaseBasketInfoService;
|
||||
import com.bgs.common.core.controller.BaseController;
|
||||
import com.bgs.common.core.domain.AjaxResult;
|
||||
import com.bgs.common.utils.poi.ExcelUtil;
|
||||
import com.bgs.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 货筐信息Controller
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2024-07-19
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/base/basketInfo")
|
||||
public class BaseBasketInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "base/basketInfo";
|
||||
|
||||
@Autowired
|
||||
private IBaseBasketInfoService baseBasketInfoService;
|
||||
|
||||
@RequiresPermissions("base:basketInfo:view")
|
||||
@GetMapping()
|
||||
public String basketInfo()
|
||||
{
|
||||
return prefix + "/basketInfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询货筐信息列表
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BaseBasketInfo> list = baseBasketInfoService.selectBaseBasketInfoList(baseBasketInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出货筐信息列表
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:export")
|
||||
@Log(title = "货筐信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
List<BaseBasketInfo> list = baseBasketInfoService.selectBaseBasketInfoList(baseBasketInfo);
|
||||
ExcelUtil<BaseBasketInfo> util = new ExcelUtil<BaseBasketInfo>(BaseBasketInfo.class);
|
||||
return util.exportExcel(list, "货筐信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增货筐信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存货筐信息
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:add")
|
||||
@Log(title = "货筐信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
return toAjax(baseBasketInfoService.insertBaseBasketInfo(baseBasketInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货筐信息
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:edit")
|
||||
@GetMapping("/edit/{objId}")
|
||||
public String edit(@PathVariable("objId") Long objId, ModelMap mmap)
|
||||
{
|
||||
BaseBasketInfo baseBasketInfo = baseBasketInfoService.selectBaseBasketInfoByObjId(objId);
|
||||
mmap.put("baseBasketInfo", baseBasketInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存货筐信息
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:edit")
|
||||
@Log(title = "货筐信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
return toAjax(baseBasketInfoService.updateBaseBasketInfo(baseBasketInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除货筐信息
|
||||
*/
|
||||
@RequiresPermissions("base:basketInfo:remove")
|
||||
@Log(title = "货筐信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseBasketInfoService.deleteBaseBasketInfoByObjIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增货筐信息')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-basketInfo-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="basketCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐条码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="basketEpc" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="basketType" class="form-control" th:with="type=${@dict.getType('basket_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="basketStatus" class="form-control" th:with="type=${@dict.getType('basket_status')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="updatedTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/basketInfo"
|
||||
$("#form-basketInfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-basketInfo-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='updatedTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('货筐信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>货筐编号:</label>
|
||||
<input type="text" name="basketCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>货筐条码:</label>
|
||||
<input type="text" name="basketEpc"/>
|
||||
</li>
|
||||
<!--<li>
|
||||
<label>货筐类型:</label>
|
||||
<select name="basketType" th:with="type=${@dict.getType('basket_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>-->
|
||||
<li>
|
||||
<label>货筐状态:</label>
|
||||
<select name="basketStatus" th:with="type=${@dict.getType('basket_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="base:basketInfo:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="base:basketInfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="base:basketInfo:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="base:basketInfo: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('base:basketInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('base:basketInfo:remove')}]];
|
||||
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
|
||||
var basketStatusDatas = [[${@dict.getType('basket_status')}]];
|
||||
var isFlagDatas = [[${@dict.getType('sys_is_flag')}]];
|
||||
var prefix = ctx + "base/basketInfo";
|
||||
|
||||
$(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: 'basketCode',
|
||||
title: '货筐编号'
|
||||
},
|
||||
{
|
||||
field: 'basketEpc',
|
||||
title: '货筐RFID条码'
|
||||
},
|
||||
{
|
||||
field: 'basketType',
|
||||
title: '货筐类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(basketTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'basketStatus',
|
||||
title: '货筐状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(basketStatusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updatedTime',
|
||||
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="$.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,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改货筐信息')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-basketInfo-edit" th:object="${baseBasketInfo}">
|
||||
<input name="objId" th:field="*{objId}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="basketCode" th:field="*{basketCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐条码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="basketEpc" th:field="*{basketEpc}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="basketType" class="form-control" th:with="type=${@dict.getType('basket_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{basketType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">货筐状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="basketStatus" class="form-control" th:with="type=${@dict.getType('basket_status')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{basketStatus}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="updatedTime" th:value="${#dates.format(baseBasketInfo.updatedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "base/basketInfo";
|
||||
$("#form-basketInfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-basketInfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='updatedTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,171 @@
|
||||
package com.bgs.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.bgs.common.annotation.Excel;
|
||||
import com.bgs.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 货筐信息对象 base_basket_info
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2024-07-19
|
||||
*/
|
||||
public class BaseBasketInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 标识ID */
|
||||
private Long objId;
|
||||
|
||||
/** 货筐编号 */
|
||||
@Excel(name = "货筐编号")
|
||||
private String basketCode;
|
||||
|
||||
/** 货筐RFID */
|
||||
@Excel(name = "货筐RFID")
|
||||
private String basketEpc;
|
||||
|
||||
/** 货筐类型 */
|
||||
@Excel(name = "货筐类型")
|
||||
private Long basketType;
|
||||
|
||||
/** 货筐状态 */
|
||||
@Excel(name = "货筐状态")
|
||||
private Long basketStatus;
|
||||
|
||||
/** 是否状态 */
|
||||
private Long isFlag;
|
||||
|
||||
/** 创建人 */
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedTime;
|
||||
|
||||
public void setObjId(Long objId)
|
||||
{
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objId;
|
||||
}
|
||||
|
||||
public void setBasketCode(String basketCode)
|
||||
{
|
||||
this.basketCode = basketCode;
|
||||
}
|
||||
|
||||
public String getBasketCode()
|
||||
{
|
||||
return basketCode;
|
||||
}
|
||||
|
||||
public void setBasketEpc(String basketEpc)
|
||||
{
|
||||
this.basketEpc = basketEpc;
|
||||
}
|
||||
|
||||
public String getBasketEpc()
|
||||
{
|
||||
return basketEpc;
|
||||
}
|
||||
|
||||
public void setBasketType(Long basketType)
|
||||
{
|
||||
this.basketType = basketType;
|
||||
}
|
||||
|
||||
public Long getBasketType()
|
||||
{
|
||||
return basketType;
|
||||
}
|
||||
|
||||
public void setBasketStatus(Long basketStatus)
|
||||
{
|
||||
this.basketStatus = basketStatus;
|
||||
}
|
||||
|
||||
public Long getBasketStatus()
|
||||
{
|
||||
return basketStatus;
|
||||
}
|
||||
|
||||
public void setIsFlag(Long isFlag)
|
||||
{
|
||||
this.isFlag = isFlag;
|
||||
}
|
||||
|
||||
public Long getIsFlag()
|
||||
{
|
||||
return isFlag;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime)
|
||||
{
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime()
|
||||
{
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setUpdatedBy(String updatedBy)
|
||||
{
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getUpdatedBy()
|
||||
{
|
||||
return updatedBy;
|
||||
}
|
||||
|
||||
public void setUpdatedTime(Date updatedTime)
|
||||
{
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime()
|
||||
{
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId", getObjId())
|
||||
.append("basketCode", getBasketCode())
|
||||
.append("basketEpc", getBasketEpc())
|
||||
.append("basketType", getBasketType())
|
||||
.append("basketStatus", getBasketStatus())
|
||||
.append("isFlag", getIsFlag())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("createdTime", getCreatedTime())
|
||||
.append("updatedBy", getUpdatedBy())
|
||||
.append("updatedTime", getUpdatedTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.bgs.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.bgs.system.domain.BaseBasketInfo;
|
||||
|
||||
/**
|
||||
* 货筐信息Mapper接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2024-07-19
|
||||
*/
|
||||
public interface BaseBasketInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询货筐信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 货筐信息
|
||||
*/
|
||||
public BaseBasketInfo selectBaseBasketInfoByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询货筐信息列表
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 货筐信息集合
|
||||
*/
|
||||
public List<BaseBasketInfo> selectBaseBasketInfoList(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 新增货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBasketInfo(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 修改货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBasketInfo(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 删除货筐信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBasketInfoByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除货筐信息
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBasketInfoByObjIds(String[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.bgs.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.bgs.system.domain.BaseBasketInfo;
|
||||
|
||||
/**
|
||||
* 货筐信息Service接口
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2024-07-19
|
||||
*/
|
||||
public interface IBaseBasketInfoService
|
||||
{
|
||||
/**
|
||||
* 查询货筐信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 货筐信息
|
||||
*/
|
||||
public BaseBasketInfo selectBaseBasketInfoByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询货筐信息列表
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 货筐信息集合
|
||||
*/
|
||||
public List<BaseBasketInfo> selectBaseBasketInfoList(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 新增货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseBasketInfo(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 修改货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseBasketInfo(BaseBasketInfo baseBasketInfo);
|
||||
|
||||
/**
|
||||
* 批量删除货筐信息
|
||||
*
|
||||
* @param objIds 需要删除的货筐信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBasketInfoByObjIds(String objIds);
|
||||
|
||||
/**
|
||||
* 删除货筐信息信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseBasketInfoByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.bgs.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bgs.system.mapper.BaseBasketInfoMapper;
|
||||
import com.bgs.system.domain.BaseBasketInfo;
|
||||
import com.bgs.system.service.IBaseBasketInfoService;
|
||||
import com.bgs.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 货筐信息Service业务层处理
|
||||
*
|
||||
* @author wenjy
|
||||
* @date 2024-07-19
|
||||
*/
|
||||
@Service
|
||||
public class BaseBasketInfoServiceImpl implements IBaseBasketInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseBasketInfoMapper baseBasketInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询货筐信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 货筐信息
|
||||
*/
|
||||
@Override
|
||||
public BaseBasketInfo selectBaseBasketInfoByObjId(Long objId)
|
||||
{
|
||||
return baseBasketInfoMapper.selectBaseBasketInfoByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询货筐信息列表
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 货筐信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseBasketInfo> selectBaseBasketInfoList(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
return baseBasketInfoMapper.selectBaseBasketInfoList(baseBasketInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseBasketInfo(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
return baseBasketInfoMapper.insertBaseBasketInfo(baseBasketInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货筐信息
|
||||
*
|
||||
* @param baseBasketInfo 货筐信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseBasketInfo(BaseBasketInfo baseBasketInfo)
|
||||
{
|
||||
return baseBasketInfoMapper.updateBaseBasketInfo(baseBasketInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除货筐信息
|
||||
*
|
||||
* @param objIds 需要删除的货筐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBasketInfoByObjIds(String objIds)
|
||||
{
|
||||
return baseBasketInfoMapper.deleteBaseBasketInfoByObjIds(Convert.toStrArray(objIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除货筐信息信息
|
||||
*
|
||||
* @param objId 货筐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseBasketInfoByObjId(Long objId)
|
||||
{
|
||||
return baseBasketInfoMapper.deleteBaseBasketInfoByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
<?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.bgs.system.mapper.BaseBasketInfoMapper">
|
||||
|
||||
<resultMap type="BaseBasketInfo" id="BaseBasketInfoResult">
|
||||
<result property="objId" column="obj_id" />
|
||||
<result property="basketCode" column="basket_code" />
|
||||
<result property="basketEpc" column="basket_epc" />
|
||||
<result property="basketType" column="basket_type" />
|
||||
<result property="basketStatus" column="basket_status" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="createdBy" column="created_by" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updatedBy" column="updated_by" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseBasketInfoVo">
|
||||
select obj_id, basket_code, basket_epc, basket_type, basket_status, is_flag, created_by, created_time, updated_by, updated_time from base_basket_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseBasketInfoList" parameterType="BaseBasketInfo" resultMap="BaseBasketInfoResult">
|
||||
<include refid="selectBaseBasketInfoVo"/>
|
||||
<where>
|
||||
<if test="basketCode != null and basketCode != ''"> and basket_code = #{basketCode}</if>
|
||||
<if test="basketEpc != null and basketEpc != ''"> and basket_epc = #{basketEpc}</if>
|
||||
<if test="basketType != null "> and basket_type = #{basketType}</if>
|
||||
<if test="basketStatus != null "> and basket_status = #{basketStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBasketInfoByObjId" parameterType="Long" resultMap="BaseBasketInfoResult">
|
||||
<include refid="selectBaseBasketInfoVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseBasketInfo" parameterType="BaseBasketInfo" useGeneratedKeys="true" keyProperty="objId">
|
||||
insert into base_basket_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="basketCode != null">basket_code,</if>
|
||||
<if test="basketEpc != null">basket_epc,</if>
|
||||
<if test="basketType != null">basket_type,</if>
|
||||
<if test="basketStatus != null">basket_status,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="basketCode != null">#{basketCode},</if>
|
||||
<if test="basketEpc != null">#{basketEpc},</if>
|
||||
<if test="basketType != null">#{basketType},</if>
|
||||
<if test="basketStatus != null">#{basketStatus},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseBasketInfo" parameterType="BaseBasketInfo">
|
||||
update base_basket_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="basketCode != null">basket_code = #{basketCode},</if>
|
||||
<if test="basketEpc != null">basket_epc = #{basketEpc},</if>
|
||||
<if test="basketType != null">basket_type = #{basketType},</if>
|
||||
<if test="basketStatus != null">basket_status = #{basketStatus},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseBasketInfoByObjId" parameterType="Long">
|
||||
delete from base_basket_info where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseBasketInfoByObjIds" parameterType="String">
|
||||
delete from base_basket_info where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue