Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
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
wangweidong
patzn-cloud-service-hmhj
Commits
b2772b74
Commit
b2772b74
authored
Nov 03, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对原铝重取所有检测项目值替换到原铝发送ERP中;
parent
96e39f74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+8
-5
EntrustSampleItemIndexMapper.xml
...in/resources/mapper/hmhj/EntrustSampleItemIndexMapper.xml
+3
-3
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
b2772b74
...
...
@@ -1500,6 +1500,8 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
// 将原铝重取的编号以map形式处理
Map
<
String
,
Long
>
retakeMap
=
new
HashMap
<>(
16
);
boolean
cpSample
=
false
;
// 此处原铝的和铝成品的查询分开了,实际上只用原铝的即可,铝成品的重写是为了不再对比重取数据
if
(
Objects
.
equals
(
ylname
,
sampleName
))
{
// 当为原铝时,判断是否存在重取,如果存在重取,需要在重取时触发,也就是下个条件下触发,如果不存在重取,那么直接发
...
...
@@ -1536,11 +1538,13 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
dataList
=
entrustSampleItemIndexService
.
listSampleItemIndex
(
entrustIds
,
null
);
}
else
{
cpSample
=
true
;
dataList
=
entrustSampleItemIndexService
.
listCpSampleItemIndex
(
null
,
ids
);
}
// ==
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
dataList
),
String
.
format
(
"【%s】要发送的数据为空!"
,
sampleName
));
// == search data loop
boolean
finalCpSample
=
cpSample
;
dataList
.
forEach
(
t
->
{
// 根据有无ID判断是属于哪一种数据来源
Object
oid
=
t
.
get
(
"id"
),
obrand
=
t
.
get
(
"brand"
);
...
...
@@ -1559,12 +1563,11 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
t
.
put
(
"brand"
,
brand
);
}
t
.
remove
(
"id"
);
}
else
{
}
if
(
finalCpSample
)
{
String
testTimeStr
=
t
.
get
(
"test_time"
).
toString
();
Date
testTime
=
null
;
if
(
Objects
.
nonNull
(
testTimeStr
)
&&
null
!=
(
testTime
=
DateUtils
.
dateStringtoDate
(
testTimeStr
,
DateKit
.
FORMAT_DEFAULT
)))
{
t
.
put
(
"shift"
,
DateKit
.
getShiftByDate
(
testTime
));
}
t
.
put
(
"shift"
,
DateKit
.
getShiftByDate
(
DateUtils
.
dateStringtoDate
(
testTimeStr
,
DateKit
.
FORMAT_DEFAULT
)));
}
logger
.
error
(
"DATA_ITEM: {}"
,
t
);
});
...
...
src/main/resources/mapper/hmhj/EntrustSampleItemIndexMapper.xml
View file @
b2772b74
...
...
@@ -106,7 +106,7 @@
s.code "sample_code",
s.slot_no,
s.sample_from,
s.sample_grading
"brand",
coalesce(cq.sample_grading,s.sample_grading)
"brand",
s.entrust_id,
s.company_id,
i.tester,
...
...
@@ -117,10 +117,10 @@
JOIN entrust_sample_item i ON i.ID = ii.entrust_sample_item_id AND i.deleted = 0
JOIN entrust_sample s ON s.ID = i.entrust_sample_id AND s.deleted = 0
LEFT JOIN (
select es.slot_no, esi.period, esii.name ,esii.test_value,to_char(esii.ctime,'yyyy-MM-dd') "ctime" from entrust_sample_item_index esii
select es.slot_no, es
.sample_grading, es
i.period, esii.name ,esii.test_value,to_char(esii.ctime,'yyyy-MM-dd') "ctime" from entrust_sample_item_index esii
join entrust_sample_item esi on esi.id = esii.entrust_sample_item_id and esi.deleted = 0
join entrust_sample es on es.id = esi.entrust_sample_id and es.deleted = 0
where esii.deleted = 0 and es.name = '原铝重取'
and esi.name in ('原铝Fe','原铝Si')
where esii.deleted = 0 and es.name = '原铝重取'
order by esii.ctime desc
) cq on cq.slot_no = s.slot_no and cq.period = i.period and cq.name = ii.name and cq.ctime = to_char(ii.ctime,'yyyy-MM-dd')
WHERE ii.deleted = 0
...
...
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