FIRSTCOMMIT

master
20918 1 year ago
parent d15be6ec48
commit 601ca7cdea

@ -183,6 +183,13 @@
<version>${ruoyi.version}</version> <version>${ruoyi.version}</version>
</dependency> </dependency>
<!-- mybatisplus-->
<!-- <dependency>-->
<!-- <groupId>com.baomidou</groupId>-->
<!-- <artifactId>mybatis-plus-boot-starter</artifactId>-->
<!-- <version>3.5.4</version>-->
<!-- </dependency>-->
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

@ -0,0 +1,127 @@
package com.ruoyi.web.controller.system;
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.system.domain.TdIndenture;
import com.ruoyi.system.service.ITdIndentureService;
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 ruoyi
* @date 2024-04-08
*/
@Controller
@RequestMapping("/system/indenture")
public class TdIndentureController extends BaseController
{
private String prefix = "system/indenture";
@Autowired
private ITdIndentureService tdIndentureService;
@RequiresPermissions("system:indenture:view")
@GetMapping()
public String indenture()
{
return prefix + "/indenture";
}
/**
*
*/
@RequiresPermissions("system:indenture:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdIndenture tdIndenture)
{
startPage();
List<TdIndenture> list = tdIndentureService.selectTdIndentureList(tdIndenture);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:indenture:export")
@Log(title = "维修商", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdIndenture tdIndenture)
{
List<TdIndenture> list = tdIndentureService.selectTdIndentureList(tdIndenture);
ExcelUtil<TdIndenture> util = new ExcelUtil<TdIndenture>(TdIndenture.class);
return util.exportExcel(list, "维修商数据");
}
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:indenture:add")
@Log(title = "维修商", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdIndenture tdIndenture)
{
return toAjax(tdIndentureService.insertTdIndenture(tdIndenture));
}
/**
*
*/
@RequiresPermissions("system:indenture:edit")
@GetMapping("/edit/{indentureId}")
public String edit(@PathVariable("indentureId") String indentureId, ModelMap mmap)
{
TdIndenture tdIndenture = tdIndentureService.selectTdIndentureByIndentureId(indentureId);
mmap.put("tdIndenture", tdIndenture);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:indenture:edit")
@Log(title = "维修商", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdIndenture tdIndenture)
{
return toAjax(tdIndentureService.updateTdIndenture(tdIndenture));
}
/**
*
*/
@RequiresPermissions("system:indenture:remove")
@Log(title = "维修商", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdIndentureService.deleteTdIndentureByIndentureIds(ids));
}
}

@ -0,0 +1,127 @@
package com.ruoyi.web.controller.system;
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.system.domain.TdQuestion;
import com.ruoyi.system.service.ITdQuestionService;
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 admin
* @date 2024-04-07
*/
@Controller
@RequestMapping("/system/question")
public class TdQuestionController extends BaseController
{
private String prefix = "system/question";
@Autowired
private ITdQuestionService tdQuestionService;
@RequiresPermissions("system:question:view")
@GetMapping()
public String question()
{
return prefix + "/question";
}
/**
*
*/
@RequiresPermissions("system:question:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdQuestion tdQuestion)
{
startPage();
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:question:export")
@Log(title = "题库管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdQuestion tdQuestion)
{
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
ExcelUtil<TdQuestion> util = new ExcelUtil<TdQuestion>(TdQuestion.class);
return util.exportExcel(list, "题库管理数据");
}
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:question:add")
@Log(title = "题库管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdQuestion tdQuestion)
{
return toAjax(tdQuestionService.insertTdQuestion(tdQuestion));
}
/**
*
*/
@RequiresPermissions("system:question:edit")
@GetMapping("/edit/{ID}")
public String edit(@PathVariable("ID") Long ID, ModelMap mmap)
{
TdQuestion tdQuestion = tdQuestionService.selectTdQuestionByID(ID);
mmap.put("tdQuestion", tdQuestion);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:question:edit")
@Log(title = "题库管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdQuestion tdQuestion)
{
return toAjax(tdQuestionService.updateTdQuestion(tdQuestion));
}
/**
*
*/
@RequiresPermissions("system:question:remove")
@Log(title = "题库管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdQuestionService.deleteTdQuestionByIDs(ids));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 556 KiB

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<title>若依系统首页</title> <title>保密业务辅助管理系统首页</title>
<!-- 避免IE使用兼容模式 --> <!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link th:href="@{favicon.ico}" rel="shortcut icon"/> <link th:href="@{favicon.ico}" rel="shortcut icon"/>
@ -27,7 +27,7 @@
</div> </div>
<a th:href="@{/index}"> <a th:href="@{/index}">
<li class="logo hidden-xs"> <li class="logo hidden-xs">
<span class="logo-lg">RuoYi</span> <span class="logo-lg">保密业务辅助管理系统</span>
</li> </li>
</a> </a>
<div class="sidebar-collapse tab-content" id="side-menu"> <div class="sidebar-collapse tab-content" id="side-menu">

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<title>若依系统首页</title> <title>保密业务辅助管理系统首页</title>
<!-- 避免IE使用兼容模式 --> <!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link th:href="@{favicon.ico}" rel="shortcut icon"/> <link th:href="@{favicon.ico}" rel="shortcut icon"/>
@ -26,7 +26,7 @@
</div> </div>
<a th:href="@{/index}"> <a th:href="@{/index}">
<li class="logo hidden-xs"> <li class="logo hidden-xs">
<span class="logo-lg">RuoYi</span> <span class="logo-lg">保密业务辅助管理系统</span>
</li> </li>
</a> </a>
<div class="sidebar-collapse"> <div class="sidebar-collapse">
@ -72,7 +72,7 @@
</ul> </ul>
</li> </li>
<li th:if="${demoEnabled}"> <li th:if="${demoEnabled}">
<a href="#"><i class="fa fa-desktop"></i><span class="nav-label">实例演示</span><span class="fa arrow"></span></a> /* <!-- <a href="#"><i class="fa fa-desktop"></i><span class="nav-label">实例演示</span><span class="fa arrow"></span></a> -->
<ul class="nav nav-second-level collapse"> <ul class="nav nav-second-level collapse">
<li> <a>表单<span class="fa arrow"></span></a> <li> <a>表单<span class="fa arrow"></span></a>
<ul class="nav nav-third-level"> <ul class="nav nav-third-level">

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>登录若依系统</title> <title>登录保密业务辅助管理系统系统</title>
<meta name="description" content="若依后台管理框架"> <meta name="description" content="若依后台管理框架">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/> <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
@ -26,16 +26,11 @@
<div class="col-sm-7"> <div class="col-sm-7">
<div class="signin-info"> <div class="signin-info">
<div class="logopanel m-b"> <div class="logopanel m-b">
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1> <h1> 保密业务辅助管理系统 </h1>
</div> </div>
<div class="m-b"></div> <div class="m-b"></div>
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
<ul class="m-b"> <ul class="m-b">
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
</ul> </ul>
<strong th:if="${isAllowRegister}">还没有账号? <a th:href="@{/register}">立即注册&raquo;</a></strong> <strong th:if="${isAllowRegister}">还没有账号? <a th:href="@{/register}">立即注册&raquo;</a></strong>
</div> </div>
@ -43,7 +38,7 @@
<div class="col-sm-5"> <div class="col-sm-5">
<form id="signupForm" autocomplete="off"> <form id="signupForm" autocomplete="off">
<h4 class="no-margins">登录:</h4> <h4 class="no-margins">登录:</h4>
<p class="m-t-md">你若不离不弃,我必生死相依</p> <p class="m-t-md"> </p>
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" /> <input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" />
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" /> <input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
<div class="row m-t" th:if="${captchaEnabled==true}"> <div class="row m-t" th:if="${captchaEnabled==true}">
@ -64,8 +59,8 @@
</div> </div>
</div> </div>
<div class="signup-footer"> <div class="signup-footer">
<div class="pull-left"> <div class="pull-right">
Copyright © 2018-2023 ruoyi.vip All Rights Reserved. <br> Copyright © 2024 zky.vip All Rights Reserved. <br>
</div> </div>
</div> </div>
</div> </div>

@ -0,0 +1,104 @@
<!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-indenture-add">
<div class="form-group">
<label class="col-sm-3 control-label">维修商名称:</label>
<div class="col-sm-8">
<input name="indentureName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商地址:</label>
<div class="col-sm-8">
<input name="indentureAddress" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商座机:</label>
<div class="col-sm-8">
<input name="indenturePhone" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商手机:</label>
<div class="col-sm-8">
<input name="indentureMobile" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
<input name="indentureLinkman" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="linkmanPhone" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人手机:</label>
<div class="col-sm-8">
<input name="linkmanMobile" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商状态:</label>
<div class="col-sm-8">
<select name="indentureState" class="form-control m-b" th:with="type=${@dict.getType('sys_normal_disable')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="REMARK" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建人:</label>
<div class="col-sm-8">
<input name="createStaffid" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="createDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</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 + "system/indenture"
$("#form-indenture-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-indenture-add').serialize());
}
}
$("input[name='createDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,105 @@
<!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-indenture-edit" th:object="${tdIndenture}">
<input name="indentureId" th:field="*{indentureId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">维修商名称:</label>
<div class="col-sm-8">
<input name="indentureName" th:field="*{indentureName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商地址:</label>
<div class="col-sm-8">
<input name="indentureAddress" th:field="*{indentureAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商座机:</label>
<div class="col-sm-8">
<input name="indenturePhone" th:field="*{indenturePhone}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商手机:</label>
<div class="col-sm-8">
<input name="indentureMobile" th:field="*{indentureMobile}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
<input name="indentureLinkman" th:field="*{indentureLinkman}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="linkmanPhone" th:field="*{linkmanPhone}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人手机:</label>
<div class="col-sm-8">
<input name="linkmanMobile" th:field="*{linkmanMobile}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">维修商状态:</label>
<div class="col-sm-8">
<select name="indentureState" class="form-control m-b" th:with="type=${@dict.getType('sys_normal_disable')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{indentureState}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="REMARK" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建人:</label>
<div class="col-sm-8">
<input name="createStaffid" th:field="*{createStaffid}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="createDate" th:value="${#dates.format(tdIndenture.createDate, '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>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/indenture";
$("#form-indenture-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-indenture-edit').serialize());
}
}
$("input[name='createDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,145 @@
<!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="indentureName"/>
</li>
<li>
<label>维修商地址:</label>
<input type="text" name="indentureAddress"/>
</li>
<li>
<label>维修商状态:</label>
<select name="indentureState" th:with="type=${@dict.getType('sys_normal_disable')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>创建时间:</label>
<input type="text" class="time-input" placeholder="请选择创建时间" name="createDate"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:indenture:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:indenture:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:indenture:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:indenture: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:indenture:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:indenture:remove')}]];
var indentureStateDatas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/indenture";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "维修商",
columns: [{
checkbox: true
},
{
field: 'indentureId',
title: '维修商id',
visible: false
},
{
field: 'indentureName',
title: '维修商名称'
},
{
field: 'indentureAddress',
title: '维修商地址'
},
{
field: 'indenturePhone',
title: '维修商座机'
},
{
field: 'indentureMobile',
title: '维修商手机'
},
{
field: 'indentureLinkman',
title: '联系人'
},
{
field: 'linkmanPhone',
title: '联系人电话'
},
{
field: 'linkmanMobile',
title: '联系人手机'
},
{
field: 'indentureState',
title: '维修商状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(indentureStateDatas, value);
}
},
{
field: 'remark',
title: '备注'
},
{
field: 'createStaffid',
title: '创建人'
},
{
field: 'createDate',
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.indentureId+ '\')"><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.indentureId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</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('新增题库管理')" />
<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-question-add">
<div class="form-group">
<label class="col-sm-3 control-label">题库类型:</label>
<div class="col-sm-8">
<select name="TYPEID" class="form-control m-b" th:with="type=${@dict.getType('td_question_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">问题描述:</label>
<div class="col-sm-8">
<input name="qSubject" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项A</label>
<div class="col-sm-8">
<input name="OPTIONA" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项B</label>
<div class="col-sm-8">
<input name="OPTIONB" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项C</label>
<div class="col-sm-8">
<input name="OPTIONC" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项D</label>
<div class="col-sm-8">
<input name="OPTIOND" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">答案:</label>
<div class="col-sm-8">
<input name="NOTE" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建人:</label>
<div class="col-sm-8">
<input name="CREATEPERSON" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="CREATEDATE" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"> <i class="fa fa-calendar"></i></span>
</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 + "system/question"
$("#form-question-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-question-add').serialize());
}
}
$("input[name='CREATEDATE']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,93 @@
<!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-question-edit" th:object="${tdQuestion}">
<input name="ID" th:field="*{ID}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">题库类型:</label>
<div class="col-sm-8">
<select name="TYPEID" class="form-control m-b" th:with="type=${@dict.getType('td_question_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{TYPEID}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">问题描述:</label>
<div class="col-sm-8">
<input name="qSubject" th:field="*{qSubject}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项A</label>
<div class="col-sm-8">
<input name="OPTIONA" th:field="*{OPTIONA}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项B</label>
<div class="col-sm-8">
<input name="OPTIONB" th:field="*{OPTIONB}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项C</label>
<div class="col-sm-8">
<input name="OPTIONC" th:field="*{OPTIONC}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">选项D</label>
<div class="col-sm-8">
<input name="OPTIOND" th:field="*{OPTIOND}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">答案:</label>
<div class="col-sm-8">
<input name="NOTE" th:field="*{NOTE}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建人:</label>
<div class="col-sm-8">
<input name="CREATEPERSON" th:field="*{CREATEPERSON}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="CREATEDATE" th:value="${#dates.format(tdQuestion.CREATEDATE, '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>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/question";
$("#form-question-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-question-edit').serialize());
}
}
$("input[name='CREATEDATE']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('题库管理列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>题库类型:</label>
<select name="TYPEID" th:with="type=${@dict.getType('td_question_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>问题描述:</label>
<input type="text" name="qSubject"/>
</li>
<li>
<label>创建人:</label>
<input type="text" name="CREATEPERSON"/>
</li>
<li>
<label>创建时间:</label>
<input type="text" class="time-input" placeholder="请选择创建时间" name="CREATEDATE"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:question:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:question:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:question:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:question: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">
debugger;
var editFlag = [[${@permission.hasPermi('system:question:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:question:remove')}]];
var TYPEIDDatas = [[${@dict.getType('td_question_type')}]];
var prefix = ctx + "system/question";
$(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: 'typeid',
title: '题库类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(TYPEIDDatas, value);
}
},
{
field: 'qSubject',
title: '问题描述'
},
{
field: 'optiona',
title: '选项A'
},
{
field: 'optionb',
title: '选项B'
},
{
field: 'optionc',
title: '选项C'
},
{
field: 'optiond',
title: '选项D'
},
{
field: 'note',
title: '答案'
},
{
field: 'createperson',
title: '创建人'
},
{
field: 'CREATEDATE',
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,196 @@
package com.ruoyi.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.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* td_indenture
*
* @author ruoyi
* @date 2024-04-08
*/
public class TdIndenture extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 维修商id */
private Long indentureId;
/** 维修商名称 */
@Excel(name = "维修商名称")
private String indentureName;
/** 维修商地址 */
@Excel(name = "维修商地址")
private String indentureAddress;
/** 维修商座机 */
@Excel(name = "维修商座机")
private String indenturePhone;
/** 维修商手机 */
@Excel(name = "维修商手机")
private String indentureMobile;
/** 联系人 */
@Excel(name = "联系人")
private String indentureLinkman;
/** 联系人电话 */
@Excel(name = "联系人电话")
private String linkmanPhone;
/** 联系人手机 */
@Excel(name = "联系人手机")
private String linkmanMobile;
/** 维修商状态 */
@Excel(name = "维修商状态")
private String indentureState;
/** 备注*/
@Excel(name = "备注")
private String REMARK;
@Override
public String getRemark() {
return REMARK;
}
@Override
public void setRemark(String remark) {
this.REMARK = remark;
}
/** 创建人 */
@Excel(name = "创建人")
private String createStaffid;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate;
public void setIndentureId(Long indentureId)
{
this.indentureId = indentureId;
}
public Long getIndentureId()
{
return indentureId;
}
public void setIndentureName(String indentureName)
{
this.indentureName = indentureName;
}
public String getIndentureName()
{
return indentureName;
}
public void setIndentureAddress(String indentureAddress)
{
this.indentureAddress = indentureAddress;
}
public String getIndentureAddress()
{
return indentureAddress;
}
public void setIndenturePhone(String indenturePhone)
{
this.indenturePhone = indenturePhone;
}
public String getIndenturePhone()
{
return indenturePhone;
}
public void setIndentureMobile(String indentureMobile)
{
this.indentureMobile = indentureMobile;
}
public String getIndentureMobile()
{
return indentureMobile;
}
public void setIndentureLinkman(String indentureLinkman)
{
this.indentureLinkman = indentureLinkman;
}
public String getIndentureLinkman()
{
return indentureLinkman;
}
public void setLinkmanPhone(String linkmanPhone)
{
this.linkmanPhone = linkmanPhone;
}
public String getLinkmanPhone()
{
return linkmanPhone;
}
public void setLinkmanMobile(String linkmanMobile)
{
this.linkmanMobile = linkmanMobile;
}
public String getLinkmanMobile()
{
return linkmanMobile;
}
public void setIndentureState(String indentureState)
{
this.indentureState = indentureState;
}
public String getIndentureState()
{
return indentureState;
}
public void setCreateStaffid(String createStaffid)
{
this.createStaffid = createStaffid;
}
public String getCreateStaffid()
{
return createStaffid;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("indentureId", getIndentureId())
.append("indentureName", getIndentureName())
.append("indentureAddress", getIndentureAddress())
.append("indenturePhone", getIndenturePhone())
.append("indentureMobile", getIndentureMobile())
.append("indentureLinkman", getIndentureLinkman())
.append("linkmanPhone", getLinkmanPhone())
.append("linkmanMobile", getLinkmanMobile())
.append("indentureState", getIndentureState())
.append("REMARK", getRemark())
.append("createStaffid", getCreateStaffid())
.append("createDate", getCreateDate())
.toString();
}
}

@ -0,0 +1,166 @@
package com.ruoyi.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.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* td_question
*
* @author admin
* @date 2024-04-07
*/
public class TdQuestion extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private Long ID;
/** 题库类型 */
@Excel(name = "题库类型")
private Long TYPEID;
/** 问题描述 */
@Excel(name = "问题描述")
private String qSubject;
/** 选项A */
@Excel(name = "选项A")
private String OPTIONA;
/** 选项B */
@Excel(name = "选项B")
private String OPTIONB;
/** 选项C */
@Excel(name = "选项C")
private String OPTIONC;
/** 选项D */
@Excel(name = "选项D")
private String OPTIOND;
/** 答案 */
@Excel(name = "答案")
private String NOTE;
/** 创建人 */
@Excel(name = "创建人")
private String CREATEPERSON;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date CREATEDATE;
public void setID(Long ID)
{
this.ID = ID;
}
public Long getID()
{
return ID;
}
public void setTYPEID(Long TYPEID)
{
this.TYPEID = TYPEID;
}
public Long getTYPEID()
{
return TYPEID;
}
public void setqSubject(String qSubject)
{
this.qSubject = qSubject;
}
public String getqSubject()
{
return qSubject;
}
public void setOPTIONA(String OPTIONA)
{
this.OPTIONA = OPTIONA;
}
public String getOPTIONA()
{
return OPTIONA;
}
public void setOPTIONB(String OPTIONB)
{
this.OPTIONB = OPTIONB;
}
public String getOPTIONB()
{
return OPTIONB;
}
public void setOPTIONC(String OPTIONC)
{
this.OPTIONC = OPTIONC;
}
public String getOPTIONC()
{
return OPTIONC;
}
public void setOPTIOND(String OPTIOND)
{
this.OPTIOND = OPTIOND;
}
public String getOPTIOND()
{
return OPTIOND;
}
public void setNOTE(String NOTE)
{
this.NOTE = NOTE;
}
public String getNOTE()
{
return NOTE;
}
public void setCREATEPERSON(String CREATEPERSON)
{
this.CREATEPERSON = CREATEPERSON;
}
public String getCREATEPERSON()
{
return CREATEPERSON;
}
public void setCREATEDATE(Date CREATEDATE)
{
this.CREATEDATE = CREATEDATE;
}
public Date getCREATEDATE()
{
return CREATEDATE;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("ID", getID())
.append("TYPEID", getTYPEID())
.append("qSubject", getqSubject())
.append("OPTIONA", getOPTIONA())
.append("OPTIONB", getOPTIONB())
.append("OPTIONC", getOPTIONC())
.append("OPTIOND", getOPTIOND())
.append("NOTE", getNOTE())
.append("CREATEPERSON", getCREATEPERSON())
.append("CREATEDATE", getCREATEDATE())
.toString();
}
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TdIndenture;
/**
* Mapper
*
* @author ruoyi
* @date 2024-04-08
*/
public interface TdIndentureMapper
{
/**
*
*
* @param indentureId
* @return
*/
public TdIndenture selectTdIndentureByIndentureId(String indentureId);
/**
*
*
* @param tdIndenture
* @return
*/
public List<TdIndenture> selectTdIndentureList(TdIndenture tdIndenture);
/**
*
*
* @param tdIndenture
* @return
*/
public int insertTdIndenture(TdIndenture tdIndenture);
/**
*
*
* @param tdIndenture
* @return
*/
public int updateTdIndenture(TdIndenture tdIndenture);
/**
*
*
* @param indentureId
* @return
*/
public int deleteTdIndentureByIndentureId(String indentureId);
/**
*
*
* @param indentureIds
* @return
*/
public int deleteTdIndentureByIndentureIds(String[] indentureIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TdQuestion;
/**
* Mapper
*
* @author admin
* @date 2024-04-07
*/
public interface TdQuestionMapper
{
/**
*
*
* @param ID
* @return
*/
public TdQuestion selectTdQuestionByID(Long ID);
/**
*
*
* @param tdQuestion
* @return
*/
public List<TdQuestion> selectTdQuestionList(TdQuestion tdQuestion);
/**
*
*
* @param tdQuestion
* @return
*/
public int insertTdQuestion(TdQuestion tdQuestion);
/**
*
*
* @param tdQuestion
* @return
*/
public int updateTdQuestion(TdQuestion tdQuestion);
/**
*
*
* @param ID
* @return
*/
public int deleteTdQuestionByID(Long ID);
/**
*
*
* @param IDs
* @return
*/
public int deleteTdQuestionByIDs(String[] IDs);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TdIndenture;
/**
* Service
*
* @author ruoyi
* @date 2024-04-08
*/
public interface ITdIndentureService
{
/**
*
*
* @param indentureId
* @return
*/
public TdIndenture selectTdIndentureByIndentureId(String indentureId);
/**
*
*
* @param tdIndenture
* @return
*/
public List<TdIndenture> selectTdIndentureList(TdIndenture tdIndenture);
/**
*
*
* @param tdIndenture
* @return
*/
public int insertTdIndenture(TdIndenture tdIndenture);
/**
*
*
* @param tdIndenture
* @return
*/
public int updateTdIndenture(TdIndenture tdIndenture);
/**
*
*
* @param indentureIds
* @return
*/
public int deleteTdIndentureByIndentureIds(String indentureIds);
/**
*
*
* @param indentureId
* @return
*/
public int deleteTdIndentureByIndentureId(String indentureId);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TdQuestion;
/**
* Service
*
* @author admin
* @date 2024-04-07
*/
public interface ITdQuestionService
{
/**
*
*
* @param ID
* @return
*/
public TdQuestion selectTdQuestionByID(Long ID);
/**
*
*
* @param tdQuestion
* @return
*/
public List<TdQuestion> selectTdQuestionList(TdQuestion tdQuestion);
/**
*
*
* @param tdQuestion
* @return
*/
public int insertTdQuestion(TdQuestion tdQuestion);
/**
*
*
* @param tdQuestion
* @return
*/
public int updateTdQuestion(TdQuestion tdQuestion);
/**
*
*
* @param IDs
* @return
*/
public int deleteTdQuestionByIDs(String IDs);
/**
*
*
* @param ID
* @return
*/
public int deleteTdQuestionByID(Long ID);
}

@ -0,0 +1,94 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdIndentureMapper;
import com.ruoyi.system.domain.TdIndenture;
import com.ruoyi.system.service.ITdIndentureService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author ruoyi
* @date 2024-04-08
*/
@Service
public class TdIndentureServiceImpl implements ITdIndentureService
{
@Autowired
private TdIndentureMapper tdIndentureMapper;
/**
*
*
* @param indentureId
* @return
*/
@Override
public TdIndenture selectTdIndentureByIndentureId(String indentureId)
{
return tdIndentureMapper.selectTdIndentureByIndentureId(indentureId);
}
/**
*
*
* @param tdIndenture
* @return
*/
@Override
public List<TdIndenture> selectTdIndentureList(TdIndenture tdIndenture)
{
return tdIndentureMapper.selectTdIndentureList(tdIndenture);
}
/**
*
*
* @param tdIndenture
* @return
*/
@Override
public int insertTdIndenture(TdIndenture tdIndenture)
{
return tdIndentureMapper.insertTdIndenture(tdIndenture);
}
/**
*
*
* @param tdIndenture
* @return
*/
@Override
public int updateTdIndenture(TdIndenture tdIndenture)
{
return tdIndentureMapper.updateTdIndenture(tdIndenture);
}
/**
*
*
* @param indentureIds
* @return
*/
@Override
public int deleteTdIndentureByIndentureIds(String indentureIds)
{
return tdIndentureMapper.deleteTdIndentureByIndentureIds(Convert.toStrArray(indentureIds));
}
/**
*
*
* @param indentureId
* @return
*/
@Override
public int deleteTdIndentureByIndentureId(String indentureId)
{
return tdIndentureMapper.deleteTdIndentureByIndentureId(indentureId);
}
}

@ -0,0 +1,94 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdQuestionMapper;
import com.ruoyi.system.domain.TdQuestion;
import com.ruoyi.system.service.ITdQuestionService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author admin
* @date 2024-04-07
*/
@Service
public class TdQuestionServiceImpl implements ITdQuestionService
{
@Autowired
private TdQuestionMapper tdQuestionMapper;
/**
*
*
* @param ID
* @return
*/
@Override
public TdQuestion selectTdQuestionByID(Long ID)
{
return tdQuestionMapper.selectTdQuestionByID(ID);
}
/**
*
*
* @param tdQuestion
* @return
*/
@Override
public List<TdQuestion> selectTdQuestionList(TdQuestion tdQuestion)
{
return tdQuestionMapper.selectTdQuestionList(tdQuestion);
}
/**
*
*
* @param tdQuestion
* @return
*/
@Override
public int insertTdQuestion(TdQuestion tdQuestion)
{
return tdQuestionMapper.insertTdQuestion(tdQuestion);
}
/**
*
*
* @param tdQuestion
* @return
*/
@Override
public int updateTdQuestion(TdQuestion tdQuestion)
{
return tdQuestionMapper.updateTdQuestion(tdQuestion);
}
/**
*
*
* @param IDs
* @return
*/
@Override
public int deleteTdQuestionByIDs(String IDs)
{
return tdQuestionMapper.deleteTdQuestionByIDs(Convert.toStrArray(IDs));
}
/**
*
*
* @param ID
* @return
*/
@Override
public int deleteTdQuestionByID(Long ID)
{
return tdQuestionMapper.deleteTdQuestionByID(ID);
}
}

@ -0,0 +1,109 @@
<?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.system.mapper.TdIndentureMapper">
<resultMap type="TdIndenture" id="TdIndentureResult">
<result property="indentureId" column="INDENTURE_ID" />
<result property="indentureName" column="INDENTURE_NAME" />
<result property="indentureAddress" column="INDENTURE_ADDRESS" />
<result property="indenturePhone" column="INDENTURE_PHONE" />
<result property="indentureMobile" column="INDENTURE_MOBILE" />
<result property="indentureLinkman" column="INDENTURE_LINKMAN" />
<result property="linkmanPhone" column="LINKMAN_PHONE" />
<result property="linkmanMobile" column="LINKMAN_MOBILE" />
<result property="indentureState" column="INDENTURE_STATE" />
<result property="remark" column="REMARK" />
<result property="createStaffid" column="CREATE_STAFFID" />
<result property="createDate" column="CREATE_DATE" />
</resultMap>
<sql id="selectTdIndentureVo">
select INDENTURE_ID, INDENTURE_NAME, INDENTURE_ADDRESS, INDENTURE_PHONE, INDENTURE_MOBILE, INDENTURE_LINKMAN, LINKMAN_PHONE, LINKMAN_MOBILE, INDENTURE_STATE, REMARK, CREATE_STAFFID, CREATE_DATE from td_indenture
</sql>
<select id="selectTdIndentureList" parameterType="TdIndenture" resultMap="TdIndentureResult">
<include refid="selectTdIndentureVo"/>
<where>
<if test="indentureName != null and indentureName != ''"> and INDENTURE_NAME like concat('%', #{indentureName}, '%')</if>
<if test="indentureAddress != null and indentureAddress != ''"> and INDENTURE_ADDRESS = #{indentureAddress}</if>
<if test="indenturePhone != null and indenturePhone != ''"> and INDENTURE_PHONE = #{indenturePhone}</if>
<if test="indentureMobile != null and indentureMobile != ''"> and INDENTURE_MOBILE = #{indentureMobile}</if>
<if test="indentureLinkman != null and indentureLinkman != ''"> and INDENTURE_LINKMAN = #{indentureLinkman}</if>
<if test="linkmanPhone != null and linkmanPhone != ''"> and LINKMAN_PHONE = #{linkmanPhone}</if>
<if test="linkmanMobile != null and linkmanMobile != ''"> and LINKMAN_MOBILE = #{linkmanMobile}</if>
<if test="indentureState != null and indentureState != ''"> and INDENTURE_STATE = #{indentureState}</if>
<if test="remark != null and REMARK != ''"> and REMARK = #{remark}</if>
<if test="createStaffid != null and createStaffid != ''"> and CREATE_STAFFID = #{createStaffid}</if>
<if test="createDate != null "> and CREATE_DATE = #{createDate}</if>
</where>
</select>
<select id="selectTdIndentureByIndentureId" parameterType="String" resultMap="TdIndentureResult">
<include refid="selectTdIndentureVo"/>
where INDENTURE_ID = #{indentureId}
</select>
<insert id="insertTdIndenture" parameterType="TdIndenture">
insert into td_indenture
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indentureId != null">INDENTURE_ID,</if>
<if test="indentureName != null">INDENTURE_NAME,</if>
<if test="indentureAddress != null">INDENTURE_ADDRESS,</if>
<if test="indenturePhone != null">INDENTURE_PHONE,</if>
<if test="indentureMobile != null">INDENTURE_MOBILE,</if>
<if test="indentureLinkman != null">INDENTURE_LINKMAN,</if>
<if test="linkmanPhone != null">LINKMAN_PHONE,</if>
<if test="linkmanMobile != null">LINKMAN_MOBILE,</if>
<if test="indentureState != null">INDENTURE_STATE,</if>
<if test="remark != null">REMARK,</if>
<if test="createStaffid != null">CREATE_STAFFID,</if>
<if test="createDate != null">CREATE_DATE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indentureId != null">#{indentureId},</if>
<if test="indentureName != null">#{indentureName},</if>
<if test="indentureAddress != null">#{indentureAddress},</if>
<if test="indenturePhone != null">#{indenturePhone},</if>
<if test="indentureMobile != null">#{indentureMobile},</if>
<if test="indentureLinkman != null">#{indentureLinkman},</if>
<if test="linkmanPhone != null">#{linkmanPhone},</if>
<if test="linkmanMobile != null">#{linkmanMobile},</if>
<if test="indentureState != null">#{indentureState},</if>
<if test="remark != null">#{REMARK},</if>
<if test="createStaffid != null">#{createStaffid},</if>
<if test="createDate != null">#{createDate},</if>
</trim>
</insert>
<update id="updateTdIndenture" parameterType="TdIndenture">
update td_indenture
<trim prefix="SET" suffixOverrides=",">
<if test="indentureName != null">INDENTURE_NAME = #{indentureName},</if>
<if test="indentureAddress != null">INDENTURE_ADDRESS = #{indentureAddress},</if>
<if test="indenturePhone != null">INDENTURE_PHONE = #{indenturePhone},</if>
<if test="indentureMobile != null">INDENTURE_MOBILE = #{indentureMobile},</if>
<if test="indentureLinkman != null">INDENTURE_LINKMAN = #{indentureLinkman},</if>
<if test="linkmanPhone != null">LINKMAN_PHONE = #{linkmanPhone},</if>
<if test="linkmanMobile != null">LINKMAN_MOBILE = #{linkmanMobile},</if>
<if test="indentureState != null">INDENTURE_STATE = #{indentureState},</if>
<if test="REMARK != null">REMARK = #{remark},</if>
<if test="createStaffid != null">CREATE_STAFFID = #{createStaffid},</if>
<if test="createDate != null">CREATE_DATE = #{createDate},</if>
</trim>
where INDENTURE_ID = #{indentureId}
</update>
<delete id="deleteTdIndentureByIndentureId" parameterType="String">
delete from td_indenture where INDENTURE_ID = #{indentureId}
</delete>
<delete id="deleteTdIndentureByIndentureIds" parameterType="String">
delete from td_indenture where INDENTURE_ID in
<foreach item="indentureId" collection="array" open="(" separator="," close=")">
#{indentureId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,97 @@
<?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.system.mapper.TdQuestionMapper">
<resultMap type="TdQuestion" id="TdQuestionResult">
<result property="ID" column="ID" />
<result property="TYPEID" column="TYPEID" />
<result property="qSubject" column="Q_SUBJECT" />
<result property="OPTIONA" column="OPTIONA" />
<result property="OPTIONB" column="OPTIONB" />
<result property="OPTIONC" column="OPTIONC" />
<result property="OPTIOND" column="OPTIOND" />
<result property="NOTE" column="NOTE" />
<result property="CREATEPERSON" column="CREATEPERSON" />
<result property="CREATEDATE" column="CREATEDATE" />
</resultMap>
<sql id="selectTdQuestionVo">
select ID, TYPEID, Q_SUBJECT, OPTIONA, OPTIONB, OPTIONC, OPTIOND, NOTE, CREATEPERSON, CREATEDATE from td_question
</sql>
<select id="selectTdQuestionList" parameterType="TdQuestion" resultMap="TdQuestionResult">
<include refid="selectTdQuestionVo"/>
<where>
<if test="TYPEID != null "> and TYPEID = #{TYPEID}</if>
<if test="qSubject != null and qSubject != ''"> and Q_SUBJECT like concat('%', #{qSubject}, '%')</if>
<if test="OPTIONA != null and OPTIONA != ''"> and OPTIONA = #{OPTIONA}</if>
<if test="OPTIONB != null and OPTIONB != ''"> and OPTIONB = #{OPTIONB}</if>
<if test="OPTIONC != null and OPTIONC != ''"> and OPTIONC = #{OPTIONC}</if>
<if test="OPTIOND != null and OPTIOND != ''"> and OPTIOND = #{OPTIOND}</if>
<if test="NOTE != null and NOTE != ''"> and NOTE = #{NOTE}</if>
<if test="CREATEPERSON != null and CREATEPERSON != ''"> and CREATEPERSON = #{CREATEPERSON}</if>
<if test="CREATEDATE != null "> and CREATEDATE = #{CREATEDATE}</if>
</where>
</select>
<select id="selectTdQuestionByID" parameterType="Long" resultMap="TdQuestionResult">
<include refid="selectTdQuestionVo"/>
where ID = #{ID}
</select>
<insert id="insertTdQuestion" parameterType="TdQuestion" useGeneratedKeys="true" keyProperty="ID">
insert into td_question
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="TYPEID != null">TYPEID,</if>
<if test="qSubject != null">Q_SUBJECT,</if>
<if test="OPTIONA != null">OPTIONA,</if>
<if test="OPTIONB != null">OPTIONB,</if>
<if test="OPTIONC != null">OPTIONC,</if>
<if test="OPTIOND != null">OPTIOND,</if>
<if test="NOTE != null">NOTE,</if>
<if test="CREATEPERSON != null">CREATEPERSON,</if>
<if test="CREATEDATE != null">CREATEDATE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="TYPEID != null">#{TYPEID},</if>
<if test="qSubject != null">#{qSubject},</if>
<if test="OPTIONA != null">#{OPTIONA},</if>
<if test="OPTIONB != null">#{OPTIONB},</if>
<if test="OPTIONC != null">#{OPTIONC},</if>
<if test="OPTIOND != null">#{OPTIOND},</if>
<if test="NOTE != null">#{NOTE},</if>
<if test="CREATEPERSON != null">#{CREATEPERSON},</if>
<if test="CREATEDATE != null">#{CREATEDATE},</if>
</trim>
</insert>
<update id="updateTdQuestion" parameterType="TdQuestion">
update td_question
<trim prefix="SET" suffixOverrides=",">
<if test="TYPEID != null">TYPEID = #{TYPEID},</if>
<if test="qSubject != null">Q_SUBJECT = #{qSubject},</if>
<if test="OPTIONA != null">OPTIONA = #{OPTIONA},</if>
<if test="OPTIONB != null">OPTIONB = #{OPTIONB},</if>
<if test="OPTIONC != null">OPTIONC = #{OPTIONC},</if>
<if test="OPTIOND != null">OPTIOND = #{OPTIOND},</if>
<if test="NOTE != null">NOTE = #{NOTE},</if>
<if test="CREATEPERSON != null">CREATEPERSON = #{CREATEPERSON},</if>
<if test="CREATEDATE != null">CREATEDATE = #{CREATEDATE},</if>
</trim>
where ID = #{ID}
</update>
<delete id="deleteTdQuestionByID" parameterType="Long">
delete from td_question where ID = #{ID}
</delete>
<delete id="deleteTdQuestionByIDs" parameterType="String">
delete from td_question where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save