diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml index a8205318..6193b8a7 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml @@ -122,12 +122,12 @@ security: - /warm-flow-ui/** - /warm-flow/** - /other/ys7Device/webhook - # todo 仅测试 - - /facility/matrix/** - /**/changxie/callback/** + - /progress/progressPlanDetail/insert/numberAI - /gps/equipment/dataAcceptance - /resource/oss/upload - - /progress/progressPlanDetail/insert/numberAI + # todo 仅测试 + - /facility/matrix/** # 多租户配置 tenant: diff --git a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java index 48f92122..835b270f 100644 --- a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java +++ b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java @@ -2,10 +2,13 @@ package org.dromara.test; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.IdcardUtil; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.dromara.common.utils.IdCardEncryptorUtil; import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.service.ISubConstructionUserService; import org.dromara.contractor.service.ISubUserSalaryDetailService; @@ -63,6 +66,24 @@ public class DemoTest { @Resource private ISubUserSalaryDetailService userSalaryDetailService; + @Resource + private IdCardEncryptorUtil idCardEncryptorUtil; + + @Test + void setIdCardEncryptorUtil() { + List list = constructionUserService.list(); + List update = list.stream().filter(user -> StringUtils.isNotBlank(user.getSfzNumber())) + .filter(user -> IdcardUtil.isValidCard18(user.getSfzNumber())) + .toList().stream() + .map(user -> { + SubConstructionUser updateUser = new SubConstructionUser(); + updateUser.setId(user.getId()); + updateUser.setSfzNumber(idCardEncryptorUtil.encrypt(user.getSfzNumber())); + return updateUser; + }).toList(); + constructionUserService.updateBatchById(update); + } + @Test void test() { Boolean result = photovoltaicPanelPartsService diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/controller/HseSafetyWeeklyReportController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/controller/HseSafetyWeeklyReportController.java index 9cc5d5f5..95e5237b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/controller/HseSafetyWeeklyReportController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/controller/HseSafetyWeeklyReportController.java @@ -1,6 +1,7 @@ package org.dromara.safety.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; @@ -105,4 +106,13 @@ public class HseSafetyWeeklyReportController extends BaseController { @PathVariable Long[] ids) { return toAjax(safetyWeeklyReportService.deleteWithValidByIds(List.of(ids), true)); } + + /** + * 畅写在线修改保存回调 + */ + @PostMapping("/changxie/callback/{id}") + public void singleFileUploads(@NotNull(message = "主键不能为空") + @PathVariable Long id, HttpServletRequest request, HttpServletResponse response) { + safetyWeeklyReportService.singleFileUploads(id, request, response); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/safetyweeklyreport/HseSafetyWeeklyReportVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/safetyweeklyreport/HseSafetyWeeklyReportVo.java index 28bc9978..ad015736 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/safetyweeklyreport/HseSafetyWeeklyReportVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/domain/vo/safetyweeklyreport/HseSafetyWeeklyReportVo.java @@ -64,7 +64,22 @@ public class HseSafetyWeeklyReportVo implements Serializable { /** * 文件位置 */ - private String pathUrl; + private String fileUrl; + + /** + * 文件路径 + */ + private String filePath; + + /** + * 文件后缀 + */ + private String fileSuffix; + + /** + * 文件名 + */ + private String fileName; /** * 备注 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/IHseSafetyWeeklyReportService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/IHseSafetyWeeklyReportService.java index b7b40c32..14e3ae43 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/IHseSafetyWeeklyReportService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/IHseSafetyWeeklyReportService.java @@ -3,6 +3,8 @@ package org.dromara.safety.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.safety.domain.HseSafetyWeeklyReport; @@ -96,4 +98,12 @@ public interface IHseSafetyWeeklyReportService extends IService getVoPage(Page safetyWeeklyReportPage); + /** + * 畅写回调 + * + * @param id 主键 + * @param request 请求 + * @param response 响应 + */ + void singleFileUploads(Long id, HttpServletRequest request, HttpServletResponse response); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseSafetyInspectionServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseSafetyInspectionServiceImpl.java index 32e10288..3c806b6c 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseSafetyInspectionServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/safety/service/impl/HseSafetyInspectionServiceImpl.java @@ -31,7 +31,6 @@ import org.dromara.project.domain.BusProjectTeamMember; import org.dromara.project.service.IBusProjectService; import org.dromara.project.service.IBusProjectTeamMemberService; import org.dromara.project.service.IBusProjectTeamService; -import org.dromara.quality.domain.QltQualityInspection; import org.dromara.safety.constant.HseSafetyConstant; import org.dromara.safety.domain.HseSafetyInspection; import org.dromara.safety.domain.HseTeamMeeting; @@ -514,7 +513,7 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl