Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
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
hlcm
leaf-hlcm
Commits
fe217118
Commit
fe217118
authored
Dec 03, 2024
by
38823
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机易查优化
parent
2a7d4461
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
15 deletions
+94
-15
JYCInterfaceController.java
...s/hlcm/hlinteface/controllers/JYCInterfaceController.java
+17
-15
JYCInterfaceMapper.java
...m/hand/hls/hlcm/hlinteface/mapper/JYCInterfaceMapper.java
+13
-0
JYCInterfaceMapper.xml
...om/hand/hls/hlcm/hlinteface/mapper/JYCInterfaceMapper.xml
+64
-0
No files found.
src/main/java/com/hand/hls/hlcm/hlinteface/controllers/JYCInterfaceController.java
View file @
fe217118
...
...
@@ -2,17 +2,20 @@ package com.hand.hls.hlcm.hlinteface.controllers;
import
com.alibaba.fastjson.JSONObject
;
import
com.hand.hap.system.controllers.BaseController
;
import
com.hand.hls.hlcm.hlinteface.mapper.JYCInterfaceMapper
;
import
leaf.database.service.DatabaseServiceFactory
;
import
leaf.utils.ObjectRegistryHolder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
com.google.common.util.concurrent.RateLimiter
;
import
java.util.
Arrays
;
import
java.util.List
;
import
java.util.
*
;
import
leaf.database.service.BusinessModelService
;
import
uncertain.composite.CompositeMap
;
import
java.io.IOException
;
...
...
@@ -24,6 +27,8 @@ public class JYCInterfaceController extends BaseController {
private
static
final
String
WJ
=
"wj"
;
private
static
final
String
BM_PATH
=
"cont.jyc_equno_query"
;
private
static
final
String
WJFL_FIELD
=
"WJFL"
;
@Autowired
JYCInterfaceMapper
jYCInterfaceMapper
;
DatabaseServiceFactory
dsf
=
ObjectRegistryHolder
.
getInstanceOfType
(
DatabaseServiceFactory
.
class
);
CompositeMap
context
=
new
CompositeMap
();
public
boolean
checkInterfacePara
(
String
equNo
,
String
type
,
String
reqClientIp
,
JSONObject
resultjson
){
...
...
@@ -68,26 +73,23 @@ public class JYCInterfaceController extends BaseController {
if
(
equNo
!=
null
)
{
param
.
put
(
"machine_number"
,
equNo
);
}
BusinessModelService
bms
=
dsf
.
getModelService
(
BM_PATH
,
context
);
CompositeMap
result
=
bms
.
queryAsMap
(
param
);
//
BusinessModelService bms = dsf.getModelService(BM_PATH, context);
List
<
Map
>
result
=
jYCInterfaceMapper
.
selectJycList
(
equNo
);
if
(
result
!=
null
)
{
List
<
CompositeMap
>
valueList
=
result
.
getChilds
();
if
(
valueList
!=
null
)
{
if
(
valueList
.
size
()>
0
){
Map
map
=
result
.
get
(
0
);
if
(!
ObjectUtils
.
isEmpty
(
map
))
{
existsFlag
=
true
;
CompositeMap
child
=
valueList
.
get
(
0
);
JSONObject
JYCResponseBody
=
new
JSONObject
();
JYCResponseBody
.
put
(
"equNm"
,
child
.
getString
(
"equnm
"
));
JYCResponseBody
.
put
(
"brandName"
,
child
.
getString
(
"brandname
"
));
JYCResponseBody
.
put
(
"equMdl"
,
child
.
getString
(
"equmdl
"
));
JYCResponseBody
.
put
(
"vinNo"
,
child
.
getString
(
"vinno
"
));
JYCResponseBody
.
put
(
"machineNo"
,
child
.
getString
(
"machineno
"
));
JYCResponseBody
.
put
(
"status"
,
child
.
getString
(
"status
"
));
JYCResponseBody
.
put
(
"equNm"
,
map
.
get
(
"EQUNM
"
));
JYCResponseBody
.
put
(
"brandName"
,
map
.
get
(
"BRANDNAME
"
));
JYCResponseBody
.
put
(
"equMdl"
,
map
.
get
(
"EQUMDL
"
));
JYCResponseBody
.
put
(
"vinNo"
,
map
.
get
(
"VINNO
"
));
JYCResponseBody
.
put
(
"machineNo"
,
map
.
get
(
"MACHINENO
"
));
JYCResponseBody
.
put
(
"status"
,
map
.
get
(
"STATUS
"
));
JYCResponseBody
.
put
(
"platform"
,
WJFL_FIELD
);
resultjson
.
put
(
"JYCResponseBody"
,
JYCResponseBody
);
resultjson
.
put
(
"ResponseCode"
,
"01"
);
resultjson
.
put
(
"ResponseMsg"
,
"交易正常"
);
}
/*for (CompositeMap child : valueList) {3
existsFlag = true;
if (child == null) {
...
...
src/main/java/com/hand/hls/hlcm/hlinteface/mapper/JYCInterfaceMapper.java
0 → 100644
View file @
fe217118
package
com
.
hand
.
hls
.
hlcm
.
hlinteface
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
public
interface
JYCInterfaceMapper
{
public
List
<
Map
>
selectJycList
(
@Param
(
"machineNumber"
)
String
machineNumber
);
}
src/main/resources/com/hand/hls/hlcm/hlinteface/mapper/JYCInterfaceMapper.xml
0 → 100644
View file @
fe217118
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.hand.hls.hlcm.hlinteface.mapper.JYCInterfaceMapper"
>
<select
id=
"selectJycList"
parameterType=
"java.lang.String"
resultType=
"java.util.Map"
>
select nvl(t2.equnm,'') equnm,
nvl(t2.brandname,'')brandname,
nvl(t2.equmdl,'')equmdl,
nvl(t2.vinno,'')vinno,
nvl(t2.machineno,'')machineno,
t2.status
from (select t1.*
from (
select li.LEASE_NAME equnm,
li.brand_value brandname,
li.PATTERN equmdl,
nvl(li.machine_number, li.machine_number_70) vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc, prj_project_lease_item li
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and cc.division != '95'
and (li.machine_number=#{machineNumber} or li.machine_number_70=#{machineNumber})
union
select lil.ASSET_NAME equnm,
li.brand_value brandname,
lil.SPECIFICATION equmdl,
lil.ASSET_NUM vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc,
prj_project_lease_item li,
prj_project_lease_item_list lil
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and li.project_lease_item_id = lil.project_lease_item_id
and cc.division != '95'
and lil.ASSET_NUM=#{machineNumber}
) t1
order by nvl(t1.creation_date, to_date('2000-01-01', 'yyyy-mm-dd')) desc) t2
where rownum = 1
</select>
</mapper>
\ 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