Browse Source

执法事项相关

v2
蟑螂恶霸 2 years ago
parent
commit
8e3fe27dc5
  1. 2
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppTestSIQController.java
  2. 231
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/add.html
  3. 12
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/edit.html
  4. 6
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/view.html
  5. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LinkageDictServiceImpl.java
  6. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LinkageDictMapper.xml

2
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppTestSIQController.java

@ -1,7 +1,7 @@
package com.zdxt.app.controller;
import cn.hutool.core.util.IdUtil;
import com.zdxt.code.utils.IdCardCryptoUtil;
import com.zdxt.common.util.IdCardCryptoUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

231
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/add.html

@ -1,149 +1,114 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="zdxtInclude :: header('新增关联')" />
<th:block th:include="zdxtInclude :: select2-css" />
<th:block th:include="include :: header('修改节点')" />
<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-linkage-add">
<!--<input id="treeId" name="parentId" type="hidden"/>-->
<input id="treeId" name="parentId" type="hidden" th:value="${linkage.id}" />
<div class="form-group">
<label class="col-sm-3 control-label">上级节点:</label>
<div class="col-sm-8">
<div class="input-group">
<!--<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true">-->
<input class="form-control" type="text" onclick="selectItemTree()" id="treeName" readonly="true" th:value="${linkage.title}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dept-edit">
<input id="treeId" name="parentId" type="hidden" th:value="${linkage.id}" />
<div class="form-group">
<label class="col-sm-3 control-label">上级部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="treeName" onclick="selectItemTree()" readonly="true">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">名称:</label>
<div class="col-sm-6">
<input class="form-control" type="text" placeholder="请输入名称" name="title" id="title" required>
</div>
<div class="col-sm-2">
<input class="form-control" type="text" name="srot" placeholder="请输入排序" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">值:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入值" name="value" id="value" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">领域:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入领域" name="domain" id="domain">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点名称:</label>
<div class="col-sm-6">
<input class="form-control" type="text" name="deptName" id="title" required>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入部门" name="dept" id="dept">
</div>
<div class="col-sm-2">
<input class="form-control" type="text" name="srot" required>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">要求:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入要求" name="demand" id="demand">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">依据:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入依据" name="basis" id="basis">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">值:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入值" name="value" id="value" required>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="zdxtInclude :: footer" />
<th:block th:include="zdxtInclude :: select2-js" />
<script type="text/javascript">
var prefix = ctx + "code/linkage";
$("#form-linkage-add").validate({
onkeyup: false,
rules:{
deptName:{
remote: {
url: prefix + "/checkItemNameUnique",
type: "post",
dataType: "json",
data: {
"parentId": function() {
return $("input[name='parentId']").val();
},
"title" : function() {
return $.common.trim($("#title").val());
}
},
dataFilter: function(data, type) {
return $.validate.unique(data);
}
}
},
orderNum:{
digits:true
},
email:{
email:true,
},
phone:{
isPhone:true,
},
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
var prefix = ctx + "code/linkage";
$("#form-dept-edit").validate({
onkeyup: false,
rules:{
deptName:{
remote: {
url: prefix + "/checkItemNameUnique",
type: "post",
dataType: "json",
data: {
"deptId": function() {
return $("#id").val();
},
"parentId": function() {
return $("input[name='parentId']").val();
},
"deptName": function() {
return $.common.trim($("#title").val());
}
},
dataFilter: function(data, type) {
return $.validate.unique(data);
}
}
},
messages: {
"deptName": {
remote: "节点已经存在"
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-linkage-add').serialize());
}
}
/*部门管理-新增-选择父部门树*/
function selectItemTree() {
var options = {
title: '部门选择',
width: "380",
url: prefix + "/selectItemTree/" + $("#treeId").val(),
// url: prefix + "/selectDeptTree/123",
callBack: doSubmit
};
$.modal.openOptions(options);
srot:{
digits:true
},
},
messages: {
"deptName": {
remote: "部门已经存在"
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-dept-edit').serialize());
}
function doSubmit(index, layero){
}
/*部门管理-修改-选择部门树*/
function selectItemTree() {
var id = $("#treeId").val();
var options = {
title: '节点选择',
width: "380",
url: prefix + "/selectItemTree/" + $("#treeId").val(),
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
if ($.tree.notAllowLastLevel(tree)) {
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
$(function() {
$('#deptType').select2({
placeholder: "请选择类型",
allowClear: true
});
})
</script>
}
$(function() {
$('#deptType').select2({
placeholder: "请选择类型",
allowClear: true
});
})
</script>
</body>
</html>

12
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/edit.html

@ -25,13 +25,13 @@
<input class="form-control" type="text" name="deptName" th:field="*{title}" id="title" required>
</div>
<div class="col-sm-2">
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}" required>
<input class="form-control" type="text" name="srot" th:field="*{srot}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">值:</label>
<div class="col-sm-8">
<input class="form-control" type="text" placeholder="请输入值" name="value" id="value" required>
<input class="form-control" type="text" placeholder="请输入值" name="value" th:field="*{value}" id="value" required>
</div>
</div>
<div class="form-group">
@ -48,7 +48,7 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
var prefix = ctx + "system/dept";
var prefix = ctx + "code/linkage";
$("#form-dept-edit").validate({
onkeyup: false,
@ -74,7 +74,7 @@
}
}
},
orderNum:{
srot:{
digits:true
},
},
@ -94,8 +94,8 @@
/*部门管理-修改-选择部门树*/
function selectItemTree() {
var deptId = $("#treeId").val();
if(deptId > 0) {
var id = $("#treeId").val();
if(id > 0 || id.length > 1) {
var options = {
title: '节点选择',
width: "380",

6
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/linkage/view.html

@ -97,9 +97,9 @@
formatter: function(value, row, index) {
// if (row.parentId != 0) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.deptId + '\',820,508)"><i class="fa fa-edit"></i> 编辑</a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.deptId + '\',820,508)"><i class="fa fa-plus"></i> 新增</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.deptId + '\')"><i class="fa fa-trash"></i> 删除</a>');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\',820,508)"><i class="fa fa-edit"></i> 编辑</a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.id + '\',820,508)"><i class="fa fa-plus"></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-trash"></i> 删除</a>');
return actions.join('');
// } else {
// return "";

1
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LinkageDictServiceImpl.java

@ -46,6 +46,7 @@ public class LinkageDictServiceImpl implements ILinkageDictService
return linkageDictMapper.selectLinkageDictById(id);
}
@Override
@DataScope
public LinkageDict selectLinkageDictByValueAndParentId(String value, String parentId)
{
return linkageDictMapper.selectLinkageDictByValueAndParentId(value, parentId);

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LinkageDictMapper.xml

@ -40,17 +40,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updator != null and updator != ''"> and updator = #{updator}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
or (`value` = 100 or `value` = 'law_item' or `value` = 'check_item')
</where>
</select>
<select id="selectLinkageDictById" parameterType="String" resultMap="LinkageDictResult">
<include refid="selectLinkageDictVo"/>
select ld.id, ld.title, ld.`value`, ld.parent_id, ld.`desc`, ld.srot, ld.`status`, ld.`domain`, ld.dept, ld.dept_id, ld.demand, ld.basis, ld.creator, ld.create_time, ld.updator, ld.update_time,
(select title from linkage_dict where id = ld.parent_id) parent_name
from linkage_dict ld
where id = #{id}
</select>
<select id="selectLinkageDictByValueAndParentId" parameterType="String" resultMap="LinkageDictResult">
<include refid="selectLinkageDictVo"/>
where `value` = #{value} and parent_id = #{parentId}
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<insert id="insertLinkageDict" parameterType="LinkageDict">

Loading…
Cancel
Save