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
aa84874b
Commit
aa84874b
authored
Sep 18, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
3a8726af
0a4c01cf
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
161 additions
and
65 deletions
+161
-65
UserDto.java
.../com/yeejoin/amos/boot/module/common/api/dto/UserDto.java
+3
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+2
-1
InputItem.java
...va/com/yeejoin/amos/supervision/dao/entity/InputItem.java
+2
-11
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+10
-15
CheckController.java
...amos/supervision/business/controller/CheckController.java
+3
-2
PlanTaskDetailMapper.java
...supervision/business/dao/mapper/PlanTaskDetailMapper.java
+1
-1
RoutePointItemMapper.java
...supervision/business/dao/mapper/RoutePointItemMapper.java
+2
-0
ICheckShotDao.java
...os/supervision/business/dao/repository/ICheckShotDao.java
+12
-0
CheckInputItemDto.java
...join/amos/supervision/business/dto/CheckInputItemDto.java
+32
-0
CheckInputParam.java
...join/amos/supervision/business/param/CheckInputParam.java
+1
-0
CheckPageParam.java
...ejoin/amos/supervision/business/param/CheckPageParam.java
+1
-0
CheckRecordParam.java
...oin/amos/supervision/business/param/CheckRecordParam.java
+3
-0
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+26
-8
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+10
-3
ICheckService.java
...mos/supervision/business/service/intfc/ICheckService.java
+2
-1
CheckVo.java
...ava/com/yeejoin/amos/supervision/business/vo/CheckVo.java
+8
-0
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+20
-11
plan_task_detail.xml
...rvision/src/main/resources/db/mapper/plan_task_detail.xml
+1
-1
pointMapper.xml
...-supervision/src/main/resources/db/mapper/pointMapper.xml
+9
-9
routePointItemMapper.xml
...ion/src/main/resources/db/mapper/routePointItemMapper.xml
+11
-0
pom.xml
pom.xml
+2
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/UserDto.java
View file @
aa84874b
...
...
@@ -38,4 +38,7 @@ public class UserDto {
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"机构类型(部门:DEPARTMENT,单位:COMPANY,人员:PERSON)"
)
private
String
bizOrgType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
aa84874b
...
...
@@ -428,7 +428,8 @@ GROUP BY
'2' AS identityType,
u.biz_org_code,
f.field_code,
f.field_value
f.field_value,
u.biz_org_type
FROM
`cb_org_usr` u
LEFT JOIN cb_dynamic_form_instance f ON f.instance_id = u.sequence_nbr
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/InputItem.java
View file @
aa84874b
...
...
@@ -224,8 +224,8 @@ public class InputItem extends BasicEntity {
/**
* 扩展属性
*/
@Transient
private
String
ext
;
//
@Transient
//
private String ext;
public
Integer
getItemStart
()
{
return
itemStart
;
...
...
@@ -514,12 +514,4 @@ public class InputItem extends BasicEntity {
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getExt
()
{
return
ext
;
}
public
void
setExt
(
String
ext
)
{
this
.
ext
=
ext
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
aa84874b
...
...
@@ -1192,24 +1192,19 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 业主单位
List
<
UserDto
>
list
=
orgUsrMapper
.
getUserInfo
(
userId
,
typeArr
[
0
],
null
,
FIELD_CODE
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
throw
new
RuntimeException
(
"人员绑定单位重复!"
);
}
else
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(
list
.
size
()
==
1
)
{
userDtoList
.
addAll
(
list
);
UserDto
userDto
=
list
.
get
(
0
);
String
codeVal
=
userDto
.
getCompanyId
().
substring
(
0
,
5
);
if
(
StringUtils
.
isNotBlank
(
codeVal
))
{
List
<
UserDto
>
dtoList
=
orgUsrMapper
.
getUserInfo
(
null
,
typeArr
[
1
],
codeVal
,
COMPANY_FIELD_CODE
);
if
(!
CollectionUtils
.
isEmpty
(
dtoList
))
{
userDtoList
.
addAll
(
dtoList
);
return
userDtoList
;
}
if
(
list
.
size
()
==
1
)
{
userDtoList
.
addAll
(
list
);
UserDto
userDto
=
list
.
get
(
0
);
String
codeVal
=
userDto
.
getBizOrgCode
().
substring
(
0
,
5
);
if
(
StringUtils
.
isNotBlank
(
codeVal
))
{
List
<
UserDto
>
dtoList
=
orgUsrMapper
.
getUserInfo
(
null
,
typeArr
[
1
],
codeVal
,
COMPANY_FIELD_CODE
);
if
(!
CollectionUtils
.
isEmpty
(
dtoList
))
{
userDtoList
.
addAll
(
dtoList
);
}
throw
new
RuntimeException
(
"未获取人员业主单位!"
);
}
throw
new
RuntimeException
(
"人员绑定业主单位不唯一!"
)
;
return
userDtoList
;
}
throw
new
RuntimeException
(
"人员绑定业主单位不唯一!"
);
}
throw
new
RuntimeException
(
"人员未绑定任何单位!"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
aa84874b
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputItemDto
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
...
...
@@ -550,8 +551,8 @@ public class CheckController extends AbstractBaseController {
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
requestParam
.
setOrgCode
(
orgCode
);
CheckDto
checkDto
=
checkService
.
saveCheckRecord
(
requestParam
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
check
Dto
);
List
<
CheckInputItemDto
>
checkInputItemDtoList
=
checkService
.
saveCheckRecord
(
requestParam
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
check
InputItemDtoList
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
ResponseHelper
.
buildResponse
(
e
.
getMessage
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/PlanTaskDetailMapper.java
View file @
aa84874b
...
...
@@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
public
interface
PlanTaskDetailMapper
extends
BaseMapper
{
void
finishTaskDetail
(
@Param
(
value
=
"planTaskDetailId"
)
long
planTaskDetailId
,
@Param
(
value
=
"pointId"
)
long
pointId
,
@Param
(
value
=
"planTaskId"
)
long
planTaskId
,
@Param
(
value
=
"executorId"
)
String
executorId
,
@Param
(
value
=
"executorName"
)
String
executorName
,
@Param
(
value
=
"size"
)
int
size
);
,
@Param
(
value
=
"executorId"
)
String
executorId
,
@Param
(
value
=
"executorName"
)
String
executorName
,
@Param
(
value
=
"size"
)
int
size
,
@Param
(
value
=
"planTaskStatus"
)
String
planTaskStatus
);
Map
findPlanTaskByTaskIdAndPointId
(
@Param
(
value
=
"planTaskId"
)
long
planTaskId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/RoutePointItemMapper.java
View file @
aa84874b
...
...
@@ -15,5 +15,7 @@ public interface RoutePointItemMapper extends BaseMapper {
long
queryPageCount
(
InputItemPageParam
param
);
int
getPointItemCount
(
Long
routeId
,
Long
pointId
);
List
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/ICheckShotDao.java
View file @
aa84874b
...
...
@@ -3,9 +3,12 @@ package com.yeejoin.amos.supervision.business.dao.repository;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.supervision.dao.entity.CheckShot
;
import
org.springframework.transaction.annotation.Transactional
;
@Repository
(
"checkShotDao"
)
public
interface
ICheckShotDao
extends
BaseDao
<
CheckShot
,
Long
>
{
...
...
@@ -27,4 +30,13 @@ public interface ICheckShotDao extends BaseDao<CheckShot, Long> {
* @return
*/
List
<
CheckShot
>
findAllByCheckIdAndCheckInputId
(
Long
checkId
,
Long
checkInputId
);
/**
* 根据check_input_id删除图片
*/
// @Modifying
// @Transactional
// @Query(value = "DELETE FROM p_check_shot WHERE check_input_id = ?1 ", nativeQuery = true)
// void deleteByCheckInputId(Long checkInputId);
void
deleteByCheckInputId
(
Long
checkInputId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dto/CheckInputItemDto.java
0 → 100644
View file @
aa84874b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dto
;
public
class
CheckInputItemDto
{
private
Long
checkInputId
;
private
Long
checkId
;
private
Long
routPointItemId
;
public
Long
getCheckInputId
()
{
return
checkInputId
;
}
public
void
setCheckInputId
(
Long
checkInputId
)
{
this
.
checkInputId
=
checkInputId
;
}
public
Long
getCheckId
()
{
return
checkId
;
}
public
void
setCheckId
(
Long
checkId
)
{
this
.
checkId
=
checkId
;
}
public
Long
getRoutPointItemId
()
{
return
routPointItemId
;
}
public
void
setRoutPointItemId
(
Long
routPointItemId
)
{
this
.
routPointItemId
=
routPointItemId
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/CheckInputParam.java
View file @
aa84874b
...
...
@@ -8,6 +8,7 @@ import java.util.List;
@Data
public
class
CheckInputParam
{
private
Long
id
;
private
long
inputItemId
;
private
String
inputValue
;
private
String
selectName
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/CheckPageParam.java
View file @
aa84874b
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
public
class
CheckPageParam
extends
CommonPageable
{
private
Long
planId
;
private
Long
companyId
;
private
Long
pointId
;
private
String
orgCode
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/CheckRecordParam.java
View file @
aa84874b
...
...
@@ -26,6 +26,9 @@ public class CheckRecordParam {
@ApiModelProperty
(
value
=
"检查时间"
)
private
String
checkTime
;
@ApiModelProperty
(
value
=
"任务状态是否结束"
)
private
String
planTaskStatus
;
// 0 不结束,1结束
/**
* 检查项
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
aa84874b
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper;
import
com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputItemDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.*
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
...
...
@@ -1335,7 +1336,7 @@ public class CheckServiceImpl implements ICheckService {
@Override
@Transactional
public
CheckDto
saveCheckRecord
(
CheckRecordParam
recordParam
,
ReginParams
reginParams
)
throws
Exception
{
public
List
<
CheckInputItemDto
>
saveCheckRecord
(
CheckRecordParam
recordParam
,
ReginParams
reginParams
)
throws
Exception
{
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
.
getUserModel
())
&&
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
())
&&
ObjectUtils
.
isEmpty
(
personIdentity
))
{
throw
new
RuntimeException
(
"获取用户信息失败"
);
...
...
@@ -1411,10 +1412,19 @@ public class CheckServiceImpl implements ICheckService {
List
<
Map
<
String
,
Object
>>
unqualifiedCheckItemList
=
Lists
.
newArrayList
();
StringBuilder
error
=
new
StringBuilder
();
int
score
=
0
;
int
size
=
0
;
for
(
CheckInputParam
item
:
list
)
{
List
<
CheckShot
>
checkShots
=
new
ArrayList
<>();
InputItem
inputItem
=
inputItemDao
.
findById
(
item
.
getInputItemId
()).
get
();
// InputItem inputItem = inputItemDao.findById(item.getInputItemId()).get();
InputItem
inputItem
=
inputItemDao
.
getOne
(
item
.
getInputItemId
());
CheckInput
checkInput
=
new
CheckInput
();
if
(!
ObjectUtils
.
isEmpty
(
item
.
getId
()))
{
checkInput
.
setId
(
item
.
getId
());
// 更新操作,将该点下所有图片删除,其余更新
checkShotDao
.
deleteByCheckInputId
(
item
.
getId
());
}
else
{
size
+=
1
;
}
checkInput
.
setCreateDate
(
new
Date
());
checkInput
.
setOrgCode
(
recordParam
.
getOrgCode
());
checkInput
.
setInputId
(
inputItem
.
getId
());
...
...
@@ -1490,7 +1500,13 @@ public class CheckServiceImpl implements ICheckService {
checkInputDao
.
saveAll
(
checkItemList
);
}
List
<
CheckShot
>
allShot
=
new
ArrayList
<>();
List
<
CheckInputItemDto
>
checkInputItemDtoList
=
new
ArrayList
<>();
checkItemList
.
forEach
(
c
->
{
CheckInputItemDto
checkInputItemDto
=
new
CheckInputItemDto
();
checkInputItemDto
.
setCheckId
(
c
.
getCheckId
());
checkInputItemDto
.
setCheckInputId
(
c
.
getId
());
checkInputItemDto
.
setRoutPointItemId
(
c
.
getRoutePointItemId
());
checkInputItemDtoList
.
add
(
checkInputItemDto
);
c
.
getCheckShotList
().
forEach
(
s
->
{
s
.
setCheckId
(
c
.
getCheckId
());
s
.
setOrgCode
(
recordParam
.
getOrgCode
());
...
...
@@ -1504,15 +1520,17 @@ public class CheckServiceImpl implements ICheckService {
checkShotDao
.
saveAll
(
allShot
);
}
int
size
=
0
;
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
size
=
list
.
size
();
}
// if (!ObjectUtils.isEmpty(list)) {
// size = list.size();
// }
// 更改状态
String
planTaskStatus
=
recordParam
.
getPlanTaskStatus
();
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
recordParam
.
getPointId
(),
recordParam
.
getPlanTaskId
(),
mtUserSeq
,
userName
,
size
);
recordParam
.
getPlanTaskId
(),
mtUserSeq
,
userName
,
size
,
planTaskStatus
);
//7.返回不合格记录
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
// return new CheckDto(check.getId(), unqualifiedCheckItemList);
return
checkInputItemDtoList
;
}
catch
(
Exception
e
)
{
throw
new
Exception
(
e
.
getMessage
(),
e
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
aa84874b
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.supervision.business.constants.XJConstant;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICheckDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
...
...
@@ -30,6 +31,7 @@ import com.yeejoin.amos.supervision.business.vo.CalDateVo;
import
com.yeejoin.amos.supervision.business.vo.CodeOrderVo
;
import
com.yeejoin.amos.supervision.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.supervision.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.common.enums.PlanTaskDetailIsFinishEnum
;
import
com.yeejoin.amos.supervision.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
...
...
@@ -98,6 +100,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Autowired
private
IPointInputItemDao
pointInputItemDao
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
)
{
long
total
=
planTaskMapper
.
countPlanTask
(
params
);
...
...
@@ -326,7 +331,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
strDate
=
df
.
format
(
now
);
String
tomorrow
=
DateUtil
.
getIntervalDateStr
(
now
,
1
,
"yyyy-MM-dd"
);
//下一天
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
XJConstant
.
PLAN_STATUS_START
);
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
())
);
if
(
planList
==
null
||
planList
.
size
()
<=
0
)
{
log
.
info
(
strDate
+
" "
+
" 暂无待生成执行数据的计划"
);
return
;
...
...
@@ -514,8 +519,10 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
// 查询点下检查项的个数
List
<
PointInputItem
>
pointInputItemByPointId
=
pointInputItemDao
.
getPointInputItemByPointId
(
pointId
.
longValue
());
planTaskDetailInstance
.
setItemNum
(
pointInputItemByPointId
.
size
());
// List<PointInputItem> pointInputItemByPointId = pointInputItemDao.getPointInputItemByPointId(pointId.longValue());
Long
routeId
=
plan
.
getRouteId
();
int
itemCount
=
routePointItemMapper
.
getPointItemCount
(
routeId
,
pointId
.
longValue
());
planTaskDetailInstance
.
setItemNum
(
itemCount
);
// 2.保存执行数据明细表
planTaskDetail
.
saveAndFlush
(
planTaskDetailInstance
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ICheckService.java
View file @
aa84874b
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.supervision.business.service.intfc;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckInputItemDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.*
;
import
com.yeejoin.amos.supervision.business.param.*
;
...
...
@@ -269,7 +270,7 @@ public interface ICheckService {
* @param reginParams 权限信息
* @return CheckDto
*/
CheckDto
saveCheckRecord
(
CheckRecordParam
recordParam
,
ReginParams
reginParams
)
throws
Exception
;
List
<
CheckInputItemDto
>
saveCheckRecord
(
CheckRecordParam
recordParam
,
ReginParams
reginParams
)
throws
Exception
;
/**
* 校验是否已经填写过
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/CheckVo.java
View file @
aa84874b
...
...
@@ -4,10 +4,18 @@ import lombok.Data;
import
java.util.Date
;
/**
* @author DELL
*/
@Data
public
class
CheckVo
{
/**
* 主键id
*/
private
Long
id
;
/**
* 检查项ID
*/
private
Long
inputItemId
;
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
aa84874b
...
...
@@ -1988,44 +1988,53 @@
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
LEFT JOIN p_point pp ON pp.id = c.point_id
<where>
<if
test=
"planId != null"
>
c.plan_id = #{planId}
</if>
<if
test=
"companyId != null"
>
AND
c.company
_id = #{companyId}
AND
pp.original
_id = #{companyId}
</if>
<if
test=
"
orgCode
!= null"
>
c.org_code = #{orgCode
}
<if
test=
"
pointId
!= null"
>
AND pp.id = #{pointId
}
</if>
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
</where>
</select>
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.CheckVo"
>
SELECT
i.id,
i.`name`,
i.`name`
inputItemName
,
ci.safety_danger_num,
ci.major_danger_num,
c.check_time,
c.user_name,
c.company_id,
c.company_name,
ci.create_date checkTime,
ci.user_name,
pp.original_id,
pp.name companyName,
IF
( c.check_time IS NULL, 0, 1 ) AS ext
FROM
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
LEFT JOIN p_point pp ON pp.id = c.point_id
<where>
<if
test=
"planId != null"
>
c.plan_id = #{planId}
</if>
<if
test=
"companyId != null"
>
AND
c.company
_id = #{companyId}
AND
pp.original
_id = #{companyId}
</if>
<if
test=
"
orgCode
!= null"
>
c.org_code = #{orgCode
}
<if
test=
"
pointId
!= null"
>
AND pp.id = #{pointId
}
</if>
<!-- <if test="orgCode != null">-->
<!-- AND c.org_code = #{orgCode}-->
<!-- </if>-->
ORDER BY c.check_time DESC
<choose>
<when
test=
"pageSize==-1"
></when>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/plan_task_detail.xml
View file @
aa84874b
...
...
@@ -3,7 +3,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper"
>
<update
id=
"finishTaskDetail"
>
call updatePlanTask(#{planTaskId}, #{pointId}, #{planTaskDetailId} ,#{executorId},#{executorName},#{size})
call updatePlanTask(#{planTaskId}, #{pointId}, #{planTaskDetailId} ,#{executorId},#{executorName},#{size}
,#{planTaskStatus}
)
</update>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/pointMapper.xml
View file @
aa84874b
...
...
@@ -1142,15 +1142,15 @@
<select
id=
"queryItemsByPointId"
resultType=
"map"
>
SELECT
COALESCE ( pci.id , 0 ) inputId,
ppi.id,
ppi.input_item_id itemId,
ppi.point_id pointId,
prp.point_id pointId,
pii.name itemName,
pii.item_type itemTyp,
pii.data_json dataJson,
pii.remark remark,
pii.picture_json picJson,
p
rpi.id routePointI
temId,
p
ii.id i
temId,
CASE pii.`input_type`
WHEN 0 THEN
'手动录入'
...
...
@@ -1158,13 +1158,13 @@
'同步'
END inputType
FROM
p_point_inputitem ppi
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
LEFT JOIN p_route_point pp ON pp.route_id = #{routeId} AND pp.point_id = ppi.point_id
LEFT JOIN p_route_point_item prpi ON prpi.route_point_id = pp.id AND prpi.point_input_item_id = ppi.id
LEFT JOIN p_check_input pci ON pci.route_point_item_id = prpi.id
p_route_point prp
LEFT JOIN p_route_point_item ppi ON ppi.route_point_id = prp.id
LEFT JOIN p_input_item pii ON ppi.input_item_id = pii.id
LEFT JOIN p_check_input pci ON pci.route_point_item_id = ppi.id
WHERE
ppi.point_id = #{pointId} AND pii.is_delete = 0 AND pci.route_point_item_id is NULL
prp.route_id = #{routeId} AND pii.is_delete = 0
-- AND pci.route_point_item_id is NULL
ORDER BY pii.order_no
</select>
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/routePointItemMapper.xml
View file @
aa84874b
...
...
@@ -80,4 +80,14 @@
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<select
id=
"getPointItemCount"
resultType=
"int"
>
SELECT
COUNT(prpi.input_item_id)
FROM
p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
WHERE
prp.route_id = #{routeId} AND prp.point_id = #{pointId}
</select>
</mapper>
\ No newline at end of file
pom.xml
View file @
aa84874b
...
...
@@ -27,7 +27,7 @@
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.20
</tyboot-version>
<amos.version>
1.6.
0
</amos.version>
<amos.version>
1.6.
3-SNAPSHOT
</amos.version>
<itext.version>
7.1.1
</itext.version>
</properties>
...
...
@@ -235,7 +235,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-rule
</artifactId>
<version>
1.4.7
</version>
<version>
${amos.version}
</version>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
...
...
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