Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
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
竹天卫
tianjin-cement
Commits
bc48fae4
Commit
bc48fae4
authored
Mar 11, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
da698ec0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
26 deletions
+124
-26
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+11
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+2
-0
CommonServiceImpl.java
...se/sc/cement/business/service/impl/CommonServiceImpl.java
+34
-26
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+77
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
bc48fae4
...
@@ -565,6 +565,17 @@ public class EntrustController {
...
@@ -565,6 +565,17 @@ public class EntrustController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"重新校核计算"
)
@PostMapping
(
"/checkCountNewAgain"
)
public
BaseResponse
checkCountNewAgain
(
@RequestBody
CheckCountNewQuery
query
)
{
try
{
return
entrustService
.
checkCountNewAgain
(
query
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"重新校核计算{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"数据校核退回任务分页(处理人+检测人员查看)"
)
@ApiOperation
(
value
=
"数据校核退回任务分页(处理人+检测人员查看)"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"entrustCode"
,
value
=
"委托单号"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"entrustCode"
,
value
=
"委托单号"
,
paramType
=
"query"
,
dataType
=
"String"
),
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
bc48fae4
...
@@ -100,6 +100,8 @@ public interface IEntrustService extends IService<Entrust> {
...
@@ -100,6 +100,8 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
checkCountNew
(
CheckCountNewQuery
query
);
BaseResponse
<
String
>
checkCountNew
(
CheckCountNewQuery
query
);
BaseResponse
<
String
>
checkCountNewAgain
(
CheckCountNewQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleReturnCheckPage
(
PageQuery
pageQuery
,
String
entrustCode
,
Integer
status
,
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleReturnCheckPage
(
PageQuery
pageQuery
,
String
entrustCode
,
Integer
status
,
String
clientName
,
String
projectName
,
String
projectCode
,
String
clientName
,
String
projectName
,
String
projectCode
,
Integer
isUrgent
,
Integer
distributionStatus
);
Integer
isUrgent
,
Integer
distributionStatus
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/CommonServiceImpl.java
View file @
bc48fae4
...
@@ -184,70 +184,78 @@ public class CommonServiceImpl {
...
@@ -184,70 +184,78 @@ public class CommonServiceImpl {
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
entry
.
getKey
());
jsonObject
.
put
(
"name"
,
entry
.
getKey
());
jsonObject
.
put
(
"value"
,
entry
.
getValue
());
jsonObject
.
put
(
"value"
,
entry
.
getValue
());
jsonObject
.
put
(
"retain"
,
entry
.
getValue
());
jsonArray
.
add
(
jsonObject
);
jsonArray
.
add
(
jsonObject
);
}
}
//如果包含滴定度,直接更新检测组配置的校核元素值,下次校核直接带过来
//如果包含滴定度,直接更新检测组配置的校核元素值,下次校核直接带过来
TeamGroup
teamGroup
=
teamGroupMapper
.
selectById
(
groupId
);
TeamGroup
teamGroup
=
teamGroupMapper
.
selectById
(
groupId
);
if
(
teamGroup
!=
null
&&
StringUtils
.
isNotBlank
(
teamGroup
.
getCheckElement
())){
if
(
teamGroup
!=
null
&&
StringUtils
.
isNotBlank
(
teamGroup
.
getCheckElement
())){
JSONArray
jsonArr
=
JSON
.
parseArray
(
teamGroup
.
getCheckElement
());
JSONArray
jsonArr
=
JSON
.
parseArray
(
teamGroup
.
getCheckElement
());
Map
<
String
,
String
>
teamgroupMap
=
jSONArrayToMap
(
jsonArr
);
for
(
int
i
=
0
;
i
<
jsonArr
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
jsonArr
.
size
();
i
++){
JSONObject
jsonObject
=
jsonArr
.
getJSONObject
(
i
);
JSONObject
jsonObjectGroup
=
jsonArr
.
getJSONObject
(
i
);
if
(
jsonObject
.
containsKey
(
"TSiO<sub>2</sub>"
)){
//输入的值 根据检测组中的输入值位数进行放入,用于前端展示
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()>
0
){
for
(
int
j
=
0
;
j
<
jsonArray
.
size
();
j
++){
JSONObject
jsonObjectInput
=
jsonArray
.
getJSONObject
(
i
);
if
(
jsonObjectInput
.
get
(
"name"
).
equals
(
jsonObjectGroup
.
get
(
"name"
))){
jsonObjectInput
.
put
(
"retain"
,
jsonObjectGroup
.
getString
(
"retain"
));
break
;
}
}
}
if
(
jsonObjectGroup
.
containsKey
(
"TSiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TSiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TSiO<sub>2</sub>"
)){
jsonObject
.
put
(
"TSiO<sub>2</sub>"
,
map
.
get
(
"TSiO<sub>2</sub>"
));
jsonObject
Group
.
put
(
"TSiO<sub>2</sub>"
,
map
.
get
(
"TSiO<sub>2</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
jsonObject
Group
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
jsonObject
.
put
(
"TAl<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
));
jsonObject
Group
.
put
(
"TAl<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TFe<sub>2</sub>O<sub>3</sub>"
)){
if
(
jsonObject
Group
.
containsKey
(
"TFe<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TFe<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TFe<sub>2</sub>O<sub>3</sub>"
)){
jsonObject
.
put
(
"TFe<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TFe<sub>2</sub>O<sub>3</sub>"
));
jsonObject
Group
.
put
(
"TFe<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TFe<sub>2</sub>O<sub>3</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TMgO"
)){
if
(
jsonObject
Group
.
containsKey
(
"TMgO"
)){
if
(
map
.
containsKey
(
"TMgO"
)){
if
(
map
.
containsKey
(
"TMgO"
)){
jsonObject
.
put
(
"TMgO"
,
map
.
get
(
"TMgO"
));
jsonObject
Group
.
put
(
"TMgO"
,
map
.
get
(
"TMgO"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
jsonObject
Group
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TTiO<sub>2</sub>"
)){
jsonObject
.
put
(
"TTiO<sub>2</sub>"
,
map
.
get
(
"TTiO<sub>2</sub>"
));
jsonObject
Group
.
put
(
"TTiO<sub>2</sub>"
,
map
.
get
(
"TTiO<sub>2</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
jsonObject
Group
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
if
(
map
.
containsKey
(
"TAl<sub>2</sub>O<sub>3</sub>"
)){
jsonObject
.
put
(
"TAl<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
));
jsonObject
Group
.
put
(
"TAl<sub>2</sub>O<sub>3</sub>"
,
map
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
jsonObject
Group
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TTiO<sub>2</sub>"
)){
if
(
map
.
containsKey
(
"TTiO<sub>2</sub>"
)){
jsonObject
.
put
(
"TTiO<sub>2</sub>"
,
map
.
get
(
"TTiO<sub>2</sub>"
));
jsonObject
Group
.
put
(
"TTiO<sub>2</sub>"
,
map
.
get
(
"TTiO<sub>2</sub>"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"TCaO"
)){
if
(
jsonObject
Group
.
containsKey
(
"TCaO"
)){
if
(
map
.
containsKey
(
"TCaO"
)){
if
(
map
.
containsKey
(
"TCaO"
)){
jsonObject
.
put
(
"TCaO"
,
map
.
get
(
"TCaO"
));
jsonObject
Group
.
put
(
"TCaO"
,
map
.
get
(
"TCaO"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"V1"
)){
if
(
jsonObject
Group
.
containsKey
(
"V1"
)){
if
(
map
.
containsKey
(
"V1"
)){
if
(
map
.
containsKey
(
"V1"
)){
jsonObject
.
put
(
"V1"
,
map
.
get
(
"V1"
));
jsonObject
Group
.
put
(
"V1"
,
map
.
get
(
"V1"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"T"
)){
if
(
jsonObject
Group
.
containsKey
(
"T"
)){
if
(
map
.
containsKey
(
"T"
)){
if
(
map
.
containsKey
(
"T"
)){
jsonObject
.
put
(
"T"
,
map
.
get
(
"T"
));
jsonObject
Group
.
put
(
"T"
,
map
.
get
(
"T"
));
}
}
}
}
if
(
jsonObject
.
containsKey
(
"K"
)){
if
(
jsonObject
Group
.
containsKey
(
"K"
)){
if
(
map
.
containsKey
(
"K"
)){
if
(
map
.
containsKey
(
"K"
)){
jsonObject
.
put
(
"K"
,
map
.
get
(
"K"
));
jsonObject
Group
.
put
(
"K"
,
map
.
get
(
"K"
));
}
}
}
}
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
bc48fae4
...
@@ -3910,6 +3910,83 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -3910,6 +3910,83 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
/**
* 按照检测组重新校核计算 -不改变当前状态 只改变结果(新的)
* @param query
* @return
*/
@Override
@Transactional
public
BaseResponse
<
String
>
checkCountNewAgain
(
CheckCountNewQuery
query
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
noLogin
(
"请登录用户"
);
}
if
(
query
==
null
||
query
.
getEntrustId
()
==
null
||
query
.
getUserId
()
==
null
||
query
.
getSmapleId
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
if
(
query
.
getTeamGroupId
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择检测组"
);
}
Entrust
entrust
=
entrustMapper
.
selectById
(
query
.
getEntrustId
());
if
(
entrust
==
null
)
{
return
BaseResponse
.
errorMsg
(
"信息错误"
);
}
Sample
sample_this
=
sampleMapper
.
selectById
(
query
.
getSmapleId
());
if
(
sample_this
==
null
){
return
BaseResponse
.
errorMsg
(
"样品信息错误"
);
}
//保存校核输入表信息
QueryWrapper
<
SampleDistributionCheckinput
>
checkinputQueryWrapper
=
new
QueryWrapper
<>();
checkinputQueryWrapper
.
eq
(
"entrust_id"
,
query
.
getEntrustId
());
checkinputQueryWrapper
.
eq
(
"sample_id"
,
query
.
getSmapleId
());
checkinputQueryWrapper
.
eq
(
"team_group_id"
,
query
.
getTeamGroupId
());
checkinputQueryWrapper
.
eq
(
"user_id"
,
query
.
getUserId
());
List
<
SampleDistributionCheckinput
>
checkinputList
=
sampleDistributionCheckinputMapper
.
selectList
(
checkinputQueryWrapper
);
SampleDistributionCheckinput
checkinput
=
null
;
JSONArray
inputResult_jsonArray
=
commonService
.
mapToJSONArray2
(
query
.
getUserId
(),
query
.
getTeamGroupId
(),
query
.
getIntputResult
());
String
inputResult_String
=
JSON
.
toJSON
(
inputResult_jsonArray
).
toString
();
System
.
out
.
println
(
inputResult_String
);
if
(
checkinputList
!=
null
&&
checkinputList
.
size
()
>
0
){
checkinput
=
checkinputList
.
get
(
0
);
if
(
checkinput
.
getStatus
()
!=
4
){
return
BaseResponse
.
errorMsg
(
"校核状态错误"
);
}
checkinput
.
setInputResult
(
inputResult_String
)
.
setUpdateTime
(
LocalDateTime
.
now
());
sampleDistributionCheckinputMapper
.
updateById
(
checkinput
);
}
else
{
return
BaseResponse
.
errorMsg
(
"校核输入表信息错误"
);
}
//保存校核结果信息
List
<
CheckCountDistributionNewQuery
>
queryList
=
query
.
getCheckCountDistributionNewQueryList
();
if
(
queryList
!=
null
&&
queryList
.
size
()>
0
){
for
(
CheckCountDistributionNewQuery
disQuery
:
queryList
){
SampleDistribution
dis
=
distributionMapper
.
selectById
(
disQuery
.
getDistributionId
());
dis
.
setCheckInputId
(
checkinput
.
getId
());
dis
.
setDistributionResult
(
disQuery
.
getDistributionResult
());
if
(
dis
.
getCheckId
()
!=
null
){
SampleDistributionCheck
disCheck
=
sampleDistributionCheckMapper
.
selectById
(
dis
.
getCheckId
());
disCheck
.
setDistributionError
(
disQuery
.
getDistributionError
())
.
setLastResult
(
disQuery
.
getLastResult
())
.
setUpdateTime
(
LocalDateTime
.
now
());
sampleDistributionCheckMapper
.
updateById
(
disCheck
);
dis
.
setCheckId
(
disCheck
.
getId
());
}
else
{
return
BaseResponse
.
errorMsg
(
"校核结果表信息错误"
);
}
distributionMapper
.
updateById
(
dis
);
}
}
return
BaseResponse
.
okData
(
"校核完成"
);
}
/**
/**
* 数据校核退回任务分页
* 数据校核退回任务分页
*
*
...
...
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