Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
ac88ab14
Commit
ac88ab14
authored
Aug 16, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
c55a0ff6
1dfac7a8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
46 deletions
+37
-46
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+4
-1
CheckInputParam.java
...join/amos/maintenance/business/param/CheckInputParam.java
+1
-3
CheckRecordParam.java
...oin/amos/maintenance/business/param/CheckRecordParam.java
+17
-27
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+9
-10
CheckParamUtil.java
...eejoin/amos/maintenance/business/util/CheckParamUtil.java
+1
-4
plan_task_detail.xml
...tenance/src/main/resources/db/mapper/plan_task_detail.xml
+5
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
ac88ab14
...
@@ -196,7 +196,10 @@ public class CheckController extends AbstractBaseController {
...
@@ -196,7 +196,10 @@ public class CheckController extends AbstractBaseController {
public
CommonResponse
saveCheckRecord
(
public
CommonResponse
saveCheckRecord
(
@ApiParam
(
value
=
"检查信息"
)
@RequestBody
()
CheckRecordParam
requestParam
)
{
@ApiParam
(
value
=
"检查信息"
)
@RequestBody
()
CheckRecordParam
requestParam
)
{
try
{
try
{
CheckDto
checkDto
=
checkService
.
saveCheckRecord
(
requestParam
,
getSelectedOrgInfo
());
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
requestParam
.
setOrgCode
(
orgCode
);
CheckDto
checkDto
=
checkService
.
saveCheckRecord
(
requestParam
,
reginParams
);
return
CommonResponseUtil
.
success
(
checkDto
);
return
CommonResponseUtil
.
success
(
checkDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/param/CheckInputParam.java
View file @
ac88ab14
...
@@ -10,10 +10,8 @@ import java.util.List;
...
@@ -10,10 +10,8 @@ import java.util.List;
*/
*/
@Data
@Data
public
class
CheckInputParam
{
public
class
CheckInputParam
{
private
l
ong
inputItemId
;
private
L
ong
inputItemId
;
private
String
inputValue
;
private
String
inputValue
;
private
String
selectName
;
private
boolean
isCheck
;
private
String
remark
;
private
String
remark
;
private
Long
routePointItemId
;
private
Long
routePointItemId
;
private
List
<
CheckShotDto
>
checkInputShot
;
private
List
<
CheckShotDto
>
checkInputShot
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/param/CheckRecordParam.java
View file @
ac88ab14
...
@@ -13,37 +13,27 @@ import java.util.List;
...
@@ -13,37 +13,27 @@ import java.util.List;
@ApiModel
(
value
=
"任务提交"
)
@ApiModel
(
value
=
"任务提交"
)
public
class
CheckRecordParam
{
public
class
CheckRecordParam
{
@ApiModelProperty
(
value
=
"任务id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"任务id"
,
required
=
true
)
private
Long
planTaskId
;
private
Long
planTaskId
;
@ApiModelProperty
(
value
=
"点id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"点id"
,
required
=
true
)
private
Long
pointId
;
private
Long
pointId
;
@ApiModelProperty
(
value
=
"点名称
"
)
@ApiModelProperty
(
value
=
"任务id
"
)
private
String
pointNam
e
;
private
String
orgCod
e
;
@ApiModelProperty
(
value
=
"检查记录id
"
)
@ApiModelProperty
(
value
=
"备注
"
)
private
Long
checkId
;
private
String
remark
;
@ApiModelProperty
(
value
=
"执行人id
"
)
@ApiModelProperty
(
value
=
"维保日期,非必输
"
)
private
String
userId
;
private
String
checkTime
;
@ApiModelProperty
(
value
=
"任务id
"
)
@ApiModelProperty
(
value
=
"路线id,非必输
"
)
private
String
orgCode
;
private
Long
routeId
;
@ApiModelProperty
(
value
=
"备注"
)
/**
private
String
remark
;
* 检查项
*/
@ApiModelProperty
(
value
=
"检查项"
,
required
=
true
)
@ApiModelProperty
(
value
=
"路线id"
)
private
List
<
CheckInputParam
>
checkItems
;
private
Long
routeId
;
@ApiModelProperty
(
value
=
"检查时间"
)
private
String
checkTime
;
/**
* 检查项
*/
@ApiModelProperty
(
value
=
"检查项"
,
required
=
true
)
private
List
<
CheckInputParam
>
checkItems
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
ac88ab14
...
@@ -138,11 +138,10 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -138,11 +138,10 @@ public class CheckServiceImpl implements ICheckService {
check
.
setPlanTaskId
(
recordParam
.
getPlanTaskId
());
check
.
setPlanTaskId
(
recordParam
.
getPlanTaskId
());
check
.
setPlanId
(
planTask
.
getPlanId
());
check
.
setPlanId
(
planTask
.
getPlanId
());
check
.
setPlanName
(
detail
.
get
(
"planName"
).
toString
());
check
.
setPlanName
(
detail
.
get
(
"planName"
).
toString
());
check
.
setPointName
(
detail
.
get
(
"pointName"
).
toString
());
check
.
setPointName
(
point
.
getName
());
recordParam
.
setPointName
(
detail
.
get
(
"pointName"
).
toString
());
check
.
setPointId
(
point
.
getId
());
check
.
setPointId
(
recordParam
.
getPointId
());
check
.
setRemark
(
recordParam
.
getRemark
());
check
.
setRemark
(
recordParam
.
getRemark
());
check
.
setCheckTime
(
DateUtil
.
getLongDate
(
recordParam
.
getCheckTime
()
));
check
.
setCheckTime
(
new
Date
(
));
check
.
setUploadTime
(
new
Date
());
check
.
setUploadTime
(
new
Date
());
check
.
setOrgCode
(
recordParam
.
getOrgCode
());
check
.
setOrgCode
(
recordParam
.
getOrgCode
());
check
.
setUserId
(
mtUserSeq
);
check
.
setUserId
(
mtUserSeq
);
...
@@ -158,10 +157,12 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -158,10 +157,12 @@ public class CheckServiceImpl implements ICheckService {
CheckInput
checkInput
=
new
CheckInput
();
CheckInput
checkInput
=
new
CheckInput
();
checkInput
.
setCreateDate
(
new
Date
());
checkInput
.
setCreateDate
(
new
Date
());
checkInput
.
setOrgCode
(
recordParam
.
getOrgCode
());
checkInput
.
setOrgCode
(
recordParam
.
getOrgCode
());
checkInput
.
setInputId
(
Long
.
valueOf
(
item
.
getInputItemId
()
+
""
));
checkInput
.
setInputId
(
inputItem
.
getId
(
));
checkInput
.
setInputName
(
inputItem
.
getName
());
checkInput
.
setInputName
(
inputItem
.
getName
());
checkInput
.
setInputValue
(
item
.
getInputValue
());
checkInput
.
setOrderNo
(
inputItem
.
getOrderNo
());
checkInput
.
setOrderNo
(
inputItem
.
getOrderNo
());
checkInput
.
setRemark
(
item
.
getRemark
());
checkInput
.
setRemark
(
item
.
getRemark
());
checkInput
.
setRoutePointItemId
(
item
.
getRoutePointItemId
());
//1.校验结果
//1.校验结果
if
(
XJConstant
.
INPUT_ITEM_SELECT
.
equals
(
inputItem
.
getItemType
()))
{
if
(
XJConstant
.
INPUT_ITEM_SELECT
.
equals
(
inputItem
.
getItemType
()))
{
paraseSelect
(
checkInput
,
inputItem
.
getDataJson
(),
item
,
inputItem
.
getIsScore
());
paraseSelect
(
checkInput
,
inputItem
.
getDataJson
(),
item
,
inputItem
.
getIsScore
());
...
@@ -176,15 +177,13 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -176,15 +177,13 @@ public class CheckServiceImpl implements ICheckService {
Map
<
String
,
Object
>
unCheckMap
=
Maps
.
newHashMap
();
Map
<
String
,
Object
>
unCheckMap
=
Maps
.
newHashMap
();
unCheckMap
.
put
(
"itemId"
,
item
.
getInputItemId
());
unCheckMap
.
put
(
"itemId"
,
item
.
getInputItemId
());
unCheckMap
.
put
(
"routeId"
,
check
.
getRouteId
());
unCheckMap
.
put
(
"routeId"
,
check
.
getRouteId
());
unCheckMap
.
put
(
"pointId"
,
recordParam
.
getPoin
tId
());
unCheckMap
.
put
(
"pointId"
,
point
.
ge
tId
());
unCheckMap
.
put
(
"name"
,
inputItem
.
getName
());
unCheckMap
.
put
(
"name"
,
inputItem
.
getName
());
unCheckMap
.
put
(
"inputValue"
,
item
.
getInputValue
());
unCheckMap
.
put
(
"inputValue"
,
item
.
getInputValue
());
unqualifiedCheckItemList
.
add
(
unCheckMap
);
unqualifiedCheckItemList
.
add
(
unCheckMap
);
}
else
{
}
else
{
checkInput
.
setIsOk
(
CheckStatusEnum
.
QUALIFIED
.
getCode
());
checkInput
.
setIsOk
(
CheckStatusEnum
.
QUALIFIED
.
getCode
());
}
}
checkInput
.
setRoutePointItemId
(
item
.
getRoutePointItemId
());
checkInput
.
setInputValue
(
item
.
getInputValue
());
score
+=
checkInput
.
getScore
();
score
+=
checkInput
.
getScore
();
for
(
CheckShotDto
shotDto
:
item
.
getCheckInputShot
())
{
for
(
CheckShotDto
shotDto
:
item
.
getCheckInputShot
())
{
CheckShot
img
=
new
CheckShot
();
CheckShot
img
=
new
CheckShot
();
...
@@ -218,7 +217,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -218,7 +217,7 @@ public class CheckServiceImpl implements ICheckService {
Check
finalCheck
=
check
;
Check
finalCheck
=
check
;
//4.检查项入库
//4.检查项入库
checkItemList
.
forEach
(
checkInput
->
checkInput
.
setCheckId
(
finalCheck
.
getId
()));
checkItemList
.
forEach
(
checkInput
->
checkInput
.
setCheckId
(
finalCheck
.
getId
()));
if
(!
checkItemList
.
isEmpty
())
{
if
(!
checkItemList
.
isEmpty
())
{
checkInputDao
.
saveAll
(
checkItemList
);
checkInputDao
.
saveAll
(
checkItemList
);
}
}
List
<
CheckShot
>
allShot
=
new
ArrayList
<>();
List
<
CheckShot
>
allShot
=
new
ArrayList
<>();
...
@@ -245,7 +244,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -245,7 +244,7 @@ public class CheckServiceImpl implements ICheckService {
private
void
checkCanFinishTask
(
String
mtUserSeq
,
PlanTask
planTask
,
Long
pointId
)
throws
Exception
{
private
void
checkCanFinishTask
(
String
mtUserSeq
,
PlanTask
planTask
,
Long
pointId
)
throws
Exception
{
int
status
;
int
status
;
int
count
=
checkService
.
checkHasRecord
(
planTask
.
getId
(),
pointId
);
int
count
=
checkService
.
checkHasRecord
(
planTask
.
getId
(),
pointId
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
RuntimeException
(
"任务已执行,不能重复执行"
);
throw
new
RuntimeException
(
"任务已执行,不能重复执行"
);
}
}
if
(!
ToolUtils
.
transBeanList
(
planTask
.
getUserId
()).
contains
(
mtUserSeq
))
{
if
(!
ToolUtils
.
transBeanList
(
planTask
.
getUserId
()).
contains
(
mtUserSeq
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/util/CheckParamUtil.java
View file @
ac88ab14
...
@@ -15,11 +15,8 @@ public class CheckParamUtil {
...
@@ -15,11 +15,8 @@ public class CheckParamUtil {
String
operator
=
daoCriteria
.
getOperator
();
String
operator
=
daoCriteria
.
getOperator
();
String
name
=
daoCriteria
.
getPropertyName
();
String
name
=
daoCriteria
.
getPropertyName
();
if
(
"checkTime"
.
equals
(
name
)){
if
(
"checkTime"
.
equals
(
name
)){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM"
);
param
.
setCheckTime
(
daoCriterias
.
get
(
i
).
getValue
().
toString
());
param
.
setCheckTime
(
daoCriterias
.
get
(
i
).
getValue
().
toString
());
}
else
if
(
"userId"
.
equals
(
name
)){
}
else
if
(
"routeId"
.
equals
(
name
)){
param
.
setUserId
(
daoCriterias
.
get
(
i
).
getValue
().
toString
());
}
else
if
(
"routeId"
.
equals
(
name
)){
param
.
setRouteId
(
Long
.
valueOf
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()));
param
.
setRouteId
(
Long
.
valueOf
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()));
}
else
if
(
"orgCode"
.
equals
(
name
)
&&
operator
.
equals
(
QueryOperatorEnum
.
EQUAL
.
getName
())){
}
else
if
(
"orgCode"
.
equals
(
name
)
&&
operator
.
equals
(
QueryOperatorEnum
.
EQUAL
.
getName
())){
param
.
setOrgCode
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()+
"%"
);
param
.
setOrgCode
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()+
"%"
);
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/plan_task_detail.xml
View file @
ac88ab14
...
@@ -8,7 +8,11 @@
...
@@ -8,7 +8,11 @@
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
SELECT
SELECT
p.name planName, pt.begin_time beginTime, pt.end_time endTime, pp.name pointName, pp.point_no pointNo, ptd.id planTaskDetailId, pt.route_id routeId, pr.name routeName
p.name planName,
pp.name pointName,
ptd.id planTaskDetailId,
pt.route_id routeId,
pr.name routeName
FROM
FROM
p_plan_task pt
p_plan_task pt
LEFT JOIN p_plan p ON pt.plan_id = p.id
LEFT JOIN p_plan p ON pt.plan_id = p.id
...
...
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