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
247dfb3c
Commit
247dfb3c
authored
Oct 17, 2020
by
季圣华
Browse files
增加平台参数表
parent
56a8beed
Changes
21
Hide whitespace changes
Inline
Side-by-side
docs/jsh_erp.sql
View file @
247dfb3c
...
@@ -972,3 +972,21 @@ INSERT INTO `jsh_user_business` VALUES ('66', 'UserRole', '130', '[10]', null, '
...
@@ -972,3 +972,21 @@ INSERT INTO `jsh_user_business` VALUES ('66', 'UserRole', '130', '[10]', null, '
INSERT
INTO
`jsh_user_business`
VALUES
(
'67'
,
'UserRole'
,
'131'
,
'[17]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'67'
,
'UserRole'
,
'131'
,
'[17]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'68'
,
'RoleFunctions'
,
'16'
,
'[210]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'68'
,
'RoleFunctions'
,
'16'
,
'[210]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'69'
,
'RoleFunctions'
,
'17'
,
'[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
241
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
199
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
242
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
41
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
200
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
210
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
211
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
197
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
203
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
204
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
205
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
206
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
212
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
201
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
202
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
40
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
232
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
233
\"
,
\"
btnStr
\"
:
\"
1,2
\"
}]'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'69'
,
'RoleFunctions'
,
'17'
,
'[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
241
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
199
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
242
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
41
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
200
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
210
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
211
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
197
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
203
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
204
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
205
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
206
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
212
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
201
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
202
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
40
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
232
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
233
\"
,
\"
btnStr
\"
:
\"
1,2
\"
}]'
,
'0'
);
-- ----------------------------
-- Table structure for jsh_platform_config
-- ----------------------------
DROP
TABLE
IF
EXISTS
`jsh_platform_config`
;
CREATE
TABLE
`jsh_platform_config`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
,
`platform_key`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'关键词'
,
`platform_key_info`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'关键词名称'
,
`platform_value`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'值'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8
COMMENT
=
'平台参数'
;
-- ----------------------------
-- Records of jsh_platform_config
-- ----------------------------
INSERT
INTO
`jsh_platform_config`
VALUES
(
'1'
,
'platform_name'
,
'平台名称'
,
'华夏ERP'
);
INSERT
INTO
`jsh_platform_config`
VALUES
(
'2'
,
'activation_code'
,
'激活码'
,
null
);
docs/数据库更新记录-方便升级.txt
View file @
247dfb3c
...
@@ -1020,4 +1020,22 @@ alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0'
...
@@ -1020,4 +1020,22 @@ alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0'
alter table jsh_depot_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_depot_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_account_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_account_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
alter table jsh_depot_head drop column oper_person_name;
alter table jsh_depot_head drop column oper_person_name;
update jsh_depot_head set creator=hands_person_id;
update jsh_depot_head set creator=hands_person_id;
\ No newline at end of file
-- --------------------------------------------------------
-- 时间 2020年10月17日
-- by jishenghua
-- 增加平台表
-- --------------------------------------------------------
DROP TABLE IF EXISTS `jsh_platform_config`;
CREATE TABLE `jsh_platform_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`platform_key` varchar(100) DEFAULT NULL COMMENT '关键词',
`platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称',
`platform_value` varchar(200) DEFAULT NULL COMMENT '值',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='平台参数';
INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '华夏ERP');
INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', null);
\ No newline at end of file
erp_web/pages/manage/plugin.html
View file @
247dfb3c
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
iconCls=
"icon-redo"
id=
"searchResetBtn"
>
重置
</a>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
iconCls=
"icon-redo"
id=
"searchResetBtn"
>
重置
</a>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
id=
"s
erialNumber"
>
获取序列号
</a>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
id=
"s
ubmitActivationCode"
>
填写激活码
</a>
</div>
</div>
</div>
</div>
<table
id=
"tableData"
style=
"height:340px;top:300px;border-bottom-color:#FFFFFF"
></table>
<table
id=
"tableData"
style=
"height:340px;top:300px;border-bottom-color:#FFFFFF"
></table>
...
@@ -61,6 +61,32 @@
...
@@ -61,6 +61,32 @@
<a
href=
"javascript:void(0)"
id=
"cancelPlugin"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
<a
href=
"javascript:void(0)"
id=
"cancelPlugin"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#pluginDlg').dialog('close')"
>
取消
</a>
onclick=
"javascript:$('#pluginDlg').dialog('close')"
>
取消
</a>
</div>
</div>
<div
id=
"activationCodeDlg"
class=
"easyui-dialog"
style=
"width:420px;padding:10px 20px"
closed=
"true"
buttons=
"#activationCodeDlg-buttons"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<form
id=
"activationCodeFM"
method=
"post"
novalidate
>
<table>
<tr>
<td>
机器码
</td>
<td
style=
"padding:5px"
>
<span
id=
"machineCode"
></span>
</td>
</tr>
<tr>
<td>
激活码
</td>
<td
style=
"padding:5px"
>
<input
name=
"activationCode"
id=
"activationCode"
class=
"easyui-textbox"
data-options=
"multiline:true"
style=
"width: 280px;height: 60px;"
/>
</td>
</tr>
</table>
</form>
</div>
<div
id=
"activationCodeDlg-buttons"
>
<a
href=
"javascript:void(0)"
id=
"saveActivationCode"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存
</a>
<a
href=
"javascript:void(0)"
id=
"cancelActivationCode"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#activationCodeDlg').dialog('close')"
>
取消
</a>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
//初始化界面
//初始化界面
$
(
function
()
{
$
(
function
()
{
...
@@ -365,8 +391,8 @@
...
@@ -365,8 +391,8 @@
}
}
});
});
//
获取序列号
//
填写激活码
$
(
"
#s
erialNumber
"
).
unbind
().
bind
({
$
(
"
#s
ubmitActivationCode
"
).
unbind
().
bind
({
click
:
function
()
{
click
:
function
()
{
$
.
ajax
({
$
.
ajax
({
type
:
"
get
"
,
type
:
"
get
"
,
...
@@ -374,7 +400,28 @@
...
@@ -374,7 +400,28 @@
dataType
:
"
json
"
,
dataType
:
"
json
"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
$
.
messager
.
alert
(
'
序列号
'
,
res
.
data
);
$
(
"
#machineCode
"
).
text
(
res
.
data
);
$
(
'
#activationCodeDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui/themes/icons/edit_add.png"/> 填写激活码
'
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
"
#activationCode
"
).
textbox
(
"
clear
"
);
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/platformConfig/getPlatformConfigByKey
"
,
data
:
{
platformKey
:
"
activation_code
"
},
dataType
:
"
json
"
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
==
200
){
$
(
"
#activationCode
"
).
textbox
(
"
setValue
"
,
res
.
data
.
platformValue
);
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
}
},
},
//此处添加错误处理
//此处添加错误处理
...
@@ -385,6 +432,33 @@
...
@@ -385,6 +432,33 @@
});
});
}
}
});
});
$
(
"
#saveActivationCode
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
$
(
"
#activationCode
"
).
val
()
==
""
){
$
.
messager
.
alert
(
'
提示
'
,
'
激活码不能为空!
'
,
'
warning
'
);
return
;
}
$
.
ajax
({
type
:
"
post
"
,
url
:
"
/platformConfig/updatePlatformConfigByKey
"
,
data
:
{
platformKey
:
"
activation_code
"
,
platformValue
:
$
(
"
#activationCode
"
).
val
()
},
dataType
:
"
json
"
,
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
==
200
){
$
.
messager
.
alert
(
'
提示
'
,
'
保存成功!
'
,
'
info
'
);
$
(
'
#activationCodeDlg
'
).
dialog
(
'
close
'
);
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
提示
'
,
'
保存信息异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
});
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/java/com/jsh/erp/config/TenantConfig.java
View file @
247dfb3c
...
@@ -63,7 +63,7 @@ public class TenantConfig {
...
@@ -63,7 +63,7 @@ public class TenantConfig {
// 这里可以判断是否过滤表
// 这里可以判断是否过滤表
if
(
"jsh_material_property"
.
equals
(
tableName
)
||
"jsh_sequence"
.
equals
(
tableName
)
if
(
"jsh_material_property"
.
equals
(
tableName
)
||
"jsh_sequence"
.
equals
(
tableName
)
||
"jsh_user_business"
.
equals
(
tableName
)
||
"jsh_function"
.
equals
(
tableName
)
||
"jsh_user_business"
.
equals
(
tableName
)
||
"jsh_function"
.
equals
(
tableName
)
||
"jsh_tenant"
.
equals
(
tableName
))
{
||
"jsh_platform_config"
.
equals
(
tableName
)||
"jsh_tenant"
.
equals
(
tableName
))
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
247dfb3c
...
@@ -7,13 +7,12 @@ import com.jsh.erp.constants.ExceptionConstants;
...
@@ -7,13 +7,12 @@ import com.jsh.erp.constants.ExceptionConstants;
import
com.jsh.erp.datasource.entities.*
;
import
com.jsh.erp.datasource.entities.*
;
import
com.jsh.erp.datasource.vo.DepotItemStockWarningCount
;
import
com.jsh.erp.datasource.vo.DepotItemStockWarningCount
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.service.
M
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.
m
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.material.MaterialService
;
import
com.jsh.erp.service.material.MaterialService
;
import
com.jsh.erp.utils.*
;
import
com.jsh.erp.utils.*
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -22,7 +21,6 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -22,7 +21,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.File
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
...
src/main/java/com/jsh/erp/controller/MaterialExtendController.java
View file @
247dfb3c
...
@@ -3,24 +3,19 @@ package com.jsh.erp.controller;
...
@@ -3,24 +3,19 @@ package com.jsh.erp.controller;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.vo.MaterialExtendVo4List
;
import
com.jsh.erp.datasource.vo.MaterialExtendVo4List
;
import
com.jsh.erp.service.
M
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.
m
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.ErpInfo
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
/**
/**
* @author jijiaqing
* @author jijiaqing
*/
*/
...
...
src/main/java/com/jsh/erp/controller/PlatformConfigController.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.constants.BusinessConstants
;
import
com.jsh.erp.constants.ExceptionConstants
;
import
com.jsh.erp.datasource.entities.PlatformConfig
;
import
com.jsh.erp.datasource.entities.Supplier
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.service.platformConfig.PlatformConfigService
;
import
com.jsh.erp.service.systemConfig.SystemConfigService
;
import
com.jsh.erp.service.user.UserService
;
import
com.jsh.erp.utils.*
;
import
jxl.Sheet
;
import
jxl.Workbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
/**
* @author ji|sheng|hua 华夏erp
*/
@RestController
@RequestMapping
(
value
=
"/platformConfig"
)
public
class
PlatformConfigController
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
PlatformConfigController
.
class
);
@Resource
private
PlatformConfigService
platformConfigService
;
/**
* 根据platformKey更新platformValue
* @param platformKey
* @param platformValue
* @param request
* @return
*/
@PostMapping
(
value
=
"/updatePlatformConfigByKey"
)
public
String
updatePlatformConfigByKey
(
@RequestParam
(
"platformKey"
)
String
platformKey
,
@RequestParam
(
"platformValue"
)
String
platformValue
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
platformConfigService
.
updatePlatformConfigByKey
(
platformKey
,
platformValue
);
if
(
res
>
0
)
{
return
returnJson
(
objectMap
,
ErpInfo
.
OK
.
name
,
ErpInfo
.
OK
.
code
);
}
else
{
return
returnJson
(
objectMap
,
ErpInfo
.
ERROR
.
name
,
ErpInfo
.
ERROR
.
code
);
}
}
/**
* 根据platformKey查询信息
* @param platformKey
* @param request
* @return
*/
@GetMapping
(
value
=
"/getPlatformConfigByKey"
)
public
BaseResponseInfo
getPlatformConfigByKey
(
@RequestParam
(
"platformKey"
)
String
platformKey
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
PlatformConfig
platformConfig
=
platformConfigService
.
getPlatformConfigByKey
(
platformKey
);
res
.
code
=
200
;
res
.
data
=
platformConfig
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
}
src/main/java/com/jsh/erp/datasource/entities/PlatformConfig.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.datasource.entities
;
public
class
PlatformConfig
{
private
Long
id
;
private
String
platformKey
;
private
String
platformKeyInfo
;
private
String
platformValue
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getPlatformKey
()
{
return
platformKey
;
}
public
void
setPlatformKey
(
String
platformKey
)
{
this
.
platformKey
=
platformKey
==
null
?
null
:
platformKey
.
trim
();
}
public
String
getPlatformKeyInfo
()
{
return
platformKeyInfo
;
}
public
void
setPlatformKeyInfo
(
String
platformKeyInfo
)
{
this
.
platformKeyInfo
=
platformKeyInfo
==
null
?
null
:
platformKeyInfo
.
trim
();
}
public
String
getPlatformValue
()
{
return
platformValue
;
}
public
void
setPlatformValue
(
String
platformValue
)
{
this
.
platformValue
=
platformValue
==
null
?
null
:
platformValue
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/PlatformConfigExample.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.datasource.entities
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PlatformConfigExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
PlatformConfigExample
()
{
oredCriteria
=
new
ArrayList
<>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyIsNull
()
{
addCriterion
(
"platform_key is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyIsNotNull
()
{
addCriterion
(
"platform_key is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyEqualTo
(
String
value
)
{
addCriterion
(
"platform_key ="
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyNotEqualTo
(
String
value
)
{
addCriterion
(
"platform_key <>"
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyGreaterThan
(
String
value
)
{
addCriterion
(
"platform_key >"
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_key >="
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyLessThan
(
String
value
)
{
addCriterion
(
"platform_key <"
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_key <="
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyLike
(
String
value
)
{
addCriterion
(
"platform_key like"
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyNotLike
(
String
value
)
{
addCriterion
(
"platform_key not like"
,
value
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_key in"
,
values
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_key not in"
,
values
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_key between"
,
value1
,
value2
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_key not between"
,
value1
,
value2
,
"platformKey"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoIsNull
()
{
addCriterion
(
"platform_key_info is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoIsNotNull
()
{
addCriterion
(
"platform_key_info is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoEqualTo
(
String
value
)
{
addCriterion
(
"platform_key_info ="
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoNotEqualTo
(
String
value
)
{
addCriterion
(
"platform_key_info <>"
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoGreaterThan
(
String
value
)
{
addCriterion
(
"platform_key_info >"
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_key_info >="
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoLessThan
(
String
value
)
{
addCriterion
(
"platform_key_info <"
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_key_info <="
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoLike
(
String
value
)
{
addCriterion
(
"platform_key_info like"
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoNotLike
(
String
value
)
{
addCriterion
(
"platform_key_info not like"
,
value
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_key_info in"
,
values
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_key_info not in"
,
values
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_key_info between"
,
value1
,
value2
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformKeyInfoNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_key_info not between"
,
value1
,
value2
,
"platformKeyInfo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueIsNull
()
{
addCriterion
(
"platform_value is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueIsNotNull
()
{
addCriterion
(
"platform_value is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueEqualTo
(
String
value
)
{
addCriterion
(
"platform_value ="
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueNotEqualTo
(
String
value
)
{
addCriterion
(
"platform_value <>"
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueGreaterThan
(
String
value
)
{
addCriterion
(
"platform_value >"
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_value >="
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueLessThan
(
String
value
)
{
addCriterion
(
"platform_value <"
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"platform_value <="
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueLike
(
String
value
)
{
addCriterion
(
"platform_value like"
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueNotLike
(
String
value
)
{
addCriterion
(
"platform_value not like"
,
value
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_value in"
,
values
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"platform_value not in"
,
values
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_value between"
,
value1
,
value2
,
"platformValue"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlatformValueNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"platform_value not between"
,
value1
,
value2
,
"platformValue"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/PlatformConfigMapper.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.PlatformConfig
;
import
com.jsh.erp.datasource.entities.PlatformConfigExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
PlatformConfigMapper
{
long
countByExample
(
PlatformConfigExample
example
);
int
deleteByExample
(
PlatformConfigExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
PlatformConfig
record
);
int
insertSelective
(
PlatformConfig
record
);
List
<
PlatformConfig
>
selectByExample
(
PlatformConfigExample
example
);
PlatformConfig
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
PlatformConfig
record
,
@Param
(
"example"
)
PlatformConfigExample
example
);
int
updateByExample
(
@Param
(
"record"
)
PlatformConfig
record
,
@Param
(
"example"
)
PlatformConfigExample
example
);
int
updateByPrimaryKeySelective
(
PlatformConfig
record
);
int
updateByPrimaryKey
(
PlatformConfig
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/PlatformConfigMapperEx.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.PlatformConfig
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
public
interface
PlatformConfigMapperEx
{
List
<
PlatformConfig
>
selectByConditionPlatformConfig
(
@Param
(
"key"
)
String
key
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
Long
countsByPlatformConfig
(
@Param
(
"key"
)
String
key
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/MaterialExtend/MaterialExtendComponent.java
View file @
247dfb3c
package
com.jsh.erp.service.
M
aterialExtend
;
package
com.jsh.erp.service.
m
aterialExtend
;
import
com.jsh.erp.service.ICommonQuery
;
import
com.jsh.erp.service.ICommonQuery
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
src/main/java/com/jsh/erp/service/MaterialExtend/MaterialExtendResource.java
View file @
247dfb3c
package
com.jsh.erp.service.
M
aterialExtend
;
package
com.jsh.erp.service.
m
aterialExtend
;
import
com.jsh.erp.service.ResourceInfo
;
import
com.jsh.erp.service.ResourceInfo
;
...
...
src/main/java/com/jsh/erp/service/MaterialExtend/MaterialExtendService.java
View file @
247dfb3c
package
com.jsh.erp.service.
M
aterialExtend
;
package
com.jsh.erp.service.
m
aterialExtend
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -23,7 +23,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
...
@@ -23,7 +23,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
247dfb3c
...
@@ -10,7 +10,7 @@ import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
...
@@ -10,7 +10,7 @@ import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
import
com.jsh.erp.datasource.vo.DepotItemVo4Stock
;
import
com.jsh.erp.datasource.vo.DepotItemVo4Stock
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.exception.JshException
;
import
com.jsh.erp.exception.JshException
;
import
com.jsh.erp.service.
M
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.
m
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.material.MaterialService
;
import
com.jsh.erp.service.material.MaterialService
;
import
com.jsh.erp.service.serialNumber.SerialNumberService
;
import
com.jsh.erp.service.serialNumber.SerialNumberService
;
...
@@ -22,8 +22,6 @@ import org.slf4j.Logger;
...
@@ -22,8 +22,6 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
...
src/main/java/com/jsh/erp/service/material/MaterialService.java
View file @
247dfb3c
...
@@ -10,7 +10,7 @@ import com.jsh.erp.datasource.entities.*;
...
@@ -10,7 +10,7 @@ import com.jsh.erp.datasource.entities.*;
import
com.jsh.erp.datasource.mappers.*
;
import
com.jsh.erp.datasource.mappers.*
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.exception.JshException
;
import
com.jsh.erp.exception.JshException
;
import
com.jsh.erp.service.
M
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.
m
aterialExtend.MaterialExtendService
;
import
com.jsh.erp.service.depot.DepotService
;
import
com.jsh.erp.service.depot.DepotService
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.log.LogService
;
...
@@ -20,7 +20,6 @@ import com.jsh.erp.service.user.UserService;
...
@@ -20,7 +20,6 @@ import com.jsh.erp.service.user.UserService;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.ExcelUtils
;
import
com.jsh.erp.utils.ExcelUtils
;
import
com.jsh.erp.utils.StringUtil
;
import
com.jsh.erp.utils.StringUtil
;
import
jxl.Cell
;
import
jxl.Sheet
;
import
jxl.Sheet
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigComponent.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.service.platformConfig
;
import
com.jsh.erp.service.ICommonQuery
;
import
com.jsh.erp.utils.Constants
;
import
com.jsh.erp.utils.QueryUtils
;
import
com.jsh.erp.utils.StringUtil
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
@Service
(
value
=
"platformConfig_component"
)
@PlatformConfigResource
public
class
PlatformConfigComponent
implements
ICommonQuery
{
@Resource
private
PlatformConfigService
platformConfigService
;
@Override
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
platformConfigService
.
getPlatformConfig
(
id
);
}
@Override
public
List
<?>
select
(
Map
<
String
,
String
>
map
)
throws
Exception
{
return
getPlatformConfigList
(
map
);
}
private
List
<?>
getPlatformConfigList
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
key
=
StringUtil
.
getInfo
(
search
,
"key"
);
return
platformConfigService
.
select
(
key
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
@Override
public
Long
counts
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
key
=
StringUtil
.
getInfo
(
search
,
"key"
);
return
platformConfigService
.
countPlatformConfig
(
key
);
}
@Override
public
int
insert
(
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
return
platformConfigService
.
insertSystemConfig
(
beanJson
,
request
);
}
@Override
public
int
update
(
String
beanJson
,
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
return
platformConfigService
.
updateSystemConfig
(
beanJson
,
id
,
request
);
}
@Override
public
int
delete
(
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
return
platformConfigService
.
deleteSystemConfig
(
id
,
request
);
}
@Override
public
int
batchDelete
(
String
ids
,
HttpServletRequest
request
)
throws
Exception
{
return
platformConfigService
.
batchDeleteSystemConfig
(
ids
,
request
);
}
@Override
public
int
checkIsNameExist
(
Long
id
,
String
name
)
throws
Exception
{
return
0
;
}
}
src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigResource.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.service.platformConfig
;
import
com.jsh.erp.service.ResourceInfo
;
import
java.lang.annotation.*
;
/**
* @author jishenghua qq752718920 2020-10-16 22:26:27
*/
@ResourceInfo
(
value
=
"platformConfig"
)
@Inherited
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
PlatformConfigResource
{
}
src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigService.java
0 → 100644
View file @
247dfb3c
package
com.jsh.erp.service.platformConfig
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.entities.PlatformConfig
;
import
com.jsh.erp.datasource.entities.PlatformConfigExample
;
import
com.jsh.erp.datasource.mappers.PlatformConfigMapper
;
import
com.jsh.erp.datasource.mappers.PlatformConfigMapperEx
;
import
com.jsh.erp.exception.JshException
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@Service
public
class
PlatformConfigService
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
PlatformConfigService
.
class
);
@Resource
private
PlatformConfigMapper
platformConfigMapper
;
@Resource
private
PlatformConfigMapperEx
platformConfigMapperEx
;
public
PlatformConfig
getPlatformConfig
(
long
id
)
throws
Exception
{
PlatformConfig
result
=
null
;
try
{
result
=
platformConfigMapper
.
selectByPrimaryKey
(
id
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
result
;
}
public
List
<
PlatformConfig
>
getPlatformConfig
()
throws
Exception
{
PlatformConfigExample
example
=
new
PlatformConfigExample
();
example
.
createCriteria
();
List
<
PlatformConfig
>
list
=
null
;
try
{
list
=
platformConfigMapper
.
selectByExample
(
example
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
;
}
public
List
<
PlatformConfig
>
select
(
String
key
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
PlatformConfig
>
list
=
null
;
try
{
list
=
platformConfigMapperEx
.
selectByConditionPlatformConfig
(
key
,
offset
,
rows
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
;
}
public
Long
countPlatformConfig
(
String
key
)
throws
Exception
{
Long
result
=
null
;
try
{
result
=
platformConfigMapperEx
.
countsByPlatformConfig
(
key
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
result
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertSystemConfig
(
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
PlatformConfig
platformConfig
=
JSONObject
.
parseObject
(
beanJson
,
PlatformConfig
.
class
);
int
result
=
0
;
try
{
result
=
platformConfigMapper
.
insertSelective
(
platformConfig
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
return
result
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateSystemConfig
(
String
beanJson
,
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
PlatformConfig
platformConfig
=
JSONObject
.
parseObject
(
beanJson
,
PlatformConfig
.
class
);
platformConfig
.
setId
(
id
);
int
result
=
0
;
try
{
result
=
platformConfigMapper
.
updateByPrimaryKeySelective
(
platformConfig
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
return
result
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
deleteSystemConfig
(
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
int
result
=
0
;
try
{
result
=
platformConfigMapper
.
deleteByPrimaryKey
(
id
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
return
result
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteSystemConfig
(
String
ids
,
HttpServletRequest
request
)
throws
Exception
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
PlatformConfigExample
example
=
new
PlatformConfigExample
();
example
.
createCriteria
().
andIdIn
(
idList
);
int
result
=
0
;
try
{
result
=
platformConfigMapper
.
deleteByExample
(
example
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
return
result
;
}
public
int
updatePlatformConfigByKey
(
String
platformKey
,
String
platformValue
)
throws
Exception
{
int
result
=
0
;
try
{
PlatformConfig
platformConfig
=
new
PlatformConfig
();
platformConfig
.
setPlatformValue
(
platformValue
);
PlatformConfigExample
example
=
new
PlatformConfigExample
();
example
.
createCriteria
().
andPlatformKeyEqualTo
(
platformKey
);
result
=
platformConfigMapper
.
updateByExampleSelective
(
platformConfig
,
example
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
return
result
;
}
public
PlatformConfig
getPlatformConfigByKey
(
String
platformKey
)
throws
Exception
{
PlatformConfig
platformConfig
=
new
PlatformConfig
();
try
{
PlatformConfigExample
example
=
new
PlatformConfigExample
();
example
.
createCriteria
().
andPlatformKeyEqualTo
(
platformKey
);
List
<
PlatformConfig
>
list
=
platformConfigMapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()>
0
){
platformConfig
=
list
.
get
(
0
);
}
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
platformConfig
;
}
}
src/main/resources/mapper_xml/PlatformConfigMapper.xml
0 → 100644
View file @
247dfb3c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.PlatformConfigMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.PlatformConfig"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"platform_key"
jdbcType=
"VARCHAR"
property=
"platformKey"
/>
<result
column=
"platform_key_info"
jdbcType=
"VARCHAR"
property=
"platformKeyInfo"
/>
<result
column=
"platform_value"
jdbcType=
"VARCHAR"
property=
"platformValue"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, platform_key, platform_key_info, platform_value
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfigExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_platform_config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from jsh_platform_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from jsh_platform_config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfigExample"
>
delete from jsh_platform_config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfig"
>
insert into jsh_platform_config (id, platform_key, platform_key_info,
platform_value)
values (#{id,jdbcType=BIGINT}, #{platformKey,jdbcType=VARCHAR}, #{platformKeyInfo,jdbcType=VARCHAR},
#{platformValue,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfig"
>
insert into jsh_platform_config
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"platformKey != null"
>
platform_key,
</if>
<if
test=
"platformKeyInfo != null"
>
platform_key_info,
</if>
<if
test=
"platformValue != null"
>
platform_value,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"platformKey != null"
>
#{platformKey,jdbcType=VARCHAR},
</if>
<if
test=
"platformKeyInfo != null"
>
#{platformKeyInfo,jdbcType=VARCHAR},
</if>
<if
test=
"platformValue != null"
>
#{platformValue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfigExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_platform_config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update jsh_platform_config
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.platformKey != null"
>
platform_key = #{record.platformKey,jdbcType=VARCHAR},
</if>
<if
test=
"record.platformKeyInfo != null"
>
platform_key_info = #{record.platformKeyInfo,jdbcType=VARCHAR},
</if>
<if
test=
"record.platformValue != null"
>
platform_value = #{record.platformValue,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update jsh_platform_config
set id = #{record.id,jdbcType=BIGINT},
platform_key = #{record.platformKey,jdbcType=VARCHAR},
platform_key_info = #{record.platformKeyInfo,jdbcType=VARCHAR},
platform_value = #{record.platformValue,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfig"
>
update jsh_platform_config
<set>
<if
test=
"platformKey != null"
>
platform_key = #{platformKey,jdbcType=VARCHAR},
</if>
<if
test=
"platformKeyInfo != null"
>
platform_key_info = #{platformKeyInfo,jdbcType=VARCHAR},
</if>
<if
test=
"platformValue != null"
>
platform_value = #{platformValue,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.PlatformConfig"
>
update jsh_platform_config
set platform_key = #{platformKey,jdbcType=VARCHAR},
platform_key_info = #{platformKeyInfo,jdbcType=VARCHAR},
platform_value = #{platformValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Prev
1
2
Next
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