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
42835c94
Commit
42835c94
authored
Apr 20, 2019
by
乾坤平台
Committed by
季圣华
Apr 20, 2019
Browse files
!50 异常封装
Merge pull request !50 from 乾坤平台/master
parents
7ce3af46
8a831229
Changes
69
Hide whitespace changes
Inline
Side-by-side
erp_web/pages/materials/materialcategory.html
View file @
42835c94
...
...
@@ -284,14 +284,6 @@
}
});
});
$
(
'
#btnSetFunctions
'
).
click
(
function
()
{
var
currentRow
=
$
(
"
#tableData
"
).
datagrid
(
"
getSelected
"
);
if
(
currentRow
==
null
)
{
$
.
messager
.
alert
(
'
提示
'
,
"
请选择一条数据再操作!
"
,
'
warning
'
);
return
false
;
}
this
.
href
=
"
/pages/manage/roleFunctions.html?id=
"
+
currentRow
.
id
;
});
//查询父级商品类别
$
(
"
#lookForSelectMaterialCategory
"
).
on
(
"
click
"
,
function
()
{
$
(
'
#forSelectMaterialCategoryDlg
'
).
dialog
({
...
...
src/main/java/com/jsh/erp/constants/ExceptionConstants.java
View file @
42835c94
...
...
@@ -18,6 +18,17 @@ public class ExceptionConstants {
**/
public
static
final
int
SERVICE_SUCCESS_CODE
=
200
;
public
static
final
String
SERVICE_SUCCESS_MSG
=
"操作成功"
;
/**
* 数据查询异常
*/
public
static
final
int
DATA_READ_FAIL_CODE
=
300
;
public
static
final
String
DATA_READ_FAIL_MSG
=
"数据查询异常"
;
/**
* 数据写入异常
*/
public
static
final
int
DATA_WRITE_FAIL_CODE
=
301
;
public
static
final
String
DATA_WRITE_FAIL_MSG
=
"数据写入异常"
;
/**
* 系统运行时未知错误
**/
...
...
src/main/java/com/jsh/erp/controller/AccountController.java
View file @
42835c94
package
com.jsh.erp.controller
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.constants.BusinessConstants
;
...
...
@@ -41,7 +40,7 @@ public class AccountController {
* @return
*/
@GetMapping
(
value
=
"/findBySelect"
)
public
String
findBySelect
(
HttpServletRequest
request
)
{
public
String
findBySelect
(
HttpServletRequest
request
)
throws
Exception
{
String
res
=
null
;
try
{
List
<
Account
>
dataList
=
accountService
.
findBySelect
();
...
...
@@ -70,7 +69,7 @@ public class AccountController {
* @return
*/
@GetMapping
(
value
=
"/getAccount"
)
public
BaseResponseInfo
getAccount
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAccount
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -100,7 +99,7 @@ public class AccountController {
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
"accountId"
)
Long
accountId
,
@RequestParam
(
"initialAmount"
)
BigDecimal
initialAmount
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -133,7 +132,7 @@ public class AccountController {
@PostMapping
(
value
=
"/updateAmountIsDefault"
)
public
String
updateAmountIsDefault
(
@RequestParam
(
"isDefault"
)
Boolean
isDefault
,
@RequestParam
(
"accountId"
)
Long
accountId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
accountService
.
updateAmountIsDefault
(
isDefault
,
accountId
);
if
(
res
>
0
)
{
...
...
src/main/java/com/jsh/erp/controller/AccountHeadController.java
View file @
42835c94
...
...
@@ -40,7 +40,7 @@ public class AccountHeadController {
* @return
*/
@GetMapping
(
value
=
"/getMaxId"
)
public
BaseResponseInfo
getMaxId
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getMaxId
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -68,7 +68,7 @@ public class AccountHeadController {
public
BaseResponseInfo
findTotalPay
(
@RequestParam
(
"supplierId"
)
Integer
supplierId
,
@RequestParam
(
"endTime"
)
String
endTime
,
@RequestParam
(
"supType"
)
String
supType
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -106,7 +106,7 @@ public class AccountHeadController {
*/
@GetMapping
(
value
=
"/getDetailByNumber"
)
public
BaseResponseInfo
getDetailByNumber
(
@RequestParam
(
"billNo"
)
String
billNo
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
AccountHeadVo4ListEx
ahl
=
new
AccountHeadVo4ListEx
();
try
{
...
...
@@ -132,7 +132,7 @@ public class AccountHeadController {
* @param endTime
* @return
*/
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
mode
,
String
endTime
)
{
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
mode
,
String
endTime
)
throws
Exception
{
BigDecimal
allMoney
=
BigDecimal
.
ZERO
;
try
{
Integer
supplierId
=
Integer
.
valueOf
(
getS
);
...
...
src/main/java/com/jsh/erp/controller/AccountItemController.java
View file @
42835c94
...
...
@@ -55,7 +55,7 @@ public class AccountItemController {
@RequestParam
(
"updated"
)
String
updated
,
@RequestParam
(
"headerId"
)
Long
headerId
,
@RequestParam
(
"listType"
)
String
listType
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -70,7 +70,7 @@ public class AccountItemController {
@GetMapping
(
value
=
"/getDetailList"
)
public
BaseResponseInfo
getDetailList
(
@RequestParam
(
"headerId"
)
Long
headerId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
src/main/java/com/jsh/erp/controller/AppController.java
View file @
42835c94
...
...
@@ -48,7 +48,7 @@ public class AppController {
* @return
*/
@GetMapping
(
value
=
"/findAppByUserId"
)
public
JSONObject
findAppByUserId
(
@RequestParam
(
"userId"
)
String
userId
,
HttpServletRequest
request
)
{
public
JSONObject
findAppByUserId
(
@RequestParam
(
"userId"
)
String
userId
,
HttpServletRequest
request
)
throws
Exception
{
List
<
UserBusiness
>
roleList
=
userBusinessService
.
findRoleByUserId
(
userId
);
String
roles
=
null
;
if
(
roleList
!=
null
&&
roleList
.
size
()>
0
&&
roleList
.
get
(
0
)!=
null
){
...
...
@@ -109,7 +109,7 @@ public class AppController {
}
@GetMapping
(
value
=
"/findDesk"
)
public
JSONObject
findDesk
(
HttpServletRequest
request
)
{
public
JSONObject
findDesk
(
HttpServletRequest
request
)
throws
Exception
{
JSONObject
obj
=
new
JSONObject
();
List
<
App
>
dockList
=
appService
.
findDock
();
JSONArray
dockArray
=
new
JSONArray
();
...
...
@@ -160,7 +160,7 @@ public class AppController {
*/
@PostMapping
(
value
=
"/findRoleAPP"
)
public
JSONArray
findRoleAPP
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
App
>
dataListApp
=
appService
.
findRoleAPP
();
...
...
@@ -229,7 +229,7 @@ public class AppController {
*/
@PostMapping
(
value
=
"/uploadImg"
)
public
BaseResponseInfo
uploadImg
(
MultipartFile
fileInfo
,
@RequestParam
(
"fileInfoName"
)
String
fileName
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
if
(
fileInfo
!=
null
)
{
...
...
src/main/java/com/jsh/erp/controller/DepotController.java
View file @
42835c94
...
...
@@ -41,7 +41,7 @@ public class DepotController {
private
UserBusinessService
userBusinessService
;
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
Depot
>
depotList
=
depotService
.
getAllList
();
...
...
@@ -64,7 +64,7 @@ public class DepotController {
*/
@PostMapping
(
value
=
"/findUserDepot"
)
public
JSONArray
findUserDepot
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Depot
>
dataList
=
depotService
.
findUserDepot
();
...
...
@@ -104,7 +104,7 @@ public class DepotController {
@RequestMapping
(
value
=
"/findDepotByUserId"
)
public
JSONArray
findDepotByUserId
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Depot
>
dataList
=
depotService
.
findUserDepot
();
...
...
@@ -145,7 +145,7 @@ public class DepotController {
public
String
getDepotList
(
@RequestParam
(
value
=
Constants
.
PAGE_SIZE
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
value
=
Constants
.
CURRENT_PAGE
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
Constants
.
SEARCH
,
required
=
false
)
String
search
)
{
@RequestParam
(
value
=
Constants
.
SEARCH
,
required
=
false
)
String
search
)
throws
Exception
{
Map
<
String
,
Object
>
parameterMap
=
new
HashMap
<
String
,
Object
>();
//查询参数
JSONObject
obj
=
JSON
.
parseObject
(
search
);
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
42835c94
...
...
@@ -55,7 +55,7 @@ public class DepotHeadController {
@PostMapping
(
value
=
"/batchSetStatus"
)
public
String
batchSetStatus
(
@RequestParam
(
"status"
)
String
status
,
@RequestParam
(
"depotHeadIDs"
)
String
depotHeadIDs
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
depotHeadService
.
batchSetStatus
(
status
,
depotHeadIDs
);
if
(
res
>
0
)
{
...
...
@@ -71,7 +71,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping
(
value
=
"/buildNumber"
)
public
BaseResponseInfo
buildNumber
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
buildNumber
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -93,7 +93,7 @@ public class DepotHeadController {
* @return
*/
@GetMapping
(
value
=
"/getMaxId"
)
public
BaseResponseInfo
getMaxId
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getMaxId
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -117,7 +117,7 @@ public class DepotHeadController {
*/
@GetMapping
(
value
=
"/findByMonth"
)
public
BaseResponseInfo
findByMonth
(
@RequestParam
(
"monthTime"
)
String
monthTime
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -164,7 +164,7 @@ public class DepotHeadController {
@RequestParam
(
"beginTime"
)
String
beginTime
,
@RequestParam
(
"endTime"
)
String
endTime
,
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -211,7 +211,7 @@ public class DepotHeadController {
@RequestParam
(
"beginTime"
)
String
beginTime
,
@RequestParam
(
"endTime"
)
String
endTime
,
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -254,7 +254,7 @@ public class DepotHeadController {
@RequestParam
(
"endTime"
)
String
endTime
,
@RequestParam
(
"organId"
)
Integer
organId
,
@RequestParam
(
"supType"
)
String
supType
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -338,7 +338,7 @@ public class DepotHeadController {
public
BaseResponseInfo
findTotalPay
(
@RequestParam
(
"supplierId"
)
Integer
supplierId
,
@RequestParam
(
"endTime"
)
String
endTime
,
@RequestParam
(
"supType"
)
String
supType
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -376,7 +376,7 @@ public class DepotHeadController {
*/
@GetMapping
(
value
=
"/getDetailByNumber"
)
public
BaseResponseInfo
getDetailByNumber
(
@RequestParam
(
"number"
)
String
number
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
DepotHeadVo4List
dhl
=
new
DepotHeadVo4List
();
try
{
...
...
@@ -403,7 +403,7 @@ public class DepotHeadController {
* @param mode 合计或者金额
* @return
*/
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
{
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
throws
Exception
{
BigDecimal
allMoney
=
BigDecimal
.
ZERO
;
try
{
Integer
supplierId
=
Integer
.
valueOf
(
getS
);
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
42835c94
...
...
@@ -51,7 +51,7 @@ public class DepotItemController {
@GetMapping
(
value
=
"/getHeaderIdByMaterial"
)
public
BaseResponseInfo
getHeaderIdByMaterial
(
@RequestParam
(
"materialParam"
)
String
materialParam
,
@RequestParam
(
"depotIds"
)
String
depotIds
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
DepotItemVo4HeaderId
>
depotItemList
=
depotItemService
.
getHeaderIdByMaterial
(
materialParam
,
depotIds
);
...
...
@@ -89,7 +89,7 @@ public class DepotItemController {
public
String
findDetailByTypeAndMaterialId
(
@RequestParam
(
value
=
Constants
.
PAGE_SIZE
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
value
=
Constants
.
CURRENT_PAGE
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
"materialId"
)
String
mId
,
HttpServletRequest
request
)
{
@RequestParam
(
"materialId"
)
String
mId
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
String
>
parameterMap
=
ParamUtils
.
requestToMap
(
request
);
parameterMap
.
put
(
"mId"
,
mId
);
PageQueryInfo
queryInfo
=
new
PageQueryInfo
();
...
...
@@ -139,7 +139,7 @@ public class DepotItemController {
@RequestParam
(
"projectId"
)
Integer
pid
,
@RequestParam
(
"materialId"
)
String
mId
,
@RequestParam
(
"monthTime"
)
String
monthTime
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
String
>
parameterMap
=
ParamUtils
.
requestToMap
(
request
);
parameterMap
.
put
(
"mId"
,
mId
);
parameterMap
.
put
(
"monthTime"
,
monthTime
);
...
...
@@ -203,7 +203,7 @@ public class DepotItemController {
@RequestParam
(
value
=
Constants
.
CURRENT_PAGE
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
"materialId"
)
String
mId
,
@RequestParam
(
"monthTime"
)
String
monthTime
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
String
>
parameterMap
=
ParamUtils
.
requestToMap
(
request
);
parameterMap
.
put
(
"mId"
,
mId
);
parameterMap
.
put
(
"monthTime"
,
monthTime
);
...
...
@@ -250,7 +250,7 @@ public class DepotItemController {
* @param mId
* @return
*/
public
int
sumNumberByMaterialId
(
String
type
,
Long
mId
)
{
public
int
sumNumberByMaterialId
(
String
type
,
Long
mId
)
throws
Exception
{
int
allNumber
=
0
;
try
{
allNumber
=
depotItemService
.
findByTypeAndMaterialId
(
type
,
mId
);
...
...
@@ -291,7 +291,7 @@ public class DepotItemController {
*
* @return
*/
public
String
findUnitName
(
Long
mId
)
{
public
String
findUnitName
(
Long
mId
)
throws
Exception
{
String
unitName
=
""
;
try
{
unitName
=
materialService
.
findUnitName
(
mId
);
...
...
@@ -310,7 +310,7 @@ public class DepotItemController {
@GetMapping
(
value
=
"/getDetailList"
)
public
BaseResponseInfo
getDetailList
(
@RequestParam
(
"headerId"
)
Long
headerId
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -382,7 +382,7 @@ public class DepotItemController {
*
* @return
*/
public
String
getOtherInfo
(
String
[]
mpArr
,
DepotItemVo4WithInfoEx
diEx
)
{
public
String
getOtherInfo
(
String
[]
mpArr
,
DepotItemVo4WithInfoEx
diEx
)
throws
Exception
{
String
materialOther
=
""
;
for
(
int
i
=
0
;
i
<
mpArr
.
length
;
i
++)
{
if
(
mpArr
[
i
].
equals
(
"颜色"
))
{
...
...
@@ -427,7 +427,7 @@ public class DepotItemController {
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -497,7 +497,7 @@ public class DepotItemController {
@RequestParam
(
"monthTime"
)
String
monthTime
,
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -540,7 +540,7 @@ public class DepotItemController {
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -600,7 +600,7 @@ public class DepotItemController {
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -665,7 +665,7 @@ public class DepotItemController {
@RequestParam
(
"monthTime"
)
String
monthTime
,
@RequestParam
(
"headIds"
)
String
headIds
,
@RequestParam
(
"materialIds"
)
String
materialIds
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
String
message
=
"成功"
;
...
...
@@ -731,7 +731,7 @@ public class DepotItemController {
* @param isPrev
* @return
*/
public
BigDecimal
sumNumber
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
public
BigDecimal
sumNumber
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
throws
Exception
{
BigDecimal
sumNumber
=
BigDecimal
.
ZERO
;
try
{
BigDecimal
sum
=
depotItemService
.
findByType
(
type
,
ProjectId
,
MId
,
MonthTime
,
isPrev
);
...
...
@@ -744,7 +744,7 @@ public class DepotItemController {
return
sumNumber
;
}
public
BigDecimal
assembleNumber
(
String
subType
,
String
mType
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
public
BigDecimal
assembleNumber
(
String
subType
,
String
mType
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
throws
Exception
{
BigDecimal
assembleNumber
=
BigDecimal
.
ZERO
;
try
{
BigDecimal
sum
=
depotItemService
.
findAssembleByType
(
subType
,
mType
,
ProjectId
,
MId
,
MonthTime
,
isPrev
);
...
...
@@ -766,7 +766,7 @@ public class DepotItemController {
* @param isPrev
* @return
*/
public
BigDecimal
sumPrice
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
public
BigDecimal
sumPrice
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
throws
Exception
{
BigDecimal
sumPrice
=
BigDecimal
.
ZERO
;
try
{
BigDecimal
sum
=
depotItemService
.
findPriceByType
(
type
,
ProjectId
,
MId
,
MonthTime
,
isPrev
);
...
...
@@ -779,7 +779,7 @@ public class DepotItemController {
return
sumPrice
;
}
public
BigDecimal
sumNumberBuyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
)
{
public
BigDecimal
sumNumberBuyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
)
throws
Exception
{
BigDecimal
sumNumber
=
BigDecimal
.
ZERO
;
String
sumType
=
"Number"
;
try
{
...
...
@@ -793,7 +793,7 @@ public class DepotItemController {
return
sumNumber
;
}
public
BigDecimal
sumPriceBuyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
)
{
public
BigDecimal
sumPriceBuyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
)
throws
Exception
{
BigDecimal
sumPrice
=
BigDecimal
.
ZERO
;
String
sumType
=
"Price"
;
try
{
...
...
src/main/java/com/jsh/erp/controller/FunctionsController.java
View file @
42835c94
...
...
@@ -41,7 +41,7 @@ public class FunctionsController {
@PostMapping
(
value
=
"/findMenu"
)
public
JSONArray
findMenu
(
@RequestParam
(
value
=
"pNumber"
)
String
pNumber
,
@RequestParam
(
value
=
"hasFunctions"
)
String
hasFunctions
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
try
{
...
...
@@ -124,7 +124,7 @@ public class FunctionsController {
*/
@PostMapping
(
value
=
"/findRoleFunctions"
)
public
JSONArray
findRoleFunctions
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Functions
>
dataListFun
=
functionsService
.
findRoleFunctions
(
"0"
);
...
...
@@ -277,7 +277,7 @@ public class FunctionsController {
*/
@GetMapping
(
value
=
"/findByIds"
)
public
BaseResponseInfo
findByIds
(
@RequestParam
(
"functionsIds"
)
String
functionsIds
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
Functions
>
dataList
=
functionsService
.
findByIds
(
functionsIds
);
...
...
src/main/java/com/jsh/erp/controller/InOutItemController.java
View file @
42835c94
...
...
@@ -35,7 +35,7 @@ public class InOutItemController {
* @return
*/
@GetMapping
(
value
=
"/findBySelect"
)
public
String
findBySelect
(
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
{
public
String
findBySelect
(
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
throws
Exception
{
String
res
=
null
;
try
{
List
<
InOutItem
>
dataList
=
inOutItemService
.
findBySelect
(
type
);
...
...
src/main/java/com/jsh/erp/controller/MaterialCategoryController.java
View file @
42835c94
...
...
@@ -35,7 +35,7 @@ public class MaterialCategoryController {
private
MaterialCategoryService
materialCategoryService
;
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
@RequestParam
(
"parentId"
)
Long
parentId
,
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAllList
(
@RequestParam
(
"parentId"
)
Long
parentId
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
MaterialCategory
>
materialCategoryList
=
materialCategoryService
.
getAllList
(
parentId
);
...
...
@@ -56,7 +56,7 @@ public class MaterialCategoryController {
* @return
*/
@RequestMapping
(
value
=
"/findById"
)
public
BaseResponseInfo
findById
(
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
{
public
BaseResponseInfo
findById
(
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
MaterialCategory
>
dataList
=
materialCategoryService
.
findById
(
id
);
...
...
src/main/java/com/jsh/erp/controller/MaterialController.java
View file @
42835c94
...
...
@@ -46,7 +46,7 @@ public class MaterialController {
@RequestParam
(
"standard"
)
String
standard
,
@RequestParam
(
"mfrs"
)
String
mfrs
,
@RequestParam
(
"otherField1"
)
String
otherField1
,
@RequestParam
(
"otherField2"
)
String
otherField2
,
@RequestParam
(
"otherField3"
)
String
otherField3
,
@RequestParam
(
"unit"
)
String
unit
,
@RequestParam
(
"unitId"
)
Long
unitId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
exist
=
materialService
.
checkIsExist
(
id
,
name
,
model
,
color
,
standard
,
mfrs
,
otherField1
,
otherField2
,
otherField3
,
unit
,
unitId
);
...
...
@@ -68,7 +68,7 @@ public class MaterialController {
@PostMapping
(
value
=
"/batchSetEnable"
)
public
String
batchSetEnable
(
@RequestParam
(
"enabled"
)
Boolean
enabled
,
@RequestParam
(
"materialIDs"
)
String
materialIDs
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
materialService
.
batchSetEnable
(
enabled
,
materialIDs
);
if
(
res
>
0
)
{
...
...
@@ -85,7 +85,7 @@ public class MaterialController {
* @return
*/
@GetMapping
(
value
=
"/findById"
)
public
BaseResponseInfo
findById
(
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
{
public
BaseResponseInfo
findById
(
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
MaterialVo4Unit
>
list
=
materialService
.
findById
(
id
);
...
...
@@ -106,7 +106,7 @@ public class MaterialController {
* @return
*/
@GetMapping
(
value
=
"/findBySelect"
)
public
JSONArray
findBySelect
(
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
{
public
JSONArray
findBySelect
(
@RequestParam
(
"mpList"
)
String
mpList
,
HttpServletRequest
request
)
throws
Exception
{
JSONArray
dataArray
=
new
JSONArray
();
try
{
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findBySelect
();
...
...
@@ -163,7 +163,7 @@ public class MaterialController {
* @return
*/
@GetMapping
(
value
=
"/findByOrder"
)
public
BaseResponseInfo
findByOrder
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
findByOrder
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -203,7 +203,7 @@ public class MaterialController {
@RequestParam
(
"model"
)
String
model
,
@RequestParam
(
"categoryId"
)
Long
categoryId
,
@RequestParam
(
"categoryIds"
)
String
categoryIds
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
String
message
=
"成功"
;
...
...
@@ -303,7 +303,7 @@ public class MaterialController {
response
.
sendRedirect
(
"../pages/materials/material.html"
);
}
public
BigDecimal
parseBigDecimalEx
(
String
str
){
public
BigDecimal
parseBigDecimalEx
(
String
str
)
throws
Exception
{
if
(!
StringUtil
.
isEmpty
(
str
))
{
return
new
BigDecimal
(
str
);
}
else
{
...
...
@@ -313,7 +313,7 @@ public class MaterialController {
@RequestMapping
(
value
=
"/getMaterialEnableSerialNumberList"
)
public
String
getMaterialEnableSerialNumberList
(
@RequestParam
(
value
=
Constants
.
PAGE_SIZE
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
value
=
Constants
.
CURRENT_PAGE
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
Constants
.
SEARCH
,
required
=
false
)
String
search
)
{
@RequestParam
(
value
=
Constants
.
SEARCH
,
required
=
false
)
String
search
)
throws
Exception
{
Map
<
String
,
Object
>
parameterMap
=
new
HashMap
<
String
,
Object
>();
//查询参数
JSONObject
obj
=
JSON
.
parseObject
(
search
);
...
...
src/main/java/com/jsh/erp/controller/PersonController.java
View file @
42835c94
...
...
@@ -30,7 +30,7 @@ public class PersonController {
private
PersonService
personService
;
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -53,7 +53,8 @@ public class PersonController {
* @return
*/
@GetMapping
(
value
=
"/getPersonByIds"
)
public
BaseResponseInfo
getPersonByIds
(
@RequestParam
(
"personIDs"
)
String
personIDs
,
HttpServletRequest
request
)
{
public
BaseResponseInfo
getPersonByIds
(
@RequestParam
(
"personIDs"
)
String
personIDs
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -76,7 +77,8 @@ public class PersonController {
* @return
*/
@GetMapping
(
value
=
"/getPersonByType"
)
public
BaseResponseInfo
getPersonByType
(
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
{
public
BaseResponseInfo
getPersonByType
(
@RequestParam
(
"type"
)
String
type
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -99,7 +101,8 @@ public class PersonController {
* @return
*/
@PostMapping
(
value
=
"/getPersonByNumType"
)
public
JSONArray
getPersonByNumType
(
@RequestParam
(
"type"
)
String
typeNum
,
HttpServletRequest
request
)
{
public
JSONArray
getPersonByNumType
(
@RequestParam
(
"type"
)
String
typeNum
,
HttpServletRequest
request
)
throws
Exception
{
JSONArray
dataArray
=
new
JSONArray
();
try
{
String
type
=
""
;
...
...
src/main/java/com/jsh/erp/controller/ResourceController.java
View file @
42835c94
...
...
@@ -4,13 +4,16 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.constants.BusinessConstants
;
import
com.jsh.erp.service.CommonQueryManager
;
import
com.jsh.erp.utils.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
...
...
@@ -25,7 +28,7 @@ public class ResourceController {
private
CommonQueryManager
configResourceManager
;
@GetMapping
(
value
=
"/test/heart"
)
public
JSONObject
exitHeart
(
HttpServletRequest
request
)
{
public
JSONObject
exitHeart
(
HttpServletRequest
request
)
throws
Exception
{
return
JsonUtils
.
ok
();
}
...
...
@@ -34,7 +37,7 @@ public class ResourceController {
@RequestParam
(
value
=
Constants
.
PAGE_SIZE
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
value
=
Constants
.
CURRENT_PAGE
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
Constants
.
SEARCH
,
required
=
false
)
String
search
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
String
>
parameterMap
=
ParamUtils
.
requestToMap
(
request
);
parameterMap
.
put
(
Constants
.
SEARCH
,
search
);
PageQueryInfo
queryInfo
=
new
PageQueryInfo
();
...
...
@@ -60,7 +63,7 @@ public class ResourceController {
@PostMapping
(
value
=
"/{apiName}/add"
,
produces
=
{
"application/javascript"
,
"application/json"
})
public
String
addResource
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
(
"info"
)
String
beanJson
,
HttpServletRequest
request
)
{
@RequestParam
(
"info"
)
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
insert
=
configResourceManager
.
insert
(
apiName
,
beanJson
,
request
);
if
(
insert
>
0
)
{
...
...
@@ -73,7 +76,7 @@ public class ResourceController {
@PostMapping
(
value
=
"/{apiName}/update"
,
produces
=
{
"application/javascript"
,
"application/json"
})
public
String
updateResource
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
(
"info"
)
String
beanJson
,
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
{
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
update
=
configResourceManager
.
update
(
apiName
,
beanJson
,
id
,
request
);
if
(
update
>
0
)
{
...
...
@@ -85,7 +88,7 @@ public class ResourceController {
@PostMapping
(
value
=
"/{apiName}/{id}/delete"
,
produces
=
{
"application/javascript"
,
"application/json"
})
public
String
deleteResource
(
@PathVariable
(
"apiName"
)
String
apiName
,
@PathVariable
Long
id
,
HttpServletRequest
request
)
{
@PathVariable
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
delete
=
configResourceManager
.
delete
(
apiName
,
id
,
request
);
if
(
delete
>
0
)
{
...
...
@@ -97,7 +100,7 @@ public class ResourceController {
@PostMapping
(
value
=
"/{apiName}/batchDelete"
,
produces
=
{
"application/javascript"
,
"application/json"
})
public
String
batchDeleteResource
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
(
"ids"
)
String
ids
,
HttpServletRequest
request
)
{
@RequestParam
(
"ids"
)
String
ids
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
delete
=
configResourceManager
.
batchDelete
(
apiName
,
ids
,
request
);
if
(
delete
>
0
)
{
...
...
@@ -110,7 +113,7 @@ public class ResourceController {
@GetMapping
(
value
=
"/{apiName}/checkIsNameExist"
)
public
String
checkIsNameExist
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
Long
id
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
exist
=
configResourceManager
.
checkIsNameExist
(
apiName
,
id
,
name
);
if
(
exist
>
0
)
{
...
...
src/main/java/com/jsh/erp/controller/RoleController.java
View file @
42835c94
...
...
@@ -37,7 +37,7 @@ public class RoleController {
*/
@PostMapping
(
value
=
"/findUserRole"
)
public
JSONArray
findUserRole
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Role
>
dataList
=
roleService
.
findUserRole
();
...
...
@@ -76,7 +76,7 @@ public class RoleController {
}
@PostMapping
(
value
=
"/list"
)
public
List
<
Role
>
list
(
HttpServletRequest
request
)
{
public
List
<
Role
>
list
(
HttpServletRequest
request
)
throws
Exception
{
return
roleService
.
getRole
();
}
...
...
src/main/java/com/jsh/erp/controller/SerialNumberController.java
View file @
42835c94
...
...
@@ -61,7 +61,7 @@ public class SerialNumberController {
*/
@PostMapping
(
"/serialNumber/addSerialNumber"
)
@ResponseBody
public
Object
addSerialNumber
(
@RequestParam
(
"info"
)
String
beanJson
){
public
Object
addSerialNumber
(
@RequestParam
(
"info"
)
String
beanJson
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
SerialNumberEx
sne
=
JSON
.
parseObject
(
beanJson
,
SerialNumberEx
.
class
);
serialNumberService
.
addSerialNumber
(
sne
);
...
...
@@ -78,7 +78,7 @@ public class SerialNumberController {
*/
@PostMapping
(
"/serialNumber/updateSerialNumber"
)
@ResponseBody
public
Object
updateSerialNumber
(
@RequestParam
(
"info"
)
String
beanJson
){
public
Object
updateSerialNumber
(
@RequestParam
(
"info"
)
String
beanJson
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
SerialNumberEx
sne
=
JSON
.
parseObject
(
beanJson
,
SerialNumberEx
.
class
);
...
...
@@ -100,7 +100,7 @@ public class SerialNumberController {
@PostMapping
(
"/serialNumber/batAddSerialNumber"
)
@ResponseBody
public
Object
batAddSerialNumber
(
@RequestParam
(
"materialName"
)
String
materialName
,
@RequestParam
(
"serialNumberPrefix"
)
String
serialNumberPrefix
,
@RequestParam
(
"batAddTotal"
)
Integer
batAddTotal
,
@RequestParam
(
"remark"
)
String
remark
){
@RequestParam
(
"batAddTotal"
)
Integer
batAddTotal
,
@RequestParam
(
"remark"
)
String
remark
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
serialNumberService
.
batAddSerialNumber
(
materialName
,
serialNumberPrefix
,
batAddTotal
,
remark
);
...
...
src/main/java/com/jsh/erp/controller/SupplierController.java
View file @
42835c94
...
...
@@ -57,7 +57,7 @@ public class SupplierController {
@PostMapping
(
value
=
"/updateAdvanceIn"
)
public
String
updateAdvanceIn
(
@RequestParam
(
"supplierId"
)
Long
supplierId
,
@RequestParam
(
"advanceIn"
)
BigDecimal
advanceIn
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
supplierService
.
updateAdvanceIn
(
supplierId
,
advanceIn
);
if
(
res
>
0
)
{
...
...
@@ -73,7 +73,7 @@ public class SupplierController {
* @return
*/
@PostMapping
(
value
=
"/findBySelect_cus"
)
public
JSONArray
findBySelectCus
(
HttpServletRequest
request
)
{
public
JSONArray
findBySelectCus
(
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Supplier
>
supplierList
=
supplierService
.
findBySelectCus
();
...
...
@@ -108,7 +108,7 @@ public class SupplierController {
* @return
*/
@PostMapping
(
value
=
"/findBySelect_sup"
)
public
JSONArray
findBySelectSup
(
HttpServletRequest
request
)
{
public
JSONArray
findBySelectSup
(
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Supplier
>
supplierList
=
supplierService
.
findBySelectSup
();
...
...
@@ -135,7 +135,7 @@ public class SupplierController {
* @return
*/
@PostMapping
(
value
=
"/findBySelect_retail"
)
public
JSONArray
findBySelectRetail
(
HttpServletRequest
request
)
{
public
JSONArray
findBySelectRetail
(
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Supplier
>
supplierList
=
supplierService
.
findBySelectRetail
();
...
...
@@ -165,7 +165,7 @@ public class SupplierController {
*/
@GetMapping
(
value
=
"/findById"
)
public
BaseResponseInfo
findById
(
@RequestParam
(
"supplierId"
)
Long
supplierId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
JSONArray
dataArray
=
new
JSONArray
();
...
...
@@ -221,7 +221,7 @@ public class SupplierController {
@PostMapping
(
value
=
"/batchSetEnable"
)
public
String
batchSetEnable
(
@RequestParam
(
"enabled"
)
Boolean
enabled
,
@RequestParam
(
"supplierIDs"
)
String
supplierIDs
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
int
res
=
supplierService
.
batchSetEnable
(
enabled
,
supplierIDs
);
if
(
res
>
0
)
{
...
...
@@ -240,7 +240,7 @@ public class SupplierController {
*/
@PostMapping
(
value
=
"/findUserCustomer"
)
public
JSONArray
findUserCustomer
(
@RequestParam
(
"UBType"
)
String
type
,
@RequestParam
(
"UBKeyId"
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
JSONArray
arr
=
new
JSONArray
();
try
{
List
<
Supplier
>
dataList
=
supplierService
.
findUserCustomer
();
...
...
@@ -295,7 +295,7 @@ public class SupplierController {
@RequestParam
(
"phonenum"
)
String
phonenum
,
@RequestParam
(
"telephone"
)
String
telephone
,
@RequestParam
(
"description"
)
String
description
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
String
message
=
"成功"
;
...
...
@@ -382,7 +382,7 @@ public class SupplierController {
importFun
(
supplierFile
);
response
.
sendRedirect
(
"../pages/manage/member.html"
);
}
public
String
importFun
(
MultipartFile
supplierFile
){
public
String
importFun
(
MultipartFile
supplierFile
)
throws
Exception
{
BaseResponseInfo
info
=
new
BaseResponseInfo
();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -436,7 +436,7 @@ public class SupplierController {
return
null
;
}
public
BigDecimal
parseBigDecimalEx
(
String
str
){
public
BigDecimal
parseBigDecimalEx
(
String
str
)
throws
Exception
{
if
(!
StringUtil
.
isEmpty
(
str
))
{
return
new
BigDecimal
(
str
);
}
else
{
...
...
src/main/java/com/jsh/erp/controller/UserBusinessController.java
View file @
42835c94
...
...
@@ -36,7 +36,7 @@ public class UserBusinessController {
@GetMapping
(
value
=
"/getBasicData"
)
public
BaseResponseInfo
getBasicData
(
@RequestParam
(
value
=
"KeyId"
)
String
keyId
,
@RequestParam
(
value
=
"Type"
)
String
type
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
UserBusiness
>
list
=
userBusinessService
.
getBasicData
(
keyId
,
type
);
...
...
@@ -55,7 +55,7 @@ public class UserBusinessController {
@GetMapping
(
value
=
"/checkIsValueExist"
)
public
String
checkIsValueExist
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"keyId"
,
required
=
false
)
String
keyId
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
Long
id
=
userBusinessService
.
checkIsValueExist
(
type
,
keyId
);
if
(
id
!=
null
)
{
...
...
@@ -76,7 +76,7 @@ public class UserBusinessController {
@PostMapping
(
value
=
"/updateBtnStr"
)
public
BaseResponseInfo
updateBtnStr
(
@RequestParam
(
value
=
"userBusinessId"
,
required
=
false
)
Long
userBusinessId
,
@RequestParam
(
value
=
"btnStr"
,
required
=
false
)
String
btnStr
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
int
back
=
userBusinessService
.
updateBtnStr
(
userBusinessId
,
btnStr
);
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
42835c94
...
...
@@ -59,7 +59,7 @@ public class UserController {
@PostMapping
(
value
=
"/login"
)
public
BaseResponseInfo
login
(
@RequestParam
(
value
=
"loginame"
,
required
=
false
)
String
loginame
,
@RequestParam
(
value
=
"password"
,
required
=
false
)
String
password
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
logger
.
info
(
"============用户登录 login 方法调用开始=============="
);
String
msgTip
=
""
;
User
user
=
null
;
...
...
@@ -150,7 +150,7 @@ public class UserController {
}
@GetMapping
(
value
=
"/getUserSession"
)
public
BaseResponseInfo
getSessionUser
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getSessionUser
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -171,7 +171,7 @@ public class UserController {
}
@GetMapping
(
value
=
"/logout"
)
public
BaseResponseInfo
logout
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
BaseResponseInfo
logout
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
request
.
getSession
().
removeAttribute
(
"user"
);
...
...
@@ -192,7 +192,7 @@ public class UserController {
@PostMapping
(
value
=
"/resetPwd"
)
public
String
resetPwd
(
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
throws
NoSuchAlgorithm
Exception
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
String
password
=
"123456"
;
String
md5Pwd
=
Tools
.
md5Encryp
(
password
);
...
...
@@ -206,7 +206,7 @@ public class UserController {
@PostMapping
(
value
=
"/updatePwd"
)
public
String
updatePwd
(
@RequestParam
(
"userId"
)
Long
userId
,
@RequestParam
(
"password"
)
String
password
,
@RequestParam
(
"oldpwd"
)
String
oldpwd
,
HttpServletRequest
request
)
{
@RequestParam
(
"oldpwd"
)
String
oldpwd
,
HttpServletRequest
request
)
throws
Exception
{
Integer
flag
=
0
;
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -242,7 +242,7 @@ public class UserController {
* @return
*/
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -425,7 +425,7 @@ public class UserController {
}
@GetMapping
(
"/getTenantStatus"
)
public
BaseResponseInfo
getTenantStatus
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getTenantStatus
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
Prev
1
2
3
4
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