Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
cloud-fb
Commits
b1defed9
Commit
b1defed9
authored
Apr 21, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
砂石类型去掉所属区域公司的过滤.
parent
e24bca96
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
10 deletions
+17
-10
DinasTypeDaoImpl.java
...ava/com/xyst/dinas/biz/internal/dao/DinasTypeDaoImpl.java
+1
-8
StationDaoImpl.java
.../java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
+1
-2
DinasType.jmx
...main/resources/com/xyst/dinas/biz/datamodel/DinasType.jmx
+10
-0
DinasType.hbm.xml
...yst.dinas.biz/src/main/resources/config/DinasType.hbm.xml
+5
-0
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/DinasTypeDaoImpl.java
View file @
b1defed9
...
...
@@ -67,7 +67,6 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
public
Page
<
KObject
>
listDinasTypeInfoPaging
(
Page
<
KObject
>
page
)
{
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
addRegionalCompanyFilter
(
detachedCriteria
);
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
addOrder
(
Order
.
desc
(
"sortOrder"
));
page
.
setTotal
(
template
.
findByCriteria
(
detachedCriteria
).
size
());
...
...
@@ -99,7 +98,6 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"dataType.regionalCompany.id"
,
regionalCompanyId
));
return
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
);
}
...
...
@@ -113,7 +111,7 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"s.del"
,
false
));
if
(!
CollectionUtils
.
isEmpty
(
regionalCompanyIds
)){
detachedCriteria
.
add
(
Restrictions
.
in
(
"
d
.regionalCompany.id"
,
regionalCompanyIds
));
detachedCriteria
.
add
(
Restrictions
.
in
(
"
s
.regionalCompany.id"
,
regionalCompanyIds
));
}
if
(!
CollectionUtils
.
isEmpty
(
dinasTypeIds
)){
detachedCriteria
.
add
(
Restrictions
.
in
(
"d.id"
,
dinasTypeIds
));
...
...
@@ -140,8 +138,6 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
// detachedCriteria.add(Restrictions.eq("department.id", departmentId));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"dinasTypeName"
,
name
));
addRegionalCompanyFilter
(
detachedCriteria
);
if
(
id
!=
null
)
{
detachedCriteria
.
add
(
Restrictions
.
ne
(
"id"
,
id
));
}
...
...
@@ -153,10 +149,8 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
KObject
id
=
load
(
kobject
.
getUuid
(
"id"
));
kobject
.
set
(
BaseConstants
.
CREATOR
,
id
.
get
(
BaseConstants
.
CREATOR
));
kobject
.
set
(
BaseConstants
.
CREATE_TIME
,
id
.
getDate
(
BaseConstants
.
CREATE_TIME
));
kobject
.
set
(
"stations"
,
id
.
get
(
"stations"
));
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
kobject
.
set
(
"modifyTime"
,
new
Date
());
kobject
.
set
(
"regionalCompany"
,
getCurrentLoginRegionalCompany
());
kobject
.
set
(
BaseConstants
.
MODIFIER
,
staff
.
getUuid
(
"id"
));
kobject
.
set
(
"del"
,
false
);
template
.
merge
(
kobject
);
...
...
@@ -219,7 +213,6 @@ public class DinasTypeDaoImpl extends AbstractBaseDao implements DinasTypeDao, D
kObject
.
set
(
BaseConstants
.
CREATOR
,
staff
);
kObject
.
set
(
BaseConstants
.
CREATE_TIME
,
new
Date
());
kObject
.
set
(
"del"
,
false
);
kObject
.
set
(
"regionalCompany"
,
getCurrentLoginRegionalCompany
());
return
((
UUID
)
template
.
save
(
kObject
));
}
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
View file @
b1defed9
...
...
@@ -58,7 +58,6 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
public
List
<
KObject
>
listStationInfoByRegionalCompany
(
UUID
regionalCompanyId
)
{
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
StationConstant
.
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
// detachedCriteria.add(Restrictions.eq("department.id", departmentId));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
if
(
null
==
regionalCompanyId
){
...
...
@@ -185,7 +184,7 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
@Override
public
List
<
KObject
>
queryStationByRegionalCompany
(
UUID
id
)
{
return
template
.
execute
(
session
->
{
Query
<
KObject
>
query
=
session
.
createQuery
(
"from "
+
StationConstant
.
ENTITY
+
" where regionalCompany.id=:id "
,
KObject
.
class
);
Query
<
KObject
>
query
=
session
.
createQuery
(
"
from "
+
StationConstant
.
ENTITY
+
" where regionalCompany.id=:id "
,
KObject
.
class
);
query
.
setParameter
(
"id"
,
id
);
return
query
.
getResultList
();
});
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/datamodel/DinasType.jmx
View file @
b1defed9
...
...
@@ -62,6 +62,16 @@
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>
c3a59b7d-ee72-4e8e-a961-441ab4a07055
</m:id>
<m:name>
type
</m:name>
<m:title>
类型 0砂 1石
</m:title>
<m:type>
int
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations></m:annotations>
<m:id>
bd60d3ff-9308-4f15-aa1e-67d2923192f2
</m:id>
<m:name>
sortOrder
</m:name>
...
...
backend/xyst.dinas.biz/src/main/resources/config/DinasType.hbm.xml
View file @
b1defed9
...
...
@@ -51,6 +51,11 @@
<comment>
砂石种类名称
</comment>
</column>
</property>
<property
name=
"type"
type=
"int"
not-null=
"false"
>
<column
name=
"type"
length=
"1"
default=
"0"
>
<comment>
砂石种类类型 0砂 1石
</comment>
</column>
</property>
<property
name=
"dinasIsSell"
type=
"boolean"
>
<column
name=
"dinas_is_sell"
default=
"true"
not-null=
"false"
>
<comment>
砂石是否售卖,0不售卖 1还售卖
</comment>
...
...
Write
Preview
Markdown
is supported
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