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
03b272f6
Commit
03b272f6
authored
Aug 27, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into chenhao
parents
d36d16ec
a26b587a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
217 additions
and
103 deletions
+217
-103
FailureDetailsMapper.java
...s/boot/module/common/api/mapper/FailureDetailsMapper.java
+35
-4
FailureDetailsMapper.xml
...on-api/src/main/resources/mapper/FailureDetailsMapper.xml
+36
-0
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+48
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+14
-0
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+0
-13
FailureRepairlogServiceImpl.java
.../common/biz/service/impl/FailureRepairlogServiceImpl.java
+0
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+2
-1
CheckMapper.java
...oin/amos/maintenance/business/dao/mapper/CheckMapper.java
+1
-1
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+3
-3
ICheckService.java
...mos/maintenance/business/service/intfc/ICheckService.java
+1
-1
AppMessagePushService.java
...yeejoin/amos/maintenance/jpush/AppMessagePushService.java
+61
-62
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+4
-4
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+11
-10
pom.xml
pom.xml
+1
-1
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/mapper/FailureDetailsMapper.java
View file @
03b272f6
...
@@ -22,7 +22,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -22,7 +22,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
/**
* 查询全部 分页
* 查询全部 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param current 当前页
* @param current 当前页
* @return
* @return
*/
*/
...
@@ -30,11 +33,33 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -30,11 +33,33 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
List
<
FailureDetails
>
selectAllPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
List
<
FailureDetails
>
selectAllPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* WEB端查询全部 分页
*
* @param current 当前页
* @param currentStatus 当前任务状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
* @param submissionBranchId 报送部门
* @param sequenceNbr 故障单号
* @return
*/
List
<
FailureDetails
>
selectWebAll
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
submissionName
,
Integer
submissionBranchId
,
Long
sequenceNbr
);
/**
/**
* 查询我发起的 分页
* 查询我发起的 分页
* current 当前页
* current 当前页
* size 条数
* size 条数
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
* @return
*/
*/
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
...
@@ -42,7 +67,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -42,7 +67,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
/**
* 查询待处理 分页
* 查询待处理 分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @param
* @return
* @return
*/
*/
...
@@ -58,7 +86,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
...
@@ -58,7 +86,10 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
String
startTime
,
String
endTime
,
Integer
submissionPid
);
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
/**
* 查询待处理 维修人员分页
* 查询待处理 维修人员分页
*
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @param
* @return
* @return
*/
*/
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureDetailsMapper.xml
View file @
03b272f6
...
@@ -29,9 +29,45 @@
...
@@ -29,9 +29,45 @@
</if>
</if>
</where>
</where>
order by submission_time DESC limit #{current},#{size}
order by submission_time DESC limit #{current},#{size}
</select>
<select
id=
"selectWebAll"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
<where>
<if
test=
"currentStatus!= null "
>
and current_status = #{currentStatus}
</if>
<if
test=
"startTime!= null and endTime != null"
>
and submission_time between #{startTime} and #{endTime}
</if>
<if
test=
"submissionName!= null "
>
and submission_name = #{submissionName}
</if>
<if
test=
"submissionBranchId!= null "
>
and submission_branch_id= #{submissionBranchId}
</if>
<if
test=
"sequenceNbr!= null "
>
and sequence_nbr = #{sequenceNbr}
</if>
</where>
order by submission_time DESC limit #{current},#{size}
</select>
</select>
<select
id=
"selectISubPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
<select
id=
"selectISubPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT sequence_nbr,
SELECT sequence_nbr,
current_status,
current_status,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
03b272f6
...
@@ -6,7 +6,6 @@ import java.util.List;
...
@@ -6,7 +6,6 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
io.swagger.annotations.ApiImplicitParam
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -242,4 +241,52 @@ public class FailureDetailsController extends BaseController {
...
@@ -242,4 +241,52 @@ public class FailureDetailsController extends BaseController {
}
}
}
}
/**
* Web端列表分页查询
*
* @param current 当前页
* @param size 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/weblist"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"Web端列表分页查询"
,
notes
=
"Web端列表分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPageList
(
@RequestParam
(
value
=
"current"
)
Long
current
,
@RequestParam
(
value
=
"size"
)
Long
size
,
Long
currentStatus
,
String
submissionName
,
String
startTime
,
String
endTime
,
Integer
submissionBranchId
,
Long
sequenceNbr
)
{
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
if
(
current
>
0
)
{
page
.
setCurrent
((
current
-
1
)
*
size
);
}
else
{
page
.
setCurrent
(
current
);
}
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
IPage
<
FailureDetails
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForPageList
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
List
<
FailureDetails
>
records
=
failureDetailsIPage
.
getRecords
();
List
<
FailureDetailsDto
>
failureDetailsDtoList
=
new
ArrayList
<>();
records
.
forEach
(
failureDetails
->
{
FailureDetailsDto
failureDetailsDto
=
new
FailureDetailsDto
();
BeanUtils
.
copyProperties
(
failureDetails
,
failureDetailsDto
);
failureDetailsDto
.
setCurrentStatusName
(
Constants
.
currentStatusNameMap
.
get
(
failureDetails
.
getCurrentStatus
()));
failureDetailsDtoList
.
add
(
failureDetailsDto
);
});
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
03b272f6
...
@@ -105,6 +105,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -105,6 +105,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
public
IPage
<
FailureDetails
>
queryForPageList
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
submissionName
,
Integer
submissionBranchId
,
Long
sequenceNbr
)
{
List
<
FailureDetails
>
list
=
baseMapper
.
selectWebAll
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
return
iPage
;
}
/**
/**
* 待处理分页查询
* 待处理分页查询
*/
*/
...
@@ -239,8 +250,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -239,8 +250,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
System
.
out
.
println
(
System
.
currentTimeMillis
());
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
if
(
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
))
{
if
(
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
))
{
return
true
;
return
true
;
}
else
{
}
else
{
throw
new
Exception
(
"执行流程失败"
);
throw
new
Exception
(
"执行流程失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureMaintainServiceImpl.java
View file @
03b272f6
...
@@ -5,14 +5,9 @@ import java.util.Date;
...
@@ -5,14 +5,9 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,14 +15,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,14 +15,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
...
@@ -38,8 +27,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto;
...
@@ -38,8 +27,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain
;
import
com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureRepairlogServiceImpl.java
View file @
03b272f6
...
@@ -5,12 +5,10 @@ import java.util.List;
...
@@ -5,12 +5,10 @@ import java.util.List;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureRepairlogMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureRepairlogMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureRepairlogService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureRepairlogService
;
...
...
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 @
03b272f6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -435,7 +436,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -435,7 +436,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
formDto
.
toString
().
getBytes
(),
2
,
tru
e
);
emqKeeper
.
getMqttClient
().
publish
(
airportAddTopic
,
JSON
.
toJSONString
(
formDto
).
getBytes
(),
2
,
fals
e
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
getMessage
();
e
.
getMessage
();
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/CheckMapper.java
View file @
03b272f6
...
@@ -279,7 +279,7 @@ public interface CheckMapper extends BaseMapper {
...
@@ -279,7 +279,7 @@ public interface CheckMapper extends BaseMapper {
long
getCheckCount
(
HashMap
<
String
,
Object
>
params
);
long
getCheckCount
(
HashMap
<
String
,
Object
>
params
);
List
<
Hash
Map
<
String
,
Object
>>
getChecks
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getChecks
(
HashMap
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getCheckDetail
(
@Param
(
value
=
"id"
)
String
id
);
Map
<
String
,
Object
>
getCheckDetail
(
@Param
(
value
=
"id"
)
String
id
);
...
...
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 @
03b272f6
...
@@ -1090,8 +1090,8 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1090,8 +1090,8 @@ public class CheckServiceImpl implements ICheckService {
}
}
@Override
@Override
public
Page
<
Hash
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
)
{
public
Page
<
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
params
,
CommonPageable
page
)
{
List
<
Hash
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
checkMapper
.
getCheckCount
(
params
);
long
total
=
checkMapper
.
getCheckCount
(
params
);
if
(
total
==
0
)
{
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
page
,
total
);
return
new
PageImpl
<>(
content
,
page
,
total
);
...
@@ -1100,7 +1100,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -1100,7 +1100,7 @@ public class CheckServiceImpl implements ICheckService {
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getChecks
(
params
);
content
=
checkMapper
.
getChecks
(
params
);
if
(
0
<
content
.
size
())
{
if
(
0
<
content
.
size
())
{
for
(
Hash
Map
<
String
,
Object
>
map
:
content
)
{
for
(
Map
<
String
,
Object
>
map
:
content
)
{
if
(
map
.
containsKey
(
"isOk"
))
{
if
(
map
.
containsKey
(
"isOk"
))
{
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/ICheckService.java
View file @
03b272f6
...
@@ -258,7 +258,7 @@ public interface ICheckService {
...
@@ -258,7 +258,7 @@ public interface ICheckService {
*/
*/
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Page
<
Hash
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
pageable
);
Page
<
Map
<
String
,
Object
>>
getCheckPage
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
pageable
);
Map
<
String
,
Object
>
getCheckDetail
(
String
id
);
Map
<
String
,
Object
>
getCheckDetail
(
String
id
);
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/jpush/AppMessagePushService.java
View file @
03b272f6
package
com
.
yeejoin
.
amos
.
maintenance
.
jpush
;
package
com
.
yeejoin
.
amos
.
maintenance
.
jpush
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.PushPayload
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.param.PushMsgParam
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
com.yeejoin.amos.maintenance.business.util.CommonResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -7,23 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -7,23 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.param.PushMsgParam
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.PushPayload
;
@Service
@Service
public
class
AppMessagePushService
{
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
protected
static
final
Logger
log
=
LoggerFactory
@Autowired
.
getLogger
(
AppMessagePushService
.
class
);
private
com
.
yeejoin
.
amos
.
maintenance
.
feign
.
PushFeign
PushFeign
;
@Autowired
private
com
.
yeejoin
.
amos
.
maintenance
.
feign
.
PushFeign
PushFeign
;
// private static String APP_KEY;
// private static String APP_KEY;
//
//
// private static String MASTER_SECRET;
// private static String MASTER_SECRET;
...
@@ -36,20 +34,21 @@ public class AppMessagePushService {
...
@@ -36,20 +34,21 @@ public class AppMessagePushService {
// public void setMasterSecret(String masterSecret) {
// public void setMasterSecret(String masterSecret) {
// this.MASTER_SECRET = masterSecret;
// this.MASTER_SECRET = masterSecret;
// }
// }
@Value
(
"${params.isPush}"
)
@Value
(
"${params.isPush}"
)
private
String
isPush
;
private
String
isPush
;
protected
static
final
String
APP_KEY
=
"1b3f7b961200f4b236811dfe"
;
protected
static
final
String
APP_KEY
=
"1b3f7b961200f4b236811dfe"
;
protected
static
final
String
MASTER_SECRET
=
"8b650e645fb3a43c96be02b2"
;
protected
static
final
String
MASTER_SECRET
=
"8b650e645fb3a43c96be02b2"
;
//
//
private
static
JPushClient
jpushClient
=
new
JPushClient
(
MASTER_SECRET
,
private
static
JPushClient
jpushClient
=
new
JPushClient
(
MASTER_SECRET
,
APP_KEY
);
APP_KEY
);
public
static
String
buildJpushUserKey
(
String
userId
)
{
return
XJConstant
.
JPUSH_USER_KEY
+
"_"
+
userId
;
public
static
String
buildJpushUserKey
(
String
userId
)
{
}
return
XJConstant
.
JPUSH_USER_KEY
+
"_"
+
userId
;
}
// private static JPushClient jpushClient = null;
// private static JPushClient jpushClient = null;
//
//
// public static JPushClient getJPushClient(String APP_KEY, String MASTER_SECRET) {
// public static JPushClient getJPushClient(String APP_KEY, String MASTER_SECRET) {
...
@@ -61,29 +60,29 @@ public class AppMessagePushService {
...
@@ -61,29 +60,29 @@ public class AppMessagePushService {
// }
// }
/*public void sendMessage(List<PushMsgParam> responses)
/*public void sendMessage(List<PushMsgParam> responses)
{
{
PushFeign.sendMessage(responses);
PushFeign.sendMessage(responses);
try
try
{
{
if(responses!=null && "true".equals(isPush))
if(responses!=null && "true".equals(isPush))
{
{
for(PushMsgParam response:responses)
for(PushMsgParam response:responses)
{
{
PushPayload payload = buildPushPayload(response);
PushPayload payload = buildPushPayload(response);
jpushClient.sendPush(payload);
jpushClient.sendPush(payload);
}
}
}
}
}
}
catch (Exception e){
catch (Exception e){
log.error(e.getMessage(),e);
log.error(e.getMessage(),e);
e.printStackTrace();
e.printStackTrace();
}
}
}
}
*/
*/
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
return
(
PushPayload
)
commonResponse
.
getDataList
();
return
(
PushPayload
)
commonResponse
.
getDataList
();
/*if(JPushTypeEnum.ALL.getCode().equals(response.getType())){
/*if(JPushTypeEnum.ALL.getCode().equals(response.getType())){
return PushPayload.newBuilder()
return PushPayload.newBuilder()
.setPlatform(Platform.android())
.setPlatform(Platform.android())
...
@@ -102,19 +101,19 @@ public class AppMessagePushService {
...
@@ -102,19 +101,19 @@ public class AppMessagePushService {
.build();
.build();
}*/
}*/
}
}
public
void
sendMessage
(
PushMsgParam
response
)
{
public
void
sendMessage
(
PushMsgParam
response
)
{
try
{
try
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
))
{
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
03b272f6
...
@@ -100,10 +100,10 @@
...
@@ -100,10 +100,10 @@
<changeSet
author=
"chenhao"
id=
"2021-08-26-chenhao-1"
>
<changeSet
author=
"chenhao"
id=
"2021-08-26-chenhao-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"cb_firefighters_contract"
columnName=
"start_time"
/>
<columnExists
tableName=
"cb_firefighters_contract"
columnName=
"start_time"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
modify table cb_firefighters_contract add one columns
</comment>
<comment>
modify table cb_firefighters_contract add one columns
</comment>
<sql>
<sql>
ALTER TABLE `cb_firefighters_contract` ADD start_time date COMMENT '起始时间';
ALTER TABLE `cb_firefighters_contract` ADD start_time date COMMENT '起始时间';
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
03b272f6
...
@@ -1912,12 +1912,13 @@
...
@@ -1912,12 +1912,13 @@
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
pp.original_id equipId,
pp.original_id equipId,
CONCAT
(pp.address, pp.building_name
) buildingName,
CONCAT
_WS('',pp.building_name,pp.address
) buildingName,
pc.org_code AS orgCode
pc.org_code AS orgCode
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
) a
) a
<include
refid=
"mobile-check-record-where"
/>
<include
refid=
"mobile-check-record-where"
/>
order by checkDate
limit #{offset},#{pageSize}
limit #{offset},#{pageSize}
</select>
</select>
...
@@ -1947,20 +1948,20 @@
...
@@ -1947,20 +1948,20 @@
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
AND (
AND (
(
(
a.
beginTim
e
<![CDATA[>=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[>=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[<=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[<=]]>
#{endTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{endTime}
a.
checkDat
e
<![CDATA[<=]]>
#{endTime}
AND a.
endTim
e
<![CDATA[>=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[>=]]>
#{endTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[<=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[>]]>
#{beginTime}
AND a.
checkDat
e
<![CDATA[>]]>
#{beginTime}
)
)
OR (
OR (
a.
beginTim
e
<![CDATA[<=]]>
#{beginTime}
a.
checkDat
e
<![CDATA[<=]]>
#{beginTime}
AND a.
endTim
e
<![CDATA[>=]]>
#{endTime}
AND a.
checkDat
e
<![CDATA[>=]]>
#{endTime}
)
)
)
)
</if>
</if>
...
@@ -2013,7 +2014,7 @@
...
@@ -2013,7 +2014,7 @@
pp.belong_system_id systemId,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
CONCAT
(pp.address, pp.building_name
) buildingName,
CONCAT
_WS('',pp.building_name,pp.address
) buildingName,
pc.org_code AS orgCode
pc.org_code AS orgCode
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
...
...
pom.xml
View file @
03b272f6
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springboot.version>
2.3.11.RELEASE
</springboot.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.20
Ty-SNAPSHOT
</tyboot-version>
<tyboot-version>
1.1.20
</tyboot-version>
<amos.version>
1.6.0
</amos.version>
<amos.version>
1.6.0
</amos.version>
<itext.version>
7.1.1
</itext.version>
<itext.version>
7.1.1
</itext.version>
</properties>
</properties>
...
...
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