Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
3a0f0191
Commit
3a0f0191
authored
Mar 09, 2019
by
季圣华
Browse files
重构-系统配置模块
parent
691b494c
Changes
12
Hide whitespace changes
Inline
Side-by-side
erp_web/js/print/print.js
View file @
3a0f0191
...
...
@@ -21,11 +21,9 @@ function CreateFormPage(strPrintName, printDatagrid) {
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
page
)
{
var
array
=
res
.
data
.
page
.
rows
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
var
name
=
array
[
i
].
name
;
if
(
name
===
"
company_name
"
)
{
companyName
=
array
[
i
].
value
;
}
if
(
array
.
length
>
0
)
{
var
info
=
array
[
0
];
companyName
=
info
.
companyName
;
}
}
}
...
...
erp_web/pages/manage/systemConfig.html
View file @
3a0f0191
...
...
@@ -16,128 +16,418 @@
<script
type=
"text/javascript"
src=
"/js/easyui-1.3.5/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"
></script>
<script
type=
"text/javascript"
src=
"/js/common/common.js"
></script>
<script>
$
(
function
()
{
//加载信息
function
loadInfo
()
{
</head>
<body>
<!-- 查询 -->
<div
id=
"searchPanel"
class=
"easyui-panel"
style=
"padding:10px;"
title=
"查询窗口"
iconCls=
"icon-search"
collapsible=
"true"
closable=
"false"
>
<table
id=
"searchTable"
>
<tr>
<td>
公司名称:
</td>
<td>
<input
type=
"text"
name=
"searchCompanyName"
id=
"searchCompanyName"
style=
"width:100px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
iconCls=
"icon-search"
id=
"searchBtn"
>
查询
</a>
</td>
</tr>
</table>
</div>
<!-- 数据显示table -->
<div
id=
"tablePanel"
class=
"easyui-panel"
style=
"padding:1px;top:300px;"
title=
"系统配置"
iconCls=
"icon-list"
collapsible=
"true"
closable=
"false"
>
<table
id=
"tableData"
style=
"top:300px;border-bottom-color:#FFFFFF"
></table>
</div>
<div
id=
"systemConfigDlg"
class=
"easyui-dialog"
style=
"width:380px;padding:10px 20px"
closed=
"true"
buttons=
"#dlg-buttons"
modal=
"true"
collapsible=
"false"
closable=
"true"
>
<form
id=
"systemConfigFM"
method=
"post"
novalidate
>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyNameLabel"
>
公司名称
</label>
<input
name=
"companyName"
id=
"companyName"
class=
"easyui-validatebox"
data-options=
"required:true,validType:'length[2,15]'"
style=
"width: 220px;height: 20px"
/>
</div>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyContactsLabel"
>
联系人
</label>
<input
name=
"companyContacts"
id=
"companyContacts"
style=
"width: 220px;height: 20px"
/>
</div>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyAddressLabel"
>
公司地址
</label>
<input
name=
"companyAddress"
id=
"companyAddress"
style=
"width: 220px;height: 20px"
/>
</div>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyTelLabel"
>
公司电话
</label>
<input
name=
"companyTel"
id=
"companyTel"
style=
"width: 220px;height: 20px"
/>
</div>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyFaxLabel"
>
公司传真
</label>
<input
name=
"companyFax"
id=
"companyFax"
style=
"width: 220px;height: 20px"
/>
</div>
<div
class=
"fitem"
style=
"padding:5px"
>
<label
id=
"companyPostCodeLabel"
>
公司邮编
</label>
<input
name=
"companyPostCode"
id=
"companyPostCode"
style=
"width: 220px;height: 20px"
/>
</div>
</form>
</div>
<div
id=
"dlg-buttons"
>
<a
href=
"javascript:void(0)"
id=
"saveSystemConfig"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存
</a>
<a
href=
"javascript:void(0)"
id=
"cancelSystemConfig"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#systemConfigDlg').dialog('close')"
>
取消
</a>
</div>
<script
type=
"text/javascript"
>
//初始化界面
$
(
function
()
{
initTableData
();
ininPager
();
});
//初始化表格数据
function
initTableData
()
{
$
(
'
#tableData
'
).
datagrid
({
height
:
heightInfo
,
nowrap
:
false
,
rownumbers
:
false
,
//动画效果
animate
:
false
,
//选中单行
singleSelect
:
true
,
collapsible
:
false
,
pagination
:
true
,
//交替出现背景
striped
:
true
,
pageSize
:
initPageSize
,
pageList
:
initPageNum
,
columns
:
[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
title
:
'
公司名称
'
,
field
:
'
companyName
'
,
width
:
150
},
{
title
:
'
联系人
'
,
field
:
'
companyContacts
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
公司地址
'
,
field
:
'
companyAddress
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
公司电话
'
,
field
:
'
companyTel
'
,
width
:
120
,
align
:
"
center
"
},
{
title
:
'
公司传真
'
,
field
:
'
companyFax
'
,
width
:
120
,
align
:
"
center
"
},
{
title
:
'
公司邮编
'
,
field
:
'
companyPostCode
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
操作
'
,
field
:
'
op
'
,
width
:
160
,
formatter
:
function
(
value
,
rec
)
{
var
str
=
''
;
var
rowInfo
=
rec
.
id
+
'
AaBb
'
+
rec
.
companyName
+
'
AaBb
'
+
rec
.
companyContacts
+
'
AaBb
'
+
rec
.
companyAddress
+
'
AaBb
'
+
rec
.
companyTel
+
'
AaBb
'
+
rec
.
companyFax
+
'
AaBb
'
+
rec
.
companyPostCode
;
str
+=
'
<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(
\'
'
+
rowInfo
+
'
\'
);"/> <a onclick="editSystemConfig(
\'
'
+
rowInfo
+
'
\'
);" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>
'
;
str
+=
'
<img src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSystemConfig(
'
+
rec
.
id
+
'
);"/> <a onclick="deleteSystemConfig(
'
+
rec
.
id
+
'
);" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>
'
;
return
str
;
}
}
]],
toolbar
:
[
{
id
:
'
addSystemConfig
'
,
text
:
'
增加
'
,
iconCls
:
'
icon-add
'
,
handler
:
function
()
{
addSystemConfig
();
}
},
{
id
:
'
deleteSystemConfig
'
,
text
:
'
删除
'
,
iconCls
:
'
icon-remove
'
,
handler
:
function
()
{
batDeleteSystemConfig
();
}
}
],
onLoadError
:
function
()
{
$
.
messager
.
alert
(
'
页面加载提示
'
,
'
页面加载异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
showSystemConfigDetails
(
1
,
initPageSize
);
}
//初始化键盘enter事件
$
(
document
).
keydown
(
function
(
event
)
{
//兼容 IE和firefox 事件
var
e
=
window
.
event
||
event
;
var
k
=
e
.
keyCode
||
e
.
which
||
e
.
charCode
;
//兼容 IE,firefox 兼容
var
obj
=
e
.
srcElement
?
e
.
srcElement
:
e
.
target
;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
if
(
k
==
"
13
"
&&
(
obj
.
id
==
"
companyName
"
||
obj
.
id
==
"
companyContacts
"
||
obj
.
id
==
"
companyAddress
"
||
obj
.
id
==
"
companyTel
"
||
obj
.
id
==
"
companyFax
"
||
obj
.
id
==
"
companyPostCode
"
))
{
$
(
"
#saveSystemConfig
"
).
click
();
}
//搜索按钮添加快捷键
if
(
k
==
"
13
"
&&
(
obj
.
id
==
"
searchCompanyName
"
))
{
$
(
"
#searchBtn
"
).
click
();
}
});
//分页信息处理
function
ininPager
()
{
try
{
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
pager
.
pagination
({
onSelectPage
:
function
(
pageNum
,
pageSize
)
{
opts
.
pageNumber
=
pageNum
;
opts
.
pageSize
=
pageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
pageNum
,
pageSize
:
pageSize
});
showSystemConfigDetails
(
pageNum
,
pageSize
);
}
});
}
catch
(
e
)
{
$
.
messager
.
alert
(
'
异常处理提示
'
,
"
分页信息异常 :
"
+
e
.
name
+
"
:
"
+
e
.
message
,
'
error
'
);
}
}
//删除系统配置信息
function
deleteSystemConfig
(
systemConfigId
)
{
$
.
messager
.
confirm
(
'
删除确认
'
,
'
确定要删除此系统配置信息吗?
'
,
function
(
r
)
{
if
(
r
)
{
$
.
ajax
({
type
:
"
ge
t
"
,
url
:
"
/systemConfig/
list
"
,
type
:
"
pos
t
"
,
url
:
"
/systemConfig/
"
+
systemConfigId
+
"
/delete
"
,
dataType
:
"
json
"
,
data
:
({
currentPage
:
1
,
pageSize
:
100
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
page
)
{
var
array
=
res
.
data
.
page
.
rows
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
var
name
=
array
[
i
].
name
;
$
(
"
.
"
+
name
).
val
(
array
[
i
].
value
).
attr
(
"
data-value
"
,
array
[
i
].
value
).
attr
(
"
data-id
"
,
array
[
i
].
id
);
}
}
if
(
res
&&
res
.
code
==
200
)
{
$
(
"
#searchBtn
"
).
click
();
}
else
{
$
.
messager
.
alert
(
'
删除提示
'
,
'
删除系统配置信息失败,请稍后再试!
'
,
'
error
'
);
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
查询失败
'
,
'
查询
系统配置信息异常,请稍后再试!
'
,
'
error
'
);
$
.
messager
.
alert
(
'
删除提示
'
,
'
删除
系统配置信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
});
}
loadInfo
();
//加载信息
$
(
"
#saveSystemConfig
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
var
status
=
false
;
$
(
"
#searchTable input
"
).
each
(
function
()
{
var
thisId
=
$
(
this
).
attr
(
"
data-id
"
);
var
thisValue
=
$
(
this
).
attr
(
"
data-value
"
);
if
(
$
(
this
).
val
()
!=
thisValue
)
{
//更新修改过的单行信息
//批量删除系统配置
function
batDeleteSystemConfig
()
{
var
row
=
$
(
'
#tableData
'
).
datagrid
(
'
getChecked
'
);
if
(
row
.
length
==
0
)
{
$
.
messager
.
alert
(
'
删除提示
'
,
'
没有记录被选中!
'
,
'
warning
'
);
return
;
}
if
(
row
.
length
>
0
)
{
$
.
messager
.
confirm
(
'
删除确认
'
,
'
确定要删除选中的
'
+
row
.
length
+
'
条系统配置信息吗?
'
,
function
(
r
)
{
if
(
r
)
{
var
ids
=
""
;
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
if
(
i
==
row
.
length
-
1
)
{
ids
+=
row
[
i
].
id
;
break
;
}
ids
+=
row
[
i
].
id
+
"
,
"
;
}
if
(
row
[
i
].
loginame
==
"
jsh
"
){
$
.
messager
.
alert
(
'
提示
'
,
'
管理员jsh不能删除!
'
,
'
warning
'
);
return
;
}
else
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
/systemConfig/
update?id=
"
+
thisId
,
url
:
"
/systemConfig/
batchDelete
"
,
dataType
:
"
json
"
,
data
:
{
info
:
JSON
.
stringify
({
value
:
$
(
this
).
val
()
})
},
async
:
false
,
data
:
({
ids
:
ids
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
status
=
true
;
if
(
res
&&
res
.
code
===
200
)
{
$
(
"
#searchBtn
"
).
click
();
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
false
);
}
else
{
$
.
messager
.
alert
(
'
删除提示
'
,
'
删除系统配置信息失败,请稍后再试!
'
,
'
error
'
);
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
保存失败
'
,
'
保存
系统配置信息
失败
,请稍后再试!
'
,
'
error
'
);
$
.
messager
.
alert
(
'
删除提示
'
,
'
删除
系统配置信息
异常
,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
});
setTimeout
(
function
()
{
if
(
status
)
{
$
.
messager
.
alert
(
'
保存成功
'
,
'
保存系统配置信息成功!
'
,
'
info
'
);
loadInfo
();
//加载信息
}
else
{
$
.
messager
.
alert
(
'
提示
'
,
'
信息未修改,无需保存!
'
,
'
info
'
);
}
});
}
}
//增加系统配置
var
url
;
var
systemConfigId
=
0
;
//保存编辑前的名称
var
oldCompanyName
=
""
;
var
pageTotal
=
0
;
//数据总量
function
addSystemConfig
()
{
if
(
pageTotal
>=
1
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
只能填写一条系统配置信息
'
,
'
warning
'
);
}
else
{
$
(
'
#systemConfigDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加系统配置
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
'
#systemConfigFM
'
).
form
(
'
clear
'
);
var
row
=
{};
$
(
'
#systemConfigFM
'
).
form
(
'
load
'
,
row
);
$
(
"
#companyName
"
).
focus
();
oldCompanyName
=
""
;
systemConfigId
=
0
;
url
=
'
/systemConfig/add
'
;
}
}
//保存系统配置信息
$
(
"
#saveSystemConfig
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
checkCompanyName
())
{
return
;
}
var
companyName
=
$
.
trim
(
$
(
"
#companyName
"
).
val
());
if
(
!
companyName
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
公司名称不能为空
'
,
'
warning
'
);
$
(
"
#companyName
"
).
val
(
""
).
focus
();
return
;
}
$
.
ajax
({
url
:
url
,
type
:
"
post
"
,
dataType
:
"
json
"
,
data
:
{
info
:
JSON
.
stringify
(
$
(
"
#systemConfigFM
"
).
serializeObject
())
},
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
$
(
'
#systemConfigDlg
'
).
dialog
(
'
close
'
);
//加载完以后重新初始化
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showSystemConfigDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
网络异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
});
//编辑系统配置信息
function
editSystemConfig
(
systemConfigTotalInfo
)
{
var
systemConfigInfo
=
systemConfigTotalInfo
.
split
(
"
AaBb
"
);
var
row
=
{
companyName
:
systemConfigInfo
[
1
],
companyContacts
:
systemConfigInfo
[
2
],
companyAddress
:
systemConfigInfo
[
3
],
companyTel
:
systemConfigInfo
[
4
],
companyFax
:
systemConfigInfo
[
5
],
companyPostCode
:
systemConfigInfo
[
6
]
};
oldCompanyName
=
systemConfigInfo
[
1
];
$
(
'
#systemConfigDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑系统配置信息
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
'
#systemConfigFM
'
).
form
(
'
load
'
,
row
);
systemConfigId
=
systemConfigInfo
[
0
];
//焦点在名称输入框==定焦在输入文字后面
$
(
"
#companyName
"
).
val
(
""
).
focus
().
val
(
systemConfigInfo
[
1
]);
url
=
'
/systemConfig/update?id=
'
+
systemConfigInfo
[
0
];
}
//检查系统配置 名称是否存在 ++ 重名无法提示问题需要跟进
function
checkCompanyName
()
{
var
companyName
=
$
.
trim
(
$
(
"
#companyName
"
).
val
());
//表示是否存在 true == 存在 false = 不存在
var
flag
=
false
;
//开始ajax名称检验,不能重名
if
(
companyName
.
length
>
0
&&
(
oldCompanyName
.
length
==
0
||
companyName
!=
oldCompanyName
))
{
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/systemConfig/checkIsNameExist
"
,
dataType
:
"
json
"
,
async
:
false
,
data
:
({
id
:
systemConfigId
,
companyName
:
companyName
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
status
)
{
flag
=
res
.
data
.
status
;
if
(
flag
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
系统配置名称已经存在
'
,
'
info
'
);
return
;
}
}
}
},
1000
);
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
检查系统配置名称是否存在异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
})
</script>
</head>
<body>
<div
class=
"system-config"
>
<table
id=
"searchTable"
>
<tr>
<td>
公司名称:
</td>
<td>
<input
type=
"text"
class=
"company_name easyui-validatebox"
data-options=
"required:true,validType:'length[2,30]'"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td>
联系人:
</td>
<td>
<input
type=
"text"
class=
"company_contacts"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td>
公司地址:
</td>
<td>
<input
type=
"text"
class=
"company_address"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td>
公司电话:
</td>
<td>
<input
type=
"text"
class=
"company_tel"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td>
公司传真:
</td>
<td>
<input
type=
"text"
class=
"company_fax"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td>
公司邮编:
</td>
<td>
<input
type=
"text"
class=
"company_post_code"
style=
"width:250px;"
/>
</td>
</tr>
<tr>
<td></td>
<td>
<a
href=
"javascript:void(0)"
id=
"saveSystemConfig"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存信息
</a>
</td>
</tr>
</table>
</div>
}
return
flag
;
}
//搜索处理
$
(
"
#searchBtn
"
).
unbind
().
bind
({
click
:
function
()
{
showSystemConfigDetails
(
1
,
initPageSize
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
opts
.
pageNumber
=
1
;
opts
.
pageSize
=
initPageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
1
,
pageSize
:
initPageSize
});
}
});
function
showSystemConfigDetails
(
pageNo
,
pageSize
)
{
var
companyName
=
$
.
trim
(
$
(
"
#searchCompanyName
"
).
val
());
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/systemConfig/list
"
,
dataType
:
"
json
"
,
data
:
({
search
:
JSON
.
stringify
({
companyName
:
companyName
}),
currentPage
:
pageNo
,
pageSize
:
pageSize
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
){
if
(
res
.
data
&&
res
.
data
.
page
)
{
pageTotal
=
res
.
data
.
page
.
total
;
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
page
);
}
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
查询提示
'
,
'
查询数据后台异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
//重置按钮
$
(
"
#searchResetBtn
"
).
unbind
().
bind
({
click
:
function
()
{
$
(
"
#searchCompanyName
"
).
val
(
""
);
//加载完以后重新初始化
$
(
"
#searchBtn
"
).
click
();
}
});
</script>
</body>
</html>
\ No newline at end of file
sql/jsh_erp.sql
View file @
3a0f0191
...
...
@@ -1308,4 +1308,22 @@ INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`,
-- ----------------------------
INSERT
INTO
`jsh_organization`
(
`org_no`
,
`org_full_name`
,
`org_abr`
,
`org_tpcd`
,
`org_stcd`
,
`org_parent_no`
,
`sort`
,
`remark`
,
`create_time`
,
`creator`
,
`update_time`
,
`updater`
,
`org_create_time`
,
`org_stop_time`
)
VALUES
(
'01'
,
'根机构'
,
'根机构'
,
NULL
,
'2'
,
'-1'
,
'1'
,
'根机构,初始化存在'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
-- ----------------------------
-- 时间:2019年3月9日
-- version:1.0.6
-- 此次更新
-- 整改jsh_systemconfig表的字段
-- ----------------------------
alter
table
jsh_systemconfig
drop
type
;
alter
table
jsh_systemconfig
drop
name
;
alter
table
jsh_systemconfig
drop
value
;
alter
table
jsh_systemconfig
drop
description
;
alter
table
jsh_systemconfig
add
company_name
varchar
(
50
)
DEFAULT
null
COMMENT
'公司名称'
;
alter
table
jsh_systemconfig
add
company_contacts
varchar
(
20
)
DEFAULT
null
COMMENT
'公司联系人'
;
alter
table
jsh_systemconfig
add
company_address
varchar
(
50
)
DEFAULT
null
COMMENT
'公司地址'
;
alter
table
jsh_systemconfig
add
company_tel
varchar
(
20
)
DEFAULT
null
COMMENT
'公司电话'
;
alter
table
jsh_systemconfig
add
company_fax
varchar
(
20
)
DEFAULT
null
COMMENT
'公司传真'
;
alter
table
jsh_systemconfig
add
company_post_code
varchar
(
20
)
DEFAULT
null
COMMENT
'公司邮编'
;
delete
from
jsh_systemconfig
;
insert
into
jsh_systemconfig
(
`company_name`
,
`company_contacts`
,
`company_address`
,
`company_tel`
,
`company_fax`
,
`company_post_code`
)
values
(
"南通jshERP公司"
,
"张三"
,
"南通市通州区某某路"
,
"0513-10101010"
,
"0513-18181818"
,
"226300"
);
sql/华夏ERP数据库设计汇总.xlsx
View file @
3a0f0191
No preview for this file type
src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java
View file @
3a0f0191
...
...
@@ -11,35 +11,51 @@ public class SystemConfig {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
typ
e
* This field corresponds to the database column jsh_systemconfig.
company_nam
e
*
* @mbggenerated
*/
private
String
typ
e
;
private
String
companyNam
e
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
name
* This field corresponds to the database column jsh_systemconfig.
company_contacts
*
* @mbggenerated
*/
private
String
name
;
private
String
companyContacts
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
value
* This field corresponds to the database column jsh_systemconfig.
company_address
*
* @mbggenerated
*/
private
String
value
;
private
String
companyAddress
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.
description
* This field corresponds to the database column jsh_systemconfig.
company_tel
*
* @mbggenerated
*/
private
String
description
;
private
String
companyTel
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_fax
*
* @mbggenerated
*/
private
String
companyFax
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_post_code
*
* @mbggenerated
*/
private
String
companyPostCode
;
/**
* This method was generated by MyBatis Generator.
...
...
@@ -67,97 +83,145 @@ public class SystemConfig {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.type
* This method returns the value of the database column jsh_systemconfig.company_name
*
* @return the value of jsh_systemconfig.company_name
*
* @mbggenerated
*/
public
String
getCompanyName
()
{
return
companyName
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_name
*
* @param companyName the value for jsh_systemconfig.company_name
*
* @mbggenerated
*/
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
==
null
?
null
:
companyName
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_contacts
*
* @return the value of jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public
String
getCompanyContacts
()
{
return
companyContacts
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_contacts
*
* @param companyContacts the value for jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public
void
setCompanyContacts
(
String
companyContacts
)
{
this
.
companyContacts
=
companyContacts
==
null
?
null
:
companyContacts
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_address
*
* @return the value of jsh_systemconfig.
type
* @return the value of jsh_systemconfig.
company_address
*
* @mbggenerated
*/
public
String
get
Type
()
{
return
type
;
public
String
get
CompanyAddress
()
{
return
companyAddress
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
type
* This method sets the value of the database column jsh_systemconfig.
company_address
*
* @param
type
the value for jsh_systemconfig.
type
* @param
companyAddress
the value for jsh_systemconfig.
company_address
*
* @mbggenerated
*/
public
void
set
Type
(
String
type
)
{
this
.
type
=
type
==
null
?
null
:
type
.
trim
();
public
void
set
CompanyAddress
(
String
companyAddress
)
{
this
.
companyAddress
=
companyAddress
==
null
?
null
:
companyAddress
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
name
* This method returns the value of the database column jsh_systemconfig.
company_tel
*
* @return the value of jsh_systemconfig.
name
* @return the value of jsh_systemconfig.
company_tel
*
* @mbggenerated
*/
public
String
get
Name
()
{
return
name
;
public
String
get
CompanyTel
()
{
return
companyTel
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
name
* This method sets the value of the database column jsh_systemconfig.
company_tel
*
* @param
name
the value for jsh_systemconfig.
name
* @param
companyTel
the value for jsh_systemconfig.
company_tel
*
* @mbggenerated
*/
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
public
void
set
CompanyTel
(
String
companyTel
)
{
this
.
companyTel
=
companyTel
==
null
?
null
:
companyTel
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
value
* This method returns the value of the database column jsh_systemconfig.
company_fax
*
* @return the value of jsh_systemconfig.
value
* @return the value of jsh_systemconfig.
company_fax
*
* @mbggenerated
*/
public
String
get
Value
()
{
return
value
;
public
String
get
CompanyFax
()
{
return
companyFax
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
value
* This method sets the value of the database column jsh_systemconfig.
company_fax
*
* @param
value
the value for jsh_systemconfig.
value
* @param
companyFax
the value for jsh_systemconfig.
company_fax
*
* @mbggenerated
*/
public
void
set
Value
(
String
value
)
{
this
.
value
=
value
==
null
?
null
:
value
.
trim
();
public
void
set
CompanyFax
(
String
companyFax
)
{
this
.
companyFax
=
companyFax
==
null
?
null
:
companyFax
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.
description
* This method returns the value of the database column jsh_systemconfig.
company_post_code
*
* @return the value of jsh_systemconfig.
description
* @return the value of jsh_systemconfig.
company_post_code
*
* @mbggenerated
*/
public
String
get
Description
()
{
return
description
;
public
String
get
CompanyPostCode
()
{
return
companyPostCode
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.
description
* This method sets the value of the database column jsh_systemconfig.
company_post_code
*
* @param
description
the value for jsh_systemconfig.
description
* @param
companyPostCode
the value for jsh_systemconfig.
company_post_code
*
* @mbggenerated
*/
public
void
set
Description
(
String
description
)
{
this
.
description
=
description
==
null
?
null
:
description
.
trim
();
public
void
set
CompanyPostCode
(
String
companyPostCode
)
{
this
.
companyPostCode
=
companyPostCode
==
null
?
null
:
companyPostCode
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java
View file @
3a0f0191
...
...
@@ -254,283 +254,423 @@ public class SystemConfigExample {
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eIsNull
()
{
addCriterion
(
"
typ
e is null"
);
public
Criteria
and
CompanyNam
eIsNull
()
{
addCriterion
(
"
company_nam
e is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eIsNotNull
()
{
addCriterion
(
"
typ
e is not null"
);
public
Criteria
and
CompanyNam
eIsNotNull
()
{
addCriterion
(
"
company_nam
e is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eEqualTo
(
String
value
)
{
addCriterion
(
"
typ
e ="
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eEqualTo
(
String
value
)
{
addCriterion
(
"
company_nam
e ="
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eNotEqualTo
(
String
value
)
{
addCriterion
(
"
typ
e <>"
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eNotEqualTo
(
String
value
)
{
addCriterion
(
"
company_nam
e <>"
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eGreaterThan
(
String
value
)
{
addCriterion
(
"
typ
e >"
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eGreaterThan
(
String
value
)
{
addCriterion
(
"
company_nam
e >"
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
typ
e >="
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_nam
e >="
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eLessThan
(
String
value
)
{
addCriterion
(
"
typ
e <"
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eLessThan
(
String
value
)
{
addCriterion
(
"
company_nam
e <"
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
typ
e <="
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_nam
e <="
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eLike
(
String
value
)
{
addCriterion
(
"
typ
e like"
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eLike
(
String
value
)
{
addCriterion
(
"
company_nam
e like"
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eNotLike
(
String
value
)
{
addCriterion
(
"
typ
e not like"
,
value
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eNotLike
(
String
value
)
{
addCriterion
(
"
company_nam
e not like"
,
value
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eIn
(
List
<
String
>
values
)
{
addCriterion
(
"
typ
e in"
,
values
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eIn
(
List
<
String
>
values
)
{
addCriterion
(
"
company_nam
e in"
,
values
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
typ
e not in"
,
values
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
company_nam
e not in"
,
values
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
typ
e between"
,
value1
,
value2
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_nam
e between"
,
value1
,
value2
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Typ
eNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
typ
e not between"
,
value1
,
value2
,
"
typ
e"
);
public
Criteria
and
CompanyNam
eNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_nam
e not between"
,
value1
,
value2
,
"
companyNam
e"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
IsNull
()
{
addCriterion
(
"
name
is null"
);
public
Criteria
and
CompanyContacts
IsNull
()
{
addCriterion
(
"
company_contacts
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
IsNotNull
()
{
addCriterion
(
"
name
is not null"
);
public
Criteria
and
CompanyContacts
IsNotNull
()
{
addCriterion
(
"
company_contacts
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
EqualTo
(
String
value
)
{
addCriterion
(
"
name ="
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
EqualTo
(
String
value
)
{
addCriterion
(
"
company_contacts ="
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
NotEqualTo
(
String
value
)
{
addCriterion
(
"
name <>"
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
NotEqualTo
(
String
value
)
{
addCriterion
(
"
company_contacts <>"
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
GreaterThan
(
String
value
)
{
addCriterion
(
"
name >"
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
GreaterThan
(
String
value
)
{
addCriterion
(
"
company_contacts >"
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
name >="
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_contacts >="
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
LessThan
(
String
value
)
{
addCriterion
(
"
name <"
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
LessThan
(
String
value
)
{
addCriterion
(
"
company_contacts <"
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
name <="
,
value
,
"name
"
);
public
Criteria
and
CompanyContacts
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_contacts <="
,
value
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
Like
(
String
value
)
{
addCriterion
(
"
name
like"
,
value
,
"
name
"
);
public
Criteria
and
CompanyContacts
Like
(
String
value
)
{
addCriterion
(
"
company_contacts
like"
,
value
,
"
companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
NotLike
(
String
value
)
{
addCriterion
(
"
name
not like"
,
value
,
"
name
"
);
public
Criteria
and
CompanyContacts
NotLike
(
String
value
)
{
addCriterion
(
"
company_contacts
not like"
,
value
,
"
companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
In
(
List
<
String
>
values
)
{
addCriterion
(
"
name in"
,
values
,
"name
"
);
public
Criteria
and
CompanyContacts
In
(
List
<
String
>
values
)
{
addCriterion
(
"
company_contacts in"
,
values
,
"companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
name
not in"
,
values
,
"
name
"
);
public
Criteria
and
CompanyContacts
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
company_contacts
not in"
,
values
,
"
companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
name
between"
,
value1
,
value2
,
"
name
"
);
public
Criteria
and
CompanyContacts
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_contacts
between"
,
value1
,
value2
,
"
companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Name
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
name
not between"
,
value1
,
value2
,
"
name
"
);
public
Criteria
and
CompanyContacts
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_contacts
not between"
,
value1
,
value2
,
"
companyContacts
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
IsNull
()
{
addCriterion
(
"
value
is null"
);
public
Criteria
and
CompanyAddress
IsNull
()
{
addCriterion
(
"
company_address
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
IsNotNull
()
{
addCriterion
(
"
value
is not null"
);
public
Criteria
and
CompanyAddress
IsNotNull
()
{
addCriterion
(
"
company_address
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
EqualTo
(
String
value
)
{
addCriterion
(
"
value ="
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
EqualTo
(
String
value
)
{
addCriterion
(
"
company_address ="
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
NotEqualTo
(
String
value
)
{
addCriterion
(
"
value <>"
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
NotEqualTo
(
String
value
)
{
addCriterion
(
"
company_address <>"
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
GreaterThan
(
String
value
)
{
addCriterion
(
"
value >"
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
GreaterThan
(
String
value
)
{
addCriterion
(
"
company_address >"
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
value >="
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_address >="
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
LessThan
(
String
value
)
{
addCriterion
(
"
value <"
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
LessThan
(
String
value
)
{
addCriterion
(
"
company_address <"
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
value <="
,
value
,
"value
"
);
public
Criteria
and
CompanyAddress
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_address <="
,
value
,
"companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
Like
(
String
value
)
{
addCriterion
(
"
value
like"
,
value
,
"
value
"
);
public
Criteria
and
CompanyAddress
Like
(
String
value
)
{
addCriterion
(
"
company_address
like"
,
value
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
NotLike
(
String
value
)
{
addCriterion
(
"
value
not like"
,
value
,
"
value
"
);
public
Criteria
and
CompanyAddress
NotLike
(
String
value
)
{
addCriterion
(
"
company_address
not like"
,
value
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
In
(
List
<
String
>
values
)
{
addCriterion
(
"
value
in"
,
values
,
"
value
"
);
public
Criteria
and
CompanyAddress
In
(
List
<
String
>
values
)
{
addCriterion
(
"
company_address
in"
,
values
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
value
not in"
,
values
,
"
value
"
);
public
Criteria
and
CompanyAddress
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
company_address
not in"
,
values
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
value
between"
,
value1
,
value2
,
"
value
"
);
public
Criteria
and
CompanyAddress
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_address
between"
,
value1
,
value2
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Value
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
value
not between"
,
value1
,
value2
,
"
value
"
);
public
Criteria
and
CompanyAddress
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_address
not between"
,
value1
,
value2
,
"
companyAddress
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
IsNull
()
{
addCriterion
(
"
description
is null"
);
public
Criteria
and
CompanyTel
IsNull
()
{
addCriterion
(
"
company_tel
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
IsNotNull
()
{
addCriterion
(
"
description
is not null"
);
public
Criteria
and
CompanyTel
IsNotNull
()
{
addCriterion
(
"
company_tel
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
EqualTo
(
String
value
)
{
addCriterion
(
"
description
="
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
EqualTo
(
String
value
)
{
addCriterion
(
"
company_tel
="
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
NotEqualTo
(
String
value
)
{
addCriterion
(
"
description
<>"
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
NotEqualTo
(
String
value
)
{
addCriterion
(
"
company_tel
<>"
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
GreaterThan
(
String
value
)
{
addCriterion
(
"
description
>"
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
GreaterThan
(
String
value
)
{
addCriterion
(
"
company_tel
>"
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
description
>="
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_tel
>="
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
LessThan
(
String
value
)
{
addCriterion
(
"
description
<"
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
LessThan
(
String
value
)
{
addCriterion
(
"
company_tel
<"
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
description
<="
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
company_tel
<="
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
Like
(
String
value
)
{
addCriterion
(
"
description
like"
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
Like
(
String
value
)
{
addCriterion
(
"
company_tel
like"
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
NotLike
(
String
value
)
{
addCriterion
(
"
description
not like"
,
value
,
"
description
"
);
public
Criteria
and
CompanyTel
NotLike
(
String
value
)
{
addCriterion
(
"
company_tel
not like"
,
value
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
In
(
List
<
String
>
values
)
{
addCriterion
(
"
description
in"
,
values
,
"
description
"
);
public
Criteria
and
CompanyTel
In
(
List
<
String
>
values
)
{
addCriterion
(
"
company_tel
in"
,
values
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
description
not in"
,
values
,
"
description
"
);
public
Criteria
and
CompanyTel
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
company_tel
not in"
,
values
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
Description
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
description
between"
,
value1
,
value2
,
"
description
"
);
public
Criteria
and
CompanyTel
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
company_tel
between"
,
value1
,
value2
,
"
companyTel
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description not between"
,
value1
,
value2
,
"description"
);
public
Criteria
andCompanyTelNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"company_tel not between"
,
value1
,
value2
,
"companyTel"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxIsNull
()
{
addCriterion
(
"company_fax is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxIsNotNull
()
{
addCriterion
(
"company_fax is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxEqualTo
(
String
value
)
{
addCriterion
(
"company_fax ="
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxNotEqualTo
(
String
value
)
{
addCriterion
(
"company_fax <>"
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxGreaterThan
(
String
value
)
{
addCriterion
(
"company_fax >"
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"company_fax >="
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxLessThan
(
String
value
)
{
addCriterion
(
"company_fax <"
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"company_fax <="
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxLike
(
String
value
)
{
addCriterion
(
"company_fax like"
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxNotLike
(
String
value
)
{
addCriterion
(
"company_fax not like"
,
value
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxIn
(
List
<
String
>
values
)
{
addCriterion
(
"company_fax in"
,
values
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"company_fax not in"
,
values
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"company_fax between"
,
value1
,
value2
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyFaxNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"company_fax not between"
,
value1
,
value2
,
"companyFax"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeIsNull
()
{
addCriterion
(
"company_post_code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeIsNotNull
()
{
addCriterion
(
"company_post_code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeEqualTo
(
String
value
)
{
addCriterion
(
"company_post_code ="
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"company_post_code <>"
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeGreaterThan
(
String
value
)
{
addCriterion
(
"company_post_code >"
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"company_post_code >="
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeLessThan
(
String
value
)
{
addCriterion
(
"company_post_code <"
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"company_post_code <="
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeLike
(
String
value
)
{
addCriterion
(
"company_post_code like"
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeNotLike
(
String
value
)
{
addCriterion
(
"company_post_code not like"
,
value
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"company_post_code in"
,
values
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"company_post_code not in"
,
values
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"company_post_code between"
,
value1
,
value2
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCompanyPostCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"company_post_code not between"
,
value1
,
value2
,
"companyPostCode"
);
return
(
Criteria
)
this
;
}
}
...
...
src/main/java/com/jsh/erp/datasource/mappers/SystemConfigMapperEx.java
View file @
3a0f0191
...
...
@@ -9,8 +9,10 @@ import java.util.List;
public
interface
SystemConfigMapperEx
{
List
<
SystemConfig
>
selectByConditionSystemConfig
(
@Param
(
"companyName"
)
String
companyName
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
Long
countsBySystemConfig
();
Long
countsBySystemConfig
(
@Param
(
"companyName"
)
String
companyName
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigComponent.java
View file @
3a0f0191
...
...
@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery {
}
private
List
<?>
getSystemConfigList
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
companyName
=
StringUtil
.
getInfo
(
search
,
"companyName"
);
String
order
=
QueryUtils
.
order
(
map
);
return
systemConfigService
.
select
(
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
return
systemConfigService
.
select
(
companyName
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
@Override
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
return
systemConfigService
.
countSystemConfig
();
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
companyName
=
StringUtil
.
getInfo
(
search
,
"companyName"
);
return
systemConfigService
.
countSystemConfig
(
companyName
);
}
@Override
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
3a0f0191
...
...
@@ -33,12 +33,12 @@ public class SystemConfigService {
SystemConfigExample
example
=
new
SystemConfigExample
();
return
systemConfigMapper
.
selectByExample
(
example
);
}
public
List
<
SystemConfig
>
select
(
int
offset
,
int
rows
)
{
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
offset
,
rows
);
public
List
<
SystemConfig
>
select
(
String
companyName
,
int
offset
,
int
rows
)
{
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
companyName
,
offset
,
rows
);
}
public
Long
countSystemConfig
()
{
return
systemConfigMapperEx
.
countsBySystemConfig
();
public
Long
countSystemConfig
(
String
companyName
)
{
return
systemConfigMapperEx
.
countsBySystemConfig
(
companyName
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
@@ -69,7 +69,7 @@ public class SystemConfigService {
public
int
checkIsNameExist
(
Long
id
,
String
name
)
{
SystemConfigExample
example
=
new
SystemConfigExample
();
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
andNameEqualTo
(
name
);
example
.
createCriteria
().
andIdNotEqualTo
(
id
).
and
Company
NameEqualTo
(
name
);
List
<
SystemConfig
>
list
=
systemConfigMapper
.
selectByExample
(
example
);
return
list
.
size
();
}
...
...
src/main/resources/mapper_xml/SystemConfigMapper.xml
View file @
3a0f0191
...
...
@@ -7,10 +7,12 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"company_name"
jdbcType=
"VARCHAR"
property=
"companyName"
/>
<result
column=
"company_contacts"
jdbcType=
"VARCHAR"
property=
"companyContacts"
/>
<result
column=
"company_address"
jdbcType=
"VARCHAR"
property=
"companyAddress"
/>
<result
column=
"company_tel"
jdbcType=
"VARCHAR"
property=
"companyTel"
/>
<result
column=
"company_fax"
jdbcType=
"VARCHAR"
property=
"companyFax"
/>
<result
column=
"company_post_code"
jdbcType=
"VARCHAR"
property=
"companyPostCode"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -83,7 +85,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id,
type, name, value, description
id,
company_name, company_contacts, company_address, company_tel, company_fax, company_post_code
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -136,10 +138,12 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_systemconfig (id, type, name,
value, description)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
insert into jsh_systemconfig (id, company_name, company_contacts,
company_address, company_tel, company_fax,
company_post_code)
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
#{companyPostCode,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
<!--
...
...
@@ -151,34 +155,46 @@
<if
test=
"id != null"
>
id,
</if>
<if
test=
"
typ
e != null"
>
typ
e,
<if
test=
"
companyNam
e != null"
>
company_nam
e,
</if>
<if
test=
"
name
!= null"
>
name
,
<if
test=
"
companyContacts
!= null"
>
company_contacts
,
</if>
<if
test=
"
value
!= null"
>
value
,
<if
test=
"
companyAddress
!= null"
>
company_address
,
</if>
<if
test=
"description != null"
>
description,
<if
test=
"companyTel != null"
>
company_tel,
</if>
<if
test=
"companyFax != null"
>
company_fax,
</if>
<if
test=
"companyPostCode != null"
>
company_post_code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
<if
test=
"companyName != null"
>
#{companyName,jdbcType=VARCHAR},
</if>
<if
test=
"companyContacts != null"
>
#{companyContacts,jdbcType=VARCHAR},
</if>
<if
test=
"companyAddress != null"
>
#{companyAddress,jdbcType=VARCHAR},
</if>
<if
test=
"
name
!= null"
>
#{
name
,jdbcType=VARCHAR},
<if
test=
"
companyTel
!= null"
>
#{
companyTel
,jdbcType=VARCHAR},
</if>
<if
test=
"
value
!= null"
>
#{
value
,jdbcType=VARCHAR},
<if
test=
"
companyFax
!= null"
>
#{
companyFax
,jdbcType=VARCHAR},
</if>
<if
test=
"
description
!= null"
>
#{
description
,jdbcType=VARCHAR},
<if
test=
"
companyPostCode
!= null"
>
#{
companyPostCode
,jdbcType=VARCHAR},
</if>
</trim>
</insert>
...
...
@@ -202,17 +218,23 @@
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.
typ
e != null"
>
typ
e = #{record.
typ
e,jdbcType=VARCHAR},
<if
test=
"record.
companyNam
e != null"
>
company_nam
e = #{record.
companyNam
e,jdbcType=VARCHAR},
</if>
<if
test=
"record.
name
!= null"
>
name = #{record.name
,jdbcType=VARCHAR},
<if
test=
"record.
companyContacts
!= null"
>
company_contacts = #{record.companyContacts
,jdbcType=VARCHAR},
</if>
<if
test=
"record.
value
!= null"
>
value = #{record.value
,jdbcType=VARCHAR},
<if
test=
"record.
companyAddress
!= null"
>
company_address = #{record.companyAddress
,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
<if
test=
"record.companyTel != null"
>
company_tel = #{record.companyTel,jdbcType=VARCHAR},
</if>
<if
test=
"record.companyFax != null"
>
company_fax = #{record.companyFax,jdbcType=VARCHAR},
</if>
<if
test=
"record.companyPostCode != null"
>
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -226,10 +248,12 @@
-->
update jsh_systemconfig
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
company_name = #{record.companyName,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
company_address = #{record.companyAddress,jdbcType=VARCHAR},
company_tel = #{record.companyTel,jdbcType=VARCHAR},
company_fax = #{record.companyFax,jdbcType=VARCHAR},
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -241,17 +265,23 @@
-->
update jsh_systemconfig
<set>
<if
test=
"type != null"
>
type = #{type,jdbcType=VARCHAR},
<if
test=
"companyName != null"
>
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if
test=
"companyContacts != null"
>
company_contacts = #{companyContacts,jdbcType=VARCHAR},
</if>
<if
test=
"companyAddress != null"
>
company_address = #{companyAddress,jdbcType=VARCHAR},
</if>
<if
test=
"
name
!= null"
>
name = #{name
,jdbcType=VARCHAR},
<if
test=
"
companyTel
!= null"
>
company_tel = #{companyTel
,jdbcType=VARCHAR},
</if>
<if
test=
"
value
!= null"
>
value = #{value
,jdbcType=VARCHAR},
<if
test=
"
companyFax
!= null"
>
company_fax = #{companyFax
,jdbcType=VARCHAR},
</if>
<if
test=
"
description
!= null"
>
description = #{description
,jdbcType=VARCHAR},
<if
test=
"
companyPostCode
!= null"
>
company_post_code = #{companyPostCode
,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
...
...
@@ -262,10 +292,12 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
set company_name = #{companyName,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR},
company_address = #{companyAddress,jdbcType=VARCHAR},
company_tel = #{companyTel,jdbcType=VARCHAR},
company_fax = #{companyFax,jdbcType=VARCHAR},
company_post_code = #{companyPostCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/SystemConfigMapperEx.xml
View file @
3a0f0191
...
...
@@ -5,6 +5,9 @@
select *
FROM jsh_systemconfig
where 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -14,5 +17,8 @@
COUNT(id)
FROM jsh_systemconfig
WHERE 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
</select>
</mapper>
\ No newline at end of file
src/test/resources/generatorConfig.xml
View file @
3a0f0191
...
...
@@ -5,7 +5,7 @@
<generatorConfiguration>
<classPathEntry
location=
"
C
:\
Users\cjl\.m2\
repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"
/>
location=
"
E
:\
maven-
repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"
/>
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
defaultModelType=
"flat"
>
<commentGenerator>
...
...
@@ -59,12 +59,12 @@
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
-->
<table
tableName=
"jsh_systemconfig"
domainObjectName=
"SystemConfig"
></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<!--
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
-->
<!--
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table
tableName=
"jsh_organization"
domainObjectName=
"Organization"
></table>
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
</context>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment