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
a1b07b8a
Commit
a1b07b8a
authored
Apr 13, 2019
by
季圣华
Browse files
解决各类表查数据能查出已删除数据的bug
parent
491e44b0
Changes
16
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
a1b07b8a
...
...
@@ -64,6 +64,7 @@ public class AccountService {
public
List
<
Account
>
getAccount
()
{
AccountExample
example
=
new
AccountExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
accountMapper
.
selectByExample
(
example
);
}
...
...
@@ -132,6 +133,7 @@ public class AccountService {
public
List
<
Account
>
findBySelect
()
{
AccountExample
example
=
new
AccountExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"id desc"
);
return
accountMapper
.
selectByExample
(
example
);
}
...
...
@@ -152,13 +154,15 @@ public class AccountService {
Date
mTime
=
StringUtil
.
getDateByString
(
timeStr
+
"-01 00:00:00"
,
null
);
if
(
type
.
equals
(
"month"
))
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
).
andPaytypeNotEqualTo
(
"预付款"
)
.
andOpertimeGreaterThanOrEqualTo
(
bTime
).
andOpertimeLessThanOrEqualTo
(
eTime
);
.
andOpertimeGreaterThanOrEqualTo
(
bTime
).
andOpertimeLessThanOrEqualTo
(
eTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
if
(
type
.
equals
(
"date"
))
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
).
andPaytypeNotEqualTo
(
"预付款"
)
.
andOpertimeLessThanOrEqualTo
(
mTime
);
.
andOpertimeLessThanOrEqualTo
(
mTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
}
}
else
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
).
andPaytypeNotEqualTo
(
"预付款"
);
example
.
createCriteria
().
andAccountidEqualTo
(
id
).
andPaytypeNotEqualTo
(
"预付款"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
List
<
DepotHead
>
dataList
=
depotHeadMapper
.
selectByExample
(
example
);
if
(
dataList
!=
null
)
{
...
...
@@ -190,13 +194,16 @@ public class AccountService {
Date
mTime
=
StringUtil
.
getDateByString
(
timeStr
+
"-01 00:00:00"
,
null
);
if
(
type
.
equals
(
"month"
))
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
)
.
andBilltimeGreaterThanOrEqualTo
(
bTime
).
andBilltimeLessThanOrEqualTo
(
eTime
);
.
andBilltimeGreaterThanOrEqualTo
(
bTime
).
andBilltimeLessThanOrEqualTo
(
eTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
if
(
type
.
equals
(
"date"
))
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
)
.
andBilltimeLessThanOrEqualTo
(
mTime
);
.
andBilltimeLessThanOrEqualTo
(
mTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
}
else
{
example
.
createCriteria
().
andAccountidEqualTo
(
id
);
example
.
createCriteria
().
andAccountidEqualTo
(
id
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
List
<
AccountHead
>
dataList
=
accountHeadMapper
.
selectByExample
(
example
);
if
(
dataList
!=
null
)
{
...
...
@@ -227,9 +234,11 @@ public class AccountService {
Date
eTime
=
StringUtil
.
getDateByString
(
timeStr
+
"-31 00:00:00"
,
null
);
Date
mTime
=
StringUtil
.
getDateByString
(
timeStr
+
"-01 00:00:00"
,
null
);
if
(
type
.
equals
(
"month"
))
{
example
.
createCriteria
().
andBilltimeGreaterThanOrEqualTo
(
bTime
).
andBilltimeLessThanOrEqualTo
(
eTime
);
example
.
createCriteria
().
andBilltimeGreaterThanOrEqualTo
(
bTime
).
andBilltimeLessThanOrEqualTo
(
eTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
if
(
type
.
equals
(
"date"
))
{
example
.
createCriteria
().
andBilltimeLessThanOrEqualTo
(
mTime
);
example
.
createCriteria
().
andBilltimeLessThanOrEqualTo
(
mTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
}
List
<
AccountHead
>
dataList
=
accountHeadMapper
.
selectByExample
(
example
);
...
...
@@ -245,9 +254,11 @@ public class AccountService {
AccountItemExample
exampleAi
=
new
AccountItemExample
();
if
(!
ids
.
equals
(
""
))
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
exampleAi
.
createCriteria
().
andAccountidEqualTo
(
id
).
andHeaderidIn
(
idList
);
exampleAi
.
createCriteria
().
andAccountidEqualTo
(
id
).
andHeaderidIn
(
idList
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
{
exampleAi
.
createCriteria
().
andAccountidEqualTo
(
id
);
exampleAi
.
createCriteria
().
andAccountidEqualTo
(
id
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
List
<
AccountItem
>
dataListOne
=
accountItemMapper
.
selectByExample
(
exampleAi
);
if
(
dataListOne
!=
null
)
{
...
...
@@ -282,13 +293,16 @@ public class AccountService {
Date
mTime
=
StringUtil
.
getDateByString
(
timeStr
+
"-01 00:00:00"
,
null
);
if
(
type
.
equals
(
"month"
))
{
example
.
createCriteria
().
andAccountidlistLike
(
"%"
+
id
.
toString
()
+
"%"
)
.
andOpertimeGreaterThanOrEqualTo
(
bTime
).
andOpertimeLessThanOrEqualTo
(
eTime
);
.
andOpertimeGreaterThanOrEqualTo
(
bTime
).
andOpertimeLessThanOrEqualTo
(
eTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
if
(
type
.
equals
(
"date"
))
{
example
.
createCriteria
().
andAccountidlistLike
(
"%"
+
id
.
toString
()
+
"%"
)
.
andOpertimeLessThanOrEqualTo
(
mTime
);
.
andOpertimeLessThanOrEqualTo
(
mTime
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
}
else
{
example
.
createCriteria
().
andAccountidlistLike
(
"%"
+
id
.
toString
()
+
"%"
);
example
.
createCriteria
().
andAccountidlistLike
(
"%"
+
id
.
toString
()
+
"%"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
List
<
DepotHead
>
dataList
=
depotHeadMapper
.
selectByExample
(
example
);
if
(
dataList
!=
null
)
{
...
...
src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java
View file @
a1b07b8a
...
...
@@ -49,6 +49,7 @@ public class AccountItemService {
public
List
<
AccountItem
>
getAccountItem
()
{
AccountItemExample
example
=
new
AccountItemExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
accountItemMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/app/AppService.java
View file @
a1b07b8a
...
...
@@ -42,7 +42,7 @@ public class AppService {
public
List
<
App
>
findDock
(){
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andZlEqualTo
(
"dock"
).
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andZlEqualTo
(
"dock"
).
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Sort"
);
List
<
App
>
list
=
appMapper
.
selectByExample
(
example
);
return
list
;
...
...
@@ -57,7 +57,7 @@ public class AppService {
*/
public
List
<
App
>
findDesk
(){
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andZlEqualTo
(
"desk"
).
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andZlEqualTo
(
"desk"
).
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Sort"
);
List
<
App
>
list
=
appMapper
.
selectByExample
(
example
);
return
list
;
...
...
@@ -69,6 +69,7 @@ public class AppService {
public
List
<
App
>
getApp
()
{
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
appMapper
.
selectByExample
(
example
);
}
...
...
@@ -108,7 +109,7 @@ public class AppService {
public
List
<
App
>
findRoleAPP
(){
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Sort"
);
List
<
App
>
list
=
appMapper
.
selectByExample
(
example
);
return
list
;
...
...
@@ -117,7 +118,8 @@ public class AppService {
public
List
<
App
>
findAppInIds
(
String
ids
,
String
type
){
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andZlEqualTo
(
type
).
andEnabledEqualTo
(
true
).
andIdIn
(
idList
);
example
.
createCriteria
().
andZlEqualTo
(
type
).
andEnabledEqualTo
(
true
).
andIdIn
(
idList
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Sort"
);
List
<
App
>
list
=
appMapper
.
selectByExample
(
example
);
return
list
;
...
...
src/main/java/com/jsh/erp/service/depot/DepotService.java
View file @
a1b07b8a
...
...
@@ -47,11 +47,13 @@ public class DepotService {
public
List
<
Depot
>
getDepot
()
{
DepotExample
example
=
new
DepotExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
depotMapper
.
selectByExample
(
example
);
}
public
List
<
Depot
>
getAllList
()
{
DepotExample
example
=
new
DepotExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"sort"
);
return
depotMapper
.
selectByExample
(
example
);
}
...
...
@@ -99,7 +101,7 @@ public class DepotService {
public
List
<
Depot
>
findUserDepot
(){
DepotExample
example
=
new
DepotExample
();
example
.
createCriteria
().
andTypeEqualTo
(
0
);
example
.
createCriteria
().
andTypeEqualTo
(
0
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Sort"
);
List
<
Depot
>
list
=
depotMapper
.
selectByExample
(
example
);
return
list
;
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
a1b07b8a
...
...
@@ -64,6 +64,7 @@ public class DepotHeadService {
public
List
<
DepotHead
>
getDepotHead
()
{
DepotHeadExample
example
=
new
DepotHeadExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
depotHeadMapper
.
selectByExample
(
example
);
}
...
...
@@ -191,7 +192,7 @@ public class DepotHeadService {
DepotHeadExample
example
=
new
DepotHeadExample
();
monthTime
=
monthTime
+
"-31 23:59:59"
;
Date
month
=
StringUtil
.
getDateByString
(
monthTime
,
null
);
example
.
createCriteria
().
andOpertimeLessThanOrEqualTo
(
month
);
example
.
createCriteria
().
andOpertimeLessThanOrEqualTo
(
month
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
return
depotHeadMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
a1b07b8a
...
...
@@ -66,6 +66,7 @@ public class DepotItemService {
public
List
<
DepotItem
>
getDepotItem
()
{
DepotItemExample
example
=
new
DepotItemExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
depotItemMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/functions/FunctionsService.java
View file @
a1b07b8a
...
...
@@ -42,6 +42,7 @@ public class FunctionsService {
public
List
<
Functions
>
getFunctions
()
{
FunctionsExample
example
=
new
FunctionsExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
functionsMapper
.
selectByExample
(
example
);
}
...
...
@@ -88,7 +89,8 @@ public class FunctionsService {
public
List
<
Functions
>
getRoleFunctions
(
String
pNumber
)
{
FunctionsExample
example
=
new
FunctionsExample
();
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andPnumberEqualTo
(
pNumber
);
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andPnumberEqualTo
(
pNumber
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Sort"
);
List
<
Functions
>
list
=
functionsMapper
.
selectByExample
(
example
);
return
list
;
...
...
@@ -96,7 +98,8 @@ public class FunctionsService {
public
List
<
Functions
>
findRoleFunctions
(
String
pnumber
){
FunctionsExample
example
=
new
FunctionsExample
();
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andPnumberEqualTo
(
pnumber
);
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andPnumberEqualTo
(
pnumber
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Sort"
);
List
<
Functions
>
list
=
functionsMapper
.
selectByExample
(
example
);
return
list
;
...
...
@@ -105,11 +108,13 @@ public class FunctionsService {
public
List
<
Functions
>
findByIds
(
String
functionsIds
){
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
functionsIds
);
FunctionsExample
example
=
new
FunctionsExample
();
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andIdIn
(
idList
);
example
.
createCriteria
().
andEnabledEqualTo
(
true
).
andIdIn
(
idList
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Sort asc"
);
List
<
Functions
>
list
=
functionsMapper
.
selectByExample
(
example
);
return
list
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteFunctionsByIds
(
String
ids
)
{
logService
.
insertLog
(
BusinessConstants
.
LOG_INTERFACE_NAME_FUNCTIONS
,
...
...
src/main/java/com/jsh/erp/service/inOutItem/InOutItemService.java
View file @
a1b07b8a
...
...
@@ -49,6 +49,7 @@ public class InOutItemService {
public
List
<
InOutItem
>
getInOutItem
()
{
InOutItemExample
example
=
new
InOutItemExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
inOutItemMapper
.
selectByExample
(
example
);
}
...
...
@@ -96,9 +97,9 @@ public class InOutItemService {
public
List
<
InOutItem
>
findBySelect
(
String
type
)
{
InOutItemExample
example
=
new
InOutItemExample
();
if
(
type
.
equals
(
"in"
))
{
example
.
createCriteria
().
andTypeEqualTo
(
"收入"
);
example
.
createCriteria
().
andTypeEqualTo
(
"收入"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
}
else
if
(
type
.
equals
(
"out"
))
{
example
.
createCriteria
().
andTypeEqualTo
(
"支出"
);
example
.
createCriteria
().
andTypeEqualTo
(
"支出"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
}
example
.
setOrderByClause
(
"id desc"
);
return
inOutItemMapper
.
selectByExample
(
example
);
...
...
src/main/java/com/jsh/erp/service/material/MaterialService.java
View file @
a1b07b8a
...
...
@@ -45,6 +45,7 @@ public class MaterialService {
public
List
<
Material
>
getMaterial
()
{
MaterialExample
example
=
new
MaterialExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
materialMapper
.
selectByExample
(
example
);
}
...
...
@@ -175,6 +176,7 @@ public class MaterialService {
public
List
<
Material
>
findByOrder
(){
MaterialExample
example
=
new
MaterialExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"Name,Model asc"
);
return
materialMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/materialProperty/MaterialPropertyService.java
View file @
a1b07b8a
...
...
@@ -42,8 +42,10 @@ public class MaterialPropertyService {
public
List
<
MaterialProperty
>
getMaterialProperty
()
{
MaterialPropertyExample
example
=
new
MaterialPropertyExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
materialPropertyMapper
.
selectByExample
(
example
);
}
public
List
<
MaterialProperty
>
select
(
String
name
,
int
offset
,
int
rows
)
{
return
materialPropertyMapperEx
.
selectByConditionMaterialProperty
(
name
,
offset
,
rows
);
}
...
...
src/main/java/com/jsh/erp/service/person/PersonService.java
View file @
a1b07b8a
...
...
@@ -49,6 +49,7 @@ public class PersonService {
public
List
<
Person
>
getPerson
()
{
PersonExample
example
=
new
PersonExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
personMapper
.
selectByExample
(
example
);
}
...
...
@@ -96,7 +97,7 @@ public class PersonService {
public
String
getPersonByIds
(
String
personIDs
)
{
List
<
Long
>
ids
=
StringUtil
.
strToLongList
(
personIDs
);
PersonExample
example
=
new
PersonExample
();
example
.
createCriteria
().
andIdIn
(
ids
);
example
.
createCriteria
().
andIdIn
(
ids
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Id asc"
);
List
<
Person
>
list
=
personMapper
.
selectByExample
(
example
);
StringBuffer
sb
=
new
StringBuffer
();
...
...
@@ -110,7 +111,7 @@ public class PersonService {
public
List
<
Person
>
getPersonByType
(
String
type
)
{
PersonExample
example
=
new
PersonExample
();
example
.
createCriteria
().
andTypeEqualTo
(
type
);
example
.
createCriteria
().
andTypeEqualTo
(
type
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"Id asc"
);
return
personMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
a1b07b8a
...
...
@@ -43,6 +43,7 @@ public class RoleService {
public
List
<
Role
>
getRole
()
{
RoleExample
example
=
new
RoleExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
roleMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
a1b07b8a
...
...
@@ -53,6 +53,7 @@ public class SupplierService {
public
List
<
Supplier
>
getSupplier
()
{
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
supplierMapper
.
selectByExample
(
example
);
}
...
...
@@ -114,28 +115,31 @@ public class SupplierService {
public
List
<
Supplier
>
findBySelectCus
()
{
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andTypeLike
(
"客户"
).
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andTypeLike
(
"客户"
).
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
)
;
example
.
setOrderByClause
(
"id desc"
);
return
supplierMapper
.
selectByExample
(
example
);
}
public
List
<
Supplier
>
findBySelectSup
()
{
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andTypeLike
(
"供应商"
).
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andTypeLike
(
"供应商"
).
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"id desc"
);
return
supplierMapper
.
selectByExample
(
example
);
}
public
List
<
Supplier
>
findBySelectRetail
()
{
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andTypeLike
(
"会员"
).
andEnabledEqualTo
(
true
);
example
.
createCriteria
().
andTypeLike
(
"会员"
).
andEnabledEqualTo
(
true
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"id desc"
);
return
supplierMapper
.
selectByExample
(
example
);
}
public
List
<
Supplier
>
findById
(
Long
supplierId
)
{
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andIdEqualTo
(
supplierId
);
example
.
createCriteria
().
andIdEqualTo
(
supplierId
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"id desc"
);
return
supplierMapper
.
selectByExample
(
example
);
}
...
...
@@ -155,7 +159,8 @@ public class SupplierService {
public
List
<
Supplier
>
findUserCustomer
(){
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andTypeEqualTo
(
"客户"
);
example
.
createCriteria
().
andTypeEqualTo
(
"客户"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"id desc"
);
List
<
Supplier
>
list
=
supplierMapper
.
selectByExample
(
example
);
return
list
;
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
a1b07b8a
...
...
@@ -42,6 +42,7 @@ public class SystemConfigService {
public
List
<
SystemConfig
>
getSystemConfig
()
{
SystemConfigExample
example
=
new
SystemConfigExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
systemConfigMapper
.
selectByExample
(
example
);
}
public
List
<
SystemConfig
>
select
(
String
companyName
,
int
offset
,
int
rows
)
{
...
...
@@ -84,6 +85,7 @@ public class SystemConfigService {
List
<
SystemConfig
>
list
=
systemConfigMapper
.
selectByExample
(
example
);
return
list
.
size
();
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteSystemConfigByIds
(
String
ids
)
{
logService
.
insertLog
(
BusinessConstants
.
LOG_INTERFACE_NAME_SYSTEM_CONFIG
,
...
...
src/main/java/com/jsh/erp/service/unit/UnitService.java
View file @
a1b07b8a
...
...
@@ -49,6 +49,7 @@ public class UnitService {
public
List
<
Unit
>
getUnit
()
{
UnitExample
example
=
new
UnitExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
unitMapper
.
selectByExample
(
example
);
}
...
...
src/main/java/com/jsh/erp/service/userBusiness/UserBusinessService.java
View file @
a1b07b8a
...
...
@@ -59,6 +59,7 @@ public class UserBusinessService {
public
List
<
UserBusiness
>
getUserBusiness
()
{
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
return
userBusinessMapper
.
selectByExample
(
example
);
}
...
...
@@ -104,14 +105,16 @@ public class UserBusinessService {
public
List
<
UserBusiness
>
getBasicData
(
String
keyId
,
String
type
){
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andKeyidEqualTo
(
keyId
).
andTypeEqualTo
(
type
);
example
.
createCriteria
().
andKeyidEqualTo
(
keyId
).
andTypeEqualTo
(
type
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
UserBusiness
>
list
=
userBusinessMapper
.
selectByExample
(
example
);
return
list
;
}
public
Long
checkIsValueExist
(
String
type
,
String
keyId
)
{
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andTypeEqualTo
(
type
).
andKeyidEqualTo
(
keyId
);
example
.
createCriteria
().
andTypeEqualTo
(
type
).
andKeyidEqualTo
(
keyId
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
UserBusiness
>
list
=
userBusinessMapper
.
selectByExample
(
example
);
Long
id
=
null
;
if
(
list
.
size
()
>
0
)
{
...
...
@@ -124,9 +127,11 @@ public class UserBusinessService {
UserBusinessExample
example
=
new
UserBusinessExample
();
String
newVaule
=
"%"
+
UBValue
+
"%"
;
if
(
TypeVale
!=
null
&&
KeyIdValue
!=
null
)
{
example
.
createCriteria
().
andTypeEqualTo
(
TypeVale
).
andKeyidEqualTo
(
KeyIdValue
).
andValueLike
(
newVaule
);
example
.
createCriteria
().
andTypeEqualTo
(
TypeVale
).
andKeyidEqualTo
(
KeyIdValue
).
andValueLike
(
newVaule
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
else
{
example
.
createCriteria
().
andValueLike
(
newVaule
);
example
.
createCriteria
().
andValueLike
(
newVaule
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
}
List
<
UserBusiness
>
list
=
userBusinessMapper
.
selectByExample
(
example
);
if
(
list
.
size
()
>
0
)
{
...
...
@@ -150,7 +155,8 @@ public class UserBusinessService {
public
List
<
UserBusiness
>
findRoleByUserId
(
String
userId
){
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andKeyidEqualTo
(
userId
).
andTypeEqualTo
(
"UserRole"
);
example
.
createCriteria
().
andKeyidEqualTo
(
userId
).
andTypeEqualTo
(
"UserRole"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
UserBusiness
>
list
=
userBusinessMapper
.
selectByExample
(
example
);
return
list
;
}
...
...
@@ -158,10 +164,12 @@ public class UserBusinessService {
public
List
<
UserBusiness
>
findAppByRoles
(
String
roles
){
List
<
String
>
rolesList
=
StringUtil
.
strToStringList
(
roles
);
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andKeyidIn
(
rolesList
).
andTypeEqualTo
(
"RoleAPP"
);
example
.
createCriteria
().
andKeyidIn
(
rolesList
).
andTypeEqualTo
(
"RoleAPP"
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
UserBusiness
>
list
=
userBusinessMapper
.
selectByExample
(
example
);
return
list
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteUserBusinessByIds
(
String
ids
)
{
logService
.
insertLog
(
BusinessConstants
.
LOG_INTERFACE_NAME_USER_BUSINESS
,
...
...
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