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
74e56458
Commit
74e56458
authored
Jan 05, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加是使用信息表新加字段赋值
parent
3efafbff
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
15 deletions
+42
-15
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+1
-1
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+12
-0
EquipRegularlyRemindServicelmpl.java
...yjc/biz/service/impl/EquipRegularlyRemindServicelmpl.java
+10
-8
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+5
-5
UseInfoMapper.java
...eejoin/amos/boot/module/ymt/api/mapper/UseInfoMapper.java
+1
-0
UseInfoMapper.xml
...odule-ymt-api/src/main/resources/mapper/UseInfoMapper.xml
+13
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
View file @
74e56458
...
...
@@ -105,7 +105,7 @@ public class CommonController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/test1"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询检验检测机构基本信息"
,
notes
=
"查询检验检测机构基本信息"
)
public
ResponseModel
sendReminderMessage
()
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
View file @
74e56458
...
...
@@ -10,11 +10,14 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -68,4 +71,13 @@ public class CommonserviceImpl {
public
TzBaseEnterpriseInfo
getInspectionUnitBySequenceNbr
(
Long
sequenceNbr
)
{
return
enterpriseInfoMapper
.
selectBySeq
(
sequenceNbr
);
}
@Async
public
void
sendMessage
(
HashMap
<
String
,
String
>
smsParams
,
List
<
String
>
phones
){
for
(
String
phone
:
phones
)
{
smsParams
.
put
(
"mobile"
,
phone
);
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/EquipRegularlyRemindServicelmpl.java
View file @
74e56458
...
...
@@ -2,13 +2,16 @@ package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.UseInfoModel
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
...
...
@@ -20,11 +23,14 @@ import java.util.stream.Collectors;
@EnableScheduling
@Service
@Slf4j
public
class
EquipRegularlyRemindServicelmpl
{
@Autowired
private
UseInfoMapper
useInfoMapper
;
@Autowired
private
TzsUserInfoMapper
tzsUserInfoMapper
;
@Autowired
CommonserviceImpl
commonservice
;
@Scheduled
(
cron
=
"0 0 8 * * ?"
)
public
void
sendReminderMessage
(){
...
...
@@ -39,7 +45,8 @@ public void sendReminderMessage(){
Date
date
=
DateUtils
.
dateAddDays
(
curDate
,
31
);
List
<
String
>
types
=
new
ArrayList
<>();
List
<
String
>
status
=
new
ArrayList
<>();
types
.
add
(
"DTJC"
);
types
.
add
(
"DQJY"
);
//查询需要发送消息的设备
// LambdaQueryWrapper<UseInfo> query = new LambdaQueryWrapper<>();
// query.in(UseInfo::getLastInspectType,types);
...
...
@@ -81,11 +88,8 @@ public void sendReminderMessage(){
smsParams
.
put
(
"smsCode"
,
"EQU_TZS_001"
);
smsParams
.
put
(
"lq"
,
String
.
valueOf
(
lq
));
smsParams
.
put
(
"cq"
,
String
.
valueOf
(
cq
));
for
(
String
phone
:
phones
)
{
smsParams
.
put
(
"mobile"
,
phone
);
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
}
commonservice
.
sendMessage
(
smsParams
,
phones
);
//发送平台消息
if
(
lqEquips
.
containsKey
(
s
)){
...
...
@@ -112,16 +116,14 @@ public void sendReminderMessage(){
messageModel
.
setMsgType
(
"EQUIP_HINT"
);
messageModel
.
setMsgTypeLabel
(
"设备检验"
);
Systemctl
.
messageClient
.
create
(
messageModel
);
log
.
info
(
"信息发送完成"
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
74e56458
...
...
@@ -28,10 +28,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.CategoryOtherInfo;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
...
...
@@ -81,7 +78,8 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
JyjcInspectionResultAttachmentServiceImpl
attachmentService
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
UseInfoMapper
useInfoMapper
;
@Autowired
CategoryOtherInfoMapper
categoryOtherInfoMapper
;
...
...
@@ -206,6 +204,8 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
extracted
(
model
,
info
,
jybgFile
);
inspectionDetectionInfoMapper
.
updateById
(
info
);
}
//更新使用信息表
useInfoMapper
.
updateByRecord
(
model
.
getEquipUnicode
(),
model
.
getNextInspectionDate
(),
model
.
getInspectionType
(),
model
.
getApplicationNo
());
return
model
;
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/UseInfoMapper.java
View file @
74e56458
...
...
@@ -17,4 +17,5 @@ public interface UseInfoMapper extends BaseMapper<UseInfo> {
List
<
UseInfoModel
>
selecEquipInfotList
(
List
<
String
>
types
,
List
<
String
>
statusList
,
Date
date
,
Date
curDate
);
void
updateByRecord
(
String
record
,
Date
nextInspectDate
,
String
lastInspectType
,
String
lastInspectReportNo
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/UseInfoMapper.xml
View file @
74e56458
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper"
>
<update
id=
"updateByRecord"
>
UPDATE
idx_biz_jg_use_info
SET
NEXT_INSPECT_DATE = #{nextInspectDate},
LAST_INSPECT_TYPE = #{lastInspectType},
LAST_INSPECT_REPORT_NO = #{lastInspectReportNo}
WHERE
RECORD = #{record}
</update>
<select
id=
"selecEquipInfotList"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.UseInfoModel"
>
SELECT
...
...
@@ -8,6 +19,7 @@
use.USE_UNIT_CREDIT_CODE,
other.SUPERVISORY_CODE,
register.PRODUCT_NAME,
use.NEXT_INSPECT_DATE as nextInspectDate,
base.contact_phone as phone
FROM
idx_biz_jg_use_info use
...
...
@@ -29,7 +41,7 @@
#{item}
</foreach>
</if>
and (
NEXT_INSPECT_DATE > #{date}
or #{curDate} > NEXT_INSPECT_DATE)
and (
#{date} >= NEXT_INSPECT_DATE
or #{curDate} > NEXT_INSPECT_DATE)
</where>
</select>
</mapper>
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