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
86b9ae90
Commit
86b9ae90
authored
Feb 26, 2019
by
qiankunpingtai
Browse files
仓库添加负责人字段
parent
c6056838
Changes
101
Show whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/service/person/PersonComponent.java
View file @
86b9ae90
...
@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery {
...
@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
type
=
StringUtil
.
getInfo
(
search
,
"type"
);
String
type
=
StringUtil
.
getInfo
(
search
,
"type"
);
...
...
src/main/java/com/jsh/erp/service/person/PersonService.java
View file @
86b9ae90
...
@@ -38,7 +38,7 @@ public class PersonService {
...
@@ -38,7 +38,7 @@ public class PersonService {
return
personMapperEx
.
selectByConditionPerson
(
name
,
type
,
offset
,
rows
);
return
personMapperEx
.
selectByConditionPerson
(
name
,
type
,
offset
,
rows
);
}
}
public
int
countPerson
(
String
name
,
String
type
)
{
public
Long
countPerson
(
String
name
,
String
type
)
{
return
personMapperEx
.
countsByPerson
(
name
,
type
);
return
personMapperEx
.
countsByPerson
(
name
,
type
);
}
}
...
...
src/main/java/com/jsh/erp/service/role/RoleComponent.java
View file @
86b9ae90
...
@@ -37,7 +37,7 @@ public class RoleComponent implements ICommonQuery {
...
@@ -37,7 +37,7 @@ public class RoleComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
return
roleService
.
countRole
(
name
);
return
roleService
.
countRole
(
name
);
...
...
src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
86b9ae90
...
@@ -40,7 +40,7 @@ public class RoleService {
...
@@ -40,7 +40,7 @@ public class RoleService {
return
roleMapperEx
.
selectByConditionRole
(
name
,
offset
,
rows
);
return
roleMapperEx
.
selectByConditionRole
(
name
,
offset
,
rows
);
}
}
public
int
countRole
(
String
name
)
{
public
Long
countRole
(
String
name
)
{
return
roleMapperEx
.
countsByRole
(
name
);
return
roleMapperEx
.
countsByRole
(
name
);
}
}
...
...
src/main/java/com/jsh/erp/service/serialNumber/SerialNumberComponent.java
View file @
86b9ae90
...
@@ -43,7 +43,7 @@ public class SerialNumberComponent implements ICommonQuery {
...
@@ -43,7 +43,7 @@ public class SerialNumberComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
serialNumber
=
StringUtil
.
getInfo
(
search
,
"serialNumber"
);
String
serialNumber
=
StringUtil
.
getInfo
(
search
,
"serialNumber"
);
String
materialName
=
StringUtil
.
getInfo
(
search
,
"materialName"
);
String
materialName
=
StringUtil
.
getInfo
(
search
,
"materialName"
);
...
...
src/main/java/com/jsh/erp/service/serialNumber/SerialNumberService.java
View file @
86b9ae90
...
@@ -61,7 +61,7 @@ public class SerialNumberService {
...
@@ -61,7 +61,7 @@ public class SerialNumberService {
}
}
public
int
countSerialNumber
(
String
serialNumber
,
String
materialName
)
{
public
Long
countSerialNumber
(
String
serialNumber
,
String
materialName
)
{
return
serialNumberMapperEx
.
countSerialNumber
(
serialNumber
,
materialName
);
return
serialNumberMapperEx
.
countSerialNumber
(
serialNumber
,
materialName
);
}
}
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierComponent.java
View file @
86b9ae90
...
@@ -42,7 +42,7 @@ public class SupplierComponent implements ICommonQuery {
...
@@ -42,7 +42,7 @@ public class SupplierComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
supplier
=
StringUtil
.
getInfo
(
search
,
"supplier"
);
String
supplier
=
StringUtil
.
getInfo
(
search
,
"supplier"
);
String
type
=
StringUtil
.
getInfo
(
search
,
"type"
);
String
type
=
StringUtil
.
getInfo
(
search
,
"type"
);
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
86b9ae90
...
@@ -42,7 +42,7 @@ public class SupplierService {
...
@@ -42,7 +42,7 @@ public class SupplierService {
return
supplierMapperEx
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
return
supplierMapperEx
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
}
}
public
int
countSupplier
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
)
{
public
Long
countSupplier
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
)
{
return
supplierMapperEx
.
countsBySupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
return
supplierMapperEx
.
countsBySupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
}
}
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigComponent.java
View file @
86b9ae90
...
@@ -36,7 +36,7 @@ public class SystemConfigComponent implements ICommonQuery {
...
@@ -36,7 +36,7 @@ public class SystemConfigComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
return
systemConfigService
.
countSystemConfig
();
return
systemConfigService
.
countSystemConfig
();
}
}
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
86b9ae90
...
@@ -37,7 +37,7 @@ public class SystemConfigService {
...
@@ -37,7 +37,7 @@ public class SystemConfigService {
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
offset
,
rows
);
return
systemConfigMapperEx
.
selectByConditionSystemConfig
(
offset
,
rows
);
}
}
public
int
countSystemConfig
()
{
public
Long
countSystemConfig
()
{
return
systemConfigMapperEx
.
countsBySystemConfig
();
return
systemConfigMapperEx
.
countsBySystemConfig
();
}
}
...
...
src/main/java/com/jsh/erp/service/unit/UnitComponent.java
View file @
86b9ae90
...
@@ -37,7 +37,7 @@ public class UnitComponent implements ICommonQuery {
...
@@ -37,7 +37,7 @@ public class UnitComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
return
unitService
.
countUnit
(
name
);
return
unitService
.
countUnit
(
name
);
...
...
src/main/java/com/jsh/erp/service/unit/UnitService.java
View file @
86b9ae90
...
@@ -38,7 +38,7 @@ public class UnitService {
...
@@ -38,7 +38,7 @@ public class UnitService {
return
unitMapperEx
.
selectByConditionUnit
(
name
,
offset
,
rows
);
return
unitMapperEx
.
selectByConditionUnit
(
name
,
offset
,
rows
);
}
}
public
int
countUnit
(
String
name
)
{
public
Long
countUnit
(
String
name
)
{
return
unitMapperEx
.
countsByUnit
(
name
);
return
unitMapperEx
.
countsByUnit
(
name
);
}
}
...
...
src/main/java/com/jsh/erp/service/user/UserComponent.java
View file @
86b9ae90
...
@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery {
...
@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
userName
=
StringUtil
.
getInfo
(
search
,
"userName"
);
String
userName
=
StringUtil
.
getInfo
(
search
,
"userName"
);
String
loginName
=
StringUtil
.
getInfo
(
search
,
"loginName"
);
String
loginName
=
StringUtil
.
getInfo
(
search
,
"loginName"
);
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
86b9ae90
...
@@ -43,7 +43,7 @@ public class UserService {
...
@@ -43,7 +43,7 @@ public class UserService {
return
userMapperEx
.
selectByConditionUser
(
userName
,
loginName
,
offset
,
rows
);
return
userMapperEx
.
selectByConditionUser
(
userName
,
loginName
,
offset
,
rows
);
}
}
public
int
countUser
(
String
userName
,
String
loginName
)
{
public
Long
countUser
(
String
userName
,
String
loginName
)
{
return
userMapperEx
.
countsByUser
(
userName
,
loginName
);
return
userMapperEx
.
countsByUser
(
userName
,
loginName
);
}
}
/**
/**
...
...
src/main/java/com/jsh/erp/service/userBusiness/UserBusinessComponent.java
View file @
86b9ae90
package
com.jsh.erp.service.userBusiness
;
package
com.jsh.erp.service.userBusiness
;
import
com.jsh.erp.constants.BusinessConstants
;
import
com.jsh.erp.service.ICommonQuery
;
import
com.jsh.erp.service.ICommonQuery
;
import
com.jsh.erp.service.depot.DepotResource
;
import
com.jsh.erp.service.depot.DepotResource
;
import
com.jsh.erp.service.depot.DepotService
;
import
com.jsh.erp.service.depot.DepotService
;
...
@@ -35,8 +36,8 @@ public class UserBusinessComponent implements ICommonQuery {
...
@@ -35,8 +36,8 @@ public class UserBusinessComponent implements ICommonQuery {
}
}
@Override
@Override
public
int
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
return
0
;
return
BusinessConstants
.
DEFAULT_LIST_NULL_NUMBER
;
}
}
@Override
@Override
...
...
src/main/java/com/jsh/erp/utils/Constants.java
View file @
86b9ae90
...
@@ -16,6 +16,7 @@ public class Constants {
...
@@ -16,6 +16,7 @@ public class Constants {
public
final
static
String
SEARCH
=
"search"
;
public
final
static
String
SEARCH
=
"search"
;
public
final
static
String
DEVICE_ID
=
"deviceId"
;
public
final
static
String
DEVICE_ID
=
"deviceId"
;
public
final
static
String
OFFSET
=
"offset"
;
public
final
static
String
OFFSET
=
"offset"
;
public
final
static
String
ROWS
=
"rows"
;
public
final
static
String
IS_RECURSION
=
"isRecursion"
;
public
final
static
String
IS_RECURSION
=
"isRecursion"
;
public
final
static
String
IS_RECURSION_VALUE
=
"1"
;
public
final
static
String
IS_RECURSION_VALUE
=
"1"
;
public
final
static
String
IS_QUERYBYNODEID
=
"isquerybyid"
;
public
final
static
String
IS_QUERYBYNODEID
=
"isquerybyid"
;
...
...
src/main/java/com/jsh/erp/utils/PageQueryInfo.java
View file @
86b9ae90
...
@@ -9,14 +9,14 @@ import java.util.List;
...
@@ -9,14 +9,14 @@ import java.util.List;
*/
*/
public
class
PageQueryInfo
{
public
class
PageQueryInfo
{
private
Integer
total
;
private
Long
total
;
private
List
<?>
rows
;
private
List
<?>
rows
;
public
Integer
getTotal
()
{
public
Long
getTotal
()
{
return
total
;
return
total
;
}
}
public
void
setTotal
(
Integer
total
)
{
public
void
setTotal
(
Long
total
)
{
this
.
total
=
total
;
this
.
total
=
total
;
}
}
...
...
src/main/java/com/jsh/erp/utils/ParamUtils.java
View file @
86b9ae90
...
@@ -12,10 +12,32 @@ public class ParamUtils {
...
@@ -12,10 +12,32 @@ public class ParamUtils {
public
static
String
getPageOffset
(
Integer
currentPage
,
Integer
pageSize
)
{
public
static
String
getPageOffset
(
Integer
currentPage
,
Integer
pageSize
)
{
if
(
currentPage
!=
null
&&
pageSize
!=
null
)
{
if
(
currentPage
!=
null
&&
pageSize
!=
null
)
{
int
offset
=
(
currentPage
-
1
)
*
pageSize
;
int
offset
=
(
currentPage
-
1
)
*
pageSize
;
if
(
offset
<
0
)
{
if
(
offset
<
=
0
)
{
return
0
+
""
;
return
"
0
"
;
}
else
{
}
else
{
return
offset
+
""
;
return
new
StringBuffer
().
append
(
offset
).
toString
();
}
}
return
null
;
}
public
static
Integer
getNumberPageOffset
(
Integer
currentPage
,
Integer
pageSize
)
{
if
(
currentPage
!=
null
&&
pageSize
!=
null
)
{
int
offset
=
(
currentPage
-
1
)
*
pageSize
;
if
(
offset
<=
0
)
{
return
0
;
}
else
{
return
offset
;
}
}
return
null
;
}
public
static
Integer
getNumberPageRows
(
Integer
currentPage
,
Integer
pageSize
)
{
if
(
currentPage
!=
null
&&
pageSize
!=
null
)
{
int
rows
=
(
currentPage
)
*
pageSize
;
if
(
rows
<=
0
)
{
return
0
;
}
else
{
return
rows
;
}
}
}
}
return
null
;
return
null
;
...
...
src/main/resources/application.properties
View file @
86b9ae90
...
@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG
...
@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG
#日志
#日志
logging.config
=
classpath:logback-spring.xml
logging.config
=
classpath:logback-spring.xml
logging.level.com.didispace
=
DEBUG
logging.level.com.didispace
=
DEBUG
#pagehelper配置
pagehelper.helperDialect
=
mysql
pagehelper.offsetAsPageNum
=
true
pagehelper.rowBoundsWithCount
=
true
pagehelper.pageSizeZero
=
true
pagehelper.reasonable
=
false
pagehelper.params
=
pageNum=pageHelperStart;pageSize=pageHelperRows;
pagehelper.supportMethodsArguments
=
false
...
...
src/main/resources/mapper_xml/AccountHeadMapperEx.xml
View file @
86b9ae90
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</select>
</select>
<select
id=
"countsByAccountHead"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countsByAccountHead"
resultType=
"java.lang.
Long
"
>
SELECT
SELECT
COUNT(id)
COUNT(id)
FROM jsh_accounthead
FROM jsh_accounthead
...
...
Prev
1
2
3
4
5
6
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