Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
f0412bfb
Commit
f0412bfb
authored
Jan 13, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.4' into MVP1.4
parents
f7a5357a
8dcd5202
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
TBusSettleServiceImpl.java
...1/business/service/settle/impl/TBusSettleServiceImpl.java
+11
-8
application.yml
...ness/yifu-business-biz/src/main/resources/application.yml
+1
-1
BusinessTask.java
...java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
+1
-1
No files found.
yifu-business/yifu-business-biz/src/main/java/com/yifu/cloud/plus/v1/business/service/settle/impl/TBusSettleServiceImpl.java
View file @
f0412bfb
...
...
@@ -15,7 +15,9 @@ import com.yifu.cloud.plus.v1.business.vo.BusFileVo;
import
com.yifu.cloud.plus.v1.business.vo.settle.SettleAdditionTypeEnum
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RandomUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.AllArgsConstructor
;
...
...
@@ -132,25 +134,26 @@ public class TBusSettleServiceImpl extends ServiceImpl<TBusSettleMapper, TBusSet
if
(!
busSettle
.
getSettleMonth
().
matches
(
SETTLE_MONTH_MATCH
))
{
return
R
.
failed
(
FILE_NAME_DATE_FORMAT_ERROR
);
}
boolean
saveBusSettleSuccess
=
this
.
save
(
busSettle
);
if
(!
saveBusSettleSuccess
)
{
return
R
.
failed
(
SAVE_SETTLE_ERROR
);
}
busSettle
.
setId
(
DateUtil
.
getCurrentDateString
()
+
RandomUtil
.
getSix
());
List
<
File
>
files
=
FileUtil
.
loopFiles
(
unzip
);
for
(
File
fl
:
files
)
{
String
fileName
=
FileUtil
.
getName
(
fl
);
SettleAdditionTypeEnum
settleAdditionTypeEnum
=
SettleAdditionTypeEnum
.
getTypeEnumByFileName
(
fileName
);
if
(
null
==
settleAdditionTypeEnum
)
{
r
unTimeExceptionDiy
(
fileName
+
":"
+
FILE_NAME_ERROT
);
r
eturn
R
.
failed
(
fileName
+
":"
+
FILE_NAME_ERROT
);
}
R
<
BusFileVo
>
busFileVoR
=
this
.
busAttaInfoService
.
uploadFile
(
fileCovertMultipartFile
(
fl
)
,
HRB_SETTLE_FILE_PATH
,
settleAdditionTypeEnum
.
getType
(),
busSettle
.
getId
());
if
(!
R
.
isSuccess
(
busFileVoR
))
{
r
unTimeExceptionDiy
(
busFileVoR
.
getMsg
());
r
eturn
R
.
failed
(
busFileVoR
.
getMsg
());
}
}
boolean
saveBusSettleSuccess
=
this
.
save
(
busSettle
);
if
(!
saveBusSettleSuccess
)
{
return
R
.
failed
(
SAVE_SETTLE_ERROR
);
}
}
else
{
return
R
.
failed
(
ZIP_FILE_NAME_VALID_FAILD
);
}
...
...
yifu-business/yifu-business-biz/src/main/resources/application.yml
View file @
f0412bfb
...
...
@@ -51,7 +51,7 @@ spring:
#所有上传文件最大大小
max-request-size
:
100MB
#单个文件最大大小
max-file-size
:
5
0MB
max-file-size
:
10
0MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/BusinessTask.java
View file @
f0412bfb
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/
@Component
(
value
=
"businessTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprBusinessProperties
.
class
)
public
class
BusinessTask
{
@Autowired
private
DaprBusinessProperties
daprBusinessProperties
;
/** * @Description: 发送短信定时任务 * @Author: huyc * @Date: 2023/1/5 9:35 * @return: void **/
public
void
buildMonitorData
(){
log
.
info
(
"------------初始化年假信息定时任务-开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/vacationMonitor/inner/buildMonitorDataForCurrentYear"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------初始化年假信息定时任务-结束------------"
);
}
// /** // * @author fxj // * @description 每天更新证件状态 // * @date 2021-08-23 // * @return void // **/ // public void updateCertStatusTask() { // log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); // remoteBusinessService.updateCertStatusTask(SecurityConstants.FROM_IN); // log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); // } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", Object.class, SecurityConstants.FROM_IN); log.info("------------短信状态更新定时任务-结束------------"); } }
\ No newline at end of file
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/
@Component
(
value
=
"businessTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprBusinessProperties
.
class
)
public
class
BusinessTask
{
@Autowired
private
DaprBusinessProperties
daprBusinessProperties
;
/** * @Description: 发送短信定时任务 * @Author: huyc * @Date: 2023/1/5 9:35 * @return: void **/
public
void
buildMonitorData
(){
log
.
info
(
"------------初始化年假信息定时任务-开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/vacationMonitor/inner/buildMonitorDataForCurrentYear"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------初始化年假信息定时任务-结束------------"
);
}
/** * @author fxj * @description 每天更新证件状态 * @date 2021-08-23 * @return void **/
public
void
updateCertStatusTask
()
{
log
.
info
(
"------------扫描定时任务开始:定时更新B端证据状态信息开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/tcertinfo/inner/updateCertStatusTask"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------扫描定时任务开始:定时更新B端证据状态信息结束------------"
);
}
/** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/
public
void
doBatchSendBusSms
(){
log
.
info
(
"------------发送短信定时任务-开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/tbuswarning/inner/doBatchSendBusSms"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------发送短信定时任务-结束------------"
);
}
/** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/
public
void
doUpdateSendBusSmsStatus
(){
log
.
info
(
"------------短信状态更新定时任务-开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprBusinessProperties
.
getAppUrl
(),
daprBusinessProperties
.
getAppId
(),
"/tbuswarning/inner/doUpdateSendBusSmsStatus"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------短信状态更新定时任务-结束------------"
);
}
}
\ No newline at end of file
...
...
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