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
9c07f55e
Commit
9c07f55e
authored
Jun 06, 2019
by
qiankunpingtai
Browse files
从源更新
parents
d4f3f6b6
4b782fab
Changes
40
Hide whitespace changes
Inline
Side-by-side
erp_web/login.html
View file @
9c07f55e
...
...
@@ -4,7 +4,6 @@
<title>
ERP系统
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=8"
>
<meta
name=
"referrer"
content=
"Webkit"
>
<link
rel=
"shortcut icon"
href=
"/images/favicon.ico"
type=
"image/x-icon"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"/css/css.css"
/>
<script
type=
"text/javascript"
src=
"/js/jquery-1.8.0.min.js"
></script>
...
...
pom.xml
View file @
9c07f55e
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.jsh
</groupId>
<artifactId>
jshERP
</artifactId>
<version>
2.0.
2
-SNAPSHOT
</version>
<version>
2.0.
3
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<name>
jshERP
</name>
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
9c07f55e
...
...
@@ -417,7 +417,7 @@ public class DepotHeadController {
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
if
((
"open"
).
equals
(
mybatisPlusStatus
))
{
Long
billsNumLimit
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"billsNumLimit"
).
toString
());
Long
count
=
depotHeadService
.
countDepotHead
(
null
,
null
,
null
,
null
,
null
,
null
);
Long
count
=
depotHeadService
.
countDepotHead
(
null
,
null
,
null
,
null
,
null
,
null
,
null
);
if
(
count
>=
billsNumLimit
)
{
throw
new
BusinessParamCheckingException
(
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_CODE
,
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_MSG
);
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
9c07f55e
...
...
@@ -42,44 +42,6 @@ public class DepotItemController {
@Resource
private
MaterialService
materialService
;
/**
* 根据材料信息获取
* @param materialParam 商品参数
* @param depotIds 拥有的仓库信息
* @param request
* @return
*/
@GetMapping
(
value
=
"/getHeaderIdByMaterial"
)
public
BaseResponseInfo
getHeaderIdByMaterial
(
@RequestParam
(
"materialParam"
)
String
materialParam
,
@RequestParam
(
"depotIds"
)
String
depotIds
,
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
List
<
DepotItemVo4HeaderId
>
depotItemList
=
depotItemService
.
getHeaderIdByMaterial
(
materialParam
,
depotIds
);
String
allReturn
=
""
;
if
(
depotItemList
!=
null
&&
depotItemList
.
size
()>
0
)
{
for
(
DepotItemVo4HeaderId
d
:
depotItemList
)
{
Long
dl
=
d
.
getHeaderid
();
//获取对象
allReturn
=
allReturn
+
dl
.
toString
()
+
","
;
}
/**
* 2019-01-17修复depotItemList集合为空时,程序异常
* */
allReturn
=
allReturn
.
substring
(
0
,
allReturn
.
length
()
-
1
);
}
if
(
allReturn
.
equals
(
"null"
))
{
allReturn
=
""
;
}
res
.
code
=
200
;
res
.
data
=
allReturn
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取数据失败"
;
}
return
res
;
}
/**
* 只根据商品id查询单据列表
* @param mId
...
...
src/main/java/com/jsh/erp/controller/ResourceController.java
View file @
9c07f55e
...
...
@@ -32,6 +32,20 @@ public class ResourceController {
return
JsonUtils
.
ok
();
}
@GetMapping
(
value
=
"/{apiName}/info"
)
public
String
getList
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
(
"id"
)
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
Object
obj
=
configResourceManager
.
selectOne
(
apiName
,
id
);
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
if
(
obj
!=
null
)
{
objectMap
.
put
(
"info"
,
obj
);
return
returnJson
(
objectMap
,
ErpInfo
.
OK
.
name
,
ErpInfo
.
OK
.
code
);
}
else
{
return
returnJson
(
objectMap
,
ErpInfo
.
ERROR
.
name
,
ErpInfo
.
ERROR
.
code
);
}
}
@GetMapping
(
value
=
"/{apiName}/list"
)
public
String
getList
(
@PathVariable
(
"apiName"
)
String
apiName
,
@RequestParam
(
value
=
Constants
.
PAGE_SIZE
,
required
=
false
)
Integer
pageSize
,
...
...
src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4HeaderId.java
deleted
100644 → 0
View file @
d4f3f6b6
package
com.jsh.erp.datasource.entities
;
public
class
DepotItemVo4HeaderId
{
private
Long
headerid
;
public
Long
getHeaderid
()
{
return
headerid
;
}
public
void
setHeaderid
(
Long
headerid
)
{
this
.
headerid
=
headerid
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
9c07f55e
...
...
@@ -24,7 +24,8 @@ public interface DepotHeadMapperEx {
@Param
(
"number"
)
String
number
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"dhIds"
)
String
dhIds
,
@Param
(
"materialParam"
)
String
materialParam
,
@Param
(
"depotIds"
)
String
depotIds
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
...
...
@@ -34,7 +35,8 @@ public interface DepotHeadMapperEx {
@Param
(
"number"
)
String
number
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"dhIds"
)
String
dhIds
);
@Param
(
"materialParam"
)
String
materialParam
,
@Param
(
"depotIds"
)
String
depotIds
);
String
findMaterialsListByHeaderId
(
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java
View file @
9c07f55e
...
...
@@ -27,10 +27,6 @@ public interface DepotItemMapperEx {
@Param
(
"type"
)
Integer
type
,
@Param
(
"remark"
)
String
remark
);
List
<
DepotItemVo4HeaderId
>
getHeaderIdByMaterial
(
@Param
(
"materialParam"
)
String
materialParam
,
@Param
(
"depotIds"
)
String
depotIds
);
List
<
DepotItemVo4DetailByTypeAndMId
>
findDetailByTypeAndMaterialIdList
(
@Param
(
"mId"
)
Long
mId
,
@Param
(
"offset"
)
Integer
offset
,
...
...
src/main/java/com/jsh/erp/service/CommonQueryManager.java
View file @
9c07f55e
...
...
@@ -30,8 +30,8 @@ public class CommonQueryManager {
* @param apiName 接口名称
* @param id ID
*/
public
Object
selectOne
(
String
apiName
,
Stri
ng
id
)
throws
Exception
{
if
(
StringUtil
.
isNotEmpty
(
apiName
)
&&
StringUtil
.
isNotEmpty
(
id
)
)
{
public
Object
selectOne
(
String
apiName
,
Lo
ng
id
)
throws
Exception
{
if
(
StringUtil
.
isNotEmpty
(
apiName
)
&&
id
!=
null
)
{
return
container
.
getCommonQuery
(
apiName
).
selectOne
(
id
);
}
return
null
;
...
...
src/main/java/com/jsh/erp/service/ICommonQuery.java
View file @
9c07f55e
...
...
@@ -13,12 +13,12 @@ import java.util.Map;
*/
public
interface
ICommonQuery
{
/**
*
查询:解析JSON,查询资源
。
*
根据id查询明细
。
*
* @param
condition
资源id
* @param
id
资源id
* @return 资源
*/
Object
selectOne
(
String
condition
)
throws
Exception
;
Object
selectOne
(
Long
id
)
throws
Exception
;
/**
* 自定义查询
...
...
src/main/java/com/jsh/erp/service/account/AccountComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class AccountComponent implements ICommonQuery {
private
AccountService
accountService
;
@Override
public
Object
selectOne
(
String
condi
tion
)
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Excep
tion
{
return
accountService
.
getAccount
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
9c07f55e
...
...
@@ -58,7 +58,7 @@ public class AccountService {
@Resource
private
UserService
userService
;
public
Account
getAccount
(
long
id
)
{
public
Account
getAccount
(
long
id
)
throws
Exception
{
return
accountMapper
.
selectByPrimaryKey
(
id
);
}
...
...
src/main/java/com/jsh/erp/service/accountHead/AccountHeadComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class AccountHeadComponent implements ICommonQuery {
private
AccountHeadService
accountHeadService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
accountHeadService
.
getAccountHead
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/accountItem/AccountItemComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class AccountItemComponent implements ICommonQuery {
private
AccountItemService
accountItemService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
accountItemService
.
getAccountItem
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/app/AppComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class AppComponent implements ICommonQuery {
private
AppService
appService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
appService
.
getApp
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/depot/DepotComponent.java
View file @
9c07f55e
...
...
@@ -20,8 +20,8 @@ public class DepotComponent implements ICommonQuery {
private
DepotService
depotService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
depotService
.
getDepot
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class DepotHeadComponent implements ICommonQuery {
private
DepotHeadService
depotHeadService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
depotHeadService
.
getDepotHead
(
id
)
;
}
@Override
...
...
@@ -35,9 +35,9 @@ public class DepotHeadComponent implements ICommonQuery {
String
number
=
StringUtil
.
getInfo
(
search
,
"number"
);
String
beginTime
=
StringUtil
.
getInfo
(
search
,
"beginTime"
);
String
endTime
=
StringUtil
.
getInfo
(
search
,
"endTime"
);
String
dhIds
=
StringUtil
.
getInfo
(
search
,
"
dhIds
"
);
String
order
=
QueryUtils
.
order
(
map
);
return
depotHeadService
.
select
(
type
,
subType
,
number
,
beginTime
,
endTime
,
dh
Ids
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
String
materialParam
=
StringUtil
.
getInfo
(
search
,
"
materialParam
"
);
String
depotIds
=
StringUtil
.
getInfo
(
search
,
"depotIds"
);
return
depotHeadService
.
select
(
type
,
subType
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Ids
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
@Override
...
...
@@ -48,8 +48,9 @@ public class DepotHeadComponent implements ICommonQuery {
String
number
=
StringUtil
.
getInfo
(
search
,
"number"
);
String
beginTime
=
StringUtil
.
getInfo
(
search
,
"beginTime"
);
String
endTime
=
StringUtil
.
getInfo
(
search
,
"endTime"
);
String
dhIds
=
StringUtil
.
getInfo
(
search
,
"dhIds"
);
return
depotHeadService
.
countDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
dhIds
);
String
materialParam
=
StringUtil
.
getInfo
(
search
,
"materialParam"
);
String
depotIds
=
StringUtil
.
getInfo
(
search
,
"depotIds"
);
return
depotHeadService
.
countDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
materialParam
,
depotIds
);
}
@Override
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
9c07f55e
...
...
@@ -88,11 +88,12 @@ public class DepotHeadService {
return
list
;
}
public
List
<
DepotHeadVo4List
>
select
(
String
type
,
String
subType
,
String
number
,
String
beginTime
,
String
endTime
,
String
dhIds
,
int
offset
,
int
rows
)
throws
Exception
{
public
List
<
DepotHeadVo4List
>
select
(
String
type
,
String
subType
,
String
number
,
String
beginTime
,
String
endTime
,
String
materialParam
,
String
depotIds
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
DepotHeadVo4List
>
resList
=
new
ArrayList
<
DepotHeadVo4List
>();
List
<
DepotHeadVo4List
>
list
=
null
;
try
{
list
=
depotHeadMapperEx
.
selectByConditionDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
dh
Ids
,
offset
,
rows
);
list
=
depotHeadMapperEx
.
selectByConditionDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Ids
,
offset
,
rows
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
@@ -127,10 +128,11 @@ public class DepotHeadService {
public
Long
countDepotHead
(
String
type
,
String
subType
,
String
number
,
String
beginTime
,
String
endTime
,
String
dhIds
)
throws
Exception
{
public
Long
countDepotHead
(
String
type
,
String
subType
,
String
number
,
String
beginTime
,
String
endTime
,
String
materialParam
,
String
depotIds
)
throws
Exception
{
Long
result
=
null
;
try
{
result
=
depotHeadMapperEx
.
countsByDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
dh
Ids
);
result
=
depotHeadMapperEx
.
countsByDepotHead
(
type
,
subType
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Ids
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemComponent.java
View file @
9c07f55e
...
...
@@ -19,8 +19,8 @@ public class DepotItemComponent implements ICommonQuery {
private
DepotItemService
depotItemService
;
@Override
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
public
Object
selectOne
(
Long
id
)
throws
Exception
{
return
depotItemService
.
getDepotItem
(
id
)
;
}
@Override
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
9c07f55e
...
...
@@ -188,19 +188,6 @@ public class DepotItemService {
return
list
==
null
?
0
:
list
.
size
();
}
public
List
<
DepotItemVo4HeaderId
>
getHeaderIdByMaterial
(
String
materialParam
,
String
depotIds
)
throws
Exception
{
List
<
DepotItemVo4HeaderId
>
list
=
null
;
try
{
list
=
depotItemMapperEx
.
getHeaderIdByMaterial
(
materialParam
,
depotIds
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
);
}
return
list
;
}
public
List
<
DepotItemVo4DetailByTypeAndMId
>
findDetailByTypeAndMaterialIdList
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
mIdStr
=
map
.
get
(
"mId"
);
Long
mId
=
null
;
...
...
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