供应商管理
parent
dc08bf9c7f
commit
27731323bc
|
@ -165,7 +165,7 @@
|
|||
});
|
||||
function openList(){
|
||||
var options = {
|
||||
title: "关联合同",
|
||||
title: "选择合同",
|
||||
url: prefix + '/selectOrder',
|
||||
skin: 'layui-layer-gray',
|
||||
maxmin: false,
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
<script>
|
||||
<script th:inline="javascript">
|
||||
var prefixOrder = ctx + "manage/order";
|
||||
$(function() {
|
||||
var options = {
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
<!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-partner-add">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">供应商编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partnerCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">供应商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partnerName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="element1" class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">省:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="province" class="province form-control m-b" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">市:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="city" class="city form-control m-b" data-first-title="选择市">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="address" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">联系人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPerson" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPhone" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">认证级别:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="level" class="form-control" th:with="type=${@dict.getType('identify_level')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/partner"
|
||||
$("#form-partner-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
var urlChina = '/demo/form/cityData';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province', 'city'],
|
||||
nodata: 'none'
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-partner-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,92 @@
|
|||
<!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-partner-edit" th:object="${partnerInfo}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">供应商编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partnerCode" th:field="*{partnerCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">供应商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="partnerName" th:field="*{partnerName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">省:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="province" th:field="*{province}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">市:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="city" th:field="*{city}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="address" th:field="*{address}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">联系人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPerson" th:field="*{contactPerson}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">认证级别:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="level" class="form-control" th:with="type=${@dict.getType('identify_level')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{level}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/partner";
|
||||
$("#form-partner-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-partner-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,133 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('供应商管理列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>供应商编码:</label>
|
||||
<input type="text" name="partnerCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>供应商名称:</label>
|
||||
<input type="text" name="partnerName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>认证级别:</label>
|
||||
<select name="level" th:with="type=${@dict.getType('identify_level')}">
|
||||
<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="system:partner:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:partner:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:partner:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:partner: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('system:partner:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:partner:remove')}]];
|
||||
var levelDatas = [[${@dict.getType('identify_level')}]];
|
||||
var prefix = ctx + "system/partner";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "供应商管理",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'partnerCode',
|
||||
title: '供应商编码'
|
||||
},
|
||||
{
|
||||
field: 'partnerName',
|
||||
title: '供应商名称'
|
||||
},
|
||||
{
|
||||
field: 'province',
|
||||
title: '省'
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '市'
|
||||
},
|
||||
{
|
||||
field: 'address',
|
||||
title: '详细地址'
|
||||
},
|
||||
{
|
||||
field: 'contactPerson',
|
||||
title: '联系人'
|
||||
},
|
||||
{
|
||||
field: 'contactPhone',
|
||||
title: '联系电话'
|
||||
},
|
||||
{
|
||||
field: 'level',
|
||||
title: '认证级别',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(levelDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createAt',
|
||||
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.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.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.sip.domain.PartnerInfo;
|
||||
import com.ruoyi.sip.service.IPartnerInfoService;
|
||||
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 mula
|
||||
* @date 2025-04-30
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/partner")
|
||||
public class PartnerInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "system/partner";
|
||||
|
||||
@Autowired
|
||||
private IPartnerInfoService partnerInfoService;
|
||||
|
||||
@RequiresPermissions("system:partner:view")
|
||||
@GetMapping()
|
||||
public String partner()
|
||||
{
|
||||
return prefix + "/partner";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:partner:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(PartnerInfo partnerInfo)
|
||||
{
|
||||
startPage();
|
||||
List<PartnerInfo> list = partnerInfoService.selectPartnerInfoList(partnerInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出供应商管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:partner:export")
|
||||
@Log(title = "供应商管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(PartnerInfo partnerInfo)
|
||||
{
|
||||
List<PartnerInfo> list = partnerInfoService.selectPartnerInfoList(partnerInfo);
|
||||
ExcelUtil<PartnerInfo> util = new ExcelUtil<PartnerInfo>(PartnerInfo.class);
|
||||
return util.exportExcel(list, "供应商管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商管理
|
||||
*/
|
||||
@RequiresPermissions("system:partner:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存供应商管理
|
||||
*/
|
||||
@RequiresPermissions("system:partner:add")
|
||||
@Log(title = "供应商管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(PartnerInfo partnerInfo)
|
||||
{
|
||||
return toAjax(partnerInfoService.insertPartnerInfo(partnerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商管理
|
||||
*/
|
||||
@RequiresPermissions("system:partner:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
PartnerInfo partnerInfo = partnerInfoService.selectPartnerInfoById(id);
|
||||
mmap.put("partnerInfo", partnerInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存供应商管理
|
||||
*/
|
||||
@RequiresPermissions("system:partner:edit")
|
||||
@Log(title = "供应商管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(PartnerInfo partnerInfo)
|
||||
{
|
||||
return toAjax(partnerInfoService.updatePartnerInfo(partnerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商管理
|
||||
*/
|
||||
@RequiresPermissions("system:partner:remove")
|
||||
@Log(title = "供应商管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(partnerInfoService.deletePartnerInfoByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,217 @@
|
|||
package com.ruoyi.sip.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.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供应商管理对象 partner_info
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-30
|
||||
*/
|
||||
public class PartnerInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String partnerCode;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String partnerName;
|
||||
|
||||
/** 省 */
|
||||
@Excel(name = "省")
|
||||
private String province;
|
||||
|
||||
/** 市 */
|
||||
@Excel(name = "市")
|
||||
private String city;
|
||||
|
||||
/** 详细地址 */
|
||||
@Excel(name = "详细地址")
|
||||
private String address;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
/** 联系电话 */
|
||||
@Excel(name = "联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
/** 认证级别 */
|
||||
@Excel(name = "认证级别")
|
||||
private String level;
|
||||
|
||||
/** */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createAt;
|
||||
|
||||
/** */
|
||||
private Date updateAt;
|
||||
|
||||
/** */
|
||||
private Date deleteAt;
|
||||
|
||||
/** */
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setPartnerCode(String partnerCode)
|
||||
{
|
||||
this.partnerCode = partnerCode;
|
||||
}
|
||||
|
||||
public String getPartnerCode()
|
||||
{
|
||||
return partnerCode;
|
||||
}
|
||||
|
||||
public void setPartnerName(String partnerName)
|
||||
{
|
||||
this.partnerName = partnerName;
|
||||
}
|
||||
|
||||
public String getPartnerName()
|
||||
{
|
||||
return partnerName;
|
||||
}
|
||||
|
||||
public void setProvince(String province)
|
||||
{
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvince()
|
||||
{
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setCity(String city)
|
||||
{
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCity()
|
||||
{
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson)
|
||||
{
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getContactPerson()
|
||||
{
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone)
|
||||
{
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone()
|
||||
{
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setLevel(String level)
|
||||
{
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getLevel()
|
||||
{
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setCreateAt(Date createAt)
|
||||
{
|
||||
this.createAt = createAt;
|
||||
}
|
||||
|
||||
public Date getCreateAt()
|
||||
{
|
||||
return createAt;
|
||||
}
|
||||
|
||||
public void setUpdateAt(Date updateAt)
|
||||
{
|
||||
this.updateAt = updateAt;
|
||||
}
|
||||
|
||||
public Date getUpdateAt()
|
||||
{
|
||||
return updateAt;
|
||||
}
|
||||
|
||||
public void setDeleteAt(Date deleteAt)
|
||||
{
|
||||
this.deleteAt = deleteAt;
|
||||
}
|
||||
|
||||
public Date getDeleteAt()
|
||||
{
|
||||
return deleteAt;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("partnerCode", getPartnerCode())
|
||||
.append("partnerName", getPartnerName())
|
||||
.append("province", getProvince())
|
||||
.append("city", getCity())
|
||||
.append("address", getAddress())
|
||||
.append("contactPerson", getContactPerson())
|
||||
.append("contactPhone", getContactPhone())
|
||||
.append("level", getLevel())
|
||||
.append("createAt", getCreateAt())
|
||||
.append("updateAt", getUpdateAt())
|
||||
.append("deleteAt", getDeleteAt())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.PartnerInfo;
|
||||
|
||||
/**
|
||||
* 供应商管理Mapper接口
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-30
|
||||
*/
|
||||
public interface PartnerInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询供应商管理
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 供应商管理
|
||||
*/
|
||||
public PartnerInfo selectPartnerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商管理列表
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 供应商管理集合
|
||||
*/
|
||||
public List<PartnerInfo> selectPartnerInfoList(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 新增供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPartnerInfo(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 修改供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePartnerInfo(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 删除供应商管理
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePartnerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePartnerInfoByIds(String[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.PartnerInfo;
|
||||
|
||||
/**
|
||||
* 供应商管理Service接口
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-30
|
||||
*/
|
||||
public interface IPartnerInfoService
|
||||
{
|
||||
/**
|
||||
* 查询供应商管理
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 供应商管理
|
||||
*/
|
||||
public PartnerInfo selectPartnerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商管理列表
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 供应商管理集合
|
||||
*/
|
||||
public List<PartnerInfo> selectPartnerInfoList(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 新增供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPartnerInfo(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 修改供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePartnerInfo(PartnerInfo partnerInfo);
|
||||
|
||||
/**
|
||||
* 批量删除供应商管理
|
||||
*
|
||||
* @param ids 需要删除的供应商管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePartnerInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除供应商管理信息
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePartnerInfoById(Long id);
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sip.mapper.PartnerInfoMapper;
|
||||
import com.ruoyi.sip.domain.PartnerInfo;
|
||||
import com.ruoyi.sip.service.IPartnerInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 供应商管理Service业务层处理
|
||||
*
|
||||
* @author mula
|
||||
* @date 2025-04-30
|
||||
*/
|
||||
@Service
|
||||
public class PartnerInfoServiceImpl implements IPartnerInfoService
|
||||
{
|
||||
@Autowired
|
||||
private PartnerInfoMapper partnerInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询供应商管理
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 供应商管理
|
||||
*/
|
||||
@Override
|
||||
public PartnerInfo selectPartnerInfoById(Long id)
|
||||
{
|
||||
return partnerInfoMapper.selectPartnerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商管理列表
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 供应商管理
|
||||
*/
|
||||
@Override
|
||||
public List<PartnerInfo> selectPartnerInfoList(PartnerInfo partnerInfo)
|
||||
{
|
||||
return partnerInfoMapper.selectPartnerInfoList(partnerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPartnerInfo(PartnerInfo partnerInfo)
|
||||
{
|
||||
return partnerInfoMapper.insertPartnerInfo(partnerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商管理
|
||||
*
|
||||
* @param partnerInfo 供应商管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePartnerInfo(PartnerInfo partnerInfo)
|
||||
{
|
||||
return partnerInfoMapper.updatePartnerInfo(partnerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应商管理
|
||||
*
|
||||
* @param ids 需要删除的供应商管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePartnerInfoByIds(String ids)
|
||||
{
|
||||
return partnerInfoMapper.deletePartnerInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商管理信息
|
||||
*
|
||||
* @param id 供应商管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePartnerInfoById(Long id)
|
||||
{
|
||||
return partnerInfoMapper.deletePartnerInfoById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?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.sip.mapper.PartnerInfoMapper">
|
||||
|
||||
<resultMap type="PartnerInfo" id="PartnerInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="partnerCode" column="partner_code" />
|
||||
<result property="partnerName" column="partner_name" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="address" column="address" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactPhone" column="contact_phone" />
|
||||
<result property="level" column="level" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="updateAt" column="update_at" />
|
||||
<result property="deleteAt" column="delete_at" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPartnerInfoVo">
|
||||
select id, partner_code, partner_name, province, city, address, contact_person, contact_phone, level, create_at, update_at, delete_at, status from partner_info
|
||||
</sql>
|
||||
|
||||
<select id="selectPartnerInfoList" parameterType="PartnerInfo" resultMap="PartnerInfoResult">
|
||||
<include refid="selectPartnerInfoVo"/>
|
||||
<where>
|
||||
<if test="partnerCode != null and partnerCode != ''"> and partner_code = #{partnerCode}</if>
|
||||
<if test="partnerName != null and partnerName != ''"> and partner_name like concat('%', #{partnerName}, '%')</if>
|
||||
<if test="level != null and level != ''"> and level = #{level}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPartnerInfoById" parameterType="Long" resultMap="PartnerInfoResult">
|
||||
<include refid="selectPartnerInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPartnerInfo" parameterType="PartnerInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into partner_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="partnerCode != null and partnerCode != ''">partner_code,</if>
|
||||
<if test="partnerName != null and partnerName != ''">partner_name,</if>
|
||||
<if test="province != null">province,</if>
|
||||
<if test="city != null">city,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="contactPerson != null">contact_person,</if>
|
||||
<if test="contactPhone != null">contact_phone,</if>
|
||||
<if test="level != null">level,</if>
|
||||
<if test="createAt != null">create_at,</if>
|
||||
<if test="updateAt != null">update_at,</if>
|
||||
<if test="deleteAt != null">delete_at,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="partnerCode != null and partnerCode != ''">#{partnerCode},</if>
|
||||
<if test="partnerName != null and partnerName != ''">#{partnerName},</if>
|
||||
<if test="province != null">#{province},</if>
|
||||
<if test="city != null">#{city},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="contactPerson != null">#{contactPerson},</if>
|
||||
<if test="contactPhone != null">#{contactPhone},</if>
|
||||
<if test="level != null">#{level},</if>
|
||||
<if test="createAt != null">#{createAt},</if>
|
||||
<if test="updateAt != null">#{updateAt},</if>
|
||||
<if test="deleteAt != null">#{deleteAt},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePartnerInfo" parameterType="PartnerInfo">
|
||||
update partner_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="partnerCode != null and partnerCode != ''">partner_code = #{partnerCode},</if>
|
||||
<if test="partnerName != null and partnerName != ''">partner_name = #{partnerName},</if>
|
||||
<if test="province != null">province = #{province},</if>
|
||||
<if test="city != null">city = #{city},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||
<if test="level != null">level = #{level},</if>
|
||||
<if test="createAt != null">create_at = #{createAt},</if>
|
||||
<if test="updateAt != null">update_at = #{updateAt},</if>
|
||||
<if test="deleteAt != null">delete_at = #{deleteAt},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePartnerInfoById" parameterType="Long">
|
||||
delete from partner_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePartnerInfoByIds" parameterType="String">
|
||||
delete from partner_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue