已修改23个文件
已重命名2个文件
已删除1个文件
已添加8个文件
| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSample1 insSample) { |
| | | String[] models = insSample.getModel().split("-(?=[^-]*$)");//æåæåä¸ä¸ªã-ã |
| | | String[] splits = insSample.getFactory().split(" - "); |
| | | String[] splits = StringUtils.isNotEmpty(insSample.getFactory())?insSample.getFactory().split(" - "):new String[0]; |
| | | List<StandardProductList> list = new ArrayList<>(); |
| | | if(splits.length<4){ |
| | | list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0],"",""); |
| | |
| | | } |
| | | } |
| | | } |
| | | String[] split1 = insSample.getFactory().split(" - "); |
| | | //夿é¿åº¦ |
| | | if (split1.length > 4) { |
| | | if (ObjectUtils.isNotEmpty(split1[3])) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSample())&&Objects.equals(list1.getSample(),split1[3])).collect(Collectors.toList()); |
| | | }else if (split1[3].isEmpty()) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSampleType())&&Objects.equals(list1.getSampleType(),split1[2])).collect(Collectors.toList()); |
| | | if (splits.length > 4) { |
| | | if (ObjectUtils.isNotEmpty(splits[3])) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSample())&&Objects.equals(list1.getSample(),splits[3])).collect(Collectors.toList()); |
| | | }else if (splits[3].isEmpty()) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSampleType())&&Objects.equals(list1.getSampleType(),splits[2])).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | list = list.stream().filter(a -> { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>设å¤è¿è¡æ»è§</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
| | | <style> |
| | | *{ |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | body { |
| | | -webkit-text-size-adjust: 100%!important; |
| | | text-size-adjust: 100%!important; |
| | | -moz-text-size-adjust: 100%!important; |
| | | } |
| | | .main{ |
| | | width: 100%; |
| | | background-color: #f5f7fa; |
| | | padding:10px 0; |
| | | } |
| | | .chartContainer{ |
| | | width:92%; |
| | | margin-left:4%; |
| | | height:200px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | } |
| | | .info{ |
| | | width:92%; |
| | | margin-left:4%; |
| | | height:calc(100% - 230px); |
| | | background-color: #fff; |
| | | margin-top: 10px; |
| | | padding-bottom: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | .info div{ |
| | | display: flex; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | border-bottom: 1px solid #dddddd; |
| | | height: 40px; |
| | | } |
| | | .info div span{ |
| | | width:100px; |
| | | color: #797979; |
| | | font-size: clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | line-height: 40px; |
| | | } |
| | | .info div p{ |
| | | width:calc(100% - 100px); |
| | | height:40px; |
| | | font-size: clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | font-weight: bold; |
| | | line-height: 40px; |
| | | text-align: right; |
| | | } |
| | | .success{ |
| | | color:#21a700 |
| | | } |
| | | .failed{ |
| | | color:#d80000 |
| | | } |
| | | .other{ |
| | | color: #e8a849; |
| | | } |
| | | .stop{ |
| | | color: lightgray; |
| | | } |
| | | .download-link{ |
| | | text-decoration:none; |
| | | width:80px; |
| | | height:25px; |
| | | margin:7.5px 10px; |
| | | background-color: #0066ff; |
| | | color:#fff; |
| | | font-size:clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | border:none; |
| | | border-radius: 3px; |
| | | line-height: 25px; |
| | | text-align: center; |
| | | } |
| | | .insProduct{ |
| | | overflow-x: scroll; |
| | | overflow-y: hidden; |
| | | display: inline-block |
| | | } |
| | | .info div:last-child{ |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <input type="hidden" id="progress" th:value="${progress}"> |
| | | <div class="main"> |
| | | <div class="chartContainer" id="chartContainer" ></div> |
| | | <div class="info"> |
| | | <div> |
| | | <span>设å¤åç§°</span> |
| | | <p th:text="${deviceName}"></p> |
| | | </div> |
| | | <div> |
| | | <span>设å¤ç¼å·</span> |
| | | <p th:text="${deviceCode}"></p> |
| | | </div> |
| | | <div> |
| | | <span>å¯ç¨æ¶é¿(å¹´)</span> |
| | | <p th:text="${usedYears}"></p> |
| | | </div> |
| | | <div> |
| | | <span>设å¤è¿è¡ç¶æ</span> |
| | | <p th:if="${runStatus==0}" class="success">æ£å¸¸</p> |
| | | <p th:if="${runStatus==1}" class="other">ç»´ä¿®</p> |
| | | <p th:if="${runStatus==2}" class="stop">åç¨</p> |
| | | <p th:if="${runStatus==3}" class="failed">æ¥åº</p> |
| | | </div> |
| | | <div> |
| | | <span> |
| | | æè¿æ ¡åæ¥æ |
| | | </span> |
| | | <input type="hidden" id="downloadUrl" th:value="${downloadUrl}"> |
| | | <a th:href="${downloadUrl}" onclick="return hasDownload()" th:download="${fileName}" rel="noopener noreferrer" class="download-link">è¯ä¹¦ä¸è½½</a> |
| | | <p th:text="${lastCalibrationDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡æ ¡åæ¥æ</span> |
| | | <p th:text="${nextCalibrationDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æ ¡åæ»ç»è®º</span> |
| | | <p th:if="${calibrateStatus=='åæ ¼'}" class="success" th:text="${calibrateStatus}"></p> |
| | | <p th:if="${calibrateStatus=='ä¸åæ ¼'}" class="failed" th:text="${calibrateStatus}"></p> |
| | | <p th:if="${calibrateStatus=='å
¶ä»'}" class="other" th:text="${calibrateStatus}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æè¿æ ¸æ¥æ¥æ</span> |
| | | <p th:text="${lastExamineDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡æ ¸æ¥æ¥æ</span> |
| | | <p th:text="${nextExamineDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æ ¸æ¥æ»ç»è®º</span> |
| | | <p th:if="${examineStatus=='åæ ¼'}" class="success" th:text="${examineStatus}"></p> |
| | | <p th:if="${examineStatus=='ä¸åæ ¼'}" class="failed" th:text="${examineStatus}"></p> |
| | | <p th:if="${examineStatus=='å
¶ä»'}" class="other" th:text="${examineStatus}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æè¿ç»´æ¤æ¥æ</span> |
| | | <p th:text="${maintenanceDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡ç»´æ¤æ¥æ</span> |
| | | <p th:text="${nextMaintenanceDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>ç»´æ¤ç±»å</span> |
| | | <p th:text="${maintenanceType}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æµé项ç®</span> |
| | | <p th:text="${insProduct}" class="insProduct"></p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | <script th:src="@{/static/js/echarts.js}"></script> |
| | | <script th:src="@{/static/js/device_qr_show.js}"></script> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
| | | <title>æ ·åä¿¡æ¯</title> |
| | | <style> |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·åç¼å·ï¼</span> |
| | | <span th:text="${sampleCode}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">å§æåå·ï¼</span> |
| | | <span th:text="${entrustCode}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">è§æ ¼åå·ï¼</span> |
| | | <span th:text="${model}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·ååç§°ï¼</span> |
| | | <span th:text="${sample}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ£æµé¡¹ç®ï¼</span> |
| | | <span th:text="${inspectionItem}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·åç¶æï¼</span> |
| | | <input type="checkbox" disabled name="insState" value="0" th:checked="${insState == 0}"> |
| | | <label>å¾
æ£</label> |
| | | <input type="checkbox" disabled name="insState" value="1" th:checked="${insState == 1}"> |
| | | <label>卿£</label> |
| | | <input type="checkbox" disabled name="insState" value="2" th:checked="${insState == 2}"> |
| | | <label>å·²æ£</label> |
| | | <input type="checkbox" disabled name="isLeave" value="1" th:checked="${isLeave == 1}"> |
| | | <label>çæ ·</label> |
| | | |
| | | </p> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>æ£æµæ¥å</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <style> |
| | | .descriptions { |
| | | width: 65%; |
| | | text-align: left; |
| | | } |
| | | .descriptions-title { |
| | | width: 35%; |
| | | text-align: center; |
| | | } |
| | | .table { |
| | | font-size: 1em; |
| | | color: #1c2023; |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | } |
| | | .table tr { |
| | | height: 3em; |
| | | } |
| | | table tr:nth-child(odd) .descriptions-title{ |
| | | background-color: #dddddd; |
| | | } |
| | | table tr:nth-child(odd) .descriptions{ |
| | | background-color: #f0f0f0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <h4 th:text="'æ¥åç¼å·ï¼' + ${entrustCode}"></h4> |
| | | <table class="table"> |
| | | <tr> |
| | | <td class="descriptions-title">è¯ æ · å ç§°<br/>Name of Product</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${productName}"></span> |
| | | <br/> |
| | | <span th:text="${productNameEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">å å·<br/>Type and Size</td> |
| | | <td class="descriptions" th:text="${insOrderModel}"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">å§ æ å ä½<br/>Client</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${company}"></span> |
| | | <br/> |
| | | <span th:text="${companyEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">æ£ éª ç±» å«<br/>Kind of Test</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${orderType}"></span> |
| | | <br/> |
| | | <span th:text="${orderTypeEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">æ¶ æ · æ¥ æ<br/>Received date</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${getTime}"></span> |
| | | <br/> |
| | | <span th:text="${getTimeEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">ç¾ å æ¥ æ<br/>Date of issue</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${issuingDate}"></span> |
| | | <br/> |
| | | <span th:text="${issuingDateEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </body> |
| | | </html> |
| | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ å²ä½èè´£") |
| | | @GetMapping("personJobResponsibilitiesSelect") |
| | | public Result<IPage<PersonJobResponsibilitiesDto>> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName) { |
| | | public Result<IPage<PersonJobResponsibilitiesDto>> personJobResponsibilitiesSelect(Page page, Integer userId, String departmentId, String userName) { |
| | | IPage<PersonJobResponsibilitiesDto> iPage = personJobResponsibilitiesService.personJobResponsibilitiesSelect(page, userId, departmentId, userName); |
| | | return Result.success(iPage); |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | Integer departId, |
| | | Integer state) { |
| | | Integer planId = 0; |
| | | if(id.equals("null") || StringUtils.isEmpty(id)) { |
| | | if(ObjectUtils.isNull(id) || StringUtils.isEmpty(id)) { |
| | | planId = null; |
| | | } else { |
| | | planId = Integer.parseInt(id); |
| | |
| | | |
| | | @ApiOperation(value = "å¹è®ä¸èæ ¸è®°å½ è®¤é¢") |
| | | @PostMapping("claimOfTrainingAndAssessmentRecords") |
| | | public Result<?> claimOfTrainingAndAssessmentRecords(@RequestParam("claimAndClaim") Boolean claimAndClaim, |
| | | @RequestParam("courseId") Integer courseId) { |
| | | public Result<?> claimOfTrainingAndAssessmentRecords(@RequestBody Map<String,Object> map) { |
| | | Boolean claimAndClaim = (Boolean)map.get("claimAndClaim"); |
| | | Integer courseId = (Integer)map.get("courseId"); |
| | | personTrainingRecordService.claimOfTrainingAndAssessmentRecords(claimAndClaim, courseId); |
| | | return Result.success(); |
| | | } |
| | |
| | | package com.ruoyi.personnel.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlan; |
| | |
| | | PersonSupervisePlan byId = personSupervisePlanService.getById(id); |
| | | // éä¿¡ç为许å çµåçæ¯å建德 |
| | | Integer approvalId = null; |
| | | if (ObjectUtils.isNull(byId.getDepartId())){ |
| | | throw new ErrorException("è¯¥ç¨æ·æ²¡æé
ç½®ç¸å
³å®éªå®¤é¨é¨ä¿¡æ¯!!"); |
| | | } |
| | | Integer departId = byId.getDepartId(); |
| | | if(departId.equals(18)) { |
| | | approvalId = 11; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PersonJobResponsibilitiesMapper extends BaseMapper<PersonJobResponsibilities> { |
| | | |
| | | IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName); |
| | | IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, @Param("userId") Integer userId, @Param("departmentId") String departmentId, @Param("userName") String userName); |
| | | } |
| | |
| | | */ |
| | | public interface PersonPersonnelCapacityMapper extends BaseMapper<PersonPersonnelCapacity> { |
| | | |
| | | IPage<PersonPersonnelCapacityDto> personPersonnelCapacityPage(Page page, Integer departLimsId, Integer userId, String userName); |
| | | IPage<PersonPersonnelCapacityDto> personPersonnelCapacityPage(Page page, @Param("departLimsId") Integer departLimsId, @Param("userId") Integer userId, @Param("userName") String userName); |
| | | |
| | | /** |
| | | * æ¥è¯¢äººåè½åæ¥å£ |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonPostAuthorizationRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonPostAuthorizationRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PersonPostAuthorizationRecordMapper extends BaseMapper<PersonPostAuthorizationRecord> { |
| | | |
| | | IPage<PersonPostAuthorizationRecordDto> personPostAuthorizationRecordPage(Page page, Integer departLimsId, Integer userId, String userName); |
| | | IPage<PersonPostAuthorizationRecordDto> personPostAuthorizationRecordPage(Page page, @Param("departLimsId") Integer departLimsId, @Param("userId") Integer userId, @Param("userName") String userName); |
| | | } |
| | |
| | | import com.ruoyi.personnel.dto.PersonRewardPunishmentRecordDto; |
| | | import com.ruoyi.personnel.excel.PersonRewardPunishmentRecordExcel; |
| | | import com.ruoyi.personnel.pojo.PersonRewardPunishmentRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | */ |
| | | public interface PersonRewardPunishmentRecordMapper extends BaseMapper<PersonRewardPunishmentRecord> { |
| | | |
| | | IPage<PersonRewardPunishmentRecordDto> rewardPunishmentPage(Page page, Integer userId, String userName, Date startTime, Date endTime, Integer departmentId); |
| | | IPage<PersonRewardPunishmentRecordDto> rewardPunishmentPage(Page page, @Param("userId") Integer userId, @Param("userName") String userName, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("departmentId") Integer departmentId); |
| | | |
| | | List<PersonRewardPunishmentRecordExcel> rewardPunishmentExport(Integer userId, Integer departmentId, String userName, Date startTime, Date endTime); |
| | | List<PersonRewardPunishmentRecordExcel> rewardPunishmentExport(@Param("userId") Integer userId, @Param("departmentId") Integer departmentId, @Param("userName") String userName, @Param("startTime") Date startTime, @Param("endTime") Date endTime); |
| | | } |
| | |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.personnel.dto.PersonSupervisePlanDetailsDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisePlanDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PersonSupervisePlanDetailsMapper extends MyBaseMapper<PersonSupervisePlanDetails> { |
| | | |
| | | IPage<PersonSupervisePlanDetailsDto> pageByDate(Page page, String date, String project, Integer planId); |
| | | IPage<PersonSupervisePlanDetailsDto> pageByDate(@Param("page") Page page, @Param("date") String date, @Param("project") String project, @Param("planId") Integer planId); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.dto.PersonSupervisionRecordDto; |
| | | import com.ruoyi.personnel.pojo.PersonSupervisionRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface PersonSupervisionRecordMapper extends BaseMapper<PersonSupervisionRecord> { |
| | | |
| | | IPage<PersonSupervisionRecordDto> personSupervisionRecordPage(Page page, Integer userId, Integer departLimsId, String userName); |
| | | IPage<PersonSupervisionRecordDto> personSupervisionRecordPage(Page page, @Param("userId") Integer userId, @Param("departLimsId") Integer departLimsId, @Param("userName") String userName); |
| | | |
| | | /** |
| | | * æ¥è¯¢çç£è®°å½è¯¦æ
|
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.personnel.pojo.PersonTrackRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface PersonTrackRecordMapper extends BaseMapper<PersonTrackRecord> { |
| | | |
| | | IPage<PersonTrackRecord> personTrackRecordSelect(Page page, String userId, String departLimsId); |
| | | IPage<PersonTrackRecord> personTrackRecordSelect(Page page, @Param("userId") String userId, @Param("departLimsId") String departLimsId); |
| | | |
| | | List<PersonTrackRecord> personTrackRecordExport(String userId, String departLimsId); |
| | | List<PersonTrackRecord> personTrackRecordExport(@Param("userId") String userId, @Param("departLimsId") String departLimsId); |
| | | |
| | | } |
| | |
| | | public interface PersonTrainingDetailedMapper extends MyBaseMapper<PersonTrainingDetailed> { |
| | | |
| | | IPage<PersonTrainingDetailedDto> queryTheAnnualPlanDetailsTable(Page page, |
| | | String trainingLecturerName, |
| | | String courseCode, String trainingDate, |
| | | Integer id, |
| | | Integer userId, |
| | | Integer loginUserId, |
| | | Integer state); |
| | | @Param("trainingLecturerName") String trainingLecturerName, |
| | | @Param("courseCode") String courseCode, @Param("trainingDate") String trainingDate, |
| | | @Param("id") Integer id, |
| | | @Param("userId") Integer userId, |
| | | @Param("loginUserId") Integer loginUserId, |
| | | @Param("state") Integer state); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»è¡¨idæ¥è¯¢è¯¦æ
|
| | |
| | | */ |
| | | public interface PersonTrainingRecordMapper extends BaseMapper<PersonTrainingRecord> { |
| | | |
| | | List<PersonTrainingRecordDto> trainingAndAssessmentRecordsPage(Integer trainingDetailedId, String userName); |
| | | List<PersonTrainingRecordDto> trainingAndAssessmentRecordsPage(@Param("trainingDetailedId") Integer trainingDetailedId, @Param("userName") String userName); |
| | | |
| | | IPage<PersonTrainingRecordListDto> personnelTrainingPersonnel(Page page, String userName, Integer userId, Integer departLimsId); |
| | | IPage<PersonTrainingRecordListDto> personnelTrainingPersonnel(Page page, @Param("userName") String userName, @Param("userId") Integer userId, @Param("departLimsId") Integer departLimsId); |
| | | |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetails(Page page, Integer userId); |
| | | |
| | |
| | | * @param year |
| | | * @return |
| | | */ |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetailsOfUserIdAndYear(Page page, Integer userId, Integer year); |
| | | IPage<TrainingRecordPersonDetailedDto> queryPersonnelDetailsOfUserIdAndYear(Page page, @Param("userId") Integer userId, @Param("year") Integer year); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·idå年份æ¥è¯¢äººåæç» å¹è®è®°å½å¯¼åº |
| | | * @param userId |
| | | * @param trainingDate |
| | | * @param |
| | | * @return |
| | | */ |
| | | List<TrainingRecordPersonDetailedDto> selectPersonDetailedDtosByTrainingDate(Integer userId, Integer year); |
| | | List<TrainingRecordPersonDetailedDto> selectPersonDetailedDtosByTrainingDate(@Param("userId") Integer userId, @Param("year") Integer year); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.personnel.dto.PersonJobResponsibilitiesDto; |
| | | import com.ruoyi.personnel.pojo.PersonJobResponsibilities; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | public interface PersonJobResponsibilitiesService extends IService<PersonJobResponsibilities> { |
| | | |
| | | IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, |
| | | String userId, |
| | | String departmentId, |
| | | String userName); |
| | | @Param("userId") Integer userId, |
| | | @Param("departmentId") String departmentId, |
| | | @Param("userName") String userName); |
| | | |
| | | void exportPersonJobResponsibilities(Integer id, HttpServletResponse response); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, String userId, String departmentId, String userName) { |
| | | public IPage<PersonJobResponsibilitiesDto> personJobResponsibilitiesSelect(Page page, Integer userId, String departmentId, String userName) { |
| | | return baseMapper.personJobResponsibilitiesSelect(page, userId, departmentId, userName); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.inspect.service.InsUnPassService; |
| | | import com.ruoyi.inspect.service.impl.InsOrderServiceImpl; |
| | | import com.ruoyi.framework.util.SheetWriteHandlerUtil; |
| | | import com.ruoyi.inspect.service.impl.InsReportServiceImpl; |
| | | import com.ruoyi.inspect.vo.*; |
| | | import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper; |
| | | import com.ruoyi.performance.mapper.PerformanceShiftMapper; |
| | |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>performance-server</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>cnas-process</artifactId> |
| | | </dependency> |
| | | |
| | | |
| | | |
| | | <!-- poi-tlå
çææ¥å --> |
| | | <dependency> |
| | |
| | | @GetMapping("/selectOrderManDay") |
| | | public Result<?> selectOrderManDay(Integer id) { |
| | | int day = insProductService.selectOrderManDay(id); |
| | | return Result.success("æå", LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | return Result.success(LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),"æå"); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªä¸åå
容详æ
") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.ApproveConfigDTO; |
| | | import com.ruoyi.inspect.service.InsReportApproveConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/approveConfig") |
| | | @Api(tags = "æ¥å审æ¹ç¾åé
ç½®") |
| | | public class InsReportApproveConfigController { |
| | | |
| | | @Autowired |
| | | private InsReportApproveConfigService insReportApproveConfigService; |
| | | |
| | | @ApiOperation("审æ¹ç¾åé
ç½®æé®") |
| | | @GetMapping("/getApproveConfigList") |
| | | public Result getApproveConfigList(){ |
| | | return Result.success(insReportApproveConfigService.getApproveConfigList()); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢äººå") |
| | | @GetMapping("/getUserList") |
| | | public Result getUserList(){ |
| | | return Result.success(insReportApproveConfigService.getUserList()); |
| | | } |
| | | |
| | | @ApiOperation("æ´æ°å®¡æ¹ç¾åé
ç½®") |
| | | @PostMapping("/updateApproveConfig") |
| | | public Result updateApproveConfig(@RequestBody ApproveConfigDTO approveConfigDTO){ |
| | | return Result.success(insReportApproveConfigService.updateApproveConfig(approveConfigDTO)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.BatchApprovalReportDTO; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.service.InsReportService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.apache.poi.hssf.record.SSTRecord; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Scanner; |
| | | |
| | | @RestController |
| | | @RequestMapping("/insReport") |
| | | @Api(tags = "æ£éªæ¥å") |
| | | public class InsReportController { |
| | | |
| | | |
| | | @Resource |
| | | private InsReportService insReportService; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @ApiOperation(value = "æ¥çæ£éªæ¥åå表") |
| | | @GetMapping("/pageInsReport") |
| | | public Result pageInsReport(Page page,ReportPageDto reportPageDto) throws Exception { |
| | | return Result.success(insReportService.pageInsReport(page, reportPageDto)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "ä¸é®å®¡æ¹æé®") |
| | | @PostMapping("/batchApprovalReport") |
| | | public Result batchApprovalReport(@RequestBody BatchApprovalReportDTO batchApprovalReportDTO){ |
| | | try { |
| | | insReportService.batchApprovalReport(batchApprovalReportDTO.getIds()); |
| | | }catch (Exception e){ |
| | | throw new RuntimeException(e); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å审æ¹è¿åº¦") |
| | | @GetMapping("/getBatchApprovalProgress") |
| | | public Result getBatchApprovalProgress(){ |
| | | return Result.success(insReportService.getBatchApprovalProgress()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥çæ£éªæ¥åæ°éä¿¡æ¯") |
| | | @GetMapping("/getReportCountInfo") |
| | | public Result getReportCountInfo(ReportPageDto reportPageDto) throws Exception { |
| | | return Result.success(insReportService.getReportCountInfo(reportPageDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ æé®") |
| | | @PostMapping("/inReport") |
| | | public Result inReport(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | | try { |
| | | String path = wordUrl; |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | InsReport insReport = insReportService.getById(id); |
| | | // 妿URLSæå¼ å
å°è¯¥æä»¶å é¤ |
| | | if(Strings.isNotEmpty(insReport.getUrlS())){ |
| | | String url = wordUrl + File.separator + insReport.getUrlS().replace("/word/", ""); |
| | | File file1 = new File(url); |
| | | if(file1.exists()) { |
| | | file1.delete(); |
| | | } |
| | | } |
| | | String code = insReport.getCode().replace("/", "") + ".docx"; |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + code; |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | return Result.success(insReportService.inReport("/word/" + pathName, id)); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | //ä¸è½½ |
| | | @GetMapping("/downReport") |
| | | public void downReport(@RequestParam("id") Integer id,@RequestParam("type") Integer type, HttpServletResponse response) { |
| | | insReportService.downReport(id,type, response); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "è¿åæé®") |
| | | @PostMapping("/upReportUrl") |
| | | public Result upReportUrl(Integer id) { |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼å¶æé®") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æäº¤æé®") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(Integer id) { |
| | | |
| | | return Result.success(insReportService.writeReport(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æé®") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹åæé®") |
| | | @PostMapping("/ratifyReport") |
| | | public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); |
| | | } |
| | | |
| | | @RequestMapping("/onlyOffice/save") |
| | | public void saveFile(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) { |
| | | PrintWriter writer = null; |
| | | try { |
| | | writer = response.getWriter(); |
| | | // è·åä¼ è¾çjsonæ°æ® |
| | | Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A"); |
| | | String body = scanner.hasNext() ? scanner.next() : ""; |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | |
| | | if (jsonObject.containsKey("url")) { |
| | | String jsonArray = jsonObject.get("lastsave").toString(); // æ´æ°æ¶é´ |
| | | String fileUrl = jsonObject.get("url").toString(); // æ´æ°æä»¶url |
| | | HttpUtil.downloadFile(fileUrl, FileUtil.file(wordUrl + "/" + fileName)); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | writer.write("{\"error\":-1}"); |
| | | return; |
| | | } |
| | | /* |
| | | * status = 1ï¼æä»¬ç»onlyOfficeçæå¡è¿å{"error":"0"}çä¿¡æ¯ã |
| | | * è¿æ ·onlyOfficeä¼è®¤ä¸ºåè°æ¥å£æ¯æ²¡é®é¢çï¼è¿æ ·å°±å¯ä»¥å¨çº¿ç¼è¾ææ¡£äºï¼å¦åçè¯ä¼å¼¹åºçªå£è¯´æ |
| | | */ |
| | | if (Objects.nonNull(writer)) { |
| | | writer.write("{\"error\":0}"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éä¸è½½æé®") |
| | | @GetMapping("/downAll") |
| | | public Result downAll(String ids) { |
| | | return Result.success(insReportService.downAll(ids)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éä¸ä¼ æé®") |
| | | @PostMapping("/upAll") |
| | | public Result upAll(MultipartFile file) throws IOException { |
| | | return Result.success(insReportService.upAll(file)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¤åæé®") |
| | | @PostMapping("/withdraw") |
| | | public Result withdraw(@RequestBody Map<String,Object> map) { |
| | | insReportService.withdraw(map); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/getLaboratoryByReportId") |
| | | public Result getLaboratoryByReportId(Integer id) { |
| | | return Result.success(insReportService.getLaboratoryByReportId(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.ApproveConfigDTO; |
| | | import com.ruoyi.inspect.pojo.InsReportApproveConfig; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_report_approve_config(æ¥å审æ¹ç¾åé
ç½®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-12-10 09:36:10 |
| | | */ |
| | | public interface InsReportApproveConfigService extends IService<InsReportApproveConfig> { |
| | | |
| | | List<InsReportApproveConfig> getApproveConfigList(); |
| | | |
| | | InsReportApproveConfig getApproveConfigByLaboratory(String laboratory); |
| | | |
| | | Map<String, List<Map<String,Object>>> getUserList(); |
| | | |
| | | boolean updateApproveConfig(ApproveConfigDTO approveConfigDTO); |
| | | } |
ÎļþÃû´Ó cnas-require/src/main/java/com/ruoyi/require/service/InsReportService.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.require.service; |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | public interface InsReportService extends IService<InsReport> { |
| | | |
| | | IPage<ReportPageDto> pageInsReport(Page page, ReportPageDto reportPageDto); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.inspect.dto.ApproveConfigDTO; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsReportApproveConfigMapper; |
| | | import com.ruoyi.inspect.pojo.InsReportApproveConfig; |
| | | import com.ruoyi.inspect.service.InsReportApproveConfigService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_report_approve_config(æ¥å审æ¹ç¾åé
ç½®)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-12-10 09:36:10 |
| | | */ |
| | | @Service |
| | | public class InsReportApproveConfigServiceImpl extends ServiceImpl<InsReportApproveConfigMapper, InsReportApproveConfig> |
| | | implements InsReportApproveConfigService { |
| | | |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Override |
| | | public List<InsReportApproveConfig> getApproveConfigList() { |
| | | Integer userId = Integer.parseInt(SecurityUtils.getUserId()+""); |
| | | User user = userMapper.selectById(userId);//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | return baseMapper.selectList(Wrappers.<InsReportApproveConfig>lambdaQuery() |
| | | .eq(StringUtils.isNotBlank(laboratory),InsReportApproveConfig::getLaboratory,laboratory)); |
| | | } |
| | | |
| | | @Override |
| | | public InsReportApproveConfig getApproveConfigByLaboratory(String laboratory) { |
| | | return baseMapper.selectOne(Wrappers.<InsReportApproveConfig>lambdaQuery() |
| | | .eq(StringUtils.isNotBlank(laboratory),InsReportApproveConfig::getLaboratory,laboratory)); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<Map<String,Object>>> getUserList() { |
| | | //æ¥è¯¢éä¿¡åçµåä¸ç人åä¿¡æ¯ |
| | | //æ¥è¯¢å½åç»å½äººåçæ¶æ |
| | | Integer userId = Integer.parseInt(SecurityUtils.getUserId()+""); |
| | | //夿å
¨é¨,个人,ç»ç»çæé |
| | | User user = userMapper.selectById(userId);//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String laboratory = ""; |
| | | String departLimsId = user.getDepartLimsId(); |
| | | if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(departLimsId)) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = userMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | return userMapper.getPersonList(laboratory).stream().collect(Collectors.groupingBy(m->m.get("depName").toString())); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateApproveConfig(ApproveConfigDTO approveConfigDTO) { |
| | | if(!approveConfigDTO.getConfigList().isEmpty()){ |
| | | approveConfigDTO.getConfigList().forEach(config->baseMapper.updateById(config)); |
| | | return true; |
| | | } |
| | | throw new RuntimeException("æ´æ°å¤±è´¥"); |
| | | } |
| | | } |
ÎļþÃû´Ó cnas-require/src/main/java/com/ruoyi/require/service/impl/InsReportServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.aspose.words.Document; |
| | | import com.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.aspose.words.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.service.InsReportService; |
| | | import com.ruoyi.process.mapper.ProcessReportMapper; |
| | | import com.ruoyi.process.pojo.ProcessReport; |
| | | import com.ruoyi.require.service.InsReportService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Slf4j |
| | | public class InsReportServiceImpl extends ServiceImpl<InsReportMapper, InsReport> |
| | | implements InsReportService { |
| | | |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | |
| | | |
| | | @Override |
| | | public IPage<ReportPageDto> pageInsReport(Page page, ReportPageDto reportPageDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId());//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | |
| | | wrapper.gt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(0)) |
| | | .lt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(1)); |
| | | } |
| | | return insReportMapper.pageInsReport(page, wrapper ,laboratory); |
| | | IPage<ReportPageDto> iPage = insReportMapper.pageInsReport(page, wrapper, laboratory); |
| | | return iPage; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int inReport(String url, Integer id) { |
| | |
| | | String url = ""; |
| | | // 0 ä¸è½½docx 1 ä¸è½½pdf |
| | | if(type == 0) { |
| | | url = Strings.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl(); |
| | | url = Strings.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl(); |
| | | }else { |
| | | url = insReport.getTempUrlPdf(); |
| | | } |
| | |
| | | insReport.setId(id); |
| | | insReport.setState(1); |
| | | insReport.setWriteTime(LocalDateTime.now());//æäº¤æ¶é´ |
| | | insReport.setWriteUserId(SecurityUtils.getUserId().intValue());//æäº¤äºº |
| | | insReport.setWriteUserId(Integer.getInteger(SecurityUtils.getUserId().toString()));//æäº¤äºº |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(SecurityUtils.getUserId().intValue()).getSignatureUrl(); |
| | | signatureUrl = userMapper.selectById(Integer.getInteger(SecurityUtils.getUserId().toString())).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | |
| | | if (ObjectUtils.isNotEmpty(examineTell)) { |
| | | insReport.setExamineTell(examineTell); |
| | | } |
| | | insReport.setExamineUserId(SecurityUtils.getUserId().intValue());//å®¡æ ¸äºº |
| | | insReport.setExamineUserId(Integer.getInteger(SecurityUtils.getUserId().toString()));//å®¡æ ¸äºº |
| | | insReport.setExamineTime(LocalDateTime.now());//å®¡æ ¸æ¶é´ |
| | | if (isExamine == 0) { |
| | | //å¦æå®¡æ ¸ä¸éè¿ |
| | |
| | | if (ObjectUtils.isNotEmpty(ratifyTell)) { |
| | | insReport.setRatifyTell(ratifyTell); |
| | | } |
| | | insReport.setRatifyUserId(SecurityUtils.getUserId().intValue());//æ¹å人 |
| | | insReport.setRatifyUserId(Integer.getInteger(SecurityUtils.getUserId().toString()));//æ¹å人 |
| | | insReport.setRatifyTime(LocalDateTime.now());//æ¹åæ¶é´ |
| | | if (isRatify == 0) { |
| | | //妿æ¹åä¸éè¿ |
| | |
| | | } |
| | | inReport("/word/" + pathName, insReport.getId()); |
| | | } |
| | | // File tempFile = null; |
| | | // File unzipDir = null; |
| | | // try { |
| | | // tempFile = File.createTempFile(wordUrl, ".zip"); |
| | | // file.transferTo(tempFile); |
| | | // |
| | | // unzipDir = new File("uploaded_files"); |
| | | // if (!unzipDir.exists()) { |
| | | // unzipDir.mkdir(); |
| | | // } |
| | | // unzip(tempFile, unzipDir); |
| | | // // å¤çè§£ååçæä»¶ |
| | | // File[] files = unzipDir.listFiles(); |
| | | // if (files != null) { |
| | | // for (File f : files) { |
| | | // // æ ¹æ®æä»¶åæ¥è¯¢id |
| | | // String name = f.getName(); |
| | | // String code = f.getName().replace(".docx", "").replace("JCZX", "JCZX/"); |
| | | // if(f.getName().lastIndexOf("_") != -1) { |
| | | // code = code.substring(f.getName().lastIndexOf("_") + 1); |
| | | // } |
| | | // //InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, f.getName().replace(".docx", "").replace("JCZX", "JCZX/"))); |
| | | // InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, code)); |
| | | // if (ObjectUtils.isEmpty(insReport)) { |
| | | // throw new ErrorException("æ²¡ææ¾å° " + f.getName() + " è¿ä¸ªæä»¶å¯¹åºçæ¥åæ°æ®"); |
| | | // } |
| | | // // 妿UrlSæå¼ å
å°è¯¥æä»¶å é¤ |
| | | // if(Strings.isNotEmpty(insReport.getUrlS())) { |
| | | // String url = wordUrl + File.separator + insReport.getUrlS().replace("/word/", ""); |
| | | // File file1 = new File(url); |
| | | // if(file1.exists()) { |
| | | // file1.delete(); |
| | | // } |
| | | // } |
| | | // String urlString; |
| | | // String pathName; |
| | | // try { |
| | | // String path = wordUrl; |
| | | // File realpath = new File(path); |
| | | // if (!realpath.exists()) { |
| | | // realpath.mkdirs(); |
| | | // } |
| | | // pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + insReport.getCode().replace("/", "") + ".docx"; |
| | | // urlString = realpath + "/" + pathName; |
| | | // // å¤å¶æä»¶å°æå®è·¯å¾ |
| | | // Files.copy(f.toPath(), new File(urlString).toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | // inReport("/word/" + pathName, insReport.getId()); |
| | | // } |
| | | // catch (IOException e) { |
| | | // throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | // } |
| | | // } |
| | | // } |
| | | // } catch (IOException e) { |
| | | // throw new ErrorException("æä»¶å¤ç失败"); |
| | | // } finally { |
| | | // if (tempFile != null && tempFile.exists()) { |
| | | // tempFile.delete(); |
| | | // } |
| | | // // éå½å é¤è§£åç®å½åå
¶ä¸çæä»¶ |
| | | // if (unzipDir.exists()) { |
| | | // deleteDirectory(unzipDir); // å 餿§çä¸´æ¶æä»¶å¤¹ |
| | | // } |
| | | // } |
| | | return 0; |
| | | } |
| | | |
| | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Integer insOrderId = insReportMapper.selectById(id).getInsOrderId(); |
| | | insOrderStateMapper.selectList(new LambdaQueryWrapper<InsOrderState>() |
| | | .eq(InsOrderState::getInsOrderId,insOrderId)) |
| | | .eq(InsOrderState::getInsOrderId,insOrderId)) |
| | | .forEach(insOrderState -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("label",insOrderState.getLaboratory()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void batchApprovalReport(List<Integer> ids) { |
| | | redisTemplate.setKeySerializer(new StringRedisSerializer()); |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | Integer userId = Integer.parseInt(SecurityUtils.getUserId().toString()); |
| | | String key = SYNC_REPORT_KEY_PREFIX+userId; |
| | | //æ§è¡åå é¤ä¹åçkeys |
| | | deleteRedisKeys(key); |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> getBatchApprovalProgress() { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | Integer userId = Integer.parseInt(SecurityUtils.getUserId().toString()); |
| | | String key = SYNC_REPORT_KEY_PREFIX + userId; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("hasProgress",false); |
| | |
| | | file = new File(pdfPath); |
| | | os = new FileOutputStream(file); |
| | | //è¦è½¬æ¢çwordæä»¶ |
| | | Document doc = new Document(wordPath); |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | doc.save(os, SaveFormat.PDF); |
| | | String name = file.getName(); |
| | | return file.getName(); |
| | |
| | | |
| | | <select id="performanceShiftList" resultMap="performanceShiftPageMap"> |
| | | SELECT |
| | | if(u.department is not null and u.department != '', CONCAT(u.name, 'ï¼', u.department, 'ï¼'), u.name) name, |
| | | GROUP_CONCAT(s.work_time, 'ï¼', s.shift, 'ï¼', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id, u.department |
| | | <!--if(u.department is not null and u.department != '', CONCAT(u.name, 'ï¼', u.department, 'ï¼'), u.name) name,--> |
| | | u.name name, |
| | | GROUP_CONCAT(s.work_time, 'ï¼', s.shift, 'ï¼', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id, u.dept_id |
| | | FROM performance_shift s |
| | | LEFT JOIN user u on u.id = s.user_id |
| | | <where> |
| | |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | </if> |
| | | </where> |
| | | order by s.create_time |
| | | GROUP BY u.id |
| | | order by s.create_time |
| | | </select> |
| | | |
| | | <select id="seldepLimsId" resultType="java.lang.String"> |
| | |
| | | private String accessKey; |
| | | private String secretKey; |
| | | private Boolean secure; |
| | | private String bucketName; |
| | | |
| | | @Bean |
| | | public MinioClient getMinioClient() { |
| | |
| | | return restResult(data, FAIL, "æä½å¤±è´¥"); |
| | | } |
| | | |
| | | public static <T> Result<T> fail(Integer code){ |
| | | return restResult(null, code,"fail"); |
| | | } |
| | | |
| | | public static <T> Result<T> fail(T data, String msg) |
| | | { |
| | | return restResult(data, FAIL, msg); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("attachment_table") |
| | | public class AttachmentTable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
¶ä»è¡¨ç»å®id") |
| | | private Integer subclassId; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("æä»¶ç±»å") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty("æä»¶ååç§°") |
| | | private String originalFileName; |
| | | |
| | | @ApiModelProperty("æ¡¶å") |
| | | private String bucketName; |
| | | |
| | | @ApiModelProperty("æå¨æ¨¡ååç§°") |
| | | private String moduleName; |
| | | |
| | | @ApiModelProperty("å
¶ä»è¡¨å") |
| | | private String otherTableName; |
| | | } |
| | |
| | | |
| | | String seldepLimsId(int depLimsId); |
| | | |
| | | List<Map<String,Object>> getPersonList(String laboratory); |
| | | |
| | | List<Map<String, Object>> getLaboratoryPersonList(String laboratory); |
| | | } |
| | | |
| | |
| | | from user u left join custom c on u.company = c.id |
| | | where u.id = #{userId} |
| | | </select> |
| | | <select id="seldepLimsId" resultType="java.lang.String"> |
| | | select name |
| | | from department_lims |
| | | where id = #{depLimsId} |
| | | </select> |
| | | <select id="getLaboratoryPersonList" resultType="java.util.Map"> |
| | | select |
| | | u.id, |
| | |
| | | and dl.name = #{laboratory} |
| | | </if> |
| | | </select> |
| | | <select id="seldepLimsId" resultType="java.lang.String"> |
| | | select name |
| | | from department_lims |
| | | where id = #{depLimsId} |
| | | </select> |
| | | <select id="getPersonList" resultType="java.util.Map"> |
| | | select |
| | | u.id, |
| | | u.name, |
| | | dl.name as depName |
| | | from |
| | | user u |
| | | left join |
| | | department_lims dl |
| | | on |
| | | FIND_IN_SET(dl.id,u.depart_lims_id) |
| | | where |
| | | dl.name in('é信产åå®éªå®¤','çµå产åå®éªå®¤','æ£æµå') |
| | | and u.status = 1 |
| | | and u.is_custom = 0 |
| | | <if test="laboratory!='' and laboratory!=null"> |
| | | and (dl.name = #{laboratory} or dl.name='æ£æµå') |
| | | </if> |
| | | </select> |
| | | </mapper> |