Commit f0412bfb authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.4' into MVP1.4

parents f7a5357a 8dcd5202
......@@ -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) {
runTimeExceptionDiy(fileName + ":" + FILE_NAME_ERROT);
return 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)) {
runTimeExceptionDiy(busFileVoR.getMsg());
return 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);
}
......
......@@ -51,7 +51,7 @@ spring:
#所有上传文件最大大小
max-request-size: 100MB
#单个文件最大大小
max-file-size: 50MB
max-file-size: 100MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment