增加代表处
parent
27731323bc
commit
ee2cc9902f
|
@ -163,15 +163,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
<<<<<<< HEAD
|
|
||||||
//getData()
|
|
||||||
=======
|
|
||||||
// getData()
|
|
||||||
>>>>>>> bfc73591aee4f41371c35fd522c7c7124d57feb2
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getData() {
|
function getData() {
|
||||||
let serialNumber=$('#serialNumber').val()
|
let serialNumber=$('#serialNumber').val()
|
||||||
$.operate.get(`/manage/service/product?serialNumber=${serialNumber}`, function (res){
|
$.operate.get(`/manage/service/product?serialNumber=${serialNumber}`, function (res){
|
||||||
let str=`<tr><td colspan="5" style="text-align: center">暂无数据</td></tr>`
|
let str=`<tr><td colspan="5" style="text-align: center">暂无数据</td></tr>`
|
||||||
if(res.data.length){
|
if(res.data.length){
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!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-agent-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="agentCode" 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="agentName" 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" 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" 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" 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">
|
||||||
|
<input name="contactEmail" 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">
|
||||||
|
<textarea name="remark" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/agent"
|
||||||
|
$("#form-agent-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-agent-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,106 @@
|
||||||
|
<!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="agentCode"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>办公处名称:</label>
|
||||||
|
<input type="text" name="agentName"/>
|
||||||
|
</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:agent:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:agent:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:agent:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:agent: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:agent:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('system:agent:remove')}]];
|
||||||
|
var prefix = ctx + "system/agent";
|
||||||
|
|
||||||
|
$(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: 'agentCode',
|
||||||
|
title: '办事处编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'agentName',
|
||||||
|
title: '办公处名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'province',
|
||||||
|
title: '所在省'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'city',
|
||||||
|
title: '所在市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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,98 @@
|
||||||
|
<!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-agent-edit" th:object="${agentInfo}">
|
||||||
|
<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="agentCode" th:field="*{agentCode}" 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="agentName" th:field="*{agentName}" 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">
|
||||||
|
<input name="contactEmail" th:field="*{contactEmail}" 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">
|
||||||
|
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "system/agent";
|
||||||
|
$("#form-agent-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-agent-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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.AgentInfo;
|
||||||
|
import com.ruoyi.sip.service.IAgentInfoService;
|
||||||
|
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-05-13
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/system/agent")
|
||||||
|
public class AgentInfoController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "system/agent";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAgentInfoService agentInfoService;
|
||||||
|
|
||||||
|
@RequiresPermissions("system:agent:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String agent()
|
||||||
|
{
|
||||||
|
return prefix + "/agent";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办事处信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<AgentInfo> list = agentInfoService.selectAgentInfoList(agentInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出办事处信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:export")
|
||||||
|
@Log(title = "办事处信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
List<AgentInfo> list = agentInfoService.selectAgentInfoList(agentInfo);
|
||||||
|
ExcelUtil<AgentInfo> util = new ExcelUtil<AgentInfo>(AgentInfo.class);
|
||||||
|
return util.exportExcel(list, "办事处信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增办事处信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:add")
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存办事处信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:add")
|
||||||
|
@Log(title = "办事处信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
return toAjax(agentInfoService.insertAgentInfo(agentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改办事处信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
AgentInfo agentInfo = agentInfoService.selectAgentInfoById(id);
|
||||||
|
mmap.put("agentInfo", agentInfo);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存办事处信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:edit")
|
||||||
|
@Log(title = "办事处信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
return toAjax(agentInfoService.updateAgentInfo(agentInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除办事处信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:agent:remove")
|
||||||
|
@Log(title = "办事处信息", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(agentInfoService.deleteAgentInfoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,214 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办事处信息对象 agent_info
|
||||||
|
*
|
||||||
|
* @author mula
|
||||||
|
* @date 2025-05-13
|
||||||
|
*/
|
||||||
|
public class AgentInfo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键,自增 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 办事处编码 */
|
||||||
|
@Excel(name = "办事处编码")
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
/** 办公处名称 */
|
||||||
|
@Excel(name = "办公处名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
/** 所在省 */
|
||||||
|
@Excel(name = "所在省")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/** 所在市 */
|
||||||
|
@Excel(name = "所在市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/** 详细地址 */
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** 联系人 */
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/** 联系邮件 */
|
||||||
|
private String contactEmail;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@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 setAgentCode(String agentCode)
|
||||||
|
{
|
||||||
|
this.agentCode = agentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAgentCode()
|
||||||
|
{
|
||||||
|
return agentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAgentName(String agentName)
|
||||||
|
{
|
||||||
|
this.agentName = agentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAgentName()
|
||||||
|
{
|
||||||
|
return agentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 setContactEmail(String contactEmail)
|
||||||
|
{
|
||||||
|
this.contactEmail = contactEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactEmail()
|
||||||
|
{
|
||||||
|
return contactEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("agentCode", getAgentCode())
|
||||||
|
.append("agentName", getAgentName())
|
||||||
|
.append("province", getProvince())
|
||||||
|
.append("city", getCity())
|
||||||
|
.append("address", getAddress())
|
||||||
|
.append("contactPerson", getContactPerson())
|
||||||
|
.append("contactPhone", getContactPhone())
|
||||||
|
.append("contactEmail", getContactEmail())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.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.AgentInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办事处信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author mula
|
||||||
|
* @date 2025-05-13
|
||||||
|
*/
|
||||||
|
public interface AgentInfoMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询办事处信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 办事处信息
|
||||||
|
*/
|
||||||
|
public AgentInfo selectAgentInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办事处信息列表
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 办事处信息集合
|
||||||
|
*/
|
||||||
|
public List<AgentInfo> selectAgentInfoList(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAgentInfo(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAgentInfo(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除办事处信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAgentInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除办事处信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAgentInfoByIds(String[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.sip.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.AgentInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办事处信息Service接口
|
||||||
|
*
|
||||||
|
* @author mula
|
||||||
|
* @date 2025-05-13
|
||||||
|
*/
|
||||||
|
public interface IAgentInfoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询办事处信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 办事处信息
|
||||||
|
*/
|
||||||
|
public AgentInfo selectAgentInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办事处信息列表
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 办事处信息集合
|
||||||
|
*/
|
||||||
|
public List<AgentInfo> selectAgentInfoList(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAgentInfo(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAgentInfo(AgentInfo agentInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除办事处信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的办事处信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAgentInfoByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除办事处信息信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAgentInfoById(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.AgentInfoMapper;
|
||||||
|
import com.ruoyi.sip.domain.AgentInfo;
|
||||||
|
import com.ruoyi.sip.service.IAgentInfoService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办事处信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mula
|
||||||
|
* @date 2025-05-13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AgentInfoServiceImpl implements IAgentInfoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private AgentInfoMapper agentInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办事处信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 办事处信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AgentInfo selectAgentInfoById(Long id)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.selectAgentInfoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询办事处信息列表
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 办事处信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AgentInfo> selectAgentInfoList(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.selectAgentInfoList(agentInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertAgentInfo(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.insertAgentInfo(agentInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改办事处信息
|
||||||
|
*
|
||||||
|
* @param agentInfo 办事处信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateAgentInfo(AgentInfo agentInfo)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.updateAgentInfo(agentInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除办事处信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的办事处信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAgentInfoByIds(String ids)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.deleteAgentInfoByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除办事处信息信息
|
||||||
|
*
|
||||||
|
* @param id 办事处信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAgentInfoById(Long id)
|
||||||
|
{
|
||||||
|
return agentInfoMapper.deleteAgentInfoById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?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.AgentInfoMapper">
|
||||||
|
|
||||||
|
<resultMap type="AgentInfo" id="AgentInfoResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="agentCode" column="agent_code" />
|
||||||
|
<result property="agentName" column="agent_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="contactEmail" column="contact_email" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<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="selectAgentInfoVo">
|
||||||
|
select id, agent_code, agent_name, province, city, address, contact_person, contact_phone, contact_email, remark, create_at, update_at, delete_at, status from agent_info
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAgentInfoList" parameterType="AgentInfo" resultMap="AgentInfoResult">
|
||||||
|
<include refid="selectAgentInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="agentCode != null and agentCode != ''"> and agent_code = #{agentCode}</if>
|
||||||
|
<if test="agentName != null and agentName != ''"> and agent_name like concat('%', #{agentName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAgentInfoById" parameterType="Long" resultMap="AgentInfoResult">
|
||||||
|
<include refid="selectAgentInfoVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAgentInfo" parameterType="AgentInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into agent_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="agentCode != null and agentCode != ''">agent_code,</if>
|
||||||
|
<if test="agentName != null and agentName != ''">agent_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="contactEmail != null">contact_email,</if>
|
||||||
|
<if test="remark != null">remark,</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="agentCode != null and agentCode != ''">#{agentCode},</if>
|
||||||
|
<if test="agentName != null and agentName != ''">#{agentName},</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="contactEmail != null">#{contactEmail},</if>
|
||||||
|
<if test="remark != null">#{remark},</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="updateAgentInfo" parameterType="AgentInfo">
|
||||||
|
update agent_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="agentCode != null and agentCode != ''">agent_code = #{agentCode},</if>
|
||||||
|
<if test="agentName != null and agentName != ''">agent_name = #{agentName},</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="contactEmail != null">contact_email = #{contactEmail},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</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="deleteAgentInfoById" parameterType="Long">
|
||||||
|
delete from agent_info where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAgentInfoByIds" parameterType="String">
|
||||||
|
delete from agent_info where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue