Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
df0d057e
Commit
df0d057e
authored
Apr 19, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
售后维修
parent
5f70e6dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletions
+43
-1
HPXS006.java
src/main/java/com/baosight/hpjx/hp/xs/domain/HPXS006.java
+1
-0
ServiceHPXS006.java
.../java/com/baosight/hpjx/hp/xs/service/ServiceHPXS006.java
+26
-1
HPXS006.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS006.xml
+16
-0
No files found.
src/main/java/com/baosight/hpjx/hp/xs/domain/HPXS006.java
View file @
df0d057e
...
...
@@ -39,6 +39,7 @@ public class HPXS006 extends DaoEPBase {
public
static
final
String
INSERT
=
"HPXS006.insert"
;
public
static
final
String
UPDATE
=
"HPXS006.update"
;
public
static
final
String
DELETE
=
"HPXS006.delete"
;
public
static
final
String
QUERYFACTORY
=
"HPXS006.getFactoryCode"
;
public
static
final
String
CHECK
=
"HPXS006.check"
;
/**
* initialize the metadata
...
...
src/main/java/com/baosight/hpjx/hp/xs/service/ServiceHPXS006.java
View file @
df0d057e
...
...
@@ -41,10 +41,11 @@ public class ServiceHPXS006 extends ServiceBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
/*inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, "userId",UserSessionUtils.getFactoryCode().get(0));*/
inInfo
=
super
.
query
(
inInfo
,
HPXS006
.
QUERY
,
new
HPSC001
());
Map
map
=
new
HashMap
();
map
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
map
.
put
(
"factoryCodes"
,
UserSessionUtils
.
getFactoryCode
(
));
map
.
put
(
"factoryCodes"
,
getFactoryCode
(
inInfo
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
REP_USER_ID_BLOCK_ID
),
map
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
CUSTOMER_RECORD_BLOCK_ID
),
null
);
}
catch
(
PlatException
e
)
{
...
...
@@ -227,4 +228,28 @@ public class ServiceHPXS006 extends ServiceBase {
CommonMethod
.
initBlock
(
inInfo
,
list
,
EiInfoUtils
.
getFirstRow
(
inInfo
));
return
inInfo
;
}
/**
* @param inInfo
* @return
*/
public
List
<
String
>
getFactoryCode
(
EiInfo
inInfo
)
{
List
<
String
>
factorycodes
=
new
ArrayList
();
try
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"userId"
,
UserSessionUtils
.
getUserId
());
inInfo
=
super
.
query
(
inInfo
,
HPXS006
.
QUERYFACTORY
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
List
rows
=
new
ArrayList
();
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
String
factory
=
(
String
)
map
.
get
(
"factoryCode"
);
factorycodes
.
add
(
factory
);
}
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询组失败"
);
}
return
factorycodes
;
}
}
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS006.xml
View file @
df0d057e
...
...
@@ -206,4 +206,19 @@
c.FACTORY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"factoryCodes"
>
#factoryCodes[]#
</iterate>
</isNotEmpty>
</select>
<select
id=
"getFactoryCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select distinct c.FACTORY_CODE as "factoryCode"
from iplat.txsog02 a
join iplat.xs_user b on a.USER_ID=b.USER_ID
join iplat.txsog01 c on c.ORG_ID = a.ORG_ID and c.IS_DELETED = 0
where 1=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
c.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
b.USER_ID = #userId#
</isNotEmpty>
</select>
</sqlMap>
\ No newline at end of file
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