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
c0b2eab2
Commit
c0b2eab2
authored
Oct 19, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_patrol' into develop_tzs_patrol
parents
57f4064d
848168e8
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
131 additions
and
154 deletions
+131
-154
PlanController.java
...ejoin/amos/patrol/business/controller/PlanController.java
+33
-28
IPlanDao.java
...yeejoin/amos/patrol/business/dao/repository/IPlanDao.java
+1
-1
IPlanTaskDetailDao.java
...os/patrol/business/dao/repository/IPlanTaskDetailDao.java
+7
-7
PlanServiceImpl.java
...in/amos/patrol/business/service/impl/PlanServiceImpl.java
+10
-10
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+2
-2
PlanTaskUtil.java
...a/com/yeejoin/amos/patrol/business/util/PlanTaskUtil.java
+4
-4
application-dev.properties
...stem-patrol/src/main/resources/application-dev.properties
+2
-2
dbTemplate_plan.xml
...m-patrol/src/main/resources/db/mapper/dbTemplate_plan.xml
+46
-44
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+16
-44
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+6
-8
routeMapper.xml
...ystem-patrol/src/main/resources/db/mapper/routeMapper.xml
+4
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanController.java
View file @
c0b2eab2
...
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.feign.TzsFeign
;
import
com.yeejoin.amos.patrol.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.patrol.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.patrol.business.util.CommonResponse
;
...
...
@@ -39,6 +40,8 @@ public class PlanController extends AbstractBaseController {
@Autowired
JcsFeignClient
jcsFeignClient
;
@Autowired
TzsFeign
tzsFeign
;
/**
* 新加接口
...
...
@@ -153,36 +156,38 @@ public class PlanController extends AbstractBaseController {
String
userId
=
getUserId
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"org_code"
,
loginOrgCode
);
map
.
put
(
"user_id"
,
userId
);
Map
<
String
,
String
>
deptMap
=
new
HashMap
<>();
Set
<
String
>
departmentIds
=
new
HashSet
<>();
List
<
String
>
depts
=
Arrays
.
asList
(
param
.
getUserDept
().
split
(
","
));
depts
.
stream
().
forEach
(
dept
->
{
deptMap
.
put
(
dept
.
substring
(
0
,
dept
.
indexOf
(
"@"
)),
dept
.
substring
(
dept
.
indexOf
(
"@"
)
+
1
));
});
for
(
String
entry
:
deptMap
.
keySet
())
{
String
entryValue
=
deptMap
.
get
(
entry
);
departmentIds
.
add
(
entryValue
);
}
StringBuffer
departmentIdBuffer
=
new
StringBuffer
();
Iterator
<
String
>
it
=
departmentIds
.
iterator
();
while
(
it
.
hasNext
())
{
departmentIdBuffer
.
append
(
it
.
next
()).
append
(
","
);
}
if
(
departmentIds
.
size
()
>
0
){
FeignClientResult
<
List
<
Map
<
String
,
Object
>>>
departmentModeldate
=
jcsFeignClient
.
selectByIdDeptList
(
departmentIdBuffer
.
toString
().
substring
(
0
,
departmentIdBuffer
.
toString
().
length
()
-
1
));
List
<
Map
<
String
,
Object
>>
departmentModels
=
departmentModeldate
.
getResult
();
if
(
departmentModels
!=
null
&&
departmentModels
.
size
()>
0
){
Map
<
String
,
Object
>
mapj
=
departmentModels
.
get
(
0
);
param
.
setBizOrgCode
(
mapj
.
get
(
"bizOrgCode"
).
toString
());
param
.
setBizOrgName
(
mapj
.
get
(
"bizOrgName"
).
toString
());
}
}
// Map<String, String> deptMap = new HashMap<>();
// Set<String> departmentIds = new HashSet<>();
// List<String> groupIds = Arrays.asList(param.getUserGroupId().split(","));
// depts.stream().forEach(dept -> {
// deptMap.put(dept.substring(0, dept.indexOf("@")), dept.substring(dept.indexOf("@") + 1));
// });
// for (String entry : deptMap.keySet()) {
// String entryValue = deptMap.get(entry);
// departmentIds.add(entryValue);
// }
// StringBuffer departmentIdBuffer = new StringBuffer();
// Iterator<String> it = departmentIds.iterator();
// while (it.hasNext()) {
// departmentIdBuffer.append(it.next()).append(",");
// }
// if(departmentIds.size() > 0){
// FeignClientResult<List<Map<String, Object>>> departmentModeldate= jcsFeignClient.selectByIdDeptList
// (departmentIdBuffer.toString().substring(0, departmentIdBuffer.toString().length() - 1));
// List<Map<String, Object>> departmentModels = departmentModeldate.getResult();
// if(departmentModels!=null&&departmentModels.size()>0){
// Map<String, Object> mapj= departmentModels.get(0);
// param.setBizOrgCode(mapj.get("bizOrgCode").toString());
// param.setBizOrgName(mapj.get("bizOrgName").toString());
// }
// }
param
.
setBizOrgCode
(
loginOrgCode
);
param
.
setBizOrgName
(
getCompanyName
(
reginParams
));
map
.
put
(
"param"
,
param
);
Plan
plan
=
planService
.
addPlan
(
map
);
Object
ob
=
plan
!=
null
?
ToJson
.
tojson
(
plan
)
:
null
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IPlanDao.java
View file @
c0b2eab2
...
...
@@ -27,7 +27,7 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Modifying
@Transactional
@Query
(
value
=
"UPDATE p_plan SET is_delete = 1,
`status`
= 1 WHERE id IN (?1)"
,
nativeQuery
=
true
)
@Query
(
value
=
"UPDATE p_plan SET is_delete = 1,
status
= 1 WHERE id IN (?1)"
,
nativeQuery
=
true
)
void
updatePlanDel
(
List
<
Long
>
ids
);
Plan
findByOriginalId
(
String
originalId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IPlanTaskDetailDao.java
View file @
c0b2eab2
...
...
@@ -14,26 +14,26 @@ public interface IPlanTaskDetailDao extends BaseDao<PlanTaskDetail, Long> {
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
void
deletePlanTaskDetailByPointId
(
List
<
Long
>
pointIds
);
/**
* 根据任务id获取任务详情
* @param planTaskId
* @return
*/
public
List
<
PlanTaskDetail
>
findAllByTaskNo
(
Long
planTaskId
);
/**
* 根据任务id及状态获取计划详情
* @param planTaskId
* @return
*/
public
List
<
PlanTaskDetail
>
findAllByTaskNoAndStatus
(
Long
planTaskId
,
String
status
);
int
countByIsFinish
(
int
status
);
int
countByIsFinishAndTaskNo
(
int
status
,
Long
taskNo
);
@Modifying
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE task_no IN (?1)"
,
nativeQuery
=
true
)
...
...
@@ -42,6 +42,6 @@ public interface IPlanTaskDetailDao extends BaseDao<PlanTaskDetail, Long> {
@Query
(
value
=
"select * FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
List
<
PlanTaskDetail
>
findALLByPointId
(
Long
pointId
);
@Query
(
value
=
"select * FROM p_plan_task_detail WHERE id = ?1 AND
`status`
= ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * FROM p_plan_task_detail WHERE id = ?1 AND
status
= ?2"
,
nativeQuery
=
true
)
List
<
PlanTaskDetail
>
findAllByIdAndStatus
(
long
id
,
String
status
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanServiceImpl.java
View file @
c0b2eab2
...
...
@@ -48,17 +48,17 @@ public class PlanServiceImpl implements IPlanService {
public
Plan
addPlan
(
HashMap
<
String
,
Object
>
map
)
{
Plan
param
=
(
Plan
)
map
.
get
(
"param"
);
String
userDept
=
param
.
getUserDept
();
String
[]
userDeptArr
=
userDept
.
split
(
","
);
// String userGroupId = param.getUserGroupId
();
// String[] userGroupIdArr = userGroupId
.split(",");
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
String
str
:
userDept
Arr
)
{
if
(
stringBuilder
.
length
()
>
0
){
stringBuilder
.
append
(
","
+
str
.
split
(
"@"
)[
0
]);
}
else
{
stringBuilder
.
append
(
str
.
split
(
"@"
)[
0
]);
}
}
// for(String str : userGroupId
Arr) {
//
if(stringBuilder.length() > 0){
// stringBuilder.append(",").append(
str.split("@")[0]);
//
}else{
//
stringBuilder.append(str.split("@")[0]);
//
}
//
//
}
param
.
setUserId
(
stringBuilder
.
toString
());
String
org_code
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
c0b2eab2
...
...
@@ -670,8 +670,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
//3.生成含有人员信息的日期执行数据
// 获取路线中的企业类型和设备类型
//
Route route = routeDao.getOne(plan.getRouteId());
Route
route
=
new
Route
();
Route
route
=
routeDao
.
getOne
(
plan
.
getRouteId
());
//
Route route = new Route();
List
<
UserDetailsDto
>
userDetailsDtos
=
new
ArrayList
<>();
// 获取用户组下所有的用户信息
try
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/PlanTaskUtil.java
View file @
c0b2eab2
...
...
@@ -512,10 +512,10 @@ public static List<HashMap<String, Object>> genWholeExeData(List<HashMap<String,
return
null
;
}
List
<
HashMap
<
String
,
Object
>>
wholeList
=
new
ArrayList
<>();
// String deviceType = route.getDevice
Type();
// String unitType = route.getUnit
Type();
String
deviceType
=
"3000"
;
String
unitType
=
"1232"
;
String
deviceType
=
route
.
getEquip
Type
();
String
unitType
=
route
.
getEnterprise
Type
();
//
String deviceType = "3000";
//
String unitType = "1232";
if
(!
CollectionUtils
.
isEmpty
(
userDetailsDtoList
))
{
Map
<
String
,
List
<
UserDetailsDto
>>
userDetailsDtoMap
=
userDetailsDtoList
.
stream
().
...
...
amos-boot-system-patrol/src/main/resources/application-dev.properties
View file @
c0b2eab2
...
...
@@ -20,7 +20,7 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business
spring.reactor.debug-agent.enabled
=
true
#DB properties:
spring.datasource.url
=
jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=business&allowMultiQueries=true
spring.datasource.url
=
jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=business&allowMultiQueries=true
&stringtype=unspecified
spring.datasource.username
=
admin
spring.datasource.password
=
Yeejoin@2023
spring.datasource.driver-class-name
=
cn.com.vastbase.Driver
...
...
@@ -38,7 +38,7 @@ security.appKey=studio_normalapp_3056965
#redis 配置
spring.redis.database
=
1
spring.redis.host
=
172.16.10.210
spring.redis.port
=
6379
spring.redis.port
=
1
6379
spring.redis.password
=
yeejoin@2020
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-wait
=
-1
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
c0b2eab2
...
...
@@ -112,51 +112,53 @@
<!--统计-巡检计划 -->
<select
id=
"countPlanInfoData"
resultType=
"long"
>
SELECT
count(1) AS total_num
count(1) AS total_num
FROM
p_plan a ,
p_route b
p_plan a ,
p_route b
WHERE
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat(concat('%',#{planName}),'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark like concat(concat('%',#{remark}),'%')
</if>
<if
test=
"deptId!=null"
>
and a.dept_id = #{deptId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(concat('%',#{bizOrgCode}),'%')
</if>
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName}::varchar,'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark}::varchar,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}::varchar,'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}::varchar,a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode}::varchar,'%')
</if>
</select>
<!--巡检计划查询 -->
<select
id=
"getPlanInfo"
resultType=
"java.util.HashMap"
>
SELECT
a.id,a.name , IFNULL(a.plan_begin,"") planBegin,a.status,
(case a.plan_type
when 1 THEN '天'
when 2 THEN '周'
when 3 THEN '月'
else '年' END) as planTypeName,
(case a.is_fixed_date
when 0 THEN '否'
else '是' END) as isFixedDateName,
IFNULL(a.plan_end,"") planEnd,a.plan_end planEnd,a.plan_type planType,
b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark,a.remark1,
b.dept_name bizOrgCode
SELECT
a.id,a.name , IFNULL(a.plan_begin::varchar,'') planBegin,a.status,
(
case a.plan_type
when 1 THEN '天'
when 2 THEN '周'
when 3 THEN '月'
else '年'
end
) as planTypeName,
(
case a.is_fixed_date
when 0 THEN '否'
else '是'
end
) as isFixedDateName,
IFNULL(a.plan_end::varchar,'') planEnd,a.plan_end planEnd,a.plan_type planType,
b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark,a.remark1,
b.dept_name bizOrgCode
FROM
p_plan a,
p_route b
p_plan a,
p_route b
WHERE
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat(concat('%',#{planName})
,'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat(concat('%',#{remark})
,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_C
ode= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}
,a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(concat('%',#{bizOrgCode})
,'%')
</if>
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName}::varchar
,'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark}::varchar
,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}::varchar,'-%')or a.org_c
ode= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}::varchar
,a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode}::varchar
,'%')
</if>
order by a.id desc
<choose>
...
...
@@ -176,18 +178,18 @@
p_route b
WHERE
a.is_delete = 0 and a.route_Id = b.id
<if
test=
"planName!=null"
>
and a.name like concat(
concat('%',#{planName})
,'%')
</if>
<if
test=
"planName!=null"
>
and a.name like concat(
'%',#{planName}::varchar
,'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark like concat(
concat('%',#{remark})
,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code LIKE CONCAT(
#{orgCode}
, '-%' ) or a.org_code= #{orgCode} )
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(#{bizOrgCode},'%')
</if>
<if
test=
"remark!=null"
>
and a.remark like concat(
'%',#{remark}::varchar
,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code LIKE CONCAT(
#{orgCode}::varchar
, '-%' ) or a.org_code= #{orgCode} )
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}
::varchar
,a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(#{bizOrgCode}
::varchar
,'%')
</if>
order by a.id
</select>
<select
id=
"queryPlanListByOrgCode"
resultType=
"Map"
>
select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode},'%')
select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode}
::varchar
,'%')
</select>
<update
id=
"initUpdatePlanStatus"
>
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
c0b2eab2
...
...
@@ -11,40 +11,27 @@
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_point d ON d.id = b.point_id
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo}::varchar,'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName}::varchar,'%')
</if>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate=='' and endDate != null and endDate != ''"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate!=null and beginDate != '' and endDate == ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.check_date = curdate()
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_code like concat (#{bizOrgCode}::varchar,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}::varchar,'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.check_date = curdate()
</if>
</where>
order by b.id) t
</select>
...
...
@@ -91,38 +78,23 @@
<include
refid=
"planTaskInfoSql"
/>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo}::varchar,'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName}::varchar,'%')
</if>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate=='' and endDate != null and endDate != ''"
>
AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"beginDate!=null and beginDate != '' and endDate == ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_
Code like concat (#{bizOrgCode}
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_
code like concat (#{bizOrgCode}::varchar
,'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}
,"-%")or a.org_C
ode= #{orgCode})
and (a.org_Code like concat (#{orgCode}
::varchar,'-%')or a.org_c
ode= #{orgCode})
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.check_date = curdate()
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
c0b2eab2
...
...
@@ -1405,15 +1405,13 @@
pp.id pointId
, pp.name pointName
, pp.point_no pointNo
, wws.name area
, wws.full_name position
, prp.order_no orderNo
, prp.id prpId
, prp.exclude_items excludeItems
FROM
p_point pp
LEFT JOIN wl_warehouse_structure wws
ON pp.risk_source_id = wws.source_id
LEFT JOIN p_route_point prp
ON prp.point_id = pp.id
WHERE prp.route_id = #{routeId}
...
...
@@ -1435,10 +1433,10 @@
SELECT
ppi.id itemId,
pii.name,
pii.picture_json photo,
pii.basis_json basis,
pii.check_method method,
pii.item_type type,
pii.picture_json
as
photo,
pii.basis_json
as
basis,
pii.check_method
as
method,
pii.item_type
as
type,
pii.level,
pii.risk_desc,
pii.input_classify
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/routeMapper.xml
View file @
c0b2eab2
...
...
@@ -436,8 +436,8 @@
and ppc.id = #{classifyId}
</if>
<if
test=
"inputName!=null and inputName !=''"
>
and (pii.name like CONCAT('%', #{inputName}, '%')
or pii.item_no like CONCAT('%', #{inputName}, '%'))
and (pii.name like CONCAT('%', #{inputName}
::varchar
, '%')
or pii.item_no like CONCAT('%', #{inputName}
::varchar
, '%'))
</if>
<if
test=
"isBound!=null and isBound !=''"
>
and temp.routePointItemId >0
...
...
@@ -447,7 +447,7 @@
</select>
<select
id=
"queryRoutesByOrgCode"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Route"
>
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}
::varchar
, '%')
</select>
<!--如果查询的点下没有检查项 返回一个标识 -->
...
...
@@ -460,7 +460,7 @@
left join p_route_point prp on prp.route_id = r.id
left join p_route_point_item prpi on prpi.route_point_id = prp.id
WHERE
r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}
::varchar
, '%')
GROUP BY r.id
order by r.create_date DESC
</select>
...
...
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