解决冲突

pull/157/head
Vincent 1 year ago
commit d27d4b2889

@ -0,0 +1,150 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>前端菜单管理</title>
<#include "/head/headaddedit.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="SFrontmenuTform" method="post" id="SFrontmenuTform" class="form-horizontal" action="${ctx}/backstage/sfrontmenut/save">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="菜单名称" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单关键字:</label>
<div class="col-sm-9">
<input name="reskey" id="reskey" class="form-control" placeholder="菜单关键字" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单链接:</label>
<div class="col-sm-9">
<input name="resurl" id="resurl" class="form-control" placeholder="菜单链接" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 描述:</label>
<div class="col-sm-9">
<input name="description" id="description" class="form-control" placeholder="描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script type="text/javascript">
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#SFrontmenuTform").attr("action","${ctx}/backstage/oa/frontmenu/save");
var form1 = $('#SFrontmenuTform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: "",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#SFrontmenuTform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,166 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>前端菜单管理</title>
<#include "/head/headaddedit.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="SFrontmenuTform" method="post" id="SFrontmenuTform" class="form-horizontal" action="${ctx}/backstage/sfrontmenut/edit">
<input type="hidden" id="id" name="id">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="菜单名称" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单关键字:</label>
<div class="col-sm-9">
<input name="reskey" id="reskey" class="form-control" placeholder="菜单关键字" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 菜单链接:</label>
<div class="col-sm-9">
<input name="resurl" id="resurl" class="form-control" placeholder="菜单链接" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 描述:</label>
<div class="col-sm-9">
<input name="description" id="description" class="form-control" placeholder="描述" class="form-control" type="text" maxlength='100' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script type="text/javascript">
$(document).ready(function () {
parent.axgetXiaoyao('${ctx}/backstage/oa/frontmenu/getdata/${id}',null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#name").val(data.data.name);
$("#parentid").val(data.data.parentid);
$("#reskey").val(data.data.reskey);
$("#resurl").val(data.data.resurl);
$("#level").val(data.data.level);
$("#icon").val(data.data.icon);
$("#ordernum").val(data.data.ordernum);
$("#ishide").val(data.data.ishide);
$("#description").val(data.data.description);
}else{
parent.toastr.error("非法请求。");
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#SFrontmenuTform").attr("action","${ctx}/backstage/oa/frontmenu/edit");
var form1 = $('#SFrontmenuTform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#SFrontmenuTform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,201 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>前端菜单管理</title>
<#include "/head/headlist.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox ">
<div class="ibox-content">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_name' id='search_name' class='form-control' placeholder='name'/>
</div>
<div class="form-group">
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</div>
</form>
</div>
</div>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="container-div">
<div class="btn-group-sm" id="_mybutton" role="group">
</div>
<br/>
</div>
</div>
<div class="col-sm-12 select-table table-striped" >
<table id="SFrontmenuT_list" ></table>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
</body>
</html>
<script type="text/javascript">
var _tableListSFrontmenuT;
var jsptoolbar = '';
var jspOperation = '';
jQuery(document).ready(function($){
parent.axgetXiaoyao("${ctx}/backstage/admin/user/toolsbarOperation?" + "resourceid=${resourceid}",null,true ,
function(data){
if(data.code == "OK"){
jsptoolbar = data.data.Jsptoolbar;
jspOperation = data.data.JspOperation;
$("#_mybutton").empty();
$(jsptoolbar).each(function (i, toolbar) {
if(toolbar.methodid != '104'){
$("#_mybutton").append('<button class="btn sbold ' + toolbar.img + '" onClick="' + toolbar.actionmethod + '(\'${resourceid}' + toolbar.methodid + '\')"> ' + ' <i class="fa ' + toolbar.methodkey + '"></i> ' + toolbar.text + '</button>&nbsp');
}
});
_tableListSFrontmenuT = $('#SFrontmenuT_list').bootstrapTable({
url: '${ctx}/backstage/oa/frontmenu/list' ,
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
height: "300", pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_name:'{"value":"' + $("#search_name").val() + '","op":"equal","type":"string"}'
};
},
responseHandler:function(res){
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
{ width:150,valign: "middle",field:'name',title:'菜单名称',sortable:true},
{ width:150,valign: "middle",field:'reskey',title:'菜单关键字',sortable:true},
{ width:150,valign: "middle",field:'resurl',title:'菜单链接',sortable:true},
{ width:150,valign: "middle",field:'description',title:'描述',sortable:true},
{
width:200,
field: 'id',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = "";
$(jspOperation).each(function (i, toolbar) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}" + toolbar.methodid + "','" + oData.id + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + toolbar.methodkey + "\"></i> " + toolbar.text + " </a>&nbsp;&nbsp;";
});
return listOperation;
}
}
]
});
}
}
);
});
function getIdSelections() {
return $.map(_tableListSFrontmenuT.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function t_actiongrant(jframeid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/oa/userfrontmenuHtml/showlist',"人员授权管理",jframeid + '_action');
}
function _useradd(jframeid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/oa/frontmenuHtml/toSave',"添加前端菜单管理",jframeid + '_add');
}
function updateData(jframeid,str){
var url = '${ctx}/backstage/oa/frontmenuHtml/toEdit/' + str ;
parent._xiaoyaoOpenMenuTab(url,"修改前端菜单管理",jframeid + '_edit');
}
function _useredit(jframeid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if(str.length > 0 && tempstr.length > 1){
parent.toastr.error("每次只能修改一条信息。");
}else{
if (str.length > 0) {
updateData(jframeid,str);
} else {
parent.toastr.error("至少选择一条信息操作。");
}
}
}
function t_delete(str){
parent.layer.closeAll('loading');
parent.axgetXiaoyao('${ctx}/backstage/oa/frontmenu/delmore' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTable();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
}
function _deletebu(sourceid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if (str.length > 0 && tempstr.length > 0) {
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
} else {
parent.toastr.error("至少选择一条数据操作");
}
}
function _delete(sourceid,str){
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
}
function refreshTable(sourceid){
_tableListSFrontmenuT.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>

@ -0,0 +1,246 @@
<#include "../../../common/taglibs.html" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>管理员列表</title>
<meta name="keywords" content="管理员列表">
<meta name="description" content="管理员列表">
<#include "/head/headlist.html" />
<link href="${ctx}/static/css/plugins/iCheck/custom.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox ">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_loginname' id='search_loginname' class="form-control" placeholder='登陆账号'/>
</div>
<div class="form-group">
<input name='search_username' id='search_username' class='form-control' placeholder='姓名'/>
</div>
<div class="form-group">
<select class="form-control" name='search_usex' id='search_usex'>
<option value="">性别</option>
<option value="0"></option>
<option value="1"></option>
</select>
</div>
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</form>
</div>
</div>
<!-- Panel Other -->
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12 select-table table-striped" >
<table id="user_list" >
</table>
</div>
</div>
</div>
<!-- End Panel Other -->
</div>
<div class="modal inmodal fade" id="frontMenumodal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content animated flipInY">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h6 class="modal-title">选择前端菜单</h6>
</div>
<div class="modal-body" id="frontmenuidCheckboxList">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
<button type="button" onclick="saveFm()" class="btn btn-primary">保存</button>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
<script src="${ctx}/static/js/plugins/iCheck/icheck.min.js"></script>
<script >
var $frontMenumodal = $('#frontMenumodal');
var _userlisttable;
var selectUserid = "";
function selectFrontMenuTree(){
$frontMenumodal.modal();
$frontMenumodal.css("z-index",(parent.getMaxZIndex() + 1));
}
function closeFrontMenu(){
$frontMenumodal.modal('hide');
}
$(function(){
_userlisttable = $('#user_list').bootstrapTable({
url: '${ctx}/backstage/oa/userfrontmenu/list',
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
pageList: [10, 25, 50,100],
height: "100%",
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_loginname:'{"value":"' + $("#search_loginname").val() + '","op":"like","type":"string"}',
search_username:'{"value":"' + $("#search_username").val() + '","op":"like","type":"string"}',
search_usex:'{"value":"' + $("#search_usex").val() + '","op":"equal","type":"string"}',
};
},
responseHandler:function(res){
//console.log(res)
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
{ width:150,valign: "middle",field:'loginname',title:'登陆账号',sortable:true},
{ width:150,valign: "middle",field:'username',title:'用户名',sortable:true},
{ width:150,valign: "middle",field:'departname',title:'所属部门',sortable:true},
{ width:60,valign: "middle",field:'enabled',title:'是否可用',sortable:true,
formatter:function(value,oData,index) {
var listOperation = "";
if(oData.enabled == 1){
listOperation = "启用";
}else{
listOperation = "禁用";
}
return listOperation;
}
},
{ width:60,valign: "middle",field:'usex',title:'性别',sortable:true,
formatter:function(value,oData,index) {
var listOperation = "";
if(oData.usex == 1){
listOperation = "男";
}else{
listOperation = "女";
}
return listOperation;
}
},
{ width:100,valign: "middle",field:'mobile',title:'手机号',sortable:true},
{ width:150,valign: "middle",field:'email',title:'电子邮箱',sortable:true},
{
width:200,
field: 'caozuo',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = '<a href="javascript:setFrontMenuData(\'' + oData.id + '\',\'' + index + '\');" class="btn btn-primary btn-xs" )=""><i class="fa fa-pencil"></i> 设置权限 </a>'
return [listOperation].join('&nbsp;&nbsp;');
}
}
]
});
});
function setFrontMenuData(usrid,selectIndex){
selectUserid = usrid;
var getdata = _userlisttable.bootstrapTable('getData');
var usermodelinfo = getdata[selectIndex];
var selectMenu = usermodelinfo.tempList;
console.log(usermodelinfo);
parent.axgetXiaoyao('${ctx}/backstage/oa/frontmenu/list' , {pagesize:100},false, function(dataMenu){
if(dataMenu.code == "OK"){
var showcheckstring = '';
var tempcount = 0;//记录循环的次数
var data = dataMenu.data;
$(data.records).each(function(idx,item){
var checked = "";
$(selectMenu).each(function (midx,mitem){
if(mitem.id == item.id){
checked = "checked";
}
})
tempcount++;
showcheckstring = showcheckstring + '<label class="checkbox-inline i-checks">';
showcheckstring = showcheckstring + '<input type="checkbox" name="frontmenuid" id="' + item.id + '" ' + checked + ' value="' + item.id + '" required="true" minlength="1">&nbsp;';
showcheckstring = showcheckstring + item.name + '</label>';
if(tempcount%5 == 0 ){
showcheckstring = showcheckstring + "<br/>";
}
});
console.log(data)
console.log(showcheckstring)
$("#frontmenuidCheckboxList").html(showcheckstring);
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
}
console.log(data);
});
selectFrontMenuTree();
}
function saveFm(){
var fmids = "";
$('input[name="frontmenuid"]:checked').each(function() {
var value = $(this).val();
if(fmids.length >= 1){
fmids = fmids + "," + value;
}else{
fmids = value;
}
});
if(fmids.length < 1){
parent.toastr.error("选择菜单");
return;
}else{
parent.axpostXiaoyao('${ctx}/backstage/oa/userfrontmenu/saveactiongrant' , {menuids:fmids,userid:selectUserid},false, function(data){
if(data.code == "OK"){
parent.toastr.success("设置完毕。");
closeFrontMenu();
refreshTable();
}else{
parent.toastr.error("失败。");
}
});
}
console.log("fmids===================" + fmids)
}
function refreshTable(){
_userlisttable.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>
</body>
</html>

@ -0,0 +1,214 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典</title>
<#include "/head/headaddedit.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Distionaryform" method="post" id="Distionaryform" class="form-horizontal" action="${ctx}/backstage/distionary/save">
<input name="distionarytypeid" id="distionarytypeid" type="hidden" value="${distionarytypeid}">
<input name="distionatygroupid" id="distionatygroupid" type="hidden" value="${distionatygroupid}">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据字典分类主键:</label>
<div class="col-sm-9">
<input name="distionarytypeid" id="distionarytypeid" class="form-control" placeholder="数据字典分类主键" class="form-control" type="text" maxlength='10' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据字典分组主键:</label>
<div class="col-sm-9">
<input name="distionatygroupid" id="distionatygroupid" class="form-control" placeholder="数据字典分组主键" class="form-control" type="text" maxlength='10' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 编码:</label>
<div class="col-sm-9">
<input name="codeno" id="codeno" class="form-control" placeholder="编码" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="数据名称" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字典内容:</label>
<div class="col-sm-9">
<input name="content" id="content" class="form-control" placeholder="字典内容" class="form-control" type="text" maxlength='50' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 是否启用:</label>
<div class="col-sm-9">
<input name="enabled" id="enabled" class="form-control" placeholder="是否启用" class="form-control" type="text" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sorting" id="sorting" class="form-control" number="true" placeholder="排序字段" class="form-control" type="text" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 创建人:</label>
<div class="col-sm-9">
<input name="createuser" id="createuser" class="form-control" placeholder="创建人" class="form-control" type="text" maxlength='95' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 创建时间:</label>
<div class="col-sm-9">
<input name="createdate" id="createdate" class="form-control" placeholder="创建时间" class="form-control" type="text" maxlength='7' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 修改人:</label>
<div class="col-sm-9">
<input name="updateuser" id="updateuser" class="form-control" placeholder="修改人" class="form-control" type="text" maxlength='95' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 更新时间:</label>
<div class="col-sm-9">
<input name="updatetime" id="updatetime" class="form-control" placeholder="更新时间" class="form-control" type="text" maxlength='7' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script type="text/javascript">
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#Distionaryform").attr("action","${ctx}/backstage/admin/distionary/save");
var form1 = $('#Distionaryform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: "",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Distionaryform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,212 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典</title>
<#include "/head/headaddedit.html" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Distionaryform" method="post" id="Distionaryform" class="form-horizontal" action="${ctx}/backstage/distionary/edit">
<input type="hidden" id="id" name="id">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据字典分类主键:</label>
<div class="col-sm-9">
<input name="distionarytypeid" id="distionarytypeid" class="form-control" placeholder="数据字典分类主键" class="form-control" type="text" maxlength='10' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据字典分组主键:</label>
<div class="col-sm-9">
<input name="distionatygroupid" id="distionatygroupid" class="form-control" placeholder="数据字典分组主键" class="form-control" type="text" maxlength='10' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 编码:</label>
<div class="col-sm-9">
<input name="codeno" id="codeno" class="form-control" placeholder="编码" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 数据名称:</label>
<div class="col-sm-9">
<input name="name" id="name" class="form-control" placeholder="数据名称" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序字段:</label>
<div class="col-sm-9">
<input name="sorting" id="sorting" class="form-control" placeholder="排序字段" class="form-control" type="text" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 创建人:</label>
<div class="col-sm-9">
<input name="createuser" id="createuser" class="form-control" placeholder="创建人" class="form-control" type="text" maxlength='95' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 创建时间:</label>
<div class="col-sm-9">
<input name="createdate" id="createdate" class="form-control" placeholder="创建时间" class="form-control" type="text" maxlength='7' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 修改人:</label>
<div class="col-sm-9">
<input name="updateuser" id="updateuser" class="form-control" placeholder="修改人" class="form-control" type="text" maxlength='95' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 更新时间:</label>
<div class="col-sm-9">
<input name="updatetime" id="updatetime" class="form-control" placeholder="更新时间" class="form-control" type="text" maxlength='7' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script type="text/javascript">
$(document).ready(function () {
parent.axgetXiaoyao('${ctx}/backstage/admin/distionary/getdata/' + $("#id").val(),null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#distionarytypeid").val(data.data.distionarytypeid);
$("#distionatygroupid").val(data.data.distionatygroupid);
$("#codeno").val(data.data.codeno);
$("#name").val(data.data.name);
$("#content").val(data.data.content);
$("#enabled").val(data.data.enabled);
$("#sorting").val(data.data.sorting);
$("#createuser").val(data.data.createuser);
$("#createdate").val(data.data.createdate);
$("#updateuser").val(data.data.updateuser);
$("#updatetime").val(data.data.updatetime);
}else{
parent.toastr.error("非法请求。");
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#Distionaryform").attr("action","${ctx}/backstage/admin/distionary/edit" + );
var form1 = $('#Distionaryform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#Distionaryform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
parent.toastr.error(data.message);
}
}
});
}
});
});
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,366 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典</title>
<#include "/head/headlist.html" />
<link href="${ctx}/static/css/plugins/iCheck/custom.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox ">
<div class="ibox-content">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_codeno' id='search_codeno' class='form-control' placeholder='编码'/>
</div>
<div class="form-group">
<input name='search_name' id='search_name' class='form-control' placeholder='描述'/>
</div>
<div class="form-group">
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</div>
</form>
</div>
</div>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="container-div">
<div class="btn-group-sm" id="_mybutton" role="group">
<button class="btn sbold btn-success" onclick="_distionaryAdd()"> <i class="fa fa-plus"></i> 添加</button>&nbsp;
<button class="btn sbold btn-danger" onclick="_distionaryDeletebu()"> <i class="fa fa-close"></i> 删除</button>
</div>
<br/>
</div>
</div>
<div class="col-sm-12 select-table table-striped" >
<table id="Distionary_list" ></table>
</div>
</div>
</div>
</div>
<div class="modal inmodal fade" id="distionaryModelManager" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content animated flipInY modal-lg">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h6 class="modal-title">字典详情管理</h6>
</div>
<div class="modal-body">
<div class="row">
<form name="Distionaryform" method="post" id="Distionaryform" class="form-horizontal" action="${ctx}/ocr/dictionary/save">
<input name="distionarytypeid" id="distionarytypeid" value="${distionarytypeid}" type="hidden">
<input name="groupId" id="distionatygroupid" value="${distionarygroupid}" type="hidden">
<input name="id" id="id" type="hidden">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 编码:</label>
<div class="col-sm-9">
<input name="value" id="value" class="form-control" placeholder="编码" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 描述:</label>
<div class="col-sm-9">
<input name="lable" id="lable" class="form-control" placeholder="描述" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 租户:</label>
<div class="col-sm-9">
<select data-placeholder="请选择租户" id="tenantId" name="tenantId" class="chosen-select" style="width:100%;" tabindex="4" required>
<option value=''>选择租户</option>
</select>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" onClick="closeDistionaryModel()" class="btn btn-w-m btn-default" id="savebuttonUserIcon">关闭</button>
<button type="button" onclick="distionaryModelformSubmit()" class="btn btn-w-m btn-primary">保存</button>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
<script src="${ctx}/static/js/plugins/jquery-form/jquery.form.min.js?v=4.3.0"></script>
<script src="${ctx}/static/js/plugins/validate/jquery.validate.min.js"></script>
<script src="${ctx}/static/js/plugins/validate/localization/messages_zh.js" type="text/javascript"></script>
<!-- iCheck -->
<script src="${ctx}/static/js/plugins/iCheck/icheck.min.js"></script>
</body>
</html>
<script type="text/javascript">
var _tableListDistionary;
var $distionaryModelManager = $("#distionaryModelManager");
function showDistionaryModel() {
$distionaryModelManager.modal();
$distionaryModelManager.css("z-index",(parent.getMaxZIndex() + 1));
}
function closeDistionaryModel() {
$("#Distionaryform")[0].reset();
$("#distionarytypeid").val('${distionarytypeid}');
$("#distionatygroupid").val('${distionarygroupid}');
$distionaryModelManager.modal('hide');
}
jQuery(document).ready(function($){
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
parent.axgetXiaoyao("${ctx}/backstage/admin/department/showDeptJsTree",null,false,function (data) {
$.each(data,function(name,anArray) {
console.log(anArray)
$("#tenantId").append("<option value='" + anArray.deptNo + "'>" + anArray.name + "</option>");
});
});
var config = {
'.chosen-select': {},
'.chosen-select-deselect': {
allow_single_deselect: true
},
'.chosen-select-no-single': {
disable_search_threshold: 10
},
'.chosen-select-no-results': {
no_results_text: 'Oops, nothing found!'
},
'.chosen-select-width': {
width: "95%"
}
}
//for (var selector in config) {
// $(selector).chosen(config[selector]);
//}
_tableListDistionary = $('#Distionary_list').bootstrapTable({
url: '${ctx}/ocr/dictionary/list',
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
height: "100%", pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: "desc",
sortname: "ID",
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_codeno:'{"value":"' + $("#search_codeno").val() + '","op":"equal","type":"string"}',
search_distionatygroupid:'{"value":"' + $("#distionatygroupid").val() + '","op":"equal","type":"string"}',
search_name:'{"value":"' + $("#search_name").val() + '","op":"equal","type":"string"}'
};
},
responseHandler:function(res){
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
// { width:150,valign: "middle",field:'distionarytypeid',title:'数据字典分类主键',sortable:true},
// { width:150,valign: "middle",field:'distionatygroupid',title:'数据字典分组主键',sortable:true},
{ width:150,valign: "middle",field:'value',title:'编码',sortable:true},
{ width:150,valign: "middle",field:'lable',title:'描述',sortable:true},
{ width:150,valign: "middle",field:'tenantName',title:'部门名称',sortable:true},
{
width:200,
field: 'id',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = "";
listOperation = listOperation + "<a href=\"javascript:_distionaryDelete('resourceid_distionary','" + oData.id + "');\" class=\"btn btn-danger btn-xs\")><i class=\"fa fa-close\"></i> 删除 </a>&nbsp;&nbsp;";
listOperation = listOperation + "<a href=\"javascript:_distionaryUpdateData('resourceid_distionary','" + oData.id + "');\" class=\"btn btn-primary btn-xs\")><i class=\"fa fa-pencil\"></i> 修改 </a>&nbsp;&nbsp;";
return listOperation;
}
}
]
});
/*
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});*/
$("#Distionaryform").attr("action","${ctx}/ocr/dictionary/save");
var distionaryForm1 = $('#Distionaryform');
var distionaryError1 = $('.alert-danger', distionaryForm1);
distionaryForm1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Distionaryform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
refreshTable();
closeDistionaryModel();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function distionaryModelformSubmit() {
$("#Distionaryform").submit();
}
function getIdSelections() {
return $.map(_tableListDistionary.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function _distionaryAdd(){
showDistionaryModel();
}
function _distionaryUpdateData(jframeid,str){
parent.axgetXiaoyao('${ctx}/ocr/dictionary/getdata/' + str,null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#value").val(data.data.value);
$("#lable").val(data.data.lable);
$("#tenantId option[value='" + data.data.tenantId + "']").attr("selected",true);
showDistionaryModel();
}else{
parent.toastr.error("非法请求。");
}
});
}
function _distionaryEdit(jframeid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if(str.length > 0 && tempstr.length > 1){
parent.toastr.error("每次只能修改一条信息。");
}else{
if (str.length > 0) {
updateData(jframeid,str);
} else {
parent.toastr.error("至少选择一条信息操作。");
}
}
}
function t_delete(str){
parent.layer.closeAll('loading');
parent.axgetXiaoyao('${ctx}/ocr/dictionary/delmore' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTable();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
}
function _distionaryDelete(sourceid,str){
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
}
function refreshTable(sourceid){
_tableListDistionary.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>

@ -0,0 +1,186 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典分组</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/css/plugins/chosen/chosen.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Distionarygroupform" method="post" id="Distionarygroupform" class="form-horizontal" action="${ctx}/backstage/admin/distionarygroup/save">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字典字段名:</label>
<div class="col-sm-9">
<input name="field" id="field" class="form-control" placeholder="字典字段名" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字典组描述:</label>
<div class="col-sm-9">
<input name="label" id="label" class="form-control" placeholder="字典字段名" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 备注:</label>
<div class="col-sm-9">
<input name="remark" id="remark" class="form-control" placeholder="分组名称" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<!-- Chosen -->
<script src="${ctx}/static/js/plugins/chosen/chosen.jquery.js"></script>
<script type="text/javascript">
var selectConfig = {
'.chosen-select': {},
'.chosen-select-deselect': {
allow_single_deselect: true
},
'.chosen-select-no-single': {
disable_search_threshold: 10
},
'.chosen-select-no-results': {
no_results_text: 'Oops, nothing found!'
},
'.chosen-select-width': {
width: "95%"
}
};
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
changeDistionarytype("");
$("#Distionarygroupform").attr("action","${ctx}/ocr/dictionaryGroup/save");
var form1 = $('#Distionarygroupform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: "",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
console.log("parent.getLoginToken()===" + parent.getLoginToken())
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Distionarygroupform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function changeDistionarytype(distionarytypeid) {
parent.axgetXiaoyao('${ctx}/backstage/admin/distionarytype/listall/',null,false , function(result) {
if(result.code == 'OK'){
var data = result.data;
console.log(data);
var posthtml = "";
$(data).each(function(idx,item){
if(undefined != distionarytypeid && distionarytypeid == item.id){
posthtml = posthtml + '<option value="' + item.id + '" hassubinfo="true" selected>' + item.typename + '</option>';
}else{
posthtml = posthtml + '<option value="' + item.id + '" hassubinfo="true">' + item.typename + '</option>';
}
});
$("#distionarytypeid").append(posthtml);
}
});
$("#distionarytypeid").chosen(selectConfig[$("#distionarytypeid")]);
}
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,197 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典分组</title>
<#include "/head/headaddedit.html" />
<link href="${ctx}/static/css/plugins/chosen/chosen.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基本信息</h5>
</div>
<div class="ibox-content">
<div class="main-content">
<form name="Distionarygroupform" method="post" id="Distionarygroupform" class="form-horizontal" action="${ctx}/backstage/admin/distionarygroup/edit">
<input type="hidden" id="id" name="id">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字典字段名:</label>
<div class="col-sm-9">
<input name="field" id="field" class="form-control" placeholder="字典字段名" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 字典组描述:</label>
<div class="col-sm-9">
<input name="label" id="label" class="form-control" placeholder="字典字段名" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 备注:</label>
<div class="col-sm-9">
<input name="remark" id="remark" class="form-control" placeholder="分组名称" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<#include "/head/footadd.html" />
<script src="${ctx}/static/js/plugins/chosen/chosen.jquery.js"></script>
<script type="text/javascript">
var selectConfig = {
'.chosen-select': {},
'.chosen-select-deselect': {
allow_single_deselect: true
},
'.chosen-select-no-single': {
disable_search_threshold: 10
},
'.chosen-select-no-results': {
no_results_text: 'Oops, nothing found!'
},
'.chosen-select-width': {
width: "95%"
}
};
$(document).ready(function () {
parent.axgetXiaoyao('${ctx}/ocr/dictionaryGroup/getdata/${id}',null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#field").val(data.data.field);
$("#label").val(data.data.label);
$("#remark").val(data.data.remark);
changeDistionarytype(data.data.distionarytypeid);
}else{
parent.toastr.error("非法请求。");
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#Distionarygroupform").attr("action","${ctx}/ocr/dictionaryGroup/save");
var form1 = $('#Distionarygroupform');
var error1 = $('.alert-danger', form1);
form1.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#Distionarygroupform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
rolesback();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
parent.toastr.error(data.message);
}
}
});
}
});
});
function changeDistionarytype(distionarytypeid) {
parent.axgetXiaoyao('${ctx}/backstage/admin/distionarytype/listall/',null,false , function(result) {
if(result.code == 'OK'){
var data = result.data;
console.log(data);
var posthtml = "";
$(data).each(function(idx,item){
if(undefined != distionarytypeid && distionarytypeid == item.id){
posthtml = posthtml + '<option value="' + item.id + '" hassubinfo="true" selected>' + item.typename + '</option>';
}else{
posthtml = posthtml + '<option value="' + item.id + '" hassubinfo="true">' + item.typename + '</option>';
}
});
$("#distionarytypeid").append(posthtml);
}
});
$("#distionarytypeid").chosen(selectConfig[$("#distionarytypeid")]);
}
function rolesback() {
parent.closeItem(window.frameElement.name);
}
</script>
</body>
</html>

@ -0,0 +1,496 @@
<#include "/common/taglibs.html" />
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>数据字典分组</title>
<#include "/head/headlist.html" />
<link href="${ctx}/static/css/plugins/iCheck/custom.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="col-sm-9">
<div class="ibox ">
<div class="ibox-content">
<div class="ibox-content">
<form id="searcheuser" class="form-inline">
<div class="form-group">
<input name='search_codeno' id='search_codeno' class='form-control' placeholder='字典组名称'/>
</div>
<div class="form-group">
<input name='search_groupname' id='search_groupname' class='form-control' placeholder='字典组描述'/>
</div>
<div class="form-group">
<a class="btn btn-primary btn-rounded btn-sm" onclick="refreshTable()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$('#searcheuser')[0].reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</div>
</form>
</div>
</div>
</div>
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div class="container-div">
<div class="btn-group-sm" id="_mybutton" role="group">
</div>
<br/>
</div>
</div>
<div class="col-sm-12 select-table table-striped" >
<table id="Distionarygroup_list" ></table>
</div>
</div>
</div>
</div>
</div>
<div class="modal inmodal fade" id="distionaryManager" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content animated flipInY modal-lg">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h6 class="modal-title">字典详情管理</h6>
</div>
<div class="modal-body">
<div class="row">
<form name="userImageform" method="post" id="userImageform" class="form-horizontal" enctype="multipart/form-data">
<div class="col-sm-8">
<div class="form-group">
<img src="" id="usericonImage" />
<input type="file" id="headPhoto" name="headPhoto" onchange="changeFile()" style="display: none;"/>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<div id="preview-pane">
<div class="preview-container">
<img src="" id="usericonImageCut" class="jcrop-preview" />
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" onClick="" class="btn btn-w-m btn-primary" id="savebuttonUserIcon">选择图片</button>
<button type="button" onclick="" class="btn btn-w-m btn-primary">保存</button>
</div>
</div>
</div>
</div>
<div class="modal inmodal fade" id="distionaryTypeManager" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content animated flipInY modal-lg">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h6 class="modal-title">字典分类管理</h6>
</div>
<div class="modal-body">
<div class="row">
<form name="Distionarytypeform" method="post" id="Distionarytypeform" class="form-horizontal" >
<input name="id" id="id" type="hidden">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 编码:</label>
<div class="col-sm-9">
<input name="codeno" id="codeno" class="form-control" placeholder="编码" class="form-control" type="text" maxlength='25' required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 分类名称:</label>
<div class="col-sm-9">
<input name="typename" id="typename" class="form-control" placeholder="分类名称" class="form-control" type="text" maxlength='75' required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 是否启用:</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label>
<input type="radio" checked="" value="1" name="enabled"> <i></i>启用
</label>
<label>
<input type="radio" value="0" name="enabled"> <i></i>禁用
</label>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required">* 排序:</label>
<div class="col-sm-9">
<input name="sorting" id="sorting" class="form-control" number="true" placeholder="排序" class="form-control" type="text" required>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" onClick="closeTypeModel()" class="btn btn-w-m btn-default" id="savebuttonUserIcon">关闭</button>
<button type="button" onclick="distionarytypeformSubmit()" class="btn btn-w-m btn-primary">保存</button>
</div>
</div>
</div>
</div>
<#include "/head/footlist.html" />
<script src="${ctx}/static/js/plugins/jquery-form/jquery.form.min.js?v=4.3.0"></script>
<script src="${ctx}/static/js/plugins/validate/jquery.validate.min.js"></script>
<script src="${ctx}/static/js/plugins/validate/localization/messages_zh.js" type="text/javascript"></script>
<!-- iCheck -->
<script src="${ctx}/static/js/plugins/iCheck/icheck.min.js"></script>
</body>
</html>
<script type="text/javascript">
var $distionaryTypeManager = $("#distionaryTypeManager");
var $distionaryManager = $("#distionaryManager");
function showTypeModel() {
$distionaryTypeManager.modal();
$distionaryTypeManager.css("z-index",(parent.getMaxZIndex() + 1));
}
function closeTypeModel() {
$("#Distionarytypeform")[0].reset();
$distionaryTypeManager.modal('hide');
}
function showManagerModel() {
$distionaryManager.modal();
$distionaryManager.css("z-index",(parent.getMaxZIndex() + 1));
}
function closeManagerModel() {
$distionaryManager.modal('hide');
}
var _distionarytype_list;
var _tableListDistionarygroup;
var jsptoolbar = '';
var jspOperation = '';
jQuery(document).ready(function($){
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
parent.axgetXiaoyao("${ctx}/backstage/admin/user/toolsbarOperation?" + "resourceid=${resourceid}",null,true ,
function(data){
if(data.code == "OK"){
jsptoolbar = data.data.Jsptoolbar;
jspOperation = data.data.JspOperation;
$("#_mybutton").empty();
$(jsptoolbar).each(function (i, toolbar) {
if(toolbar.methodid != '104'){
$("#_mybutton").append('<button class="btn sbold ' + toolbar.img + '" onClick="' + toolbar.actionmethod + '(\'${resourceid}' + toolbar.methodid + '\')"> ' + ' <i class="fa ' + toolbar.methodkey + '"></i> ' + toolbar.text + '</button>&nbsp');
}
});
_tableListDistionarygroup = $('#Distionarygroup_list').bootstrapTable({
url: '${ctx}/ocr/dictionaryGroup/list' ,
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(*
sidePagination: "server",
height: "100%", pageList: [10, 25, 50],
ajaxOptions:{
headers: {"logintoken": parent.getLoginToken()}
},
queryParams: function queryParams(params) {
return {
sortorder: "desc",
sortname: "ID",
pagesize: params.limit,
start: (params.offset / params.limit) + 1,
search_codeno:'{"value":"' + $("#search_codeno").val() + '","op":"equal","type":"string"}',
search_groupname:'{"value":"' + $("#search_groupname").val() + '","op":"equal","type":"string"}'
};
},
responseHandler:function(res){
return{"rows": res.data.records, "total": res.data.total};
},
columns: [
{checkbox: true},
{ width:150,valign: "middle",field:'field',title:'字典组字段名',sortable:true},
{ width:150,valign: "middle",field:'label',title:'字典组描述',sortable:false},
{ width:150,valign: "middle",field:'remark',title:'备注',sortable:true},
{
width:200,
field: 'id',
title: '操作',
formatter:function(value,oData,index) {
var listOperation = "";
$(jspOperation).each(function (i, toolbar) {
listOperation = listOperation + "<a href=\"javascript:" + toolbar.actionmethod + "('${resourceid}" + toolbar.methodid + "','" + oData.id + "');\" class=\"btn " + toolbar.img + " btn-xs\")><i class=\"fa " + toolbar.methodkey + "\"></i> " + toolbar.text + " </a>&nbsp;&nbsp;";
});
return listOperation;
}
}
]
});
}
}
);
$("#Distionarytypeform").attr("action","${ctx}/backstage/admin/distionarytype/save");
var formType = $('#Distionarytypeform');
var errorType = $('.alert-danger', formType);
formType.validate({
debug: true,
errorElement: 'span',
errorClass: 'help-block help-block-error',
focusInvalid: false,
ignore: ":hidden",
errorPlacement: function (error, element) {
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
success: function (label) {
label.closest('.form-group').removeClass('has-error');
},
submitHandler: function (){
parent.layer.load();
$("#savebutton").addClass('disabled');
$("#Distionarytypeform").ajaxSubmit({
headers:{"logintoken": parent.getLoginToken()},
success:function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
parent.toastr.success(data.message);
refreshTableType();
closeTypeModel();
}else if(data.code == "ERRORM"){
$.each(data.message,function(name,anArray) {
$.each(anArray,function(n,value){
$("#" + n).closest('.form-group').addClass('has-error');
$("<span>").attr( "id", n + "-error" ).addClass("help-block help-block-error").html(value).insertAfter($("#" + n));
});
});
}else{
$("#savebutton").addClass('removeClass');
parent.toastr.error(data.message);
}
}
});
}
});
});
function distionarytypeformSubmit() {
$("#Distionarytypeform").submit();
}
function getIdSelections() {
return $.map(_tableListDistionarygroup.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function getIdSelectionsType() {
return $.map(_distionarytype_list.bootstrapTable('getSelections'), function(row) {
return row.id
});
}
function _editType(sourceid,dataid){
parent.axgetXiaoyao('${ctx}/backstage/admin/distionarytype/getdata/' + dataid,null,false , function(data){
if(data.code == "OK"){
$("#id").val(data.data.id);
$("#codeno").val(data.data.codeno);
$("#typename").val(data.data.typename);
$("#sorting").val(data.data.sorting);
if(data.data.enabled == 1){
$("input:radio[name='enabled']").eq(0).attr('checked',true);
}else if(data.data.enabled == 0){
$("input:radio[name='enabled']").eq(1).attr('checked',true);
}
showTypeModel();
}else{
parent.toastr.error("非法请求。");
}
});
}
function _addtType(sourceid,dataid){
showTypeModel();
}
function _useradd(jframeid){
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/admin/ocrDistionarygroupHtml/toSave',"添加字典分组",jframeid + '_add');
}
function viewManager(sourceid,distionarygroupid) {
parent._xiaoyaoOpenMenuTab('${ctx}/backstage/admin/ocrDistionaryHtml/toList?distionarygroupid=' + distionarygroupid + "#sourceid=" +sourceid,"详情管理",distionarygroupid + '_list_child');
}
function updateData(jframeid,str){
var url = '${ctx}/backstage/admin/ocrDistionarygroupHtml/toEdit/' + str ;
parent._xiaoyaoOpenMenuTab(url,"修改数据字典分组",jframeid + '_edit');
}
function _useredit(jframeid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if(str.length > 0 && tempstr.length > 1){
parent.toastr.error("每次只能修改一条信息。");
}else{
if (str.length > 0) {
updateData(jframeid,str);
} else {
parent.toastr.error("至少选择一条信息操作。");
}
}
}
function t_delete(str){
parent.layer.closeAll('loading');
parent.axgetXiaoyao('${ctx}/ocr/dictionaryGroup/delmore' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTable();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
}
function _deleteType(sourceid,str){
var tempstr = str.split(",");
if (str.length > 0 && tempstr.length > 0) {
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
parent.axgetXiaoyao('${ctx}/backstage/admin/distionarytype/delmore' , {id:str},false, function(data){
parent.layer.closeAll('loading');
if(data.code == "OK"){
swal(data.message, "您已经永久删除了这条信息。", "success");
refreshTableType();
closeTypeModel();
}else{
swal(data.message, "遇到未知错误!", "error");
}
});
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
} else {
parent.toastr.error("至少选择一条数据操作");
}
}
function _deletebu(sourceid){
var str = getIdSelections() + "";
var tempstr = str.split(",");
if (str.length > 0 && tempstr.length > 0) {
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
} else {
parent.toastr.error("至少选择一条数据操作");
}
}
function _delete(sourceid,str){
swal({
title: "您确定要删除这条信息吗",
text: "删除后将无法恢复,请谨慎操作!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "是的,我要删除!",
cancelButtonText: "让我再考虑一下…",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
if (isConfirm) {
t_delete(str);
} else {
swal("已取消", "您取消了删除操作!", "error");
}
});
}
function refreshTable(sourceid){
_tableListDistionarygroup.bootstrapTable('refreshOptions',{pageNumber:1});
}
function refreshTableType(){
_distionarytype_list.bootstrapTable('refreshOptions',{pageNumber:1});
}
</script>

@ -129,7 +129,7 @@
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label is-required"> 默认任务图片:</label>
<div class="col-sm-9">

@ -36,9 +36,9 @@
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="0">任务终审</option>
<option value="1">图鉴审批</option>
<option value="2">任务审核</option>
<option value="3">审核填报</option>
</select>
</div>

@ -37,9 +37,9 @@
<label class="col-sm-3 control-label is-required">* 页面类型:</label>
<div class="col-sm-9">
<select class="form-control" name='reviewType' id='reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="0">任务终审</option>
<option value="1">图鉴审批</option>
<option value="2">任务审核</option>
<option value="3">审核填报</option>
</select>
</div>

@ -21,9 +21,9 @@
</div>
<div class="form-group">
<select class="form-control" name='search_reviewType' id='search_reviewType'>
<option value="0">终审</option>
<option value="1">工单</option>
<option value="2">一审二审</option>
<option value="0">任务终审</option>
<option value="1">图鉴审批</option>
<option value="2">任务审核</option>
<option value="3">审核填报</option>
</select>
</div>
@ -84,7 +84,7 @@
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
pageSize: params.limit,
start: (params.offset / params.limit) + 1,
search_name:'{"value":"' + $("#search_name").val() + '","op":"equal","type":"string"}',
search_reviewType:'{"value":"' + $("#search_reviewType").val() + '","op":"equal","type":"string"}',
@ -101,13 +101,13 @@
formatter:function(value,oData,index) {
var listOperation = "";
if(oData.reviewType == 0){
listOperation = "终审";
listOperation = "任务终审";
}
else if(oData.reviewType == 1) {
listOperation = "工单";
listOperation = "图鉴审批";
}
else if(oData.reviewType == 2) {
listOperation = "一审二审";
listOperation = "任务审核";
}
else{
listOperation = "审核填报";

@ -69,7 +69,7 @@
$("#_mybutton").append('<button class="btn sbold ' + toolbar.img + '" onClick="' + toolbar.actionmethod + '(\'${resourceid}' + toolbar.methodid + '\')"> ' + ' <i class="fa ' + toolbar.methodkey + '"></i> ' + toolbar.text + '</button>&nbsp');
}
});
_tableListPost = $('#Post_list').bootstrapTable({
_tableListCommontword = $('#Post_list').bootstrapTable({
url: '${ctx}/ocr/picturelog/page',
pagination: true, //是否显示分页(*
pageNumber:1, //初始化加载第一页,默认第一页
@ -83,13 +83,11 @@
return {
sortorder: params.order,
sortname: params.sort,
pagesize: params.limit,
pageSize: params.limit,
start: (params.offset / params.limit) + 1,
callStatus: $("#callStatus").val(),
callTimeStart: params.callTimeStart,
callTimeEnd: params.callTimeEnd,
//search_callStatus:'{"value":"' + $("#search_callStatus").val() + '","op":"equal","type":"string"}',
//search_callTime:'{"value":"' + $("#search_callTime").val() + '","op":"equal","type":"string"}',
};
},
responseHandler:function(res){

@ -104,14 +104,14 @@
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-sm-offset-5">
<button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>
<button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>
</div>
</div>
</div>
<!-- <div class="row">-->
<!-- <div class="form-group">-->
<!-- <div class="col-sm-offset-5">-->
<!-- <button id="savebutton" type="submit" class="btn btn-w-m btn-primary">保存</button>-->
<!-- <button type="button" onclick="rolesback()" class="btn btn-w-m btn-success">取消</button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
</div>

@ -177,7 +177,10 @@
}else{
parent.axpostXiaoyao("${ctx}/backstage/admin/department/updateflowable",{"Processdefinitionid":Processdefinitionid,"deptid":deptid,"category":category},true ,function (data) {
if(data.code == "OK"){
parent.toastr.success("设置成功。");
refreshTable();
}else{
parent.toastr.error("失败。");
}
});
}

@ -139,7 +139,7 @@
<input name="email" id="email" placeholder="电子邮箱" class="form-control" type="text" maxlength="30" required>
</div>
</div>
<div class="form-group">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label">岗位</label>
<div class="col-sm-9">
<select data-placeholder="选择岗位..." name="userpost" id="userpost" class="chosen-select" style="width:350px;" tabindex="2">

@ -141,7 +141,7 @@
<input name="email" id="email" placeholder="电子邮箱" class="form-control" type="text" maxlength="30" required>
</div>
</div>
<div class="form-group">
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-9">
<select data-placeholder="选择岗位..." name="userpost" id="userpost" class="form-control" style="width:350px;" tabindex="2">

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>[xiaoyao]后台管理 - 登录</title>
<title>[OCR]后台管理 - 登录</title>
<meta name="keywords" content="后台管理">
<meta name="description" content="后台管理">
<link href="${ctx}/static/css/bootstrap.min.css" rel="stylesheet">
@ -34,10 +34,10 @@
<div class="col-sm-7">
<div class="signin-info">
<div class="logopanel m-b">
<h1>[xiaoyao]</h1>
<h1>[OCR]</h1>
</div>
<div class="m-b"></div>
<h4>欢迎使用 <strong>[xiaoyao]后台管理</strong></h4>
<h4>欢迎使用 <strong>[OCR]后台管理</strong></h4>
<ul class="m-b">
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势一</li>
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势二</li>
@ -52,7 +52,7 @@
<input type="hidden" name="projectpath" id="projectpath" value="${ctx}">
<form name="signupForm" method="post">
<h4 class="no-margins">登录:</h4>
<p class="m-t-md">登录到 [xiaoyao] 后台管理</p>
<p class="m-t-md">登录到 [OCR] 后台管理</p>
<input name="txtUsername" type="text" class="form-control uname" placeholder="用户名" />
<input name="txtPassword" type="password" class="form-control pword" placeholder="密码" />
<div class="input-group m-t m-b">

@ -136,7 +136,7 @@ public class MyAuthenticationProvider implements AuthenticationProvider {
//判断账号是否存在
if(!"admin".equals(loginname) && userTokenService.listLoginNameCount(agentcode,loginname).intValue() <= 0){
throw new AuthenticationServiceException("账号不存在!");
throw new AuthenticationServiceException("账号或企业编码不存在!");
}
//数据库查询用户对象

@ -185,6 +185,10 @@ public class User implements BaseDto,java.io.Serializable {
@TableField(exist = false)
private List<SFrontmenuT> frontmenuTList = new ArrayList<>();
//临时保存集合使用
@TableField(exist = false)
private List tempList = new ArrayList<>();
public UserToken getUserToken(){
UserToken userToken = BeanUtil.copyProperties(this,UserToken.class);

@ -288,7 +288,7 @@ public class DepartmentServiceImpl extends BaseServiceImpl<DepartmentMybatisDao,
jsoncell.put("id", departmentVo.getId().toString());
jsoncell.put("pId",departmentVo.getpId().toString());
jsoncell.put("name",departmentVo.getName());
jsoncell.put("deptNo",departmentVo.getDeptNo());
jsoncells.add(jsoncell);
}

@ -630,6 +630,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMybatisDao,User> imple
User user = this.usermybatisdao.selectById(id);
if(null != user){
List<SFrontmenuT> frontmenuTList1 = isFrontmenuTService.queryUserMenuById(user.getLoginname());
user.setFrontmenuTList(frontmenuTList1);
List<Department> departmentList = this.departmentMybatisDao.selectDeptByUserid(user.getId());
user.formatDeptlist(departmentList);
//user.setTenantList(this.userTenantService.listUserTenant(user.getId()));

@ -15,6 +15,9 @@ public class DepartmentVo implements Serializable{
private String name;
private String deptNo;
@JsonSerialize(using = ToStringSerializer.class)
public Long getId() {
return id;
@ -40,4 +43,12 @@ public class DepartmentVo implements Serializable{
public void setName(String name) {
this.name = name;
}
public String getDeptNo() {
return deptNo;
}
public void setDeptNo(String deptNo) {
this.deptNo = deptNo;
}
}

@ -168,7 +168,8 @@
select
ID AS id,
DEPARTNAME AS name,
PARENTID AS pId
PARENTID AS pId,
DEPTNO AS deptNo
from S_DEPARTMENT_T WHERE 1=1
<if test="enabled != null"> and ENABLED ${enabled.dataOp} ${enabled.likestar}#{enabled.value}${enabled.likeend}</if>
<if test="parentid != null"> and PARENTID ${parentid.dataOp} ${parentid.likestar}#{parentid.value}${parentid.likeend}</if>
@ -185,7 +186,8 @@
select
ID AS id,
DEPARTNAME AS name,
PARENTID AS pId
PARENTID AS pId,
DEPTNO AS deptNo
from S_DEPARTMENT_T WHERE ID = #{id}
</select>
<select id="selectRootidById" resultMap="BaseResultMap_only" parameterType="java.lang.Long">

@ -37,6 +37,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.*;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
@ -54,6 +56,7 @@ import java.util.stream.Collectors;
@RequestMapping("/flow/task")
public class FlowTaskController extends BaseController {
private static final Logger log = LoggerFactory.getLogger(FlowTaskController.class);
@Resource
IFlowTaskService flowTaskService;
@ -313,7 +316,8 @@ public class FlowTaskController extends BaseController {
return ResultVoUtil.error("租户主键不能为空");
}
if (org.apache.commons.lang3.StringUtils.isNotBlank(taskName)) {
searchQuery.addLike("fromtaskname", taskName);
// searchQuery.addLike("fromtaskname", taskName);
searchQuery.addLike("fuzzyRetrieval", taskName);
}
//获取用户预设检索条件id,如果存在检索条件,则高级检索失效
@ -402,7 +406,8 @@ public class FlowTaskController extends BaseController {
}
}
if (StringUtils.isNotBlank(taskName)) {
searchQuery.addLike("fromtaskname", taskName);
// searchQuery.addLike("fromtaskname", taskName);
searchQuery.addLike("fuzzyRetrieval", taskName);
}
if (org.springframework.util.StringUtils.hasText(izproject)) {
if (izproject.contains(",")) {
@ -676,8 +681,10 @@ public class FlowTaskController extends BaseController {
})
@GetMapping("/repetitionTask")
@ResponseBody
public ResultVo repetitionTask(@RequestParam(value = "type",required = false,defaultValue = "1") Integer type) {
return flowTaskService.repetitionTask(type);
public ResultVo repetitionTask(HttpServletRequest request,
@RequestParam(value = "type",required = false,defaultValue = "1") Integer type) {
String tenantId = request.getHeader("X-Tenant-Id");
return flowTaskService.repetitionTask(type,tenantId);
}
/**
@ -691,10 +698,36 @@ public class FlowTaskController extends BaseController {
})
@GetMapping("/repetitionTaskList")
@ResponseBody
public ResultVo repetitionTaskList(@RequestParam(name = "pageNo") Integer pageNo,
public ResultVo repetitionTaskList(HttpServletRequest request,
@RequestParam(name = "pageNo") Integer pageNo,
@RequestParam(name = "pageSize") Integer pageSize,
@RequestParam(value = "type",required = false,defaultValue = "1") Integer type) {
Page<OcrTaskchildPicture> result = flowTaskService.repetitionTaskList(pageNo, pageSize,type);
String tenantId = request.getHeader("X-Tenant-Id");
Page<OcrTaskchildPicture> result = flowTaskService.repetitionTaskList(pageNo, pageSize,type,tenantId);
return ResultVoUtil.success(result);
}
/**
*
*
* @return
*/
@ApiOperation(value = "失败重试无量云", notes = "失败重试无量云")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
})
@GetMapping("/retryPrevailCloud")
@ResponseBody
public ResultVo retryPrevailCloud(HttpServletRequest request,
@RequestParam(name = "formId") String formId) {
String tenantId = request.getHeader("X-Tenant-Id");
Boolean result = null;
try {
result = flowTaskService.retryPrevailCloud(tenantId,formId);
} catch (Exception e) {
log.error(e.getMessage());
result =false;
}
return ResultVoUtil.success(result);
}
}

@ -193,7 +193,9 @@ public interface IFlowTaskService {
*
* @return
*/
ResultVo repetitionTask(Integer type);
ResultVo repetitionTask(Integer type, String tenantId);
Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize,Integer type);
Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize, Integer type, String tenantId);
Boolean retryPrevailCloud(String tenantId, String formId) throws Exception;
}

@ -35,10 +35,12 @@ import cn.jyjz.xiaoyao.oa.from.service.*;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.oa.from.vo.RepeatedContentVo;
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
import cn.jyjz.xiaoyao.ocr.dataobject.*;
import cn.jyjz.xiaoyao.ocr.service.*;
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskchildPictureApproVo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -117,6 +119,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
private IOcrMsgService ocrMsgService;
@Resource
private UserdistionaryService userdistionaryService;
@Resource
private OcrPrevailCloudLogService prevailCloudLogService;
@Resource
private PrevailCloudApi prevailCloudApi;
@Override
public void myTodoTaskList(PageUtils vo, HttpServletRequest request) {
@ -599,7 +605,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
model.setFinishtime(System.currentTimeMillis());
model.setStates(SystemConstantsOa.OA_STATUS_TYPE_END);
OcrPicture picture = ocrPictureService.getById(model.getPictureid());
ocrTaskchildPictureService.sendFlowTaskResult(childPicture, picture, approve);
Boolean result = ocrTaskchildPictureService.sendFlowTaskResult(childPicture, picture, approve);
model.setSendResult(result ? 1 : 0);
} else {
childPicture.setTaskNode(taskData.getDescription());
//判断节点上的描述字段是否伟finale_judgment,如果是,记录到终审表中,如果终审表已经存在,不再重复记录
@ -1561,9 +1568,20 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
//补充历史状态名称,检查补充节点信息
for (OcrTaskchildPictureAppro ocrTaskchildPictureAppro : list) {
String assignee = ocrTaskchildPictureAppro.getAssignee();
//审批节点 当前如果没有历史操作,则将当前节点赋值到历史审批节点中.
if (StringUtils.isBlank(ocrTaskchildPictureAppro.getTasknamehis())) {
ocrTaskchildPictureAppro.setTasknamehis(ocrTaskchildPictureAppro.getTaskname());
} else {
if (assignee.contains(",")) {
String[] split = assignee.split(",");
for (int i = 0; i < split.length; i++) {
if (user.getLoginname().equals(split[i])) {
String[] taskIds = ocrTaskchildPictureAppro.getTasknamehis().split(",");
ocrTaskchildPictureAppro.setTasknamehis(taskIds[i]);
}
}
}
}
if (ocrTaskchildPictureAppro.getStatshis() != null) {
@ -1610,6 +1628,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
ocrTaskchildPictureApproVo.setProjectName(one.getFromprojectname());//项目名称
ocrTaskchildPictureApproVo.setCustomerLevel(one.getFromCustomerLevel());//客户级别
ocrTaskchildPictureApproVo.setReleaseArea(one.getFromCity());//拜访城市
ocrTaskchildPictureApproVo.setFromplanid(one.getFromplanid());//所属计划
ocrTaskchildPictureApproVo.setTaskIndex(one.getTaskNodeIndex() == null ? one.getTasknode() : one.getTaskNodeIndex());
listNew.add(ocrTaskchildPictureApproVo);
@ -1944,8 +1963,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
@Override
public ResultVo repetitionTask(Integer type) {
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask(type);
public ResultVo repetitionTask(Integer type, String tenantId) {
List<RepeatedContentVo> repeatedContentVoList = flowableccMybatisDao.repetitionTask(type, tenantId);
List<String> formIdsToUpdate = new ArrayList<>();
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(repeatedContentVoList)) {
List<OcrCheckDescribeHis> checkDescribeHis = new ArrayList<>();
@ -1993,12 +2012,18 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
@Override
public Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize, Integer type) {
public Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize, Integer type, String tenantId) {
Page<OcrTaskchildPicture> page = new Page<>(pageNo, pageSize);
Page<OcrTaskchildPicture> result = flowableccMybatisDao.repetitionTaskList(page, type);
Page<OcrTaskchildPicture> result = flowableccMybatisDao.repetitionTaskList(page, type, tenantId);
return result;
}
@Override
public Boolean retryPrevailCloud(String tenantId, String formId) throws Exception {
OcrPrevailCloudLog one = prevailCloudLogService.getOne(new LambdaQueryWrapper<OcrPrevailCloudLog>().eq(OcrPrevailCloudLog::getFormId, formId));
return prevailCloudApi.sendFlowTaskResult(formId, one.getRequestParam(), one.getPictureId(), one.getTaskId());
}
/**
*
*

@ -0,0 +1,113 @@
package cn.jyjz.xiaoyao.frontmenu.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import cn.jyjz.xiaoyao.frontmenu.service.FrontmenuService;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@RestController
@RequestMapping("/backstage/oa/frontmenu")
public class FrontmenuController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private FrontmenuService frontmenuService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*jsondto
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/list")
public ResultVo<IPage<Frontmenu>> listSFrontmenuT(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
cn.jyjz.xiaoyao.admin.dataobject.User user = this.userService.getSessionUser(request);
Frontmenu sfrontmenut = new Frontmenu();
sfrontmenut.setSearchQueryrolesShowleave(user.getSearchQueryrolesShowleave());
QueryWrapper<Frontmenu> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,sfrontmenut);
IPage<Frontmenu> page = this.frontmenuService.selectSearchListPage(paramterPage,queryWrapper);;
return ResultVoUtil.success(page);
}
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@PostMapping("/save")
public ResultVo saveSFrontmenuT(HttpServletResponse response,HttpServletRequest request,Frontmenu tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.frontmenuService.save(tab);
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@PostMapping("/edit")
public ResultVo editSFrontmenuT(HttpServletResponse response,HttpServletRequest request,Frontmenu tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.frontmenuService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/getdata/{id}")
@ResponseBody
public ResultVo getdateSFrontmenuT(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") Long id) throws IOException{
Frontmenu dto = this.frontmenuService.selectDtoById(id);
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*id1,2,3
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreSFrontmenuT(HttpServletResponse response,HttpServletRequest request) throws IOException{
String ids = request.getParameter("id");
this.frontmenuService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
}

@ -0,0 +1,69 @@
package cn.jyjz.xiaoyao.frontmenu.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.frontmenu.service.FrontmenuService;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
@Controller
@RequestMapping("/backstage/oa/frontmenuHtml")
public class FrontmenuHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private FrontmenuService frontmenuService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/toList")
public String toListSFrontmenuT(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/frontmenu/list";
}
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/toSave")
public String toSaveSFrontmenuT(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/frontmenu/add";
}
/**
*ID
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/toEdit/{id}")
public String toEditSFrontmenuT(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") String id){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("id", id);
return "/backstage/oa/frontmenu/edit";
}
}

@ -0,0 +1,104 @@
package cn.jyjz.xiaoyao.frontmenu.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.admin.dataobject.User;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import cn.jyjz.xiaoyao.frontmenu.dataobject.UserFrontmenu;
import cn.jyjz.xiaoyao.frontmenu.service.UserFrontmenuService;
import com.alanpoi.common.util.StringUtils;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@RestController
@RequestMapping("/backstage/oa/userfrontmenu")
public class UserFrontmenuController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private UserFrontmenuService userFrontmenuService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*jsondto
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/list")
public ResultVo<IPage<User>> listUserFrontmenu(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
User user = this.userService.getSessionUser(request);
QueryWrapper<User> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,user,"u.");
queryWrapper.ne("u.ID",user.getId());
IPage<User> page = this.userService.selectSearchListPage(paramterPage,queryWrapper);
for(User usermodel:page.getRecords()){
//查询关联的菜单集合
List<Frontmenu> list = this.userFrontmenuService.listByUserid(usermodel.getId().toString());
usermodel.setTempList(list);
}
return ResultVoUtil.success(page);
}
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@PostMapping("/saveactiongrant")
public ResultVo saveSUserFrontmenuT(HttpServletResponse response,HttpServletRequest request) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
//获取选中的前端菜单主键
String menuids = request.getParameter("menuids");
String userid = request.getParameter("userid");
if(StringUtils.isNotBlank(menuids)){
String[] mids = menuids.split(",");
List<UserFrontmenu> userFrontmenuList = new ArrayList<>();
for(String mid:mids){
UserFrontmenu userFrontmenu = new UserFrontmenu();
userFrontmenu.setMenuid(Long.parseLong(mid));
userFrontmenu.setUserid(Long.parseLong(userid));
userFrontmenuList.add(userFrontmenu);
}
//保存之前先删除关联
this.userFrontmenuService.removeByUserid(userid);
return this.userFrontmenuService.saveBatch(userFrontmenuList)?ResultVoUtil.success():ResultVoUtil.error();
}
return ResultVoUtil.error();
}
}

@ -0,0 +1,45 @@
package cn.jyjz.xiaoyao.frontmenu.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jyjz.xiaoyao.frontmenu.service.UserFrontmenuService;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
@Controller
@RequestMapping("/backstage/oa/userfrontmenuHtml")
public class UserFrontmenuHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private UserFrontmenuService userFrontmenuService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2024-04-21 20:49:27
**/
@GetMapping("/showlist")
public String toListSUserFrontmenuT(HttpServletResponse response,HttpServletRequest request){
request.setAttribute("resourceid","3");
return "/backstage/oa/frontmenu/userfrontmenu";
}
}

@ -0,0 +1,11 @@
package cn.jyjz.xiaoyao.frontmenu.dataDao;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface FrontmenuMybatisDao extends BaseMapper<Frontmenu> {
}

@ -0,0 +1,11 @@
package cn.jyjz.xiaoyao.frontmenu.dataDao;
import cn.jyjz.xiaoyao.frontmenu.dataobject.UserFrontmenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
*
*/
@Mapper
public interface UserFrontmenuMybatisDao extends BaseMapper<UserFrontmenu> {
}

@ -0,0 +1,103 @@
package cn.jyjz.xiaoyao.frontmenu.dataobject;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
import java.util.AbstractMap.SimpleEntry;
import java.util.stream.Stream;
import java.util.stream.Collectors;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "前端菜单管理", title = "前端菜单管理")
@TableName(value = "s_frontmenu_t")
public class Frontmenu implements BaseDto,java.io.Serializable {
private static final long serialVersionUID = -7176960824610287118L;
@Schema(description = "主键ID")
@TableId(value = "id",type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
@TableField(value="id")
private Long id;
@Schema(description = "null")
@TableField(value="name")
private String name;
@Schema(description = "父级菜单ID")
@TableField(value="parentId")
private Integer parentid;
@Schema(description = "null")
@TableField(value="resKey")
private String reskey;
@Schema(description = "null")
@TableField(value="resUrl")
private String resurl;
@Schema(description = "菜单级别")
@TableField(value="level")
private Integer level;
@Schema(description = "null")
@TableField(value="icon")
private String icon;
@Schema(description = "菜单排序")
@TableField(value="orderNum")
private Integer ordernum;
@Schema(description = "菜单是否隐藏0:否,1:是)")
@TableField(value="ishide")
private Integer ishide;
@Schema(description = "null")
@TableField(value="description")
private String description;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
private SearchQuery searchQueryrolesShowleave;
@TableField(exist = false)
private final Map<String,String> query = Stream.of(
new SimpleEntry<>("LISTDEPT","deptid"),
new SimpleEntry<>("ID","id"),
new SimpleEntry<>("NAME","name"),
new SimpleEntry<>("PARENTID","parentid"),
new SimpleEntry<>("RESKEY","reskey"),
new SimpleEntry<>("RESURL","resurl"),
new SimpleEntry<>("LEVEL","level"),
new SimpleEntry<>("ICON","icon"),
new SimpleEntry<>("ORDERNUM","ordernum"),
new SimpleEntry<>("ISHIDE","ishide"),
new SimpleEntry<>("DESCRIPTION","description")
)
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
}

@ -0,0 +1,57 @@
package cn.jyjz.xiaoyao.frontmenu.dataobject;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
import java.util.AbstractMap.SimpleEntry;
import java.util.stream.Stream;
import java.util.stream.Collectors;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "用户和前端菜单关系表", title = "用户和前端菜单关系表")
@TableName(value = "s_user_frontmenu_t")
public class UserFrontmenu implements BaseDto,java.io.Serializable {
private static final long serialVersionUID = 3139365577414759746L;
@Schema(description = "用户主键id")
@TableField(value="userId")
private Long userid;
@Schema(description = "菜单ID")
@TableField(value="menuId")
private Long menuid;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
private SearchQuery searchQueryrolesShowleave;
@TableField(exist = false)
private final Map<String,String> query = Stream.of(
new SimpleEntry<>("listdept","deptid"),
new SimpleEntry<>("userId","userid"),
new SimpleEntry<>("menuId","menuid")
)
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
}

@ -0,0 +1,11 @@
package cn.jyjz.xiaoyao.frontmenu.service;
import java.util.List;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
/**
*
*/
public interface FrontmenuService extends BaseService<Frontmenu> {
}

@ -0,0 +1,26 @@
package cn.jyjz.xiaoyao.frontmenu.service;
import java.util.List;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import cn.jyjz.xiaoyao.frontmenu.dataobject.UserFrontmenu;
/**
*
*/
public interface UserFrontmenuService extends BaseService<UserFrontmenu> {
/**
*
* @param userid
* @return
*/
public List<Frontmenu> listByUserid(String userid);
/**
*
* @param userid
* @return
*/
public boolean removeByUserid(String userid);
}

@ -0,0 +1,20 @@
package cn.jyjz.xiaoyao.frontmenu.service.impl;
import cn.jyjz.xiaoyao.frontmenu.dataDao.FrontmenuMybatisDao;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import cn.jyjz.xiaoyao.frontmenu.service.FrontmenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
/**
*
*/
@Service
@Slf4j
public class FrontmenuServiceImpl extends BaseServiceImpl<FrontmenuMybatisDao, Frontmenu> implements FrontmenuService {
@Autowired
private FrontmenuMybatisDao frontmenuMybatisDao;
}

@ -0,0 +1,64 @@
package cn.jyjz.xiaoyao.frontmenu.service.impl;
import cn.jyjz.xiaoyao.frontmenu.dataDao.UserFrontmenuMybatisDao;
import cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu;
import cn.jyjz.xiaoyao.frontmenu.dataobject.UserFrontmenu;
import cn.jyjz.xiaoyao.frontmenu.service.FrontmenuService;
import cn.jyjz.xiaoyao.frontmenu.service.UserFrontmenuService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
*
*/
@Service
@Slf4j
public class UserFrontmenuServiceImpl extends BaseServiceImpl<UserFrontmenuMybatisDao, UserFrontmenu> implements UserFrontmenuService {
@Resource
private UserFrontmenuMybatisDao userFrontmenuMybatisDao;
@Resource
private FrontmenuService frontmenuService;
/**
*
* @param userid
* @return
*/
public List<Frontmenu> listByUserid(String userid){
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("userId",userid);
List<UserFrontmenu> userFrontmenuList = this.userFrontmenuMybatisDao.selectList(queryWrapper);
List<Frontmenu> list = null;
if(null != userFrontmenuList && !userFrontmenuList.isEmpty()){
List<Long> ufidList = userFrontmenuList.stream().map(UserFrontmenu::getMenuid).collect(Collectors.toList());
QueryWrapper fmQuery = new QueryWrapper();
fmQuery.in("id",ufidList);
list = this.frontmenuService.selectSearchList(fmQuery);
}
return list;
}
/**
*
* @param userid
* @return
*/
public boolean removeByUserid(String userid){
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("userId",userid);
return this.remove(queryWrapper);
}
}

@ -40,7 +40,7 @@ public interface FlowableccMybatisDao extends BaseMapper<Flowablecc> {
*/
List<UserDistionaryVo> selectUserByFromid(String fromid);
List<RepeatedContentVo> repetitionTask(@Param("type") Integer type);
List<RepeatedContentVo> repetitionTask(@Param("type") Integer type, @Param("tenantId") String tenantId);
Page<OcrTaskchildPicture> repetitionTaskList(Page<OcrTaskchildPicture> page, @Param("type") Integer type);
Page<OcrTaskchildPicture> repetitionTaskList(Page<OcrTaskchildPicture> page, @Param("type") Integer type, @Param("tenantId") String tenantId);
}

@ -3,7 +3,6 @@ package cn.jyjz.xiaoyao.ocr.api;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceParameter;
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiPage;
import org.apache.commons.compress.utils.Lists;
import java.util.List;
@ -23,7 +22,7 @@ public interface PrevailCloudApi {
*/
ApiPage<PictureSourceResult> pullPictureSource(PictureSourceParameter pictureSourceParameter) throws Exception;
void sendFlowTaskResult(String tenantId,String data) throws Exception;
Boolean sendFlowTaskResult(String formId, String data, Long pictureId, String remark) throws Exception;
/**
* id

@ -11,8 +11,11 @@ import cn.jyjz.xiaoyao.ocr.api.utils.ApiHelper;
import cn.jyjz.xiaoyao.ocr.api.utils.ApiPage;
import cn.jyjz.xiaoyao.ocr.api.utils.RequestData;
import cn.jyjz.xiaoyao.ocr.api.utils.ResultData;
import cn.jyjz.xiaoyao.ocr.common.PrevailCloudConstant;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrPrevailCloudLogService;
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
import cn.jyjz.xiaoyao.ocr.thread.entity.PictureImgToLocalEntity;
import cn.jyjz.xiaoyao.ocr.util.httputil.HttpClient;
@ -28,6 +31,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -51,6 +55,9 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
@Autowired
private ApiConfig apiConfig;
@Resource
private OcrPrevailCloudLogService prevailCloudLogService;
/**
*
*/
@ -78,7 +85,9 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
if (!apiConfig.checkConfig()) {
return null;
}
OcrPrevailCloudLog prevailCloudLog = new OcrPrevailCloudLog();
prevailCloudLog.setType(PrevailCloudConstant.PULL_PICTURE_SOURCE);
prevailCloudLog.setRequestParam(JSONUtil.toJsonStr(pictureSourceParameter));
//2.对象转map
Map<String, Object> queryParam = BeanUtil.beanToMap(pictureSourceParameter);
Map<String, String> queryParamStr = new HashMap<>();
@ -108,6 +117,8 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
String responseJsonStr = HttpClient.doPost(url, httpParamers, null, apiConfig.getConnectTimeout(), apiConfig.getReadTimeout());
System.out.println(responseJsonStr);
ResultData<String> resultData = JSONUtil.toBean(responseJsonStr, ResultData.class);
prevailCloudLog.setResponseParam(responseJsonStr);
prevailCloudLog.setStatus(resultData.getStatus());
//解密请求数据
if (resultData.getStatus() == 100) {
@ -126,11 +137,18 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
logger.debug("请求图片接口数据失败,参数:{},返回值:{}", json, responseJsonStr);
}
prevailCloudLogService.save(prevailCloudLog);
return null;
}
@Override
public void sendFlowTaskResult(String tenantId, String data) throws Exception {
public Boolean sendFlowTaskResult(String formId, String data, Long pictureId, String remark) throws Exception {
OcrPrevailCloudLog prevailCloudLog = new OcrPrevailCloudLog();
prevailCloudLog.setType(PrevailCloudConstant.SEND_FLOW_RESULT);
prevailCloudLog.setRequestParam(data);
prevailCloudLog.setFormId(Long.parseLong(formId));
prevailCloudLog.setTaskId(remark);
prevailCloudLog.setPictureId(pictureId);
ResultData<String> stringResultData = ApiHelper.buildResponse(apiConfig.getAccessCode(), data);
// RequestData requestData = ApiHelper.buildRequest(tenantId, apiConfig.getAccessKey(), apiConfig.getAccessCode(),data);//组装请求参数
String url = apiConfig.getInterfaceDomain() + sendResultUrl;
@ -141,11 +159,21 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
httpParamers.setJsonParamer(requestBodyJson);
//发起请求
String responseJsonStr = HttpClient.doPost(url, httpParamers, null, apiConfig.getConnectTimeout(), apiConfig.getReadTimeout());
System.out.println(responseJsonStr);
prevailCloudLog.setResponseParam(responseJsonStr);
ResultData<String> resultData = JSONUtil.toBean(responseJsonStr, ResultData.class);
prevailCloudLog.setStatus(resultData.getStatus());
prevailCloudLogService.save(prevailCloudLog);
if (resultData.getStatus() == 100) {
return true;
}
return false;
}
@Override
public void pullAccountInfo(long tenantNo) throws Exception {
OcrPrevailCloudLog prevailCloudLog = new OcrPrevailCloudLog();
prevailCloudLog.setType(PrevailCloudConstant.PULL_ACCOUNT_INFO);
prevailCloudLog.setRequestParam(String.valueOf(tenantNo));
Map<String, Object> queryParam = new HashMap<>();
queryParam.put("tenantNo", tenantNo);
String json = JSONObject.toJSONString(queryParam);
@ -159,8 +187,9 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
String responseJsonStr = HttpClient.doPost(url, httpParamers, null, apiConfig.getConnectTimeout(), apiConfig.getReadTimeout());
System.out.println(responseJsonStr);
ResultData<String> resultData = JSONUtil.toBean(responseJsonStr, ResultData.class);
prevailCloudLog.setResponseParam(responseJsonStr);
prevailCloudLog.setStatus(resultData.getStatus());
if (resultData.getStatus() == 100) {
;
//解析基础数据
String data = ApiHelper.decryptResponse(apiConfig.getAccessCode(), resultData);
ApiPage<String> apiPage = JSONUtil.toBean(data, ApiPage.class);
@ -174,6 +203,8 @@ public class PrevailCloudApiImpl implements PrevailCloudApi {
// resultApiPage.setRecords(listResult);
// return resultApiPage;
}
prevailCloudLogService.save(prevailCloudLog);
}
/**

@ -0,0 +1,19 @@
package cn.jyjz.xiaoyao.ocr.common;
/**
* ClassName PrevailCloudConstant$.java
* Description:
* Author scl.
* Date 2024/4/25 8:36
*/
public class PrevailCloudConstant {
public static Integer PULL_PICTURE_SOURCE = 0;
public static Integer SEND_FLOW_RESULT = 1;
public static Integer PULL_ACCOUNT_INFO = 2;
}

@ -146,10 +146,6 @@ public class ApiTestController {
Map<Long, Department> departmentMap = Maps.newHashMapWithExpectedSize(departments.size());
for (Department department : departments) {
if (department.getDlevel() == 0) {
continue;
}
departmentMap.put(department.getId(), department);
}
@ -238,10 +234,6 @@ public class ApiTestController {
Map<Long, Department> departmentMap = Maps.newHashMapWithExpectedSize(departments.size());
for (Department department : departments) {
if (department.getDlevel() == 0) {
continue;
}
departmentMap.put(department.getId(), department);
}

@ -1,10 +1,27 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.admin.dataobject.Department;
import cn.jyjz.xiaoyao.admin.service.DepartmentService;
import cn.jyjz.xiaoyao.admin.service.ResourcesService;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.constant.SystemConstants;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.framework.security.model.AdminUserModel;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionary;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionary;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionaryGroup;
import cn.jyjz.xiaoyao.ocr.service.OcrDictionaryService;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -16,6 +33,10 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* ocr_
@ -27,11 +48,26 @@ import java.io.IOException;
@Api(tags="ocr_业务数据数据字典")
@RestController
@RequestMapping("/ocr/dictionary")
public class OcrDictionaryController {
public class OcrDictionaryController extends BaseController {
@Autowired
private OcrDictionaryService ocrDictionaryService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
@Autowired
private DepartmentService departmentService;
@Autowired
private ResourcesService resourcesService;
/**
*
*mail.zhangyong@gmail.com
@ -81,4 +117,90 @@ public class OcrDictionaryController {
return new ResultVo<>(ResultVo.ERROR,result);
}
/**
*jsondto
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/list")
public ResultVo<IPage<OcrDictionary>> listDistionarygroup(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException {
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
cn.jyjz.xiaoyao.admin.dataobject.User user = this.userService.getSessionUser(request);
OcrDictionary distionarygroup = new OcrDictionary();
distionarygroup.setSearchQueryrolesShowleave(user.getSearchQueryrolesShowleave());
QueryWrapper<OcrDictionary> queryWrapper = SearchQueryFormat
.queryStringFormat(searchQuery,distionarygroup);
IPage<OcrDictionary> page = this.ocrDictionaryService.selectSearchListPage(paramterPage,queryWrapper);;
List<OcrDictionary> records = page.getRecords();
List<Long> tenantIds = records.stream().map(OcrDictionary::getTenantId).collect(Collectors.toList());
List<Department> departments = departmentService.list(new LambdaQueryWrapper<Department>().in(Department::getDeptno, tenantIds));
Map<String, String> deptNameMap = departments.stream().collect(Collectors.toMap(Department::getDeptno, Department::getDepartname));
records.forEach(s->{
s.setTenantName(deptNameMap.get(String.valueOf(s.getTenantId())));
});
return ResultVoUtil.success(page);
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@PostMapping("/save")
public ResultVo saveDistionarygroup(HttpServletResponse response,HttpServletRequest request,OcrDictionary tab) throws IOException{
OcrDictionary ocrDictionaryGroup = ocrDictionaryService.getOne(new LambdaQueryWrapper<OcrDictionary>().eq(OcrDictionary::getValue, tab.getValue()));
if(Objects.nonNull(ocrDictionaryGroup)&&!ocrDictionaryGroup.getId().equals(tab.getId())){
return ResultVoUtil.error("字段名称重复");
}
this.ocrDictionaryService.saveOrUpdate(tab);
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@PostMapping("/edit")
public ResultVo editDistionarygroup(HttpServletResponse response,HttpServletRequest request,OcrDictionary tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrDictionaryService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/getdata/{id}")
@ResponseBody
public ResultVo getdateDistionarygroup(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") Long id) throws IOException{
OcrDictionary dto = this.ocrDictionaryService.selectDtoById(id);
Department one = departmentService.getOne(new LambdaQueryWrapper<Department>().eq(Department::getDeptno, dto.getTenantId()).last("limit 1"));
dto.setTenantName(Objects.nonNull(one)?one.getDepartname():"");
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*id1,2,3
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreDistionarygroup(HttpServletResponse response,HttpServletRequest request) throws IOException{
String ids = request.getParameter("id");
this.ocrDictionaryService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
}

@ -0,0 +1,186 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.admin.dataobject.Distionarygroup;
import cn.jyjz.xiaoyao.admin.dataobject.Distionarytype;
import cn.jyjz.xiaoyao.admin.service.ResourcesService;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.constant.SystemConstants;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
import cn.jyjz.xiaoyao.framework.security.model.AdminUserModel;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionary;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionaryGroup;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrField;
import cn.jyjz.xiaoyao.ocr.dto.OcrFieldDto;
import cn.jyjz.xiaoyao.ocr.service.OcrDictionaryGroupService;
import cn.jyjz.xiaoyao.ocr.service.OcrDictionaryService;
import cn.jyjz.xiaoyao.ocr.vo.OcrFieldVo;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* ocr_
*
* @author hugh(shuli.yao) 1397940314@qq.com
* @version 1.0
* @date 2024/3/16 15:16
*/
@Api(tags="ocr_业务数据数据字典")
@RestController
@RequestMapping("/ocr/dictionaryGroup")
public class OcrDictionaryGropuController extends BaseController {
@Autowired
private OcrDictionaryGroupService ocrDictionaryGroupService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
@Autowired
private ResourcesService resourcesService;
/**
*jsondto
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/list")
public ResultVo<IPage<OcrDictionaryGroup>> listDistionarygroup(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException {
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
cn.jyjz.xiaoyao.admin.dataobject.User user = this.userService.getSessionUser(request);
OcrDictionaryGroup distionarygroup = new OcrDictionaryGroup();
distionarygroup.setSearchQueryrolesShowleave(user.getSearchQueryrolesShowleave());
QueryWrapper<OcrDictionaryGroup> queryWrapper = SearchQueryFormat
.queryStringFormat(searchQuery,distionarygroup);
IPage<OcrDictionaryGroup> page = this.ocrDictionaryGroupService.selectSearchListPage(paramterPage,queryWrapper);;
return ResultVoUtil.success(page);
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/toolsbarOther")
@ResponseBody
public ResultVo<JSONObject> toolsbarOther(HttpServletResponse response, HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
if(StringUtils.isBlank(resourceid)){
resourceid = "26";
}
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
AdminUserModel adminUserModel = (AdminUserModel) this.userTokenService.getSessionUserFromCache(userToken.getTokenid());
cn.jyjz.xiaoyao.common.base.vo.User user = adminUserModel.getUser();
JSONObject jsonObject = this.resourcesService.getResourceMethod(Long.decode(resourceid), user);
JSONArray toolsbar = (JSONArray) jsonObject.get(SystemConstants.SYS_JSP_TOOLSBAR);
if(null == toolsbar || toolsbar.isEmpty()){
jsonObject = this.resourcesService.getObjectByResourceid(resourceid);
}
return ResultVoUtil.success(jsonObject);
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@PostMapping("/save")
public ResultVo saveDistionarygroup(HttpServletResponse response,HttpServletRequest request,OcrDictionaryGroup tab) throws IOException{
OcrDictionaryGroup ocrDictionaryGroup = ocrDictionaryGroupService.getOne(new LambdaQueryWrapper<OcrDictionaryGroup>().eq(OcrDictionaryGroup::getField, tab.getField()));
if(Objects.nonNull(ocrDictionaryGroup)&&!ocrDictionaryGroup.getId().equals(tab.getId())){
return ResultVoUtil.error("字段名称重复");
}
this.ocrDictionaryGroupService.saveOrUpdate(tab);
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@PostMapping("/edit")
public ResultVo editDistionarygroup(HttpServletResponse response,HttpServletRequest request,OcrDictionaryGroup tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrDictionaryGroupService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/getdata/{id}")
@ResponseBody
public ResultVo getdateDistionarygroup(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") Long id) throws IOException{
OcrDictionaryGroup dto = this.ocrDictionaryGroupService.selectDtoById(id);
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*id1,2,3
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreDistionarygroup(HttpServletResponse response,HttpServletRequest request) throws IOException{
String ids = request.getParameter("id");
this.ocrDictionaryGroupService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
@GetMapping("/listall")
public ResultVo<List<OcrDictionaryGroup>> listall(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{
List<OcrDictionaryGroup> list = this.ocrDictionaryGroupService.list();
return ResultVoUtil.success(list);
}
}

@ -0,0 +1,78 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.admin.dataobject.Distionarygroup;
import cn.jyjz.xiaoyao.admin.service.DistionaryService;
import cn.jyjz.xiaoyao.admin.service.DistionarygroupService;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("/backstage/admin/ocrDistionaryHtml")
public class OcrDistionaryHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private DistionaryService distionaryService;
@Autowired
private DistionarygroupService distionarygroupService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2022-03-29 16:00:28
**/
@GetMapping("/toList")
public String toListDistionary(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
String distionarygroupid = request.getParameter("distionarygroupid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("distionarygroupid",distionarygroupid);
request.setAttribute("distionarytypeid","212");
return "/backstage/oa/ocr/distionary/list";
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-29 16:00:28
**/
@GetMapping("/toSave")
public String toSaveDistionary(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/distionary/add";
}
/**
*ID
*mail.zhangyong@gmail.com
*2022-03-29 16:00:28
**/
@GetMapping("/toEdit/{id}")
public String toEditDistionary(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") String id){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("id", id);
return "/backstage/oa/ocr/distionary/edit";
}
}

@ -0,0 +1,71 @@
package cn.jyjz.xiaoyao.ocr.controller;
import cn.jyjz.xiaoyao.admin.service.DistionarygroupService;
import cn.jyjz.xiaoyao.admin.service.UserService;
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("/backstage/admin/ocrDistionarygroupHtml")
public class OcrDistionarygroupHtmlController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private DistionarygroupService distionarygroupService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private UserService userService;
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/toList")
public String toListDistionarygroup(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/distionarygroup/list";
}
/**
*
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/toSave")
public String toSaveDistionarygroup(HttpServletResponse response,HttpServletRequest request){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
return "/backstage/oa/ocr/distionarygroup/add";
}
/**
*ID
*mail.zhangyong@gmail.com
*2022-03-07 15:15:08
**/
@GetMapping("/toEdit/{id}")
public String toEditDistionarygroup(HttpServletResponse response,HttpServletRequest request,@PathVariable("id") String id){
String resourceid = request.getParameter("resourceid");
request.setAttribute("resourceid",resourceid);
request.setAttribute("id", id);
return "/backstage/oa/ocr/distionarygroup/edit";
}
}

@ -10,7 +10,9 @@ import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPictureInfo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureInfoService;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import cn.jyjz.xiaoyao.ocr.util.DataUtil;
@ -55,6 +57,8 @@ public class OcrPictureController extends BaseController {
private UserService userService;
@Resource
private LogService logService;
@Resource
private OcrPictureInfoService ocrPictureInfoService;
/**
*
@ -333,11 +337,11 @@ public class OcrPictureController extends BaseController {
Map<Long, List<OcrPicture>> completeSimilarGroupMap = ocrPictures.stream().filter(s->Objects.nonNull(s.getCompleteSimilarGroupId())).collect(Collectors.groupingBy(OcrPicture::getCompleteSimilarGroupId));
for (OcrPicture ocrPictureOne : ocrPictures) {
filterScoreNoGroup(ocrPictureOne,completeSimilarGroupMap);
filterScoreNoGroup(ocrPictureOne, completeSimilarGroupMap);
LambdaQueryWrapper<OcrTaskchildPicture> ocrTaskchildPictureLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrTaskchildPictureLambdaQueryWrapper.eq(OcrTaskchildPicture::getPictureid, ocrPictureOne.getId());
OcrTaskchildPicture ocrTaskchildPicture = ocrTaskchildPictureService.getOne(ocrTaskchildPictureLambdaQueryWrapper);
if(ocrTaskchildPicture != null && ocrTaskchildPicture.getStates() != null){
if (ocrTaskchildPicture != null && ocrTaskchildPicture.getStates() != null) {
switch (ocrTaskchildPicture.getStates()) {
case 1:
ocrPictureOne.setField16("未提交");
@ -354,7 +358,17 @@ public class OcrPictureController extends BaseController {
}
ocrPictureOne.setStates(ocrTaskchildPicture.getStates());
}
LambdaQueryWrapper<OcrPictureInfo> ocrPictureInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrPictureInfoLambdaQueryWrapper.eq(OcrPictureInfo::getPictureId, ocrPictureOne.getId());
OcrPictureInfo ocrPictureInfo = ocrPictureInfoService.getOne(ocrPictureInfoLambdaQueryWrapper);
ocrPicturesNew.add(ocrPictureOne);
if (ocrPictureInfo != null && ocrPictureInfo.getImgMeasure() != null) {
String[] dimensions = ocrPictureInfo.getImgMeasure().split("x");
if (dimensions.length == 2) {
ocrPictureOne.setWide(dimensions[0]);
ocrPictureOne.setHigh(dimensions[1]);
}
}
}
pageList.setRecords(ocrPicturesNew);
@ -363,9 +377,9 @@ public class OcrPictureController extends BaseController {
private void filterScoreNoGroup(OcrPicture ocrPictureOne,Map<Long, List<OcrPicture>> completeSimilarGroupMap){
//过滤阈值为100的但是没有对应分类的图片
if(Objects.nonNull(ocrPictureOne.getSimilarityscore())&&ocrPictureOne.getSimilarityscore()==100&&Objects.nonNull(ocrPictureOne.getCompleteSimilarGroupId())&&completeSimilarGroupMap.get(ocrPictureOne.getCompleteSimilarGroupId()).size()>1){
if(Objects.nonNull(ocrPictureOne.getSimilarityscore())&&ocrPictureOne.getSimilarityscore()==100&&Objects.nonNull(ocrPictureOne.getCompleteSimilarGroupId())&&completeSimilarGroupMap.get(ocrPictureOne.getCompleteSimilarGroupId()).size()==1){
ocrPictureOne.setSimilarityscore(0);
ocrPictureOne.setIsRepeat(1);
ocrPictureOne.setIsRepeatHis(1);
}
}
/**

@ -10,6 +10,7 @@ import cn.jyjz.xiaoyao.framework.security.service.SmsLoginService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrSUserT;
import cn.jyjz.xiaoyao.ocr.service.OcrISUserTService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.swagger.annotations.ApiOperation;
@ -64,9 +65,29 @@ public class OcrSUserTController {
if(null !=map.get("rePasswrod")){
if(map.get("newPassword").equals(map.get("rePasswrod"))){
// BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
// UpdateWrapper<OcrSUserT> updatewrapper = new UpdateWrapper<>();
// updatewrapper.eq("MOBILE", map.get("loginname")).set("PASSWORD",bCryptPasswordEncoder.encode(map.get("newPassword")));
String MOBILE = "";
BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
if(StringUtils.isNotBlank(map.get("loginname"))){
LambdaQueryWrapper<OcrSUserT> ocrSUserTLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrSUserTLambdaQueryWrapper.eq(OcrSUserT::getLoginname, map.get("loginname"));
OcrSUserT ocrSUserT = sUserTService.getOne(ocrSUserTLambdaQueryWrapper);
if(ocrSUserT != null){
MOBILE = ocrSUserT.getMobile();
}
}else {
return ResultVoUtil.success(ResultVo.SUCCESS,"请输入登录名!");
}
UpdateWrapper<OcrSUserT> updatewrapper = new UpdateWrapper<>();
updatewrapper.eq("MOBILE", map.get("loginname")).set("PASSWORD",bCryptPasswordEncoder.encode(map.get("newPassword")));
// updatewrapper.eq("MOBILE", map.get("loginname")).set("PASSWORD",bCryptPasswordEncoder.encode(map.get("newPassword")));
// updatewrapper.eq("MOBILE", map.get("loginname"))
// .set("PASSWORD",bCryptPasswordEncoder.encode(map.get("newPassword")));
updatewrapper.eq("MOBILE", MOBILE)
.eq("LOGINNAME", map.get("loginname"))
.set("PASSWORD",bCryptPasswordEncoder.encode(map.get("newPassword")));
boolean update = sUserTService.update(updatewrapper);
if(update){

@ -0,0 +1,13 @@
package cn.jyjz.xiaoyao.ocr.dataDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/4/25 9:18
*/
public interface OcrPrevailCloudLogMapper extends BaseMapper<OcrPrevailCloudLog> {
}

@ -1,10 +1,13 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import cn.jyjz.xiaoyao.common.base.jsonDomain.DateSerializer;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
@ -15,6 +18,11 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.AbstractMap;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* TODO
*
@ -29,7 +37,7 @@ import lombok.NoArgsConstructor;
@Schema(name = "业务数据字典值表", title = "业务数据字典值表")
@ApiModel(value="业务数据字典值表", description="业务数据字典值表")
@TableName(value = "ocr_dictionary")
public class OcrDictionary {
public class OcrDictionary implements BaseDto,java.io.Serializable{
@ApiModelProperty(value ="主键")
@TableId(value = "id",type = IdType.ASSIGN_ID)
@ -51,10 +59,41 @@ public class OcrDictionary {
@ApiModelProperty(value ="租户id")
@TableField(value="tenant_id")
@JsonSerialize(using = ToStringSerializer.class)
private Long tenantId;
@ApiModelProperty(value ="租户名称")
@TableField(exist = false)
private String tenantName;
@ApiModelProperty(value ="字典组")
@TableField(value="group_id")
private Long groupId;
@TableField(exist = false)
@JsonIgnore
private final Map<String,String> query = Stream.of(
new AbstractMap.SimpleEntry<>("ID","id"),
new AbstractMap.SimpleEntry<>("DISTIONATYGROUPID","group_id"),
new AbstractMap.SimpleEntry<>("CODENO","value"),
new AbstractMap.SimpleEntry<>("NAME","lable")
)
.collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
@JsonIgnore
private SearchQuery searchQueryrolesShowleave;
}

@ -1,9 +1,14 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import cn.jyjz.xiaoyao.admin.dataobject.Distionary;
import cn.jyjz.xiaoyao.admin.dataobject.Distionarytype;
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
import cn.jyjz.xiaoyao.common.mybatisplus.dto.BaseDto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
@ -15,6 +20,12 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.AbstractMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* TODO
*
@ -29,7 +40,7 @@ import lombok.NoArgsConstructor;
@Schema(name = "业务数据字典组表", title = "业务数据字典组表")
@ApiModel(value="业务数据字典组表", description="业务数据字典组表")
@TableName(value = "ocr_dictionary_group")
public class OcrDictionaryGroup {
public class OcrDictionaryGroup implements BaseDto,java.io.Serializable {
@ApiModelProperty(value ="主键")
@TableId(value = "id",type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
@ -47,4 +58,33 @@ public class OcrDictionaryGroup {
@ApiModelProperty(value ="备注")
@TableField(value="remark")
private String remark;
@TableField(exist = false)
private List<OcrDictionary> distionaryList;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)
@JsonIgnore
private SearchQuery searchQueryrolesShowleave;
@TableField(exist = false)
@JsonIgnore
private final Map<String,String> query = Stream.of(
new AbstractMap.SimpleEntry<>("listdept","deptid"),
new AbstractMap.SimpleEntry<>("ID","id"),
new AbstractMap.SimpleEntry<>("CODENO","field"),
new AbstractMap.SimpleEntry<>("GROUPNAME","label")
)
.collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname){
String obj = null;
if(null != query && query.size() > 0){
obj = query.get(filedname);
}
return obj;
}
}

@ -350,6 +350,7 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@TableField(value = "is_repeat")
private Integer isRepeat;
@ApiModelProperty(value = "任务状态")
@TableField(exist = false)
private Integer states;
@ -380,8 +381,17 @@ public class OcrPicture implements BaseDto, java.io.Serializable {
@TableField(exist = false)
private String taskId;
@ApiModelProperty(value = "是否是历史重复一键查重图片墙检索结果阈值100无相同图片时使用")
@TableField(exist = false)
private Integer isRepeatHis;
@ApiModelProperty(value = "图片信息-宽")
@TableField(exist = false)
private String wide;
@ApiModelProperty(value = "图片信息-高")
@TableField(exist = false)
private String high;
//保存当前登录用户的数据权限范围的搜索条件
@TableField(exist = false)

@ -0,0 +1,110 @@
package cn.jyjz.xiaoyao.ocr.dataobject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/4/25 9:18
*/
/**
*
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ocr_prevail_cloud_log")
public class OcrPrevailCloudLog {
/**
* ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* id
*/
@TableField(value = "form_id")
private Long formId;
/**
*
*/
@TableField(value = "request_param")
private String requestParam;
/**
*
*/
@TableField(value = "response_param")
private String responseParam;
/**
*
*/
@TableField(value = "`status`")
private Integer status;
/**
*
*/
@TableField(value = "`type`")
private Integer type;
/**
*
*/
@TableField(value = "create_by")
private String createBy;
/**
*
*/
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
@TableField(value = "update_by")
private String updateBy;
/**
*
*/
@TableField(value = "update_time")
private Date updateTime;
/**
* id
*/
@TableField(value = "task_id")
private String taskId;
/**
* id
*/
@TableField(value = "picture_id")
private Long pictureId;
/**
* id
*/
@TableField(value = "tenant_id")
private String tenantId;
/**
*
*/
@TableField(value = "redundance")
private String redundance;
}

@ -215,6 +215,12 @@ public class OcrTaskchildPicture implements BaseDto, java.io.Serializable {
@TableField(value = "is_repeated_nodules")
private Integer isRepeatedNodules;
@Schema(description = "无量云回调结果")
@TableField(value = "send_result")
private Integer sendResult;
@ApiModelProperty(value = "项目对象")
@TableField(exist = false)
private Category categoryDto;
@ -295,6 +301,7 @@ public class OcrTaskchildPicture implements BaseDto, java.io.Serializable {
@TableField(exist = false)
private String serverThumbnailUrl;
public FlowModelVO getFlowModelVO() {
FlowModelVO flowModelVO = new FlowModelVO();
flowModelVO.setFormid(this.getId());

@ -0,0 +1,21 @@
package cn.jyjz.xiaoyao.ocr.service;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseService;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionaryGroup;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
*
*
* @author hugh(shuli.yao) 1397940314@qq.com
* @version 1.0
* @date 2024/3/16 12:48
*/
public interface OcrDictionaryGroupService extends BaseService<OcrDictionaryGroup> {
}

@ -36,4 +36,8 @@ public interface OcrDictionaryService extends BaseService<OcrDictionary> {
* @return
*/
String queryLabelByValue(String field, String value, String tenantId);
}

@ -0,0 +1,14 @@
package cn.jyjz.xiaoyao.ocr.service;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/4/25 12:52
*/
public interface OcrPrevailCloudLogService extends IService<OcrPrevailCloudLog>{
}

@ -149,7 +149,7 @@ public interface OcrTaskchildPictureService extends BaseService<OcrTaskchildPict
Page<OcrTaskChildPictureVo> getPackageSimilarityList(Integer pageNo, Integer pageSize, String oderType, String oderName, String checkDuplicateId, String pictureId);
void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception;
Boolean sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception;
List<OcrTaskChildPictureVo> getDubiousfileList(List<String> pictureIds, String userNodeType);
}

@ -155,7 +155,7 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
QueryWrapper<OcrCheckDuplicate> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tenant_id", tenantId);
queryWrapper.eq("status", "1");
// queryWrapper.eq("status", "1");
queryWrapper.eq("is_delete", 0);
queryWrapper.orderByDesc("create_time");
List<OcrCheckDuplicate> list = ocrCheckDuplicateMapper.selectList(queryWrapper);
@ -189,17 +189,18 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
int similarityGroupOrder = 1;
//阈值分组map
Map<String,Integer> similarityGroupOrderMap = new HashMap<>();
//1.开启比对任务
boolean isCompleteSimilarGroupIdNull;
//1.开启比对任务s
for (OcrPicture ocrPicture : ocrPictureList) {
//检查查重任务是否关闭
if(!this.isCheckDuplicateExist(checkDuplicateId)){
logger.info("查重任务,已取消!");
return;
}
// 添加相似度百分百分组id
if (ObjectUtils.isEmpty(ocrPicture.getCompleteSimilarGroupId())) {
ocrPicture.setCompleteSimilarGroupId(SnowFlakeUtil.nextId());
pictureService.updateById(ocrPicture);
isCompleteSimilarGroupIdNull = true;
} else {
isCompleteSimilarGroupIdNull = false;
}
logService.addLog(103, "AI获取图片相似度接口", sysUser, "sendParams");
if (org.apache.commons.lang3.StringUtils.isBlank(ocrPicture.getImgHash())) {
@ -295,7 +296,7 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
ocrPictureNext.setCompleteSimilarGroupId(ocrPicture.getCompleteSimilarGroupId());
pictureService.updateById(ocrPictureNext);
} else {
if (!ocrPictureNext.getCompleteSimilarGroupId().equals(ocrPicture.getCompleteSimilarGroupId()) && isCompleteSimilarGroupIdNull) {
if (!ocrPictureNext.getCompleteSimilarGroupId().equals(ocrPicture.getCompleteSimilarGroupId())) {
ocrPicture.setCompleteSimilarGroupId(ocrPictureNext.getCompleteSimilarGroupId());
pictureService.updateById(ocrPicture);
}
@ -334,6 +335,14 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl<OcrCheckDuplicateM
}
private boolean isCheckDuplicateExist(Long checkDuplicateId) {
OcrCheckDuplicate checkDuplicate = baseMapper.selectById(checkDuplicateId);
if(checkDuplicate!=null && checkDuplicate.getIsDelete()!=1){
return true;
}
return false;
}
/**
*
* @return

@ -0,0 +1,35 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.jyjz.xiaoyao.admin.cache.CacheAdminConstants;
import cn.jyjz.xiaoyao.admin.dataobject.Distionarytype;
import cn.jyjz.xiaoyao.admin.service.DistionaryService;
import cn.jyjz.xiaoyao.admin.service.DistionarytypeService;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl;
import cn.jyjz.xiaoyao.common.redis.cache.ICacheManager;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrDictionaryGroupDao;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrDictionaryGroup;
import cn.jyjz.xiaoyao.ocr.service.OcrDictionaryGroupService;
import cn.jyjz.xiaoyao.ocr.service.OcrDictionaryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
*
*
* @author hugh(shuli.yao) 1397940314@qq.com
* @version 1.0
* @date 2024/3/16 12:48
*/
@Service
@Slf4j
public class OcrDictionaryGroupServiceImpl extends BaseServiceImpl<OcrDictionaryGroupDao, OcrDictionaryGroup> implements OcrDictionaryGroupService {
}

@ -136,6 +136,7 @@ public class OcrFieldServiceImpl extends BaseServiceImpl<OcrFieldMybatisDao, Ocr
if (Objects.nonNull(ocrField.getId())) {
String name = ocrField.getName();
LambdaQueryWrapper<OcrField> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OcrField::getReviewType, ocrField.getReviewType());
queryWrapper.eq(OcrField::getName, name);
queryWrapper.eq(OcrField::getDel, 0);
OcrField ocrFieldOne = this.getOne(queryWrapper);

@ -330,7 +330,11 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
@Override
public OcrPicture getPackagePictureInfo(String checkDuplicateId, String pictureId, UserToken userToken) {
OcrPicture ocrPicture = pictureMybatisDao.getPackagePictureInfo(checkDuplicateId,pictureId);
OcrPictureInfo one = ocrPictureInfoService.getOne(new LambdaQueryWrapper<OcrPictureInfo>().eq(OcrPictureInfo::getPictureId, ocrPicture.getId()));
ocrPicture.setPictureInfo(one);
if(ObjectUtil.isNotEmpty(one)){
ocrPicture.getPictureInfo().setCreateTime(ocrPicture.getPhotoDateTimestamp());
}
return ocrPicture;
}

@ -0,0 +1,19 @@
package cn.jyjz.xiaoyao.ocr.service.impl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrPrevailCloudLogMapper;
import cn.jyjz.xiaoyao.ocr.service.OcrPrevailCloudLogService;
/**
* ClassName $className$.java
* Description:
* Author scl.
* Date 2024/4/25 12:52
*/
@Service
public class OcrPrevailCloudLogServiceImpl extends ServiceImpl<OcrPrevailCloudLogMapper, OcrPrevailCloudLog> implements OcrPrevailCloudLogService{
}

@ -127,19 +127,31 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
List<OcrTaskchildPictureAppro> ocrTaskchildPictureApproList = new ArrayList<>();
//定义第一审批节点
String taskNodeOne = "";
Integer taskNode = null;
if (oaUserApproveVoList.size() > 0) {
Map<Long, OaUserApproveVo> formIdToVoMap = new HashMap<>();
for (OaUserApproveVo vo : oaUserApproveVoList) {
Long formId = vo.getFormId();
Integer taskNode = vo.getTaskNode();
if (!formIdToVoMap.containsKey(formId) || taskNode < formIdToVoMap.get(formId).getTaskNode()) {
String taskNodeStr = vo.getTaskNode();
if ("finale_judgment".equals(taskNodeStr)) {
// 如果taskNode字段是"finale_judgment"字符串,将其转换为一个很大的数字
vo.setTaskNode("100");
taskNode = 100;
} else {
// 否则将其转换为Integer类型
taskNode = Integer.parseInt(taskNodeStr);
}
if (!formIdToVoMap.containsKey(formId) || taskNode < Integer.parseInt(formIdToVoMap.get(formId).getTaskNode())) {
formIdToVoMap.put(formId, vo);
}
}
//获取该用户第一节点
Iterator<Map.Entry<Long, OaUserApproveVo>> iterator = formIdToVoMap.entrySet().iterator();
Map.Entry<Long, OaUserApproveVo> firstEntry = iterator.next();
taskNodeOne = Integer.toString(firstEntry.getValue().getTaskNode());
taskNodeOne = firstEntry.getValue().getTaskNode();
if("100".equals(taskNodeOne)){
taskNodeOne = "finale_judgment";
}
//获取已经审批的任务ID
List<Long> formIdList = new ArrayList<>(formIdToVoMap.keySet());
//查询该用户第一节点所有待审任务列表
@ -221,19 +233,31 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
List<OcrTaskchildPictureAppro> ocrTaskchildPictureApproList = new ArrayList<>();
//定义第一审批节点
String taskNodeOne = "";
Integer taskNode = null;
if (oaUserApproveVoList.size() > 0) {
Map<Long, OaUserApproveVo> formIdToVoMap = new HashMap<>();
for (OaUserApproveVo vo : oaUserApproveVoList) {
Long formId = vo.getFormId();
Integer taskNode = vo.getTaskNode();
if (!formIdToVoMap.containsKey(formId) || taskNode < formIdToVoMap.get(formId).getTaskNode()) {
String taskNodeStr = vo.getTaskNode();
if ("finale_judgment".equals(taskNodeStr)) {
// 如果taskNode字段是"finale_judgment"字符串,将其转换为一个很大的数字
vo.setTaskNode("100");
taskNode = 100;
} else {
// 否则将其转换为Integer类型
taskNode = Integer.parseInt(taskNodeStr);
}
if (!formIdToVoMap.containsKey(formId) || taskNode < Integer.parseInt(formIdToVoMap.get(formId).getTaskNode())) {
formIdToVoMap.put(formId, vo);
}
}
//获取该用户第一节点
Iterator<Map.Entry<Long, OaUserApproveVo>> iterator = formIdToVoMap.entrySet().iterator();
Map.Entry<Long, OaUserApproveVo> firstEntry = iterator.next();
taskNodeOne = Integer.toString(firstEntry.getValue().getTaskNode());
taskNodeOne = firstEntry.getValue().getTaskNode();
if("100".equals(taskNodeOne)){
taskNodeOne = "finale_judgment";
}
//获取已经审批的任务ID
List<Long> formIdList = new ArrayList<>(formIdToVoMap.keySet());
//查询该用户第一节点所有待审任务列表

@ -62,6 +62,11 @@ public class OcrTaskPackageServiceImpl extends ServiceImpl<OcrTaskPackageMapper,
BeanUtil.copyProperties(ocrTaskPackage, taskPackage);
taskPackage.setCheckDuplicateId(ocrCheckDuplicate.getId());
if (this.save(taskPackage)) {
//修改查重任务状态,修改为已创建任务包防止重复创建
OcrCheckDuplicate ocrCheckDuplicateUpdate = new OcrCheckDuplicate();
ocrCheckDuplicateUpdate.setId(ocrCheckDuplicate.getId());
ocrCheckDuplicateUpdate.setStatus(4);
checkDuplicateService.updateById(ocrCheckDuplicateUpdate);
return ResultVoUtil.success("创建任务包成功!",taskPackage);
}
return ResultVoUtil.error("创建任务包失败!");

@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -43,6 +44,9 @@ public class OcrTaskchildDubiousFileServiceImpl extends ServiceImpl<OcrTaskchild
@Resource
private OcrTaskchildPictureService ocrTaskchildPictureService;
@Autowired
private OcrPictureInfoService ocrPictureInfoService;
/**
* ,
*
@ -112,6 +116,22 @@ public class OcrTaskchildDubiousFileServiceImpl extends ServiceImpl<OcrTaskchild
List<OcrTaskChildPictureVo> records = taskChildPictures.stream().skip((pageNo - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//补齐数据
for (OcrTaskChildPictureVo taskChildPictureVo : records) {
//赋值宽高
LambdaQueryWrapper<OcrPictureInfo> ocrPictureInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrPictureInfoLambdaQueryWrapper.eq(OcrPictureInfo::getPictureId,taskChildPictureVo.getPictureId());
OcrPictureInfo ocrPictureInfo = ocrPictureInfoService.getOne(ocrPictureInfoLambdaQueryWrapper);
if (ocrPictureInfo != null && ocrPictureInfo.getImgMeasure() != null) {
String[] dimensions = ocrPictureInfo.getImgMeasure().split("x");
if (dimensions.length == 2) {
taskChildPictureVo.setWide(dimensions[0]);
taskChildPictureVo.setHigh(dimensions[1]);
}
}
}
objectPage.setRecords(records);
objectPage.setTotal(taskChildPictures.size());
}

@ -94,6 +94,9 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
@Autowired
private DepartmentService departmentService;
@Autowired
private OcrPictureInfoService ocrPictureInfoService;
/**
*
*
@ -110,7 +113,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
StringBuffer taskType = new StringBuffer();
for (String childpictureid : cps) {
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid, Long.parseLong(packageid), null,"");
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid, Long.parseLong(packageid), null, "");
//如果是历史图片,不允许进行设置
// if(old.isIzHistory()){
@ -306,7 +309,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
@Override
public void createTask(List<OcrPicture> ocrPictureList, String tenantId, UserToken userToken,String deptid) {
public void createTask(List<OcrPicture> ocrPictureList, String tenantId, UserToken userToken, String deptid) {
if (null != ocrPictureList && !ocrPictureList.isEmpty()) {
//用于标记相似度是否存在百分百的情况
for (OcrPicture ocrPicture : ocrPictureList) {
@ -380,7 +383,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
* @param fromid
* @return
*/
public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid, UserToken userToken,String taskNode) {
public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid, UserToken userToken, String taskNode) {
OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid);
if (ocrTaskchildPicture == null) {
return new OcrTaskchildPicture();
@ -398,7 +401,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
if (null != userToken) {
Optional<Userapprove> first = list.stream().filter(userapprove -> userapprove.getUserid().toString().equals(userToken.getUserid()) && userapprove.getTaskindex().equals(taskNode)).findFirst();
Userapprove userapprove = new Userapprove();
userapprove.setStatshis(ocrTaskchildPicture.getStates()==3?2:ocrTaskchildPicture.getStates()==5?3:1);
userapprove.setStatshis(ocrTaskchildPicture.getStates() == 3 ? 2 : ocrTaskchildPicture.getStates() == 5 ? 3 : 1);
ocrTaskchildPicture.setUserapprove(first.orElse(userapprove));
}
//查询图片对象
@ -420,13 +423,13 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
String taskId = ocrTaskchildPicture.getTaskId();
String assignee = ocrTaskchildPicture.getAssignee();
if(taskId.contains(",")){
if (taskId.contains(",")) {
String[] split = assignee.split(",");
String[] taskIds = taskId.split(",");
String[] taskNames = ocrTaskchildPicture.getTaskname().split(",");
for (int i = 0; i < split.length; i++) {
if(split[i].equals(userToken.getLoginname())){
if (split[i].equals(userToken.getLoginname())) {
ocrTaskchildPicture.setTaskId(taskIds[i]);
ocrTaskchildPicture.setTaskname(taskNames[i]);
}
@ -440,7 +443,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
ocrTaskchildPicture.setOcrPicture(ocrPicture);
//检查如果已经传了节点那就把taskNo改成传入的节点值。
if(StringUtils.isNotBlank(taskNode) && !"undefined".equals(taskNode)){
if (StringUtils.isNotBlank(taskNode) && !"undefined".equals(taskNode)) {
ocrTaskchildPicture.setTaskNode(taskNode);
}
@ -667,8 +670,8 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
@Override
public List<OcrTaskChildPictureVo> getPictureHistoryList(List<String> pictureIds, String pictureId,String taskNode) {
return ocrtaskchildpicturemybatisdao.getPictureHistoryList(pictureIds, pictureId,taskNode);
public List<OcrTaskChildPictureVo> getPictureHistoryList(List<String> pictureIds, String pictureId, String taskNode) {
return ocrtaskchildpicturemybatisdao.getPictureHistoryList(pictureIds, pictureId, taskNode);
}
@Override
@ -693,18 +696,18 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
if (ObjectUtils.isNotEmpty(duplicateHis) && org.apache.commons.lang3.StringUtils.isNotBlank(duplicateHis.getCheckDuplicateResultHisJson())) {
JSONObject jsonObject = JSONObject.parseObject(duplicateHis.getCheckDuplicateResultHisJson());
Set<String> pictureIds = jsonObject.keySet();
List<OcrTaskChildPictureVo> taskChildPicturesOld = this.getPictureHistoryList(new ArrayList<>(pictureIds), pictureId,taskNode);
List<OcrTaskChildPictureVo> taskChildPicturesOld = this.getPictureHistoryList(new ArrayList<>(pictureIds), pictureId, taskNode);
List<OcrTaskChildPictureVo> taskChildPictures = new ArrayList<>();
for (OcrTaskChildPictureVo taskChildPicture : taskChildPicturesOld) {
if(taskChildPicture.getPictureId()!=null){
if (taskChildPicture.getPictureId() != null) {
taskChildPictures.add(taskChildPicture);
}
}
for (OcrTaskChildPictureVo taskChildPicture : taskChildPictures) {
if(jsonObject.getString(taskChildPicture.getPictureId())!=null){
if (jsonObject.getString(taskChildPicture.getPictureId()) != null) {
taskChildPicture.setSimilarityScore(Integer.parseInt(jsonObject.getString(taskChildPicture.getPictureId().toString())));
}else{
} else {
taskChildPicture.setSimilarityScore(1);
}
@ -723,6 +726,21 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
}
List<OcrTaskChildPictureVo> collect = taskChildPictures.stream().skip((pageNo - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//补齐数据
for (OcrTaskChildPictureVo taskChildPictureVo : collect) {
//赋值宽高
LambdaQueryWrapper<OcrPictureInfo> ocrPictureInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
ocrPictureInfoLambdaQueryWrapper.eq(OcrPictureInfo::getPictureId,taskChildPictureVo.getPictureId());
OcrPictureInfo ocrPictureInfo = ocrPictureInfoService.getOne(ocrPictureInfoLambdaQueryWrapper);
if (ocrPictureInfo != null && ocrPictureInfo.getImgMeasure() != null) {
String[] dimensions = ocrPictureInfo.getImgMeasure().split("x");
if (dimensions.length == 2) {
taskChildPictureVo.setWide(dimensions[0]);
taskChildPictureVo.setHigh(dimensions[1]);
}
}
}
objectPage.setRecords(collect);
objectPage.setTotal(taskChildPictures.size());
return objectPage;
@ -737,14 +755,14 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
@Override
public void sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception {
public Boolean sendFlowTaskResult(OcrTaskchildPicture taskchildPicture, OcrPicture picture, FlowApprove flowApprove) throws Exception {
FlowResultDto flowResultDto = new FlowResultDto();
flowResultDto.setTenantNo(picture.getTenantId());
flowResultDto.setAccountNo(Long.parseLong(picture.getPictureid()));
flowResultDto.setTaskNo(Long.parseLong(picture.getRemark()));
flowResultDto.setPictureMatchDegree(BigDecimal.valueOf(picture.getSimilarityscore()));
flowResultDto.setIsPictureRepeat(picture.getField14()==null?0:Integer.valueOf(picture.getField14()));
flowResultDto.setIsPictureRight(picture.getIztrueorfalse()==null?0:picture.getIztrueorfalse());
flowResultDto.setIsPictureRepeat(picture.getField14() == null ? 0 : Integer.valueOf(picture.getField14()));
flowResultDto.setIsPictureRight(picture.getIztrueorfalse() == null ? 0 : picture.getIztrueorfalse());
Integer resultStatus = Objects.equals(taskchildPicture.getStates(), SystemConstantsOa.OA_STATUS_TYPE_END) ? SystemConstantsOa.OCR_STATUS_SUCCESS : SystemConstantsOa.OCR_STATUS_FAILURE;
flowResultDto.setApproveResult(resultStatus);
flowResultDto.setApproveRemark(flowApprove.getComment());
@ -757,7 +775,8 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
}
}
flowResultDto.setApproveDetailList(nodeList);
prevailCloudApi.sendFlowTaskResult(picture.getTenantId().toString(),JSON.toJSONString(flowResultDto));
return prevailCloudApi.sendFlowTaskResult(taskchildPicture.getId().toString(), JSON.toJSONString(flowResultDto), picture.getId(), picture.getRemark());
}

@ -74,6 +74,9 @@ public class OcrUsersearchchildServiceImpl extends BaseServiceImpl<OcrUsersearch
if(SearchConfigEnum.FIELD16.getId().equals(searchfield)){
vo.setIzstatus(ocrUsersearchchild.getSearchvalue());
}
if("iztaskstatus".equals(searchfield)){
vo.setIztaskstatus(ocrUsersearchchild.getSearchvalue());
}
if(SearchConfigEnum.FIELD17.getId().equals(searchfield)){
vo.setIzprojecttype(ocrUsersearchchild.getSearchvalue());
}
@ -108,6 +111,10 @@ public class OcrUsersearchchildServiceImpl extends BaseServiceImpl<OcrUsersearch
if(SearchConfigEnum.THREEWEEKdd.getId().equals(searchfield)){
vo.setIzYeardddd(ocrUsersearchchild.getSearchvalue());
}
if(SearchConfigEnum.PLANSEARCH.getId().equals(searchfield)){
vo.setIzplan(ocrUsersearchchild.getSearchvalue());
}
}
return vo;
}

@ -83,10 +83,6 @@ public class PictureSourceTimerJob {
Map<Long, Department> departmentMap = Maps.newHashMapWithExpectedSize(departments.size());
for (Department department : departments) {
if (department.getDlevel() == 0) {
continue;
}
departmentMap.put(department.getId(), department);
}

@ -62,10 +62,6 @@ public class PullPictureDataJob {
Map<Long, Department> departmentMap = Maps.newHashMapWithExpectedSize(departments.size());
for (Department department : departments) {
if (department.getDlevel() == 0) {
continue;
}
departmentMap.put(department.getId(), department);
}

@ -95,15 +95,15 @@ public class ImageClassUtil {
JSONObject jsonObjectSimi = JSON.parseObject(responseDataVi);
if (null != jsonObjectSimi && jsonObjectSimi.getString("code").equals("0") && jsonObjectSimi.get("data") != null && jsonObjectSimi.getJSONArray("data").size() > 0) {
ocrPictureLog.setCallStatus("1");
ocrPictureLog.setCallMsg("req:"+jsonObjectVi.toJSONString()+"\nrep:"+responseDataVi);
ocrPictureLog.setCallMsg("请求信息:"+jsonObjectVi.toJSONString()+"\n响应信息:"+responseDataVi);
} else {
ocrPictureLog.setCallStatus("2");
ocrPictureLog.setCallMsg("req:"+jsonObjectVi.toJSONString()+"\nrep:"+responseDataVi);
ocrPictureLog.setCallMsg("请求信息:"+jsonObjectVi.toJSONString()+"\n响应信息:"+responseDataVi);
}
} catch (Exception e) {
logger.error("classify={}", e);
ocrPictureLog.setCallStatus("3");
ocrPictureLog.setCallMsg("req:"+jsonObjectVi.toJSONString()+"\nrep:"+responseDataVi+"Exception:"+e.getMessage());
ocrPictureLog.setCallMsg("请求信息:"+jsonObjectVi.toJSONString()+"\n响应信息:"+responseDataVi+"Exception:"+e.getMessage());
} finally {
ApplicationContext applicationContext = SpringUtil.getApplicationContext();
OcrPictureLogService ocrPictureLogService = applicationContext.getBean(OcrPictureLogService.class);

@ -22,6 +22,8 @@ public enum SearchConfigEnum {
FIELD4("iztaskrrom","field4"),
//任务状态
FIELD16("izstatus","field16"),
//任务状态(新)
// IZTASKSTATUS("iztaskstatus","field16"),
//拜访省份/直辖市、
PROCINCE("izvisitpro","releaseprovince"),
//厂商
@ -35,7 +37,7 @@ public enum SearchConfigEnum {
//提报人
UPUSERSEARCH("izupuser","upuserid"),
//所属计划
PLANSEARCH("izplan","planName"),
PLANSEARCH("izplan","planId"),
//相似度
SIMISEARCH("izsimilarity","similarity_score"),
//分类搜索

@ -27,7 +27,7 @@ public class OaUserApproveVo implements Serializable {
private Long formId;
@Schema(description = "审批节点")
private Integer taskNode;
private String taskNode;
@Schema(description = "审批节点名称")
private String taskName;

@ -16,6 +16,22 @@ public class OcrMsgVO {
*/
private String id;
/**
*
*/
private String titile;
/**
* (1.2.)
*/
private Integer msgCategory;
/**
* (1.2. 3.)
*/
private Integer receiveUserType;
/**
* json
*/

@ -171,4 +171,11 @@ public class OcrTaskChildPictureVo implements java.io.Serializable {
@ApiModelProperty(value = "查重id")
private String checkDuplicateId;
@ApiModelProperty(value = "图片宽")
private String Wide;
@ApiModelProperty(value = "图片高")
private String High;
}

@ -81,4 +81,7 @@ public class OcrTaskchildPictureApproVo implements java.io.Serializable {
@ApiModelProperty(value = "当前节点")
private String taskIndex;
@ApiModelProperty(value = "所属计划")
private String fromplanid;
}

@ -32,6 +32,9 @@ public class SearchConditionVO {
@ApiModelProperty(value = "任务状态")
private String izstatus;
@ApiModelProperty(value = "任务状态(新)")
private String iztaskstatus;
@ApiModelProperty(value = "拜访省份/直辖市、")
private String izvisitpro;

@ -229,6 +229,7 @@
HAVING count(field8) > 1) t1
LEFT JOIN ocr_taskchild_picture t2 ON t1.ID = t2.PICTUREID
LEFT JOIN ocr_picture t3 on t1.id = t3.ID
where t2.TENANTID = #{tenantId,jdbcType=VARCHAR}
</select>
<select id="repetitionTaskList" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture">
@ -236,11 +237,12 @@
FROM ocr_taskchild_picture t2
LEFT JOIN ocr_picture t3 ON t2.PICTUREID = t3.ID
WHERE
t2.TENANTID = #{tenantId,jdbcType=VARCHAR}
<if test="type == 0">
t2.ISFINAIL = 1
and t2.ISFINAIL = 1
</if>
<if test="type == 1">
t2.ISFINAIL = 1
and t2.ISFINAIL = 1
</if>
and t3.field8 IN (SELECT t3.field8
FROM ocr_taskchild_picture t2

@ -227,7 +227,6 @@
<select id="getPackagePictureInfo" resultMap="BaseResultMap">
SELECT t2.*,
t3.*,
t4.STATES,
t4.TASKID,
t4.ID taskchildId,
@ -240,7 +239,6 @@
1) AS historyStates
FROM ocr_check_duplicate_result t1
LEFT JOIN ocr_picture t2 ON t1.picture_id = t2.ID
left join ocr_picture_info t3 on t2.ID = t3.picture_id
left join ocr_taskchild_picture t4 on t2.ID = t4.PICTUREID
where t1.check_duplicate_id = #{packageId}
and t2.suspiciousfile = 0

@ -0,0 +1,27 @@
<?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="cn.jyjz.xiaoyao.ocr.dataDao.OcrPrevailCloudLogMapper">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.ocr.dataobject.OcrPrevailCloudLog">
<!--@mbg.generated-->
<!--@Table ocr_prevail_cloud_log-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="form_id" jdbcType="BIGINT" property="formId" />
<result column="request_param" jdbcType="VARCHAR" property="requestParam" />
<result column="response_param" jdbcType="VARCHAR" property="responseParam" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="task_id" jdbcType="VARCHAR" property="taskId" />
<result column="picture_id" jdbcType="BIGINT" property="pictureId" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="redundance" jdbcType="VARCHAR" property="redundance" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, form_id, request_param, response_param, `status`, `type`, create_by, create_time,
update_by, update_time, task_id, picture_id, tenant_id, redundance
</sql>
</mapper>

@ -479,6 +479,14 @@
<if test="userid != null">
and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}
</if>
<if test="fuzzyRetrieval != null and fuzzyRetrieval != ''">
and
(
tcp.FROMUSERNAME LIKE CONCAT('%', #{fuzzyRetrieval.value}, '%')
OR tcp.FROMTASKID LIKE CONCAT('%', #{fuzzyRetrieval.value}, '%')
OR tcp.FROMTASKNAME LIKE CONCAT('%', #{fuzzyRetrieval.value}, '%')
)
</if>
</trim>
</where>
</sql>
@ -499,6 +507,19 @@
</if>
${izupuser.likeend}
</if>
<if test="izplan != null">
${izplan.rulesOp} tcp.FROMPLANID ${izplan.dataOp} ${izplan.likestar}
<!-- #{fromuserid.value}-->
<if test="izplan.value instanceof java.util.List">
<foreach item="item" collection="izplan.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!izplan.value instanceof java.util.List">
#{izplan.value}
</if>
${izplan.likeend}
</if>
<if test="iztaskrrom != null">
${iztaskrrom.rulesOp} tcp.FROMSOURCEID ${iztaskrrom.dataOp} ${iztaskrrom.likestar}
<!-- #{fromuserid.value}-->
@ -935,7 +956,6 @@
FROM ocr_check_duplicate_result t1
LEFT JOIN ocr_picture t2 ON t1.picture_id = t2.ID
LEFT JOIN ocr_taskchild_picture t3 ON t2.ID = t3.PICTUREID
left join ocr_picture_info t5 on t2.ID = t5.picture_id
WHERE t1.check_duplicate_id = #{checkDuplicateId}
and t2.suspiciousfile = 0
<if test="pictureId != null and pictureId != ''">
@ -979,6 +999,7 @@
t2.FROMPROJECTNAME fromProjectName,
t2.FINISHTIME finishTime,
t1.imgUrl,
t1.server_thumbnail_url serverThumbnailUrl,
ifnull(t3.STATSHIS, 1) historyStates,
t1.submit_date_timestamp submitDateTimestamp,
t1.photo_date_timestamp photoDateTimestamp,
@ -1085,7 +1106,6 @@
LIMIT 1), 1) AS historyStates
from ocr_picture t2
LEFT JOIN ocr_taskchild_picture t3 ON t2.ID = t3.PICTUREID
left join ocr_picture_info t5 on t2.ID = t5.picture_id
WHERE t2.suspiciousfile = 0
and t2.ID in
<foreach collection="pictureIds" open="(" close=")" item="item" separator="," index="index">

@ -0,0 +1,57 @@
<?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="cn.jyjz.xiaoyao.frontmenu.dataDao.FrontmenuMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.frontmenu.dataobject.Frontmenu">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="parentId" property="parentid" jdbcType="INTEGER"/>
<result column="resKey" property="reskey" jdbcType="VARCHAR"/>
<result column="resUrl" property="resurl" jdbcType="VARCHAR"/>
<result column="level" property="level" jdbcType="INTEGER"/>
<result column="icon" property="icon" jdbcType="VARCHAR"/>
<result column="orderNum" property="ordernum" jdbcType="INTEGER"/>
<result column="ishide" property="ishide" jdbcType="INTEGER"/>
<result column="description" property="description" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id AS id,
name AS name,
parentId AS parentid,
resKey AS reskey,
resUrl AS resurl,
level AS level,
icon AS icon,
orderNum AS ordernum,
ishide AS ishide,
description AS description
</sql>
<sql id="Base_Where">
<where>
<trim prefixOverrides="and|or">
<if test="id != null"> and id ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}</if>
<if test="name != null"> and name ${name.dataOp} ${name.likestar}#{name.value}${name.likeend}</if>
<if test="parentid != null"> and parentId ${parentid.dataOp} ${parentid.likestar}#{parentid.value}${parentid.likeend}</if>
<if test="reskey != null"> and resKey ${reskey.dataOp} ${reskey.likestar}#{reskey.value}${reskey.likeend}</if>
<if test="resurl != null"> and resUrl ${resurl.dataOp} ${resurl.likestar}#{resurl.value}${resurl.likeend}</if>
<if test="level != null"> and level ${level.dataOp} ${level.likestar}#{level.value}${level.likeend}</if>
<if test="icon != null"> and icon ${icon.dataOp} ${icon.likestar}#{icon.value}${icon.likeend}</if>
<if test="ordernum != null"> and orderNum ${ordernum.dataOp} ${ordernum.likestar}#{ordernum.value}${ordernum.likeend}</if>
<if test="ishide != null"> and ishide ${ishide.dataOp} ${ishide.likestar}#{ishide.value}${ishide.likeend}</if>
<if test="description != null"> and description ${description.dataOp} ${description.likestar}#{description.value}${description.likeend}</if>
<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="listdept != null">
and DEPARTID in
<foreach collection="listdept.value" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
</mapper>

@ -0,0 +1,33 @@
<?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="cn.jyjz.xiaoyao.frontmenu.dataDao.UserFrontmenuMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.frontmenu.dataobject.UserFrontmenu">
<result column="userId" property="userid" jdbcType="BIGINT"/>
<result column="menuId" property="menuid" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
userId AS userid,
menuId AS menuid
</sql>
<sql id="Base_Where">
<where>
<trim prefixOverrides="and|or">
<if test="userid != null"> and userId ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="menuid != null"> and menuId ${menuid.dataOp} ${menuid.likestar}#{menuid.value}${menuid.likeend}</if>
<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="listdept != null">
and DEPARTID in
<foreach collection="listdept.value" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
</mapper>

@ -212,3 +212,35 @@ INSERT INTO S_BACKSTAGEOPENURL_T(ID,URL,REMARK) VALUES(1196092352600928213, '/fl
INSERT INTO S_BACKSTAGEOPENURL_T(ID,URL,REMARK) VALUES(1196092352600928214, '/backstage/admin/department/updateflowable', '公司关联工作流');
INSERT INTO S_RESOURCES_T(ID,RESOURCENAME,RPARENTID,ROOTID,RESOURCETYPE,PRIORITYPE,RESOURCE,RESOURCELIST,RESOURCEDESC,ENABLED,RIOCNIMAGE)
VALUES (1231708402914598912,'前端菜单管理',160000,160000, '1', '5','/backstage/oa/frontmenuHtml/toList','/backstage/oa/frontmenu/list','前端菜单管理', '1', 'icon-diamond');
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '101','/backstage/oa/frontmenuHtml/toSave','/backstage/oa/frontmenu/save');
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '102','/backstage/oa/frontmenuHtml/toEdit','/backstage/oa/frontmenu/edit');
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '103','/backstage/oa/frontmenu/delmore',null);
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '104','/backstage/oa/frontmenu/getdata',null);
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '111','/backstage/oa/frontmenuHtml/toEdit','/backstage/oa/frontmenu/edit');
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER) VALUES
(1231708402914598912, '112','/backstage/oa/frontmenu/delone',null);
INSERT INTO S_RESOURCEMETHOD_T (RESOURCEID,METHODID,RESOURCEBEFOR,RESOURCEAFTER)
VALUES (1231708402914598912, 105,'/backstage/oa/userfrontmenu/list','/backstage/oa/userfrontmenu/saveactiongrant');
INSERT INTO S_BACKSTAGEOPENURL_T(ID,URL,REMARK)
VALUES(1231708402641969153, '/backstage/oa/userfrontmenuHtml/showlist', '进入前端菜单用户列表');
INSERT INTO S_BACKSTAGEOPENURL_T(ID,URL,REMARK)
VALUES(1231708402641969153, '/backstage/oa/userfrontmenuHtml/showlist', '进入前端菜单用户列表');

@ -160,15 +160,15 @@ mybatis-plus:
xiaoyao:
web:
#上传文件路径
uploadPath: D:/Java/idea/IdeaWorkSpace/ocr/htmlweb/upload
uploadPath: D:/ideaWork/jeecg/ocr/htmlweb/upload
#页面根路径
frontPath: D:/Java/idea/IdeaWorkSpace/ocr/htmlweb
frontPath: D:/ideaWork/jeecg/ocr/htmlweb
#js、css、图片存放路径
staticPath: D:/Java/idea/IdeaWorkSpace/ocr/htmlweb/static
staticPath: D:/ideaWork/jeecg/ocr/htmlweb/static
#页面模版路径
webPath: D:/Java/idea/IdeaWorkSpace/ocr/htmlweb/web
webPath: D:/ideaWork/jeecg/ocr/htmlweb/web
#Lucene索引路径
lucenePath: D:/Java/idea/IdeaWorkSpace/ocr/htmlweb/lucene/indexDir
lucenePath: D:/ideaWork/jeecg/ocr/htmlweb/lucene/indexDir
#是否开启flowable
haveFlowable: true
webconfig:

Loading…
Cancel
Save