Merge branch 'dev' into dev_zj
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | return Result.success(processOrderService.pageProcessOrder(page, processOrderDto)); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @PostMapping("/uploadFile") |
| | | public Result uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("id") Integer id) { |
| | | processOrderService.uploadFile(file,id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤è¦æ±ãæ 书åååè¯å®¡") |
| | | @DeleteMapping("/delProcessOrder") |
| | | public Result delProcessOrder(Long id) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.process.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.process.pojo.ProcessSampleNew; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ProcessSampleNewMapper extends BaseMapper<ProcessSampleNew> { |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("颿 ·æ¥æ") |
| | | private LocalDate issueTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦å¯ç¨ä¸ä¼ ") |
| | | private Integer isUpload; |
| | | |
| | | @ApiModelProperty("è¯æ ·åç§°") |
| | | private String sampleS; |
| | | |
| | | @ApiModelProperty("å§ææ¶é´") |
| | | private String entrustmentTimeS; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String sampleTypeS; |
| | | |
| | | @ApiModelProperty("å§æåä½") |
| | | private String companyS; |
| | | |
| | | @ApiModelProperty("ç产åä½") |
| | | private String productionS; |
| | | |
| | | @ApiModelProperty("å§æäºº") |
| | | private String prepareUserS; |
| | | |
| | | @ApiModelProperty("æ ·åæ°é") |
| | | private Integer sampleNumS; |
| | | |
| | | @ApiModelProperty("æ ·åç¶æ") |
| | | private Integer insStateS; |
| | | |
| | | @ApiModelProperty("æ¯å¦çæ ·") |
| | | private Integer isLeaveS; |
| | | |
| | | @ApiModelProperty("æ ·åå¤çæ¹å¼") |
| | | private Integer processingS; |
| | | |
| | | @ApiModelProperty("çº¦å®æ¶é´") |
| | | private String appointedS; |
| | | |
| | | @ApiModelProperty("æ¥ååéæ¹å¼") |
| | | private Integer sendS; |
| | | |
| | | @ApiModelProperty("å§æäººç¾å") |
| | | private String prepareUserUrlS; |
| | | |
| | | @ApiModelProperty("å§ææ¥æ") |
| | | private String createTimeTwoS; |
| | | |
| | | @ApiModelProperty("å§æäººèç³»çµè¯") |
| | | private String phoneS; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.process.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("cnas_process_sample_new") |
| | | public class ProcessSampleNew { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
³ècnas_process_order 表id") |
| | | private Integer cnasOrderId; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("è¯éªé¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªä¾æ®") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.process.dto.ProcessOrderDto; |
| | | import com.ruoyi.process.pojo.ProcessOrder; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | |
| | | |
| | | IPage<ProcessOrderDto> pageProcessOrder(Page page, ProcessOrderDto processOrderDto); |
| | | |
| | | void uploadFile(MultipartFile file, Integer id); |
| | | |
| | | ProcessOrderDto getProcessOrder(Integer id); |
| | | |
| | | int doProcessOrder(ProcessOrder processOrder); |
| | |
| | | package com.ruoyi.process.service.impl; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | |
| | | import com.ruoyi.process.dto.InspectionOrderDetail; |
| | | import com.ruoyi.process.dto.InspectionOrderExportDto; |
| | | import com.ruoyi.process.dto.ProcessOrderDto; |
| | | import com.ruoyi.process.dto.SampleItemDto; |
| | | import com.ruoyi.process.mapper.ProcessOrderMapper; |
| | | import com.ruoyi.process.mapper.ProcessSampleNewMapper; |
| | | import com.ruoyi.process.pojo.ProcessOrder; |
| | | import com.ruoyi.process.pojo.ProcessSampleNew; |
| | | import com.ruoyi.process.service.ProcessOrderService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableRow; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-11-05 03:06:20 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class ProcessOrderServiceImpl extends ServiceImpl<ProcessOrderMapper, ProcessOrder> implements ProcessOrderService { |
| | | |
| | | @Resource |
| | | private ProcessSampleNewMapper processSampleNewMapper; |
| | | |
| | | @Resource |
| | | private ProcessOrderMapper processOrderMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void uploadFile(MultipartFile file, Integer id) { |
| | | ProcessOrder processOrder = processOrderMapper.selectById(id); |
| | | ArrayList<String> list = new ArrayList<>(); |
| | | try (InputStream inputStream = file.getInputStream()) { |
| | | XWPFDocument xwpfDocument = new XWPFDocument(inputStream); |
| | | // è·åææè¡¨æ ¼ |
| | | List<XWPFTable> tables = xwpfDocument.getTables(); |
| | | for (XWPFTable table : tables) { |
| | | // è·åè¡¨æ ¼çè¡ |
| | | List<XWPFTableRow> rows = table.getRows(); |
| | | for (int i = 0; i < rows.size(); i++) { |
| | | // è·åæ¯ä¸è¡ |
| | | List<XWPFTableCell> tableCells = rows.get(i).getTableCells(); |
| | | for (int j = 0; j < tableCells.size(); j++) { |
| | | // è·åæ¯ä¸åå
æ ¼ |
| | | String text = rows.get(i).getCell(j).getText(); |
| | | log.info("读åçå
容:{}", text); |
| | | list.add(text); |
| | | } |
| | | } |
| | | } |
| | | // æ ¹æ®è·åå°çå
容è¿è¡èµå¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | processOrder.setIsUpload(1); // æ¯å¦ä¸ä¼ |
| | | processOrder.setSampleS(list.get(1)); // è¯æ ·åç§° |
| | | processOrder.setEntrustmentTimeS(list.get(3)); // å§ææ¶é´ |
| | | processOrder.setSampleTypeS(list.get(5)); // åå· |
| | | processOrder.setCompanyS(list.get(7)); // å§æåä½ |
| | | processOrder.setProductionS(list.get(9)); // ç产åä½ |
| | | processOrder.setPrepareUserS(list.get(11)); // å§æäºº |
| | | if (NumberUtil.isNumber(list.get(13))) { |
| | | processOrder.setSampleNumS(Integer.parseInt(list.get(13))); // æ ·åæ°é |
| | | } |
| | | // æ ·åç¶æ |
| | | switch (list.get(15)) { |
| | | case "å¾
å®¡æ ¸": |
| | | processOrder.setInsStateS(0); |
| | | break; |
| | | case "å¾
æ£éª": |
| | | processOrder.setInsStateS(1); |
| | | break; |
| | | case "å·²æ£éª": |
| | | processOrder.setInsStateS(4); |
| | | break; |
| | | case "éå": |
| | | processOrder.setInsStateS(2); |
| | | break; |
| | | case "æ¤é": |
| | | processOrder.setInsStateS(3); |
| | | break; |
| | | } |
| | | if (list.get(17).contains("âæ¯Yes")) { |
| | | processOrder.setIsLeaveS(1); // æ¯å¦çæ · |
| | | } else { |
| | | processOrder.setIsLeaveS(0); // æ¯å¦çæ · |
| | | } |
| | | |
| | | if (list.get(19).contains("âå§æåä½åå")) { |
| | | processOrder.setProcessingS(0); // æ ·åå¤çæ¹å¼ |
| | | } |
| | | if(list.get(19).contains("âå®éªå®¤å¤ç")){ |
| | | processOrder.setProcessingS(1); // æ ·åå¤çæ¹å¼ |
| | | } |
| | | processOrder.setAppointedS(list.get(21)); // çº¦å®æ¶é´ |
| | | if (list.get(23).contains("âèªå")) { |
| | | processOrder.setSendS(1); // æ¯å¦èªå |
| | | } |
| | | if(list.get(23).contains("âå
¶å®")) { |
| | | processOrder.setSendS(0); // æ¯å¦èªå |
| | | } |
| | | // ä»30å¼å§æ¯æ ·åè¡¨æ ¼æ°æ® å° å¼ä¸ºå¤å®è§åç»æ |
| | | ArrayList<String> sampleList = new ArrayList<>(); |
| | | for (int i = 29; i < list.size(); i++) { |
| | | if (list.get(i).contains("å¤å®è§å")) { |
| | | break; |
| | | } |
| | | sampleList.add(list.get(i)); |
| | | } |
| | | // æ ·åè¡¨æ ¼æ°æ® |
| | | // æ ¹æ®orderId å°åæ¬çå é¤ |
| | | processSampleNewMapper.delete(new LambdaQueryWrapper<ProcessSampleNew>().eq(ProcessSampleNew::getCnasOrderId, id)); |
| | | for (int i = 0; i < sampleList.size(); i += 5) { |
| | | ProcessSampleNew processSampleNew = new ProcessSampleNew(); |
| | | processSampleNew.setCnasOrderId(id); |
| | | processSampleNew.setSampleCode(sampleList.get(i + 1)); |
| | | processSampleNew.setInspectionItem(sampleList.get(i + 2)); |
| | | processSampleNew.setMethod(sampleList.get(i + 3)); |
| | | processSampleNew.setRemark(sampleList.get(i + 4)); |
| | | processSampleNewMapper.insert(processSampleNew); |
| | | } |
| | | int len = sampleList.size() + 28; |
| | | // å¤å®è§å |
| | | processOrder.setPrepareUserUrlS(list.get(len + 4)); // å§æäººç¾å |
| | | if (StringUtils.isNotEmpty(list.get(len + 6))) { |
| | | String date = list.get(len + 6).substring(0, list.get(len + 6).indexOf("æ¥") + 1); |
| | | processOrder.setCreateTimeTwoS(date); // å§ææ¥æ |
| | | } |
| | | |
| | | processOrder.setPhoneS(list.get(len + 8)); // èç³»æ¹å¼ |
| | | Integer comprehensiveUser = null; |
| | | if (StringUtils.isNotEmpty(list.get(len + 10))) { |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().like(User::getName, list.get(len + 10))); |
| | | comprehensiveUser = users.get(0).getId(); |
| | | } |
| | | processOrder.setComprehensiveUser(comprehensiveUser); // 综å室ç¾å |
| | | |
| | | if (StringUtils.isNotEmpty(list.get(len + 12))) { |
| | | String date = list.get(len + 12).substring(0, list.get(len + 12).indexOf("æ¥") + 1); |
| | | if (StringUtils.isNotEmpty(date)) { |
| | | LocalDate parse = LocalDate.parse(date, formatter); |
| | | processOrder.setComprehensiveTime(parse); // æ¥æ¶æ¥æ |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(list.get(len + 14))) { |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().like(User::getName, list.get(len + 14))); |
| | | processOrder.setIssueUser(users.get(0).getId()); // 颿 ·å |
| | | } |
| | | if (StringUtils.isNotEmpty(list.get(len + 16))) { |
| | | String date = list.get(len + 16).substring(0, list.get(len + 16).indexOf("æ¥") + 1); |
| | | if (StringUtils.isNotEmpty(date)) { |
| | | LocalDate parse = LocalDate.parse(date, formatter); |
| | | processOrder.setIssueTime(parse); // 颿 ·æ¥æ |
| | | } |
| | | } |
| | | processOrderMapper.updateById(processOrder); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException("ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ProcessOrderDto getProcessOrder(Integer id) { |
| | | return processOrderMapper.getProcessOrder(id); |
| | | ProcessOrderDto a = processOrderMapper.getProcessOrder(id); |
| | | // 妿ä¸ä¼ äºåéç¨ä¸ä¼ äºçåæ®µ |
| | | if (Objects.nonNull(a.getIsUpload()) && a.getIsUpload().equals(1)) { |
| | | a = getNewValue(a); |
| | | } |
| | | return a; |
| | | } |
| | | public ProcessOrderDto getNewValue(ProcessOrderDto a) { |
| | | List<ProcessSampleNew> processSampleNews = processSampleNewMapper.selectList(new LambdaQueryWrapper<ProcessSampleNew>() |
| | | .eq(ProcessSampleNew::getCnasOrderId, a.getId())); |
| | | a.setSample(a.getSampleS()); // è¯æ ·åç§° |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | if (StringUtils.isNotEmpty(a.getEntrustmentTimeS())) { |
| | | LocalDate parse = LocalDate.parse(a.getEntrustmentTimeS(), dateTimeFormatter); |
| | | LocalDateTime localDateTime = LocalDateTime.of(parse, LocalTime.MIDNIGHT); |
| | | a.setCreateTime(localDateTime); // å§ææ¶é´ |
| | | } |
| | | a.setSampleType(a.getSampleTypeS()); // åå· |
| | | a.setCompany(a.getCompanyS()); // å§æåä½ |
| | | a.setProduction(a.getProductionS()); // ç产åä½ |
| | | a.setPrepareUser(a.getPrepareUserS()); // å§æäºº |
| | | a.setSampleNum(a.getSampleNumS() + ""); // æ ·åæ°é |
| | | a.setInsState(a.getInsStateS()); // æ ·åç¶æ |
| | | a.setIsLeave(a.getIsLeaveS()); // æ¯å¦çæ · |
| | | a.setProcessing(a.getProcessingS()); // æ ·åå¤çæ¹å¼ |
| | | a.setPhone(a.getPhoneS()); // èç³»æ¹å¼ |
| | | |
| | | if (StringUtils.isNotEmpty(a.getAppointedS())) { |
| | | LocalDate parse = LocalDate.parse(a.getAppointedS(), dateTimeFormatter); |
| | | a.setAppointed(parse); // çº¦å®æ¶é´ |
| | | } |
| | | a.setSend(a.getSendS()); // æ¥ååéæ¹å¼ |
| | | ArrayList<SampleItemDto> sampleItemDtos = new ArrayList<>(); |
| | | for (ProcessSampleNew b : processSampleNews) { |
| | | SampleItemDto sampleItemDto = new SampleItemDto(); |
| | | sampleItemDto.setCode(b.getSampleCode()); |
| | | sampleItemDto.setProduct(b.getInspectionItem()); |
| | | sampleItemDto.setStandardMethodList(b.getMethod()); |
| | | sampleItemDto.setRemark(b.getRemark()); |
| | | sampleItemDtos.add(sampleItemDto); |
| | | } |
| | | a.setSampleItems(sampleItemDtos); |
| | | return a; |
| | | } |
| | | |
| | | @Override |
| | |
| | | public void exportInspectionOrder(Integer id, HttpServletResponse response) { |
| | | ProcessOrder processOrder = baseMapper.selectById(id); |
| | | InspectionOrderExportDto inspectionOrderExportDto = extracted(processOrder); |
| | | List<InspectionOrderDetail> list = baseMapper.selectInsOrder(processOrder.getInsOrderId()); |
| | | int index = 1; |
| | | for (InspectionOrderDetail inspectionOrderDetail : list) { |
| | | inspectionOrderDetail.setIndex(index); |
| | | index++; |
| | | final List<InspectionOrderDetail> list; |
| | | // å¦æè¯¥æ°æ®ä¸ä¼ äºæä»¶ 就使ç¨ä¸ä¼ çæ°æ® |
| | | if(Objects.nonNull(processOrder.getIsUpload()) && processOrder.getIsUpload().equals(1)) { |
| | | list = new ArrayList<>(); |
| | | List<ProcessSampleNew> processSampleNews = processSampleNewMapper.selectList(new LambdaQueryWrapper<ProcessSampleNew>() |
| | | .eq(ProcessSampleNew::getCnasOrderId, id)); |
| | | inspectionOrderExportDto.setSample(processOrder.getSampleS()); // è¯æ ·åç§° |
| | | inspectionOrderExportDto.setCommissionDateString(processOrder.getEntrustmentTimeS()); // å§ææ¶é´ |
| | | inspectionOrderExportDto.setSampleType(processOrder.getSampleTypeS()); // åå· |
| | | inspectionOrderExportDto.setCompany(processOrder.getCompanyS()); // å§æåä½ |
| | | inspectionOrderExportDto.setProduction(processOrder.getProductionS()); // ç产åä½ |
| | | inspectionOrderExportDto.setPrepareUser(processOrder.getPrepareUserS()); // å§æäºº |
| | | inspectionOrderExportDto.setSampleNum(processOrder.getSampleNumS() + ""); // æ ·åæ°é |
| | | inspectionOrderExportDto.setInsState(processOrder.getInsStateS()); // æ ·åç¶æ |
| | | // æ¯å¦çæ · |
| | | inspectionOrderExportDto.setIsLeave1(processOrder.getIsLeaveS() == 1 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setIsLeave2(processOrder.getIsLeaveS() == 0 ? "â" : "â¡"); |
| | | // æ ·åå¤çæ¹å¼ |
| | | inspectionOrderExportDto.setProcessing0(processOrder.getProcessingS() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setProcessing1(processOrder.getProcessingS() == 1 ? "â" : "â¡"); |
| | | // çº¦å®æ¶é´ |
| | | inspectionOrderExportDto.setAppointedString(processOrder.getAppointedS()); |
| | | // æ¯å¦èªå |
| | | inspectionOrderExportDto.setSend0(processOrder.getSendS() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setSend1(processOrder.getSendS() == 1 ? "â" : "â¡"); |
| | | int i = 1; |
| | | for(ProcessSampleNew a : processSampleNews) { |
| | | InspectionOrderDetail inspectionOrderDetail = new InspectionOrderDetail(); |
| | | inspectionOrderDetail.setSampleNumber(a.getSampleCode()); |
| | | inspectionOrderDetail.setTestItem(a.getInspectionItem()); |
| | | inspectionOrderDetail.setTestStandard(a.getMethod()); |
| | | inspectionOrderDetail.setRemark(a.getRemark()); |
| | | inspectionOrderDetail.setIndex(i); |
| | | list.add(inspectionOrderDetail); |
| | | i++; |
| | | } |
| | | // å§æäººç¾å |
| | | inspectionOrderExportDto.setPrepareUser(processOrder.getPrepareUserS()); |
| | | // å§ææ¥æ |
| | | inspectionOrderExportDto.setCommissionDateString(processOrder.getEntrustmentTimeS()); |
| | | // èç³»æ¹å¼ |
| | | inspectionOrderExportDto.setPhone(processOrder.getPhoneS()); |
| | | }else { |
| | | list = baseMapper.selectInsOrder(processOrder.getInsOrderId()); |
| | | int index = 1; |
| | | for (InspectionOrderDetail inspectionOrderDetail : list) { |
| | | inspectionOrderDetail.setIndex(index); |
| | | index++; |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/inspection-order.docx"); |
| | | Configure configure = Configure.builder() |
| | |
| | | |
| | | inspectionOrderExportDto.setIsLeave1(processOrderDto.getIsLeave() != null && processOrderDto.getIsLeave() == 1 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setIsLeave2(processOrderDto.getIsLeave() != null && processOrderDto.getIsLeave() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setSend0(processOrderDto.getSend() != null && processOrderDto.getSend() == 1 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setSend1(processOrderDto.getSend() != null && processOrderDto.getSend() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setSend0(processOrderDto.getSend() != null && processOrderDto.getSend() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setSend1(processOrderDto.getSend() != null && processOrderDto.getSend() == 1 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setProcessing0(processOrderDto.getProcessing() != null && processOrderDto.getProcessing() == 0 ? "â" : "â¡"); |
| | | inspectionOrderExportDto.setProcessing1(processOrderDto.getProcessing() != null && processOrderDto.getProcessing() == 1 ? "â" : "â¡"); |
| | | if (ObjectUtils.isNotEmpty(processOrder.getRule())) { |
| | |
| | | is2.model, |
| | | GROUP_CONCAT(DISTINCT ip.inspection_item SEPARATOR ' ') AS product, |
| | | -- sm.code standardMethodList, |
| | | 'è¯éªè¦æ±' standardMethodList, |
| | | -- 'è¯éªè¦æ±' standardMethodList, |
| | | ip.method_s standardMethodList, |
| | | GROUP_CONCAT(DISTINCT ip.tell SEPARATOR ' ;') AS groupConcatTell, |
| | | is2.remark |
| | | from ins_order io2 |
| | |
| | | select is2.sample_code sampleNumber, |
| | | is2.model, |
| | | GROUP_CONCAT(DISTINCT ip.inspection_item SEPARATOR ',') AS testItem, |
| | | sm.code testStandard, |
| | | -- sm.code testStandard, |
| | | ip.method_s testStandard, |
| | | is2.remark |
| | | from ins_sample is2 |
| | | left join standard_method sm on standard_method_list_id = sm.id |
| | |
| | | <artifactId>inspect-server</artifactId> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | </dependency> |
| | | <!-- éç¨å·¥å
·--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsOrderTemplateService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/insOrder") |
| | | @Api(tags="æ£éªå模å") |
| | | public class InsOrderController { |
| | | |
| | | private InsOrderService insOrderService; |
| | | |
| | | private InsProductService insProductService; |
| | | |
| | | private InsOrderTemplateService insOrderTemplateService; |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @ApiOperation(value = "æ¥çæå±å使£éªå") |
| | | @GetMapping("/selectInsOrderParameter") |
| | | public Result selectInsOrderParameter(Page page, SampleOrderDto sampleOrderDto) { |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | //ç¨äºæ£éªä¸ååºå«æ¥çææè®¢åååªæ¥çåä¸ä¸ªå§æåä½ç订å |
| | | @ApiOperation(value = "夿å½å客æ·ç´§æ¥é¢åº¦æ¯å¦ç¨å®") |
| | | @GetMapping("/hasSendUrgentOrder") |
| | | public Result hasSendUrgentOrder() { |
| | | return Result.success(insOrderService.hasSendUrgentOrder()); |
| | | } |
| | | |
| | | //ç¨äºæ£éªä¸ååºå«æ¥çææè®¢åååªæ¥çåä¸ä¸ªå§æåä½ç订å |
| | | @ApiOperation(value = "æ¥çæææ£éªå") |
| | | @PostMapping("/selectAllInsOrderParameter") |
| | | public Result selectAllInsOrderParameter() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "åé
æé®") |
| | | @PostMapping("/upInsOrder") |
| | | public Result<?> upInsOrder(@RequestBody UpInsOrderDTO upInsOrderDTO) { |
| | | return Result.success(insOrderService.upInsOrder(upInsOrderDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¸åæé®") |
| | | @PostMapping("/addInsOrder") |
| | | public Result<?> addInsOrder(String str) { |
| | | Map<String, Object> map = JSON.parseObject(str, Map.class); |
| | | JSONArray jsonArray = JSON.parseArray(map.get("list")+""); |
| | | List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class); |
| | | InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class); |
| | | List<List<Integer>> pairing = JSON.parseArray(map.get("pairing")+""); |
| | | List<List<Integer>> fiberPairing = JSON.parseArray(map.get("fiberPairing")+"");//å
纤é
ç½®éççæ¥é
对 |
| | | return Result.success(insOrderService.addInsOrder(list, insOrder, pairing,fiberPairing)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢è®¢åæé¿é¢è®¡æ¶é´") |
| | | @PostMapping("/selectOrderManDay") |
| | | public Result<?> selectOrderManDay(Integer id) { |
| | | int day = insProductService.selectOrderManDay(id); |
| | | return Result.success("æå", LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªä¸åå
容详æ
") |
| | | @PostMapping("/getInsOrder") |
| | | public Result<?> getInsOrder(Integer orderId) { |
| | | return Result.success(insOrderService.getInsOrder(orderId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ ¸æé®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "æ£éªåid", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "state", value = "å®¡æ ¸ç»æ 1:éè¿ 2ï¼ä¸éè¿", dataTypeClass = Integer.class) |
| | | }) |
| | | @PostMapping("/upInsOrderOfState") |
| | | public Result<?> upInsOrderOfState(@RequestBody InsOrder insOrder) { |
| | | return Result.success(insOrderService.upInsOrderOfState(insOrder)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿åæ£éªæ¨¡æ¿æé®") |
| | | @PostMapping("/addInsOrderTemplate") |
| | | public Result<?> addInsOrderTemplate(@RequestBody InsOrderTemplate insOrderTemplate) { |
| | | return Result.success(insOrderTemplateService.addInsOrderTemplate(insOrderTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿£éªæ¨¡æ¿æé®") |
| | | @PostMapping("/delInsOrderTemplate") |
| | | public Result<?> delInsOrderTemplate(Integer id) { |
| | | return Result.success(insOrderTemplateService.delInsOrderTemplate(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ£éªå模æ¿") |
| | | @GetMapping("/selectInsOrderTemplate") |
| | | public Result<?> selectInsOrderTemplate(String company) { |
| | | return Result.success(insOrderTemplateService.selectInsOrderTemplate(company)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªå模æ¿idè·åæ£éªå模æ¿å
容") |
| | | @PostMapping("/selectInsOrderTemplateById") |
| | | public Result<?> selectInsOrderTemplateById(Integer id) { |
| | | return Result.success( insOrderTemplateService.selectInsOrderTemplateById(id),"æå"); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªåæ¥è¯¢æ£éªæ°æ®ï¼æ°æ®æ¥çï¼") |
| | | @PostMapping("/selectSampleAndProductByOrderId") |
| | | public Result<?> selectSampleAndProductByOrderId(@RequestBody Map<String, Object> data) throws Exception { |
| | | SampleProductDto2 sampleProductDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleProductDto2.class); |
| | | return Result.success(insOrderService.selectSampleAndProductByOrderId(sampleProductDto)); |
| | | } |
| | | //æ°æ®æ¥çä¸çæ¥ç详æ
ï¼åæ ¹åç´çç§åæ¾å¥ç®¡ |
| | | @PostMapping("/viewDetails") |
| | | public Result<?> viewDetails(@RequestBody Map<String, Object> data) { |
| | | return Result.success(insOrderService.viewDetails(data)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºå·²æ£å§æå") |
| | | @PostMapping("/exportChecked") |
| | | public void exportChecked(@RequestBody Map<String, Object> data, HttpServletResponse response) { |
| | | insOrderService.exportChecked(data,response); |
| | | } |
| | | |
| | | @ApiOperation(value = "è´¹ç¨ç»è®¡è·åæ»ä»·") |
| | | @PostMapping("/costStatistics2") |
| | | public Result<?> costStatistics2(@RequestBody Map<String, Object> data) throws Exception { |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | return Result.success(insOrderService.costStatistics2(costStatisticsDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¤éæé®") |
| | | @PutMapping("/updateStatus") |
| | | public Result<?> updateStatus(Integer id) { |
| | | insOrderService.updateStatus(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | //å¾
æ£çæ¤éçæ¥è¯¢å¾
æ£é¡¹ç® |
| | | @PostMapping("/selectNoProducts") |
| | | public Result<?> selectNoProducts(@RequestBody Map<String, Object> data,Integer orderId ,String ids) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | InsProduct insProduct = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InsProduct.class); |
| | | return Result.success(insProductService.selectNoProducts(page, insProduct,orderId,ids)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢éè¦æ¤éçæ£éªé¡¹ç®æ ·å |
| | | * @param orderId |
| | | * @return Map<String, Object> |
| | | */ |
| | | @GetMapping("/selectSampleByOrderId") |
| | | public Result<?> selectSampleByOrderId(Integer orderId) { |
| | | return Result.success(insProductService.selectSampleByOrderId(orderId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹ç® |
| | | * @param sampleId |
| | | * @return Map<String, Object> |
| | | */ |
| | | @GetMapping("/selectProductsBySampleId") |
| | | public Result<?> selectProductsBySampleId(Integer sampleId,Integer orderId) { |
| | | return Result.success(insProductService.selectProductsBySampleId(sampleId,orderId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹ç®ä¸ºæ¸©åº¦å¾ªç¯çæ£éªæ¬¡æ° |
| | | */ |
| | | @GetMapping("/selectTemperatureByProductId") |
| | | public Result selectTemperatureByproductId(Integer productId) { |
| | | return Result.success(insProductService.selectTemperatureByProductId(productId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¸©åº¦å¾ªç¯ç次æ°ä¸è´çæ¸©åº¦ç¹ |
| | | */ |
| | | @GetMapping("/selectTemperatureNumberByProductId") |
| | | public Result selectTemperatureNumberByproductId(Integer parentId,String inspectionItem) { |
| | | return Result.success(insProductService.selectTemperatureNumberByProductId(parentId,inspectionItem)); |
| | | } |
| | | |
| | | /** |
| | | * æ¤é |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @PostMapping("/revoke") |
| | | public Result<?> revoke(@RequestBody Map<String, Object> data) { |
| | | insProductService.revoke(data); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¤éå®¡æ ¸çæ ·å |
| | | * @param orderId |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/revokeReviewSample") |
| | | public Result<?> revokeReviewSample(Integer orderId) { |
| | | return Result.success(insProductService.revokeReviewSample(orderId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¤éçå¾ªç¯æ¬¡æ°ä¸è´çæ¸©åº¦ç¹ |
| | | * @return |
| | | */ |
| | | @GetMapping("/revokeReviewConsistentByProductId") |
| | | public Result<?> revokeReviewConsistentByProductId(Integer parentId,String inspectionItem){ |
| | | return Result.success(insProductService.revokeReviewConsistentByProductId(parentId,inspectionItem)); |
| | | } |
| | | |
| | | /** |
| | | * æ¤éçæ¸©åº¦å¾ªç¯çå¾ªç¯æ¬¡æ° |
| | | * @return |
| | | */ |
| | | @GetMapping("/revokeReviewTemperatureByProductId") |
| | | public Result<?> revokeReviewTemperatureByProductId(Integer productId){ |
| | | return Result.success(insProductService.revokeReviewTemperatureByProductId(productId)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¤éå®¡æ ¸ æ¸©åº¦å¾ªç¯ |
| | | */ |
| | | @GetMapping("/revokeReviewProduct") |
| | | public Result<?> revokeReviewProduct(Integer orderId,Integer sampleId){ |
| | | return Result.success(insProductService.revokeReviewProduct(orderId,sampleId)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¤éå®¡æ ¸éè¿ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @GetMapping("/revocationPassed") |
| | | public Result<?> revocationPassed(Integer orderId){ |
| | | insProductService.revocationPassed(orderId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¤éå®¡æ ¸åæ¶ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @GetMapping("/revocationCancel") |
| | | public Result<?> revocationCancel(Integer orderId){ |
| | | insProductService.revocationCancel(orderId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "å¾
æ£çæ¤é") |
| | | @PutMapping("/updateInspected") |
| | | public Result<?> updateInspected(Integer orderId,String ids){ |
| | | insProductService.updateInspected(orderId,ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¤éå®¡æ ¸æé®") |
| | | @PostMapping("/checkUpdate") |
| | | public Result<?> checkUpdate(Integer orderId,Integer state){ |
| | | insProductService.checkUpdate(orderId,state); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ç¾æå°æé®") |
| | | @PostMapping("/labelPrinting") |
| | | public Result<?> labelPrinting(String ids) { |
| | | return Result.success(insOrderService.labelPrinting(ids)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çè´¹ç¨ç»è®¡å表") |
| | | @PostMapping("/costStatistics") |
| | | public Result<?> costStatistics(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | return Result.success(insOrderService.costStatistics(page, costStatisticsDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥çç»ææé®(温度循ç¯)") |
| | | @PostMapping("/getInsOrderTemList") |
| | | public Result getInsOrderTemList(@RequestBody Map<String, Object> data) { |
| | | return Result.success(insOrderService.getInsOrderTemList(data)); |
| | | } |
| | | |
| | | /** |
| | | * è·åçæ¥æ°é |
| | | */ |
| | | @GetMapping("/permute") |
| | | public Result permute(Integer num, Boolean isValue) { |
| | | return Result.success(insOrderService.permute(num,isValue)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | import com.ruoyi.inspect.service.WarehouseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RequestMapping("/warehouse") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Api(tags = "æ ·å管ç") |
| | | public class WarehouseController { |
| | | |
| | | private WarehouseService warehouseService; |
| | | |
| | | @PostMapping("/addWarehouse") |
| | | @ApiOperation("æ·»å ä»åº") |
| | | public Result addWarehouse(String name) { |
| | | return Result.success(warehouseService.addWarehouse(name)); |
| | | } |
| | | |
| | | @GetMapping("/selectWarehouse") |
| | | @ApiOperation("æ¥è¯¢ä»åº") |
| | | public Result selectWarehouse() { |
| | | return Result.success(warehouseService.selectWarehouse()); |
| | | } |
| | | |
| | | @PostMapping("/addShelf") |
| | | @ApiOperation("æ·»å è´§æ¶") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "name", name = "åç§°", dataTypeClass = String.class), |
| | | @ApiImplicitParam(value = "row", name = "è¡", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(value = "col", name = "å", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(value = "warehouseId", name = "ä»åºid", dataTypeClass = Integer.class) |
| | | }) |
| | | |
| | | public Result addShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.addShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @PostMapping("/delWarehouse") |
| | | @ApiOperation("å é¤ä»åº") |
| | | public Result delWarehouse(Integer id) { |
| | | return Result.success(warehouseService.delWarehouse(id)); |
| | | } |
| | | |
| | | @PostMapping("/upWarehouse") |
| | | @ApiOperation("ä¿®æ¹ä»åº") |
| | | public Result upWarehouse(@RequestBody Warehouse warehouse) { |
| | | return Result.success(warehouseService.upWarehouse(warehouse)); |
| | | } |
| | | |
| | | @PostMapping("/delShelf") |
| | | @ApiOperation("å é¤è´§æ¶") |
| | | public Result delShelf(Integer id) { |
| | | return Result.success(warehouseService.delShelf(id)); |
| | | } |
| | | |
| | | @PostMapping("/upShelf") |
| | | @ApiOperation("ä¿®æ¹è´§æ¶") |
| | | public Result upShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.upShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @GetMapping("/getWarehouse") |
| | | @ApiOperation("æ¥è¯¢è´§æ¶ä¸çåæ¾ä¿¡æ¯") |
| | | public Result getWarehouse(Integer shelfId) { |
| | | return Result.success(warehouseService.getWarehouse(shelfId)); |
| | | } |
| | | |
| | | @PostMapping("/inWarehouse") |
| | | @ApiOperation("æ ·åå
¥åº") |
| | | public Result inWarehouse(String trees, String sampleCode) { |
| | | return Result.success(warehouseService.inWarehouse(trees, sampleCode)); |
| | | } |
| | | |
| | | @PostMapping("/outWarehouse") |
| | | @ApiOperation("æ ·ååºåº") |
| | | public Result outWarehouse(String sampleCode) { |
| | | return Result.success(warehouseService.outWarehouse(sampleCode)); |
| | | } |
| | | |
| | | @PostMapping("/getSampleRecord") |
| | | @ApiOperation("æ¥è¯¢æ ·å详ç»è®°å½") |
| | | public Result getSampleRecord(Integer id) { |
| | | return Result.success(warehouseService.getSampleRecord(id)); |
| | | } |
| | | |
| | | @PostMapping("/searchSampleId") |
| | | @ApiOperation("éè¿æ ·åç¼å·è¿è¡æ£ç´¢") |
| | | public Result searchSampleId(String sampleCode) { |
| | | return Result.success(warehouseService.searchSampleId(sampleCode)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsReportApproveConfig; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ApproveConfigDTO implements Serializable { |
| | | |
| | | /** |
| | | * é
ç½®å表 |
| | | */ |
| | | List<InsReportApproveConfig> configList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸é®å®¡æ¹dto |
| | | */ |
| | | @Data |
| | | public class BatchApprovalReportDTO implements Serializable { |
| | | |
| | | /** |
| | | * éä¸çæ¥åidå表 |
| | | */ |
| | | List<Integer> ids; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsBushing; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class BushingDto extends InsBushing { |
| | | |
| | | private List<FiberDto> fiber; |
| | | |
| | | private List<FibersDto> fibers; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ColumnWidth(30) |
| | | public class CommissionFeesDto { |
| | | @ExcelProperty("æ¥æ") |
| | | private String createTime; |
| | | |
| | | @ExcelProperty("æ£éªç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty("æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @ExcelProperty("è§æ ¼åå·") |
| | | private String sampleModel; |
| | | |
| | | @ExcelProperty("æ ·åæ°é") |
| | | private String sampleNum; |
| | | |
| | | @ExcelProperty("æ»ä»·") |
| | | private String totalPrice; |
| | | |
| | | @ExcelProperty("è¯éªé¡¹ç®") |
| | | private String insItem; |
| | | |
| | | @ExcelProperty("ç产åä½") |
| | | private String production; |
| | | |
| | | @ExcelProperty("å§æåä½") |
| | | private String company; |
| | | |
| | | @ExcelProperty("å§æäºº") |
| | | private String custom; |
| | | |
| | | @ExcelProperty("å·¥ç¨åç§°") |
| | | private String engineering; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class CostStatisticsDto { |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","ZTT/QR-30-01-01","æ¥æ"}) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","ZTT/QR-30-01-01","æ£éªç¼å·"}) |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","æ ·ååç§°"}) |
| | | private String sample; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","è§æ ¼åå·"}) |
| | | private String model; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","æ ·åæ°é"}) |
| | | private Integer num; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","æ»ä»·"}) |
| | | private BigDecimal price; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","è¯éªé¡¹ç®"}) |
| | | private String inspectionItem; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","å§æåä½"}) |
| | | private String company; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","å§æäºº"}) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","ç产åä½"}) |
| | | private String production; |
| | | |
| | | @ExcelProperty(value ={"ä¸å¤©ç§ææ£æµä¸å¿æ ·åç»è®°è¡¨","å·¥ç¨åç§°"}) |
| | | private String engineering; |
| | | |
| | | @ExcelIgnore |
| | | private Integer createUser; |
| | | |
| | | @ExcelIgnore |
| | | private Integer insSampleId; |
| | | |
| | | @ExcelIgnore |
| | | private Double cost;//å·¥æ¶ |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ExcelIgnore |
| | | private String dates; |
| | | @ExcelIgnore |
| | | private String laboratory; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.converters.localdate.LocalDateStringConverter; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ExcelChecked { |
| | | @ExcelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ExcelProperty("å¥ç®¡è²æ ") |
| | | private String bushColor; |
| | | |
| | | @ExcelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | @ExcelProperty("å
çº¤è²æ ") |
| | | private String color; |
| | | |
| | | @ExcelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ExcelProperty("æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ExcelProperty("è¯éªè¦æ±") |
| | | private String tell; |
| | | |
| | | @ExcelProperty("æ£éªå¼") |
| | | private String lastValue; |
| | | |
| | | @ExcelProperty("ç»æå¤å®") |
| | | private String insResult; |
| | | |
| | | @ExcelProperty("åä½") |
| | | private String unit; |
| | | |
| | | @ExcelProperty("æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @ExcelProperty("æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ExcelProperty("æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ExcelProperty("ä¸å人") |
| | | private String customName; |
| | | |
| | | @ExcelProperty(value = "ä¸åæ¶é´",converter = LocalDateStringConverter.class) |
| | | private LocalDate createTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class ExcelDto implements Serializable { |
| | | |
| | | Integer r; |
| | | |
| | | Integer c; |
| | | |
| | | Integer mc; |
| | | |
| | | ExcelV v; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ExcelMc { |
| | | |
| | | Integer r; |
| | | |
| | | Integer c; |
| | | |
| | | Integer rs; |
| | | |
| | | Integer cs; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ExcelPs { |
| | | String value; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ExcelV { |
| | | |
| | | String v; |
| | | |
| | | String ff; |
| | | |
| | | String fc; |
| | | |
| | | String fs; |
| | | |
| | | String ht; |
| | | |
| | | ExcelMc mc; |
| | | |
| | | ExcelPs ps; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FactoryDto { |
| | | |
| | | private String code = "[1]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<LaboratoryDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsFiber; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FiberDto extends InsFiber { |
| | | |
| | | private List<InsProduct> productList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsFibers; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FibersDto extends InsFibers { |
| | | |
| | | private List<FiberDto> fiber; |
| | | |
| | | private List<InsProduct> productList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.WarehouseHistory; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class HistoryDto extends WarehouseHistory { |
| | | |
| | | private String createUserName; |
| | | |
| | | private String warehouseCode; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @version 1.0.0 |
| | | * @create 2024/3/14 16:44 |
| | | **/ |
| | | @Data |
| | | public class InsOderDto { |
| | | |
| | | private Integer id; |
| | | private Integer orderName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime date; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¶é´èå´å
æ£éªä»»å¡è®¡åæ°éDTO |
| | | */ |
| | | @Data |
| | | public class InsOrderPlanCountDTO implements Serializable { |
| | | |
| | | /** |
| | | * åå®éªå®¤ |
| | | */ |
| | | @ApiModelProperty(value = "åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | /** |
| | | * å¼å§ä¸åæ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å§ä¸åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime startTime; |
| | | |
| | | /** |
| | | * ç»æä¸åæ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ç»æä¸åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime endTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InsOrderPlanDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("æ£éªä»»å¡ä¸»é®id") |
| | | private Long insSampleId; |
| | | |
| | | @ApiModelProperty("ç¨æ·id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("ç¶æ(æ£éªå¤ç)") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @ApiModelProperty("æ£éªç¶æ") |
| | | private String insState; |
| | | |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("æ ·å大类") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´èå´") |
| | | private List<LocalDateTime> sendTimeRange; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InsProductDto { |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | private String temperature; |
| | | |
| | | private String humidity; |
| | | |
| | | private Integer insOrderId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class InsProductResultDTO extends InsProductResult implements Serializable { |
| | | |
| | | /** |
| | | * 订åid |
| | | */ |
| | | @ApiModelProperty("订åid") |
| | | private Integer orderId; |
| | | |
| | | /** |
| | | *æ ·åid |
| | | */ |
| | | @ApiModelProperty("æ ·åid") |
| | | private Integer sampleId; |
| | | |
| | | /** |
| | | *åå§è®°å½æ¨¡æ¿åç§° |
| | | */ |
| | | @ApiModelProperty("åå§è®°å½æ¨¡æ¿åç§°") |
| | | private String templateName; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InsulatingDto { |
| | | |
| | | private Integer standardMethodListId; |
| | | |
| | | private Integer num; |
| | | |
| | | private List<InsProduct> insProduct; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class LaboratoryDto { |
| | | |
| | | private String code = "[2]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<SampleTypeDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ModelDto { |
| | | |
| | | private String code = "[5]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class OrderThingDto { |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("å§æäººåç§°") |
| | | private String custom; |
| | | |
| | | @ApiModelProperty("å§æåä½") |
| | | private String company; |
| | | |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("æ ·åæ°é") |
| | | private Double sampleNum; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("æ£éªåç»è®º") |
| | | private String insResult; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹ç®") |
| | | private List<ProductThingDto> products; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductDto { |
| | | |
| | | private String name; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductResultDto2 extends InsProduct { |
| | | |
| | | @ApiModelProperty("æ£éªè®¾å¤") |
| | | private String equipValue; |
| | | |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String updateUserName; |
| | | |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ProductThingDto { |
| | | |
| | | private Integer productId; |
| | | |
| | | private String inspectionItem; |
| | | |
| | | private String lastValue; |
| | | |
| | | private Integer insResult; |
| | | |
| | | private List<productResultDto> productResults; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ReportPageDto extends InsReport implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²ä¸ä¼ (0:æªä¸ä¼ ï¼1:å·²ä¸ä¼ )") |
| | | private Integer isUpload; |
| | | |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | private String writeUserName; |
| | | |
| | | private String ratifyUser; |
| | | |
| | | private String examineUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´èå´") |
| | | private List<LocalDateTime> createTimeRange; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleDto { |
| | | |
| | | private String code = "[4]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<ModelDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @version 1.0.0 |
| | | * @create 2024/3/14 18:46 |
| | | **/ |
| | | @Data |
| | | public class SampleOrderDto extends InsOrder { |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @ApiModelProperty("æ ·ååå·") |
| | | private String sampleModel; |
| | | |
| | | private String assign; |
| | | |
| | | @ApiModelProperty("æ ·åæ°é") |
| | | private Integer sampleNum; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ£éªè¿åº¦%") |
| | | private String insProgress; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String reportId; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¹å") |
| | | private Integer isRatify; |
| | | |
| | | @TableField("`url`") |
| | | private String url; |
| | | |
| | | private String urlS; |
| | | |
| | | private String name; |
| | | |
| | | /** |
| | | * ç¨äºå¤æå忝å¦è®¤é¢ |
| | | */ |
| | | private Integer inspectId; |
| | | |
| | | /** |
| | | * ä¸è½½pdfå°å |
| | | */ |
| | | private String tempUrlPdf; |
| | | |
| | | /** |
| | | * æ¶é´èå´ |
| | | */ |
| | | private List<String> startAndEndTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * æ°æ®æ¥ç对象ï¼çµåè¯éªå®¤ï¼ |
| | | */ |
| | | @Data |
| | | public class SampleProductDTODL implements Serializable { |
| | | |
| | | private Integer id; |
| | | |
| | | private Integer insProductId; |
| | | |
| | | @ApiModelProperty(name = "å§æåå·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(name = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty(name = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty(name = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(name = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty(name = "æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty(name = "æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | @ApiModelProperty(name = "ç»æå¤å®") |
| | | private Integer insResult; |
| | | |
| | | @ApiModelProperty(name = "åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(name = "è¯éªè¦æ±") |
| | | private String tell; |
| | | |
| | | @ApiModelProperty(name = "æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @ApiModelProperty(name = "æ£éªæ¥æ") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty(name = "è¯éªå®¤åç§°") |
| | | private String sonLaboratory; |
| | | |
| | | // @ApiModelProperty(value = 5, name = "æ ·åç¶æ") |
| | | private Integer insState; |
| | | |
| | | private String inspectionItemType; |
| | | |
| | | // @ApiModelProperty(value = 11, name = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | private String equipValue; |
| | | |
| | | @ApiModelProperty(value = "æ£éªè¿ç¨å¼") |
| | | private String insValue; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleProductDto extends InsSample { |
| | | |
| | | private List<InsProduct> insProduct; |
| | | |
| | | private List<BushingDto> bushing; |
| | | |
| | | private List<SampleProductDto> childSampleList; |
| | | |
| | | private InsulatingDto insulating; |
| | | |
| | | private SheathDto sheath; |
| | | |
| | | //æ£éªäºº |
| | | private String checkName; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class SampleProductDto2 implements Serializable { |
| | | |
| | | private Integer id; |
| | | private Integer insProductId; |
| | | |
| | | @ApiModelProperty("å§æåå·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("管å¥è²æ ") |
| | | private String bushColor; |
| | | |
| | | @ApiModelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("å
çº¤è²æ ") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty("æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | @ApiModelProperty("ç»æå¤å®") |
| | | private Integer insResult; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("è¯éªè¦æ±") |
| | | private String tell; |
| | | |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @ApiModelProperty("æ£éªæ¥æ") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("è¯éªå®¤åç§°") |
| | | private String sonLaboratory; |
| | | |
| | | // @ApiModelProperty(value = 5, "æ ·åç¶æ") |
| | | private Integer insState; |
| | | |
| | | private String inspectionItemType; |
| | | |
| | | // @ApiModelProperty(value = 11, "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | private String equipValue; |
| | | |
| | | @ApiModelProperty(value = "æ£éªè¿ç¨å¼") |
| | | private String insValue; |
| | | |
| | | private Integer insSampleId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleProductDto3 extends InsSample { |
| | | |
| | | private List<InsProduct> insProduct; |
| | | |
| | | private List<BushingDto> bushing; |
| | | |
| | | private List<SampleProductDto3> childSampleList; |
| | | |
| | | private InsulatingDto insulating; |
| | | |
| | | private SheathDto sheath; |
| | | private String code; |
| | | private String ioSampleType; |
| | | |
| | | private Integer isLeave; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleTypeDto { |
| | | |
| | | private String code = "[3]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<SampleDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SheathDto { |
| | | |
| | | private Integer standardMethodListId; |
| | | |
| | | private List<InsProduct> insProduct; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TasksShowDto { |
| | | |
| | | /** |
| | | * å§æåå· |
| | | */ |
| | | private String entrustCode; |
| | | |
| | | /** |
| | | * æ ·ååç§° |
| | | */ |
| | | private String sample; |
| | | |
| | | /** |
| | | * å§æåä½ |
| | | */ |
| | | private String company; |
| | | |
| | | /** |
| | | * å§ææ¶é´ |
| | | */ |
| | | private String createTime; |
| | | |
| | | /** |
| | | * æµè¯ |
| | | */ |
| | | private String state; |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸ |
| | | */ |
| | | private String insState; |
| | | |
| | | /** |
| | | * æ¥å |
| | | */ |
| | | private String code; |
| | | |
| | | /** |
| | | * å®¡æ ¸ |
| | | */ |
| | | private String isExamine; |
| | | |
| | | /** |
| | | * æ¹å |
| | | */ |
| | | private String isRatify; |
| | | |
| | | |
| | | /** |
| | | * æ£æµäºº |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ |
| | | */ |
| | | private String type; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class TemperatureCycling { |
| | | @ExcelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ExcelProperty("å¥ç®¡è²æ ") |
| | | private String bushColor; |
| | | |
| | | @ExcelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | @ExcelProperty("å
纤ç¼å·") |
| | | private String color; |
| | | |
| | | @ExcelProperty("å¾ªç¯æ¬¡æ°") |
| | | private String inspectionItem; |
| | | |
| | | @ExcelProperty("温度ç¹") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ExcelProperty("è¡°åç³»æ°1310") |
| | | private String attenuationCoefficient1310; |
| | | |
| | | @ExcelProperty("è¡°åå·®1") |
| | | private String attenuationDifference1; |
| | | |
| | | @ExcelProperty("è¡°åç³»æ°1550") |
| | | private String attenuationCoefficient1550; |
| | | |
| | | @ExcelProperty("è¡°åå·®2") |
| | | private String attenuationDifference2; |
| | | |
| | | @ExcelProperty("è¡°åç³»æ°1625") |
| | | private String attenuationCoefficient1625; |
| | | |
| | | @ExcelProperty("è¡°åå·®3") |
| | | private String attenuationDifference3; |
| | | |
| | | @ExcelProperty("è¡°å1383") |
| | | private String attenuationCoefficient1383; |
| | | |
| | | @ExcelProperty("è¡°åå·®4") |
| | | private String attenuationDifference4; |
| | | |
| | | @ExcelProperty("è¡°å1490") |
| | | private String attenuationCoefficient1490; |
| | | |
| | | @ExcelProperty("è¡°åå·®5") |
| | | private String attenuationDifference5; |
| | | |
| | | |
| | | @ExcelProperty("è¡°åå·®Max") |
| | | private String attenuationDifferenceMax; |
| | | |
| | | @ExcelProperty("æ¯å¦åæ ¼") |
| | | private String insResult; |
| | | |
| | | |
| | | @ExcelProperty("æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @ExcelProperty(value = "æ£æµæ¶é´") |
| | | private LocalDate insTime; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelIgnore |
| | | private LocalDate sendTime; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelIgnore |
| | | private String sample; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UnInsProductsDTO { |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String startDate; |
| | | |
| | | /** |
| | | * ç»ææ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private String endDate; |
| | | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | /** |
| | | * æ£éªç¶æ |
| | | */ |
| | | @ApiModelProperty(value = "æ£éªç¶æ") |
| | | private String insState; |
| | | |
| | | /** |
| | | * æ ·åç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | /** |
| | | * æ ·å大类/æ ·ååç§° |
| | | */ |
| | | @ApiModelProperty(value = "æ ·å大类/æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | /** |
| | | * åå®éªå®¤ |
| | | */ |
| | | @ApiModelProperty(value = "åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsUnPass; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author æ±ä½³å |
| | | * @date 2024/5/8 12:38 |
| | | */ |
| | | @Data |
| | | public class UnPassPageDto extends InsUnPass implements Serializable { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UpInsOrderDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "订åid") |
| | | private Integer orderId; |
| | | |
| | | @ApiModelProperty(value = "æ ·åid") |
| | | private Integer sampleId; |
| | | |
| | | @ApiModelProperty(value = "çº¦å®æ¶é´") |
| | | private String appointed; |
| | | |
| | | @ApiModelProperty(value = "ææ´¾äººå") |
| | | private List<Integer> userIdList; |
| | | |
| | | @ApiModelProperty(value = "åè¯éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseCellAndSampleDto extends WarehouseCell { |
| | | |
| | | private List<InsSample> samples; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseDto extends Warehouse { |
| | | |
| | | List<WarehouseShelf> warehouseShelfList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.pojo.WarehouseHistory; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseHistoryDto extends WarehouseHistory { |
| | | |
| | | List<InsSample> insSamples; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å·¥æ¶è®¡ç®æ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ToString |
| | | public class WorkTimeDTO implements Serializable { |
| | | |
| | | /** |
| | | *ç¨æ·id |
| | | */ |
| | | @ApiModelProperty("ç¨æ·id") |
| | | Integer userId; |
| | | |
| | | /** |
| | | *订åä¸»ä½ |
| | | */ |
| | | @ApiModelProperty("订å主ä½") |
| | | InsOrder insOrder; |
| | | |
| | | /** |
| | | *æ ·åä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty("æ ·åä¿¡æ¯") |
| | | InsSample insSample; |
| | | |
| | | /** |
| | | *æ£éªé¡¹ä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹ä¿¡æ¯") |
| | | InsProduct insProduct; |
| | | |
| | | /** |
| | | *ç¶æ£éªé¡¹ä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty("ç¶æ£éªé¡¹ä¿¡æ¯") |
| | | InsProduct parentInsProduct; |
| | | |
| | | /** |
| | | *å½åæ ·åid |
| | | */ |
| | | @ApiModelProperty("å½åæ ·åid") |
| | | Integer currentSampleId; |
| | | |
| | | /** |
| | | *循ç¯key,å½åæ£éªé¡¹id |
| | | */ |
| | | @ApiModelProperty("循ç¯key,å½åæ£éªé¡¹id") |
| | | String insProductId; |
| | | |
| | | /** |
| | | *æ§çæ£éªç»æå表 |
| | | */ |
| | | @ApiModelProperty("æ§çæ£éªç»æå表") |
| | | List<InsProductResult> oldResults; |
| | | |
| | | /** |
| | | *æ°çæ£éªç»æ |
| | | */ |
| | | @ApiModelProperty("æ°çæ£éªç»æ") |
| | | InsProductResult newResult; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class productResultDto { |
| | | |
| | | private Integer id; |
| | | |
| | | private String insValue; |
| | | |
| | | private Integer insResult; |
| | | |
| | | private String remark; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.converters.localdate.LocalDateStringConverter; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * å
纤带ç¶å ä½åæ° |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class FiberRibboGeometricalParameterExcelData implements Serializable { |
| | | |
| | | @ExcelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ExcelProperty("å¥ç®¡è²æ ") |
| | | private String bushColor; |
| | | |
| | | @ExcelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | @ExcelProperty("æ£éªé¡¹ç®åç±»") |
| | | private String inspectionItemType; |
| | | |
| | | @ExcelProperty("æ£éªäºº") |
| | | private String inspector; |
| | | |
| | | @ExcelProperty(value = "æ£éªæ¶é´",converter = LocalDateStringConverter.class) |
| | | private LocalDate insTime; |
| | | |
| | | @ExcelProperty("å
纤带å度A端") |
| | | private String thicknessA; |
| | | |
| | | @ExcelProperty("å
纤带å度B端") |
| | | private String thicknessB; |
| | | |
| | | @ExcelProperty("å
纤带宽度A端") |
| | | private String widthA; |
| | | |
| | | @ExcelProperty("å
纤带宽度B端") |
| | | private String widthB; |
| | | |
| | | @ExcelProperty("两侧å
纤水平é´è·A端") |
| | | private String sideSpacingA; |
| | | |
| | | @ExcelProperty("两侧å
纤水平é´è·B端") |
| | | private String sideSpacingB; |
| | | |
| | | @ExcelProperty("å¹³æ´åº¦A端") |
| | | private String evennessA; |
| | | |
| | | @ExcelProperty("å¹³æ´åº¦B端") |
| | | private String evennessB; |
| | | |
| | | @ExcelProperty("ç¸é»å
纤水平é´è·A端") |
| | | private String adjacentSpacingA; |
| | | |
| | | @ExcelProperty("ç¸é»å
纤水平é´è·B端") |
| | | private String adjacentSpacingB; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.FiberDto; |
| | | import com.ruoyi.inspect.dto.FibersDto; |
| | | import com.ruoyi.inspect.pojo.InsBushing; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå¥ç®¡è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:58:16 |
| | | */ |
| | | @Mapper |
| | | public interface InsBushingMapper extends BaseMapper<InsBushing> { |
| | | |
| | | List<FibersDto> selectFibersByBushingId(Integer bushingId); |
| | | |
| | | List<FiberDto> selectFiberByBushingId(Integer bushingId); |
| | | |
| | | List<FiberDto> selectFiberByFibersId(Integer fibersId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsFiber; |
| | | import com.ruoyi.inspect.pojo.InsFibers; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå
纤表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:59:01 |
| | | */ |
| | | @Mapper |
| | | public interface InsFiberMapper extends BaseMapper<InsFiber> { |
| | | |
| | | List<InsFibers> selectInsFibersByInsFiberId(Integer id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsFibers; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå
纤带表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:59:13 |
| | | */ |
| | | @Mapper |
| | | public interface InsFibersMapper extends BaseMapper<InsFibers> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderFileMapper extends BaseMapper<InsOrderFile> { |
| | | |
| | | IPage<InsOrderFile> getFileList(Page page, @Param("ew") QueryWrapper<InsOrderFile> ew, @Param("insOrderId") Integer insOrderId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.vo.DeviceVO; |
| | | import com.ruoyi.inspect.vo.ExportInsProductVO; |
| | | import com.ruoyi.inspect.vo.SampleDefectsFatherVo; |
| | | import com.ruoyi.inspect.vo.UnInsProductsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-12 16:17:55 |
| | | * @Entity com.ruoyi.inspect.pojo.InsOrder |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderMapper extends BaseMapper<InsOrder> { |
| | | // è·åæ£éªä»»å¡æ¥çç»æè¡¨æ ¼æ°æ® |
| | | List<Map<String,Object>> getInsOrderPlanList(@Param("sonLaboratory") String sonLaboratory, |
| | | @Param("entrustCode") String entrustCode, |
| | | @Param("sampleCode") String sampleCode, |
| | | @Param("createUser") Integer createUser, |
| | | @Param("startTime") String startTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("sampleType")String sampleType); |
| | | |
| | | //卿è·åtab表头 |
| | | List<Map<String,Object>> getTabHeader(@Param("sonLaboratory") String sonLaboratory,@Param("sample") String sample); |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | IPage<SampleOrderDto> selectInsOrderPage(IPage<InsOrder> page, QueryWrapper<SampleOrderDto> ew, @Param("laboratory") String laboratory, |
| | | @Param("startTime") String startTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("eqState") String eqState, |
| | | @Param("neState") String neState |
| | | ); |
| | | |
| | | // è·å导åºå·²æ£éªæ°æ® |
| | | List<ExportInsProductVO> exportChecked(@Param("names") List<String> names, @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | |
| | | //ä¿®æ¹æ£éªä¸åæ°æ® |
| | | int upInsOrderParameter(InsOrder itemParameter); |
| | | |
| | | String getLaboratoryCode(String name); |
| | | |
| | | List<SampleProductDto2> selectSampleAndProductByOrderId(@Param("ew") QueryWrapper<SampleProductDto2> ew, @Param("id") Integer id); |
| | | |
| | | IPage<CostStatisticsDto> selectCostStatistics(IPage<CostStatisticsDto> page, QueryWrapper<CostStatisticsDto> ew, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("laboratory") String laboratory); |
| | | |
| | | List<CostStatisticsDto> selectCostStatistics2(@Param("ew") QueryWrapper<CostStatisticsDto> ew,@Param("startTime") String startTime, @Param("endTime") String endTime,@Param("laboratory") String laboratory); |
| | | |
| | | DeviceVO selectDeviceList(String name); |
| | | List<SampleDefectsFatherVo> selectSampleDefects(Page page, @Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber); |
| | | |
| | | Long getCount(@Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber); |
| | | |
| | | String getEnumLabelByValue(String value); |
| | | |
| | | String getStandardMethodCode(Integer id); |
| | | |
| | | int updateStatus( Integer id); |
| | | |
| | | String selLaboratoryCode(String laboratory); |
| | | |
| | | List<Map<Integer, Object>> selectReportModelByOrderId(@Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | String seldepLimsId(int depLimsId); |
| | | // è·åé¨é¨ |
| | | String getDepartment(Integer id); |
| | | |
| | | /** |
| | | * å§æè´¹ç¨ |
| | | */ |
| | | List<CommissionFeesDto> selectCommissionFees(@Param("laboratory") String laboratory, @Param("company") String company, @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | List<UnInsProductsVO> selectUnInsProducts(@Param("laboratory")String laboratory, |
| | | @Param("startDateTime")LocalDateTime startDateTime, |
| | | @Param("endDateTime")LocalDateTime endDateTime, |
| | | @Param("dto") UnInsProductsDTO unInsProductsDTO); |
| | | |
| | | IPage<TasksShowDto> getTasksShow(Page page, @Param("sonLaboratory") String sonLaboratory); |
| | | |
| | | Map<String,Object> selectCurrentCompanyUrgentQuota(Integer userId); |
| | | |
| | | int selectPlanCountBySonLaboratory( |
| | | @Param("sonLaboratory") String sonLaboratory, |
| | | @Param("startOfMonth")LocalDateTime startOfMonth, |
| | | @Param("endOfMonth")LocalDateTime endOfMonth); |
| | | |
| | | List<ExportInsProductVO> getInsOrderTemList(@Param("entrustCode") String entrustCode, |
| | | @Param("sampleCode") String sampleCode, |
| | | @Param("startTime") String startTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("checkName") String checkName |
| | | ); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author admin |
| | | * @description é对表ãins_order_stateãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-01 11:44:50 |
| | | * @Entity com.ruoyi.inspect.pojo.InsOrderState |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderStateMapper extends BaseMapper<InsOrderState> { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-18 14:14:54 |
| | | * @Entity com.ruoyi.inspect.pojo.InsOrderTemplate |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderTemplateMapper extends BaseMapper<InsOrderTemplate> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.ProductResultDto2; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.vo.InsProductFiberVO; |
| | | import com.ruoyi.inspect.vo.InsProductVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product(æ£éªé¡¹ç®)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-08 09:45:03 |
| | | * @Entity com.ruoyi.inspect.pojo.InsProduct |
| | | */ |
| | | @Mapper |
| | | public interface InsProductMapper extends BaseMapper<InsProduct> { |
| | | |
| | | int selectOrderManDay(Integer orderId); |
| | | |
| | | Map<String, String> selectUserById(Integer userId); |
| | | |
| | | List<ProductResultDto2> getProductAndResult(Integer sampleId); |
| | | |
| | | int updateInspected(@Param("id") Integer id); |
| | | |
| | | List<InsProduct> selectFiberInsProduct(List<Integer> ids, String laboratory); |
| | | |
| | | IPage<InsProduct> selectNoProducts(Page page, Integer orderId); |
| | | |
| | | int selectInsProductCountByOrderId(Integer orderId); |
| | | |
| | | List<InsProduct> findSagTemperatureProducts(Integer sampleId, String inspectionItem); |
| | | |
| | | List<InsProductVO> selectProductByOrderId(Integer orderId,String sonLaboratory); |
| | | |
| | | List<InsProductFiberVO> selectInsProductInsFiberList(Integer sampleId); |
| | | |
| | | List<InsProductFiberVO> selectInsProductInsBushList(Integer sampleId); |
| | | |
| | | List<InsProductFiberVO> selectInsProductInsFibersList(Integer sampleId); |
| | | |
| | | List<InsProductFiberVO> selectProductBySampleId(Integer sampleId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product_result(æ£éªé¡¹ç®çç»æ)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-28 10:29:37 |
| | | * @Entity com.ruoyi.inspect.pojo.InsProductResult |
| | | */ |
| | | @Mapper |
| | | public interface InsProductResultMapper extends BaseMapper<InsProductResult> { |
| | | |
| | | List<InsProductResult> selDetail(@Param("ips") List<Integer> ips); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsProductUser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãins_product_user(æ£éªé¡¹ç®çäººåæ£éªè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-17 13:42:44 |
| | | * @Entity com.ruoyi.inspect.pojo.InsProductUser |
| | | */ |
| | | @Mapper |
| | | public interface InsProductUserMapper extends BaseMapper<InsProductUser> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsReportApproveConfig; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_report_approve_config(æ¥å审æ¹ç¾åé
ç½®)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-12-10 09:36:10 |
| | | * @Entity com.ruoyi.inspect.pojo.InsReportApproveConfig |
| | | */ |
| | | @Mapper |
| | | public interface InsReportApproveConfigMapper extends BaseMapper<InsReportApproveConfig> { |
| | | |
| | | Map<String,Object> selectApprovalConfigByLaboratory(String laboratory); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-17 22:10:02 |
| | | * @Entity com.ruoyi.inspect.pojo.InsReport |
| | | */ |
| | | @Mapper |
| | | public interface InsReportMapper extends BaseMapper<InsReport> { |
| | | |
| | | IPage<ReportPageDto> pageInsReport(IPage<ReportPageDto> page, |
| | | @Param("ew") QueryWrapper<ReportPageDto> ew, |
| | | @Param("laboratory") String laboratory); |
| | | |
| | | String getLaboratoryByName(String name); |
| | | |
| | | List<ReportPageDto> findReportCountInfo(@Param("ew") QueryWrapper<ReportPageDto> reportPageDtoQueryWrapper, |
| | | @Param("laboratory") String laboratory, |
| | | @Param("queryField") String queryField); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanDTO; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.dto.SampleProductDto3; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanVO; |
| | | import com.ruoyi.inspect.vo.SampleVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample(æ£éªæ ·å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-14 17:14:57 |
| | | * @Entity com.ruoyi.inspect.pojo.InsSample |
| | | */ |
| | | @Mapper |
| | | public interface InsSampleMapper extends BaseMapper<InsSample> { |
| | | |
| | | IPage<InsOrderPlanVO> findInsSampleAndOrder(Page page, |
| | | @Param("userName") String userName, |
| | | @Param("checkName") String checkName, |
| | | @Param("sonLaboratory") String sonLaboratory, |
| | | @Param("sample") String sample, |
| | | @Param("sampleCode") String sampleCode, |
| | | @Param("laboratory") String laboratory, |
| | | @Param("entrustCode") String entrustCode, |
| | | @Param("insState") String insState, |
| | | @Param("ew") QueryWrapper<InsOrderPlanDTO> ew, |
| | | @Param("sendTimeRange") List<LocalDateTime> sendTimeRange); |
| | | |
| | | IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, @Param("ew") QueryWrapper<InsOrderPlanDTO> ew, @Param("userId") Integer userId, @Param("sonLaboratory") String sonLaboratory, @Param("laboratory") String laboratory); |
| | | |
| | | List<SampleProductDto> selectSampleProductListByOrderId(Integer id); |
| | | |
| | | List<SampleProductDto> selectSampleProductListByOrderId2(Integer id); |
| | | |
| | | List<SampleProductDto3> selectSampleProductListByOrderId3(List<Integer> ids); |
| | | |
| | | List<SampleProductDto> getInsOrderAndSample(Integer id, String laboratory); |
| | | |
| | | String getSampleEn(String sample); |
| | | |
| | | List<InsProduct> getInsProduct1(Integer id, String laboratory); |
| | | |
| | | List<InsProduct> getInsProduct5(Integer id, String laboratory); |
| | | |
| | | List<InsProduct> getInsProduct2(@Param("id") Integer id, @Param("sonLaboratory") String sonLaboratory); |
| | | |
| | | List<InsProduct> getInsProduct3(@Param("id") Integer id, @Param("sonLaboratory") String sonLaboratory); |
| | | |
| | | List<InsProduct> getInsProduct6(@Param("id") Integer id, @Param("sonLaboratory") String sonLaboratory); |
| | | |
| | | List<InsProduct> getInsProduct4(@Param("id") Integer id, @Param("sonLaboratory") String sonLaboratory); |
| | | |
| | | List<Map<String, Object>> getReportModel(@Param("orderId") Integer orderId, @Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | SampleVo getDetailById(Integer sampleId); |
| | | |
| | | String selMethodById(Integer sampleId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsSampleUser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample_user(æ ·åè´è´£äººè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-14 17:12:02 |
| | | * @Entity com.ruoyi.inspect.pojo.InsSampleUser |
| | | */ |
| | | @Mapper |
| | | public interface InsSampleUserMapper extends BaseMapper<InsSampleUser> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.inspect.dto.UnPassPageDto; |
| | | import com.ruoyi.inspect.pojo.InsUnPass; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author æ±ä½³å |
| | | * @date 2024/5/8 13:05 |
| | | */ |
| | | @Mapper |
| | | public interface InsUnPassMapper extends BaseMapper<InsUnPass> { |
| | | IPage<UnPassPageDto> pageInsUnPass(IPage<UnPassPageDto> page, QueryWrapper<UnPassPageDto> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.ProcessOrder; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * è¦æ±ãæ 书åååè¯å®¡ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-05 03:06:20 |
| | | */ |
| | | @Mapper |
| | | public interface ProcessOrder1Mapper extends BaseMapper<ProcessOrder> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @version 1.0.0 |
| | | * @create 2024/3/14 18:54 |
| | | **/ |
| | | @Mapper |
| | | public interface SampleOrderMapper extends BaseMapper<SampleOrderDto> { |
| | | List<SampleOrderDto> selectSampleOrderList(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.WarehouseCellAndSampleDto; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_cell(è´§æ¶åå
æ ¼)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.ruoyi.inspect.pojo.WarehouseCell |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseCellMapper extends BaseMapper<WarehouseCell> { |
| | | |
| | | List<WarehouseCellAndSampleDto> getWarehouse(Integer shelfId); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.HistoryDto; |
| | | import com.ruoyi.inspect.pojo.WarehouseHistory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_history(åºå
¥åºè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.ruoyi.inspect.pojo.WarehouseHistory |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseHistoryMapper extends BaseMapper<WarehouseHistory> { |
| | | |
| | | String getUserNameById(Integer userId); |
| | | |
| | | List<HistoryDto> getHistoryListBySampleId(Integer sampleId); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.WarehouseDto; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.ruoyi.inspect.pojo.Warehouse |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseMapper extends BaseMapper<Warehouse> { |
| | | |
| | | List<WarehouseDto> selectWarehouseList(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_shelf(è´§æ¶)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.ruoyi.inspect.pojo.WarehouseShelf |
| | | */ |
| | | @Mapper |
| | | public interface WarehouseShelfMapper extends BaseMapper<WarehouseShelf> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå¥ç®¡è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:58:16 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_bushing") |
| | | @ApiModel(value = "InsBushing对象", description = "å
纤é
ç½®çå¥ç®¡è¡¨") |
| | | public class InsBushing implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç®¡è²æ ") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("æ é") |
| | | private Integer standNum; |
| | | |
| | | @ApiModelProperty("æµè¯é") |
| | | private Integer testNum; |
| | | |
| | | @ApiModelProperty("å
³è æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private Integer state; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå
纤表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:59:01 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_fiber") |
| | | @ApiModel(value = "InsFiber对象", description = "å
纤é
ç½®çå
纤表") |
| | | public class InsFiber implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("管å¥è²æ ") |
| | | private String bushColor; |
| | | |
| | | @ApiModelProperty("å
çº¤è²æ ") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("å
çº¤è§æ ¼") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åèæ å") |
| | | private String standard; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å
³è å¥ç®¡è¡¨id") |
| | | private Integer insBushingId; |
| | | |
| | | @ApiModelProperty("å
³è å
纤带表id") |
| | | private Integer insFibersId; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private Integer state; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å
纤é
ç½®çå
纤带表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-05-30 05:59:13 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_fibers") |
| | | @ApiModel(value = "InsFibers对象", description = "å
纤é
ç½®çå
纤带表") |
| | | public class InsFibers implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("å
çº¤å¸¦è§æ ¼") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åèæ å") |
| | | private String standard; |
| | | |
| | | @ApiModelProperty("å
çº¤æ£æµé") |
| | | private String num; |
| | | |
| | | @ApiModelProperty("å
³è å¥ç®¡è¡¨id") |
| | | private Integer insBushingId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private Integer state; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Size; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªä¸å |
| | | * @TableName ins_order |
| | | */ |
| | | @Data |
| | | @TableName("ins_order") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class InsOrder implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String entrustCode; |
| | | |
| | | /** |
| | | * å¤é¨å§æç¼å· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty(value = "å¤é¨å§æç¼å·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String outEntrustCode; |
| | | |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty(value = "æ£éªç±»å«") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String orderType; |
| | | |
| | | /** |
| | | * ä¸åå®¢æ· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å¶å人") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String custom; |
| | | |
| | | /** |
| | | * ä¸ååä½ |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å§æåä½") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String company; |
| | | |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("èç³»æ¹å¼") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String phone; |
| | | |
| | | /** |
| | | * å·¥åå |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å·¥åå") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String code; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ ï¼0æ®é 1ä¼å
2ç´§æ¥ï¼ |
| | | */ |
| | | @ApiModelProperty("ç´§æ¥ç¨åº¦ ï¼0æ®é 1ä¼å
2ç´§æ¥ï¼") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * çº¦å®æ¶é´ |
| | | */ |
| | | @ApiModelProperty("çº¦å®æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate appointed; |
| | | |
| | | @ApiModelProperty("æ£éªç»æ") |
| | | private Integer insResult; |
| | | |
| | | @ApiModelProperty("æ ·åå¤çæ¹å¼") |
| | | private Integer processing; |
| | | |
| | | @ApiModelProperty("æ¯å¦çæ ·") |
| | | private Integer isLeave; |
| | | |
| | | /** |
| | | * 1ï¼æ£éªå¤ç 0ï¼å¾
å®¡æ ¸ 2ï¼éå 3ï¼æ¤é |
| | | */ |
| | | @ApiModelProperty("ç¶æ") |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("夿³¨") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String remark; |
| | | |
| | | /** |
| | | * OTC订åå· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("OTC订åå·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String otcCode; |
| | | |
| | | // @ValueTableShow(11) |
| | | @ApiModelProperty("ä¸å人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | |
| | | /** |
| | | *æ´æ°äºº |
| | | */ |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | private Integer userId; |
| | | |
| | | private Integer mating; |
| | | |
| | | @ApiModelProperty("æ£éªç¶æ(0ï¼å¾
æ£éª 1:æ£éªä¸ 2:å·²æ£éª 3ï¼å¾
夿 ¸ 4ï¼å¤æ ¸æªéè¿ 5ï¼å¤æ ¸éè¿)") |
| | | private Integer insState; |
| | | |
| | | /** |
| | | * æ£éªå·¥å |
| | | */ |
| | | private String factory; |
| | | |
| | | /** |
| | | * å®éªå®¤åç§° |
| | | */ |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ ·åç±»å |
| | | */ |
| | | private String sampleType; |
| | | |
| | | /** |
| | | * æ ·ååç§° |
| | | */ |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("æ£éªæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime insTime; |
| | | |
| | | private String tell; |
| | | |
| | | private Integer send; |
| | | |
| | | private String formType; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¶é´") |
| | | private LocalDateTime examineTime; |
| | | |
| | | private String engineering; |
| | | |
| | | private String engineeringEn; |
| | | |
| | | private String production; |
| | | |
| | | private String productionEn; |
| | | |
| | | private Long companyId; |
| | | |
| | | private String prepareUser; |
| | | |
| | | @ApiModelProperty("æ¯å¦å®¡æ ¸æ¤é") |
| | | private Integer isRevocation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¤éç项ç®id") |
| | | private String revocationInsProductIds; |
| | | |
| | | @ApiModelProperty("ç¾åæ¥æ") |
| | | private LocalDateTime issuingDate; |
| | | |
| | | @ApiModelProperty("æ¤éæ¥æ") |
| | | private LocalDateTime revocationTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_order_file") |
| | | @ApiModel(value = "InsOrderFile对象", description = "æ£éªåä¸çéä»¶å表") |
| | | public class InsOrderFile implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
³è æ£éªåå¤é®id") |
| | | private Integer insOrderId; |
| | | |
| | | @ApiModelProperty("ç±»å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("éä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty("éä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ 人") |
| | | @TableField(exist = false, select = false) |
| | | private String name; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty("ä¸ä¼ æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ins_order_state |
| | | */ |
| | | @TableName(value ="ins_order_state") |
| | | @Data |
| | | public class InsOrderState implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_order表id |
| | | */ |
| | | @TableField(value = "ins_order_id") |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @TableField(value = "laboratory") |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ£éªç¶æ(0ï¼å¾
æ£éª1:æ£éªä¸ 2:å·²æ£éª3ï¼å¾
夿 ¸4ï¼å¤æ ¸æªéè¿ 5ï¼å¤æ ¸éè¿) |
| | | */ |
| | | @TableField(value = "ins_state") |
| | | private Integer insState; |
| | | |
| | | @ApiModelProperty("æ£éªæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime insTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | private Integer verifyUser; |
| | | |
| | | @ApiModelProperty("夿 ¸çç±") |
| | | private String verifyTell; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ins_order_template |
| | | */ |
| | | @TableName(value ="ins_order_template") |
| | | @Data |
| | | public class InsOrderTemplate implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @ApiModelProperty("模æ¿åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 模æ¿å
容 |
| | | */ |
| | | @ApiModelProperty("模æ¿å
容") |
| | | private String thing; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç® |
| | | * |
| | | * @TableName ins_product |
| | | */ |
| | | @TableName(value = "ins_product") |
| | | @Data |
| | | public class InsProduct implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Integer id; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private String sampleCode; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ |
| | | */ |
| | | private String inspectionItem; |
| | | |
| | | private String inspectionItemEn; |
| | | |
| | | /** |
| | | * æ£éªé¡¹åç±» |
| | | */ |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | /** |
| | | * æ£éªé¡¹åç±» |
| | | */ |
| | | private String inspectionItemSubclass; |
| | | |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | /** |
| | | * å·¥å |
| | | */ |
| | | private String factory; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ ·ååç±» |
| | | */ |
| | | private String sampleType; |
| | | |
| | | /** |
| | | * æ ·å |
| | | */ |
| | | private String sample; |
| | | |
| | | /** |
| | | * åå· |
| | | */ |
| | | private String model; |
| | | |
| | | private String methodS; |
| | | |
| | | /** |
| | | * åå®éªå®¤ |
| | | */ |
| | | private String sonLaboratory; |
| | | |
| | | /** |
| | | * 计éåä½ |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * åä»·(å
) |
| | | */ |
| | | private BigDecimal price; |
| | | |
| | | /** |
| | | * å·¥æ¶(H) |
| | | */ |
| | | private Double manHour; |
| | | |
| | | /** |
| | | * å·¥æ¶åç» |
| | | */ |
| | | private String manHourGroup; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç±»å |
| | | */ |
| | | private String inspectionItemType; |
| | | |
| | | /** |
| | | * æ£éªå¼ç±»å |
| | | */ |
| | | private String inspectionValueType; |
| | | |
| | | /** |
| | | * 设å¤ç» |
| | | */ |
| | | private String deviceGroup; |
| | | |
| | | /** |
| | | * æ£éªæ¬¡æ° |
| | | */ |
| | | private Integer checkoutNumber; |
| | | |
| | | /** |
| | | * åºé´ |
| | | */ |
| | | private String section; |
| | | |
| | | /** |
| | | * åå¼ç±»å |
| | | */ |
| | | private String valueType; |
| | | |
| | | /** |
| | | * æ¹æ³ |
| | | */ |
| | | private String method; |
| | | |
| | | /** |
| | | * é¢è®¡æ¶é´(h) |
| | | */ |
| | | private Integer manDay; |
| | | |
| | | /** |
| | | * ç¹æ®æ è¯ |
| | | */ |
| | | private String bsm; |
| | | |
| | | /** |
| | | * è¦æ±å¼ |
| | | */ |
| | | private String ask; |
| | | |
| | | /** |
| | | * è¦æ±æè¿° |
| | | */ |
| | | private String tell; |
| | | |
| | | /** |
| | | * æç»å¼ |
| | | */ |
| | | @TableField("`last_value`") |
| | | private String lastValue; |
| | | |
| | | /** |
| | | * 1ï¼åæ ¼ 0ï¼ä¸åæ ¼ 2:å¾
å® 3:ä¸å¤å® |
| | | */ |
| | | private Integer insResult; |
| | | |
| | | /** |
| | | * 1ï¼ææ 0ï¼æ æ |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_sample表id |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼standard_template表id |
| | | */ |
| | | private Integer templateId; |
| | | |
| | | @TableField(exist = false) |
| | | private List<JSONObject> template; |
| | | |
| | | @TableField(exist = false) |
| | | private Map<String, Object> style; |
| | | |
| | | @TableField(exist = false) |
| | | private InsProductResult insProductResult; |
| | | |
| | | @TableField(exist = false) |
| | | private String templateName; |
| | | |
| | | private String dic; |
| | | //温度 |
| | | private String temperature; |
| | | //湿度 |
| | | private String humidity; |
| | | |
| | | private Integer insFiberId; |
| | | |
| | | private Integer insFibersId; |
| | | |
| | | private Integer insBushId; |
| | | |
| | | private Integer standardMethodListId; |
| | | |
| | | /** |
| | | * ç¹æ®ç¬¦å·æ¿æ¢å¼ |
| | | */ |
| | | private String specialValue; |
| | | |
| | | /** |
| | | * ç¹æ®é¡¹ç®ç¶id |
| | | */ |
| | | private Integer specialItemParentId; |
| | | |
| | | //è¿åç20度常温ç计ç®å¼(温度循ç¯) |
| | | @TableField(exist = false ,select = false) |
| | | private String complue; |
| | | |
| | | /** |
| | | * å¼¹æ§æ¨¡é |
| | | */ |
| | | private String elasticityModulus; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®çç»æ |
| | | * @TableName ins_product_result |
| | | */ |
| | | @TableName(value ="ins_product_result") |
| | | @Data |
| | | public class InsProductResult implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ£éªé¡¹ç®id |
| | | */ |
| | | private Integer insProductId; |
| | | |
| | | /** |
| | | * æ£éªå¼ |
| | | */ |
| | | private String insValue; |
| | | |
| | | /** |
| | | * 计ç®å¼ |
| | | */ |
| | | private String comValue; |
| | | |
| | | /** |
| | | * 设å¤å¼ |
| | | */ |
| | | private String equipValue; |
| | | |
| | | private String equipName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®çäººåæ£éªè®°å½ |
| | | * @TableName ins_product_user |
| | | */ |
| | | @TableName(value ="ins_product_user") |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class InsProductUser implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_product表id |
| | | */ |
| | | private Integer insProductId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªæ¥å |
| | | * @TableName ins_report |
| | | */ |
| | | @TableName(value ="ins_report") |
| | | @Data |
| | | public class InsReport implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ¥åç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ£éªåid |
| | | */ |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * ç³»ç»çææ¥åå°å |
| | | */ |
| | | private String url; |
| | | |
| | | /** |
| | | * æå¨ä¸ä¼ æ¥åå°å |
| | | */ |
| | | private String urlS; |
| | | |
| | | /** |
| | | * 1ï¼æ¹å 0ï¼ä¸æ¹å |
| | | */ |
| | | private Integer isRatify; |
| | | |
| | | private String ratifyTell; |
| | | |
| | | /** |
| | | * 1ï¼å®¡æ ¸éè¿ 0ï¼å®¡æ ¸ä¸éè¿ |
| | | */ |
| | | private Integer isExamine; |
| | | |
| | | private String examineTell; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æäº¤äººï¼ |
| | | */ |
| | | private Integer writeUserId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æ¹åäººï¼ |
| | | */ |
| | | private Integer ratifyUserId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼å®¡æ ¸äººï¼ |
| | | */ |
| | | private Integer examineUserId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 1ï¼å·²æäº¤ 0ï¼å¾
æäº¤ |
| | | */ |
| | | private Integer state; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | /** |
| | | * ä¸´æ¶æ¥åå°å |
| | | */ |
| | | private String tempUrlPdf; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * æ¥å审æ¹ç¾åé
ç½® |
| | | * @TableName ins_report_approve_config |
| | | */ |
| | | @TableName(value ="ins_report_approve_config") |
| | | @Data |
| | | public class InsReportApproveConfig implements Serializable { |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * ç¼å¶äºº |
| | | */ |
| | | private Integer editor; |
| | | |
| | | /** |
| | | * å®¡æ ¸äºº |
| | | */ |
| | | private Integer examiner; |
| | | |
| | | /** |
| | | * æ¹å人 |
| | | */ |
| | | private Integer approver; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | private String laboratory; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | @TableField(select = false,exist = false) |
| | | private Integer num=1; |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºçæ¥æèç¹æ®é¡¹çæçæ ·åç»å(0:å¦ 1:æ¯) |
| | | */ |
| | | @ApiModelProperty("æ¯å¦ä¸ºçæ¥æèç¹æ®é¡¹çæçæ ·åç»å(0:å¦ 1:æ¯)") |
| | | private String isPairing; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ ·åè´è´£äººè®°å½ |
| | | * @TableName ins_sample_user |
| | | */ |
| | | @TableName(value ="ins_sample_user") |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class InsSampleUser implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ£éªæ ·åins_sample表id |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·id è´è´£äºº |
| | | */ |
| | | private Integer userId; |
| | | |
| | | /** |
| | | * 1ï¼ç¡®è®¤ 0ï¼æªç¡®è®¤ |
| | | */ |
| | | //1æ¯å¤æ ¸äºº 0æ¯æ£éªäºº |
| | | private Integer state; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * åè¯éªå®¤ |
| | | * @param insSampleId |
| | | * @param userId |
| | | * @param state |
| | | */ |
| | | private String sonLaboratory; |
| | | |
| | | public InsSampleUser(Integer insSampleId, Integer userId, Integer state,String sonLaboratory) { |
| | | this.insSampleId = insSampleId; |
| | | this.userId = userId; |
| | | this.state = state; |
| | | this.sonLaboratory = sonLaboratory; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author æ±ä½³å |
| | | * @date 2024/5/8 14:11 |
| | | */ |
| | | @Data |
| | | @TableName("ins_un_pass") |
| | | public class InsUnPass implements Serializable { |
| | | /** |
| | | * ä¸åæ ¼id |
| | | */ |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String model; |
| | | /** |
| | | * æ ·ååç§° |
| | | */ |
| | | private String sample; |
| | | /** |
| | | * æ£æµé¡¹ |
| | | */ |
| | | private String inspectionItem; |
| | | /** |
| | | * æ£æµå项 |
| | | */ |
| | | private String inspectionItemSubclass; |
| | | /** |
| | | * æ£æµç»æ |
| | | */ |
| | | @TableField("`last_value`") |
| | | private String lastValue; |
| | | /** |
| | | * å¤çæè§ |
| | | */ |
| | | private String handleSuggestion; |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | private String entrustCode; |
| | | /** |
| | | * ç¨æ·å |
| | | */ |
| | | private String name; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * <p> |
| | | * è¦æ±ãæ 书åååè¯å®¡ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-05 03:06:20 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_process_order") |
| | | @ApiModel(value = "ProcessOrder对象", description = "è¦æ±ãæ 书åååè¯å®¡") |
| | | public class ProcessOrder implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
³èå¤é®(æ£éªåid)") |
| | | private Integer insOrderId; |
| | | |
| | | @ApiModelProperty("å¤å®è§å:ä¸èèä¸ç¡®å®åº¦/èèä¸ç¡®å®åº¦(%)") |
| | | private String rule; |
| | | |
| | | @ApiModelProperty("综å室ç¾å人") |
| | | private Integer comprehensiveUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String comprehensiveUserUrl; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¥æ") |
| | | private LocalDate comprehensiveTime; |
| | | |
| | | @ApiModelProperty("颿 ·å") |
| | | private Integer issueUser; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String issueUserUrl; |
| | | |
| | | @ApiModelProperty("颿 ·æ¥æ") |
| | | private LocalDate issueTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªæ¥ååæ¾ç»è®°è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-05 08:58:39 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_process_report") |
| | | @ApiModel(value = "ProcessReport对象", description = "æ£éªæ¥ååæ¾ç»è®°è¡¨") |
| | | public class ProcessReport implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ£éªæ¥åç¼å·") |
| | | private String insReportCode; |
| | | |
| | | @ApiModelProperty("页æ°") |
| | | private String pages; |
| | | |
| | | @ApiModelProperty("åé份æ°") |
| | | private String number; |
| | | |
| | | @ApiModelProperty("åå¾ä½å¤") |
| | | private String send; |
| | | |
| | | @ApiModelProperty("åéæ¹å¼") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("å鿥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate sendTime; |
| | | |
| | | @ApiModelProperty("åé人") |
| | | private Integer sendUser; |
| | | |
| | | @ApiModelProperty("åé人åç§°") |
| | | @TableField(select = false,exist = false) |
| | | private String sendUserName; |
| | | |
| | | @ApiModelProperty("ç¾æ¶äºº") |
| | | private String signatory; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String signatoryUrl; |
| | | |
| | | @ApiModelProperty("ç¾æ¶äººåç§°") |
| | | @TableField(select = false,exist = false) |
| | | private String signatoryName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @TableName("schedule") |
| | | public class Schedule implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å
³èç¨æ·id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "æ¥ç¨å
容") |
| | | private String text; |
| | | |
| | | @ApiModelProperty(value = "æ¥ç¨æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime scheduleTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ ä¸çæ åå表 |
| | | * @TableName standard_method_list |
| | | */ |
| | | @TableName(value ="standard_method_list") |
| | | @Data |
| | | public class StandardMethodList implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * æ åç¼å· |
| | | */ |
| | | @ApiModelProperty("æ åç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * æ ååç§° |
| | | */ |
| | | @ApiModelProperty("æ åç§°å·") |
| | | private String name; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å·¥å") |
| | | private String factory; |
| | | |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ ä¸çæ£éªé¡¹ç® |
| | | * @TableName standard_product_list |
| | | */ |
| | | @TableName(value ="standard_product_list") |
| | | @Data |
| | | public class StandardProductList implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(value = "id",type = IdType.ASSIGN_ID) |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹EN") |
| | | private String inspectionItemEn; |
| | | |
| | | /** |
| | | * æ£éªé¡¹å°ç±» |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹å°ç±»") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹å°ç±»EN") |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty("åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | /** |
| | | * 计éåä½ |
| | | */ |
| | | @ApiModelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * åä»·(å
) |
| | | */ |
| | | @ApiModelProperty("åä»·") |
| | | private String price; |
| | | |
| | | /** |
| | | * å·¥æ¶(H) |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶") |
| | | private String manHour; |
| | | |
| | | /** |
| | | * å·¥æ¶åç» |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | /** |
| | | * æ£éªå¼ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | /** |
| | | * æ£éªæ¬¡æ° |
| | | */ |
| | | @ApiModelProperty("æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | | /** |
| | | * åºé´ |
| | | */ |
| | | @ApiModelProperty("åºé´") |
| | | private String section; |
| | | |
| | | /** |
| | | * æ¹æ³ |
| | | */ |
| | | @ApiModelProperty("æ¹æ³å表") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("æ¹æ³") |
| | | private String methodS; |
| | | |
| | | /** |
| | | * é¢è®¡æ¶é´(天) |
| | | */ |
| | | @ApiModelProperty("é¢è®¡æ¶é´") |
| | | private Integer manDay; |
| | | |
| | | /** |
| | | * ç¹æ®æ è¯ |
| | | */ |
| | | @ApiModelProperty("ç¹æ®æ è¯") |
| | | private String bsm; |
| | | |
| | | /** |
| | | * è¦æ±å¼ |
| | | */ |
| | | @ApiModelProperty("è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @ApiModelProperty("è¦æ±æè¿°") |
| | | private String tell; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ åæ¹æ³id |
| | | */ |
| | | @ApiModelProperty("æ åæ¹æ³id") |
| | | private Integer standardMethodListId; |
| | | |
| | | @ApiModelProperty("å·¥å") |
| | | private String factory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private Integer templateId; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("1ï¼ææ 0ï¼æ æ") |
| | | private Integer state; |
| | | |
| | | private String dic; |
| | | |
| | | private String tree; |
| | | |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»EN") |
| | | private String inspectionItemClassEn; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ 忍¡æ¿ |
| | | * @TableName standard_template |
| | | */ |
| | | @TableName(value ="standard_template") |
| | | @Data |
| | | public class StandardTemplate implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @ApiModelProperty("模æ¿åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 模æ¿ç»æ |
| | | */ |
| | | private String thing; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("æ´æ°ç¨æ·") |
| | | @TableField(exist = false) |
| | | private String updateUserName; |
| | | |
| | | /** |
| | | * 模æ¿ç¼å· |
| | | */ |
| | | @ApiModelProperty("模æ¿ç¼å·") |
| | | private String number; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ |
| | | * @TableName standard_tree |
| | | */ |
| | | @TableName(value ="standard_tree") |
| | | @Data |
| | | public class StandardTree implements Serializable { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @NotNull(message="[]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * å·¥å |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å·¥å") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String factory; |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å®éªå®¤") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String laboratory; |
| | | /** |
| | | * æ ·å大类 |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("æ ·å大类") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String sampleType; |
| | | /** |
| | | * æ ·å |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("æ ·å") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String sample; |
| | | /** |
| | | * åå· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("åå·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String model; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ä»åº |
| | | * @TableName warehouse |
| | | */ |
| | | @TableName(value ="warehouse") |
| | | @Data |
| | | public class Warehouse implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * ä»åºåç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è´§æ¶åå
æ ¼ |
| | | * @TableName warehouse_cell |
| | | */ |
| | | @TableName(value ="warehouse_cell") |
| | | @Data |
| | | public class WarehouseCell implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * è¡ |
| | | */ |
| | | @TableField("`row`") |
| | | private Integer row; |
| | | |
| | | /** |
| | | * å |
| | | */ |
| | | @TableField("`col`") |
| | | private Integer col; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * æ¯å¦ææ 1ï¼ææ 0ï¼æ æ |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 夿£ï¼è´§æ¶id |
| | | */ |
| | | private Integer shelfId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * åºå
¥åºè®°å½ |
| | | * @TableName warehouse_history |
| | | */ |
| | | @TableName(value ="warehouse_history") |
| | | @Data |
| | | public class WarehouseHistory implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private String warehouseCode; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ ·åid |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | /** |
| | | * ç¶æï¼1ï¼å
¥åº 2ï¼åºåº |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼åå
æ ¼id |
| | | */ |
| | | private Integer cellId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è´§æ¶ |
| | | * @TableName warehouse_shelf |
| | | */ |
| | | @TableName(value ="warehouse_shelf") |
| | | @Data |
| | | public class WarehouseShelf implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * è´§æ¶åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * è¡ |
| | | */ |
| | | @TableField("`row`") |
| | | private Integer row; |
| | | |
| | | /** |
| | | * å |
| | | */ |
| | | @TableField("`col`") |
| | | private Integer col; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼ä»åºid |
| | | */ |
| | | private Integer warehouseId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | public interface InsOrderService extends IService<InsOrder> { |
| | | |
| | | //è·åå使£éªä¸åæ°æ® |
| | | Map<String, Object> selectInsOrderParameter(Page<InsOrder> page, SampleOrderDto sampleOrderDto); |
| | | |
| | | //ä¿®æ¹æ£éªä¸åæ°æ® |
| | | int upInsOrder(UpInsOrderDTO upInsOrderDTO); |
| | | |
| | | int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing,List<List<Integer>> fiberPairing); |
| | | |
| | | Map<String, Object> getInsOrder(Integer id); |
| | | |
| | | int upInsOrderOfState(InsOrder insOrder); |
| | | |
| | | Map<String, Object> getInsOrderAndSample(Integer id, String laboratory); |
| | | |
| | | Map<String, Object> selectSampleAndProductByOrderId(SampleProductDto2 sampleProductDto); |
| | | List<Map<String, Object>> viewDetails(Map<String,Object> map); |
| | | |
| | | void exportChecked(Map<String,Object> data, HttpServletResponse response); |
| | | |
| | | Map<String, Object> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto); |
| | | |
| | | Map<String, Object> costStatistics2(CostStatisticsDto costStatisticsDto); |
| | | |
| | | Map<String, Object> selectSampleDefects(Page page, String inspectionItems, String orderNumber); |
| | | |
| | | int updateStatus(Integer id); |
| | | |
| | | List<SampleProductDto3> labelPrinting(String ids); |
| | | |
| | | void export(CostStatisticsDto costStatisticsDto,HttpServletResponse response)throws IOException, ServletException; |
| | | |
| | | Boolean hasSendUrgentOrder(); |
| | | |
| | | List<Map<String,Object>> getInsOrderTemList(Map<String,Object> data); |
| | | |
| | | Map<String,Object> permute(Integer num,Boolean isValue); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-18 14:14:54 |
| | | */ |
| | | public interface InsOrderTemplateService extends IService<InsOrderTemplate> { |
| | | |
| | | int addInsOrderTemplate(InsOrderTemplate insOrderTemplate); |
| | | |
| | | List<InsOrderTemplate> selectInsOrderTemplate(String company); |
| | | |
| | | Map<String,Object> selectInsOrderTemplateById(Integer id); |
| | | |
| | | int delInsOrderTemplate(Integer id); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.InsProductDto; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product(æ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 23:57:39 |
| | | */ |
| | | public interface InsProductService extends IService<InsProduct> { |
| | | |
| | | int selectOrderManDay(Integer orderId); |
| | | |
| | | int updateInspected(Integer id,String ids); |
| | | |
| | | boolean write(InsProductDto insProductDto); |
| | | |
| | | Map<String,Object> selectNoProducts(Page page, InsProduct insProduct,Integer orderId,String ids); |
| | | |
| | | List<Map<String,Object>> selectSampleByOrderId(Integer orderId); |
| | | |
| | | List<Map<String,Object>> selectProductsBySampleId(Integer sampleId,Integer orderId); |
| | | |
| | | List<Map<String,Object>> selectTemperatureByProductId(Integer productId); |
| | | |
| | | |
| | | List<Map<String,Object>> selectTemperatureNumberByProductId(Integer parentId,String inspectionItem); |
| | | |
| | | void revoke(Map<String,Object> data); |
| | | |
| | | List<Map<String,Object>> revokeReviewSample(Integer orderId); |
| | | |
| | | List<Map<String,Object>> revokeReviewTemperatureByProductId(Integer productId); |
| | | |
| | | |
| | | List<Map<String,Object>> revokeReviewProduct(Integer orderId,Integer sampleId); |
| | | |
| | | List<Map<String,Object>> revokeReviewConsistentByProductId(Integer parentId,String inspectionItem); |
| | | |
| | | void revocationPassed(Integer id); |
| | | |
| | | void revocationCancel(Integer orderId); |
| | | |
| | | void checkUpdate(Integer orderId,Integer state); |
| | | |
| | | int write2(Integer id, String elasticityModulus); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-04-06 12:13:57 |
| | | */ |
| | | public interface WarehouseCellService extends IService<WarehouseCell> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.WarehouseCellAndSampleDto; |
| | | import com.ruoyi.inspect.dto.WarehouseDto; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-04-06 12:13:57 |
| | | */ |
| | | public interface WarehouseService extends IService<Warehouse> { |
| | | |
| | | int addWarehouse(String name); |
| | | |
| | | List<WarehouseDto> selectWarehouse(); |
| | | |
| | | int addShelf(WarehouseShelf warehouseShelf); |
| | | |
| | | int delWarehouse(Integer id); |
| | | |
| | | int upWarehouse(Warehouse warehouse); |
| | | |
| | | int delShelf(Integer id); |
| | | |
| | | int upShelf(WarehouseShelf warehouseShelf); |
| | | |
| | | List<WarehouseCellAndSampleDto> getWarehouse(Integer shelfId); |
| | | |
| | | int inWarehouse(String trees, String sampleCode); |
| | | |
| | | int outWarehouse(String sampleCode); |
| | | |
| | | Map<String, Object> getSampleRecord(Integer id); |
| | | |
| | | int searchSampleId(String sampleCode); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.deepoove.poi.policy.DynamicTableRenderPolicy; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | |
| | | public class DetailTablePolicy extends DynamicTableRenderPolicy { |
| | | @Override |
| | | public void render(XWPFTable xwpfTable, Object data) throws Exception { |
| | | if (null == data) return; |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.domain.entity.Custom; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.EasyExcelUtils; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.excel.FiberRibboGeometricalParameterExcelData; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import com.ruoyi.inspect.vo.ExportInsProductVO; |
| | | import com.ruoyi.inspect.vo.SampleDefectsFatherVo; |
| | | import com.ruoyi.system.mapper.CustomMapper; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | @AllArgsConstructor |
| | | public class InsOrderServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> |
| | | implements InsOrderService { |
| | | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | private InsProductService insProductService; |
| | | |
| | | private InsProductUserMapper insProductUserMapper; |
| | | |
| | | private NumberGenerator<InsOrder> numberGenerator; |
| | | |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | UserMapper userMapper; |
| | | |
| | | private InsBushingMapper insBushingMapper; |
| | | |
| | | private InsFibersMapper insFibersMapper; |
| | | |
| | | private InsFiberMapper insFiberMapper; |
| | | |
| | | private InsProductResultMapper insProductResultMapper; |
| | | |
| | | CustomMapper customMapper; |
| | | |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | private ProcessOrder1Mapper processOrderMapper; |
| | | |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @Override |
| | | public Map<String, Object> selectInsOrderParameter(Page<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | page.setOptimizeCountSql(false); |
| | | List<String> startAndEndTime = sampleOrderDto.getStartAndEndTime(); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (CollectionUtils.isNotEmpty(startAndEndTime)) { |
| | | startTime = startAndEndTime.get(0) + " 00:00:00"; |
| | | endTime = startAndEndTime.get(1) + " 23:59:59"; |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //// map.put("head", PrintChina.printChina(SampleOrderDto.class)); |
| | | // //夿å
¨é¨,个人,ç»ç»çæé |
| | | // Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter"); |
| | | // User user = userMapper.selectById(map1.get("userId"));//å½åç»å½ç人 |
| | | // Integer roleId = user.getRoleId(); |
| | | // //è·åå½å人æå±å®éªå®¤id |
| | | // String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | // if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | // String[] split = departLimsId.split(","); |
| | | // //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | // String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | // if (departLims.contains("å®éªå®¤")) { |
| | | // laboratory = departLims; |
| | | // } |
| | | // } |
| | | // //夿æ¯å¦æ¯å
¨é¨æé |
| | | // Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "selectAllInsOrderParameter")); |
| | | // if (ObjectUtils.isEmpty(power)) { |
| | | // if (map1.get("look") == 1) { |
| | | // //个人 |
| | | // sampleOrderDto.setCreateUser(map1.get("userId")); |
| | | // } else { |
| | | // //ç»ç» |
| | | // try { |
| | | // sampleOrderDto.setCompany(customMapper.selectById(user.getCompany()).getCompany()); |
| | | // } catch (NullPointerException e) { |
| | | // throw new ErrorException("æ¾ä¸å°æå±åä½"); |
| | | // } |
| | | // } |
| | | // } |
| | | Integer state = sampleOrderDto.getState(); |
| | | sampleOrderDto.setState(null); |
| | | IPage<SampleOrderDto> sampleOrderDtoIPage = insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), laboratory, startTime, endTime, String.valueOf(state), null); |
| | | if (sampleOrderDtoIPage.getRecords().isEmpty() && (StringUtils.isNotBlank(sampleOrderDto.getEntrustCode()) || StringUtils.isNotBlank(sampleOrderDto.getOutEntrustCode()))) { |
| | | QueryWrapper<SampleOrderDto> wrapper = QueryWrappers.queryWrappers(sampleOrderDto); |
| | | IPage<InsOrder> orderPage = new Page<>(); |
| | | BeanUtil.copyProperties(page, orderPage); |
| | | IPage<SampleOrderDto> otherPage = insOrderMapper.selectInsOrderPage(orderPage, wrapper, laboratory, startTime, endTime, null, String.valueOf(state)); |
| | | if (1 == otherPage.getRecords().size()) { |
| | | sampleOrderDtoIPage = otherPage; |
| | | } |
| | | } |
| | | sampleOrderDtoIPage.getRecords().parallelStream().forEach(i -> { |
| | | if (ObjectUtils.isNotEmpty(i.getSampleCode()) && i.getSampleCode().contains("ï¼")) { |
| | | String[] split = i.getSampleCode().split("ï¼"); |
| | | i.setSampleCode(split[0]); |
| | | } |
| | | }); |
| | | map.put("body", sampleOrderDtoIPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upInsOrder(UpInsOrderDTO upInsOrderDTO) { |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(upInsOrderDTO.getOrderId()); |
| | | insOrder.setAppointed(LocalDate.parse(upInsOrderDTO.getAppointed())); |
| | | insOrder.setSendTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(insOrder); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, upInsOrderDTO.getOrderId()).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getState, 1) |
| | | // .isNull(InsProduct::getInsFibersId) |
| | | // .isNull(InsProduct::getInsFiberId) |
| | | .select(InsProduct::getSonLaboratory).groupBy(InsProduct::getSonLaboratory)); |
| | | //æ¥è¯¢ins_order_state,æ²¡æææ°å¢ |
| | | long count = insOrderStateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery().eq(InsOrderState::getInsOrderId, upInsOrderDTO.getOrderId())); |
| | | if (count == 0) { |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsOrderState insOrderState = new InsOrderState(); |
| | | insOrderState.setInsOrderId(upInsOrderDTO.getOrderId()); |
| | | try { |
| | | insOrderState.setLaboratory(insProduct.getSonLaboratory()); |
| | | } catch (NullPointerException e) { |
| | | throw new ErrorException("该æ£éªåææªç»´æ¤å®éªå®¤çæ£éªé¡¹ç®"); |
| | | } |
| | | insOrderState.setInsState(0); |
| | | insOrderStateMapper.insert(insOrderState); |
| | | } |
| | | } |
| | | //æ·»å æ ·åæ£éªäººå |
| | | if (CollectionUtils.isNotEmpty(upInsOrderDTO.getUserIdList())) { |
| | | upInsOrderDTO.getUserIdList().forEach(userId -> { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setUserId(userId); |
| | | insSampleUser.setInsSampleId(upInsOrderDTO.getOrderId()); |
| | | insSampleUser.setSonLaboratory(upInsOrderDTO.getSonLaboratory()); |
| | | insSampleUserMapper.insert(insSampleUser); |
| | | }); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing, List<List<Integer>> fiberPairing) { |
| | | insOrder.setState(0); |
| | | //夿鿩çå§æåä½ä¸å¶å人çå§æå使¯å¦ä¸è´ |
| | | Integer userId = 1; |
| | | String company = userMapper.selectById(userId).getCompany(); |
| | | if (!company.equals(insOrder.getCompanyId() + "")) { |
| | | //妿ä¸ä¸è´é£ä¹å§æäººå段å¿
å¡« |
| | | if (ObjectUtils.isEmpty(insOrder.getPrepareUser())) { |
| | | throw new ErrorException("å§æäººä¸è½ä¸ºç©º"); |
| | | } |
| | | } else { |
| | | //妿ä¸è´,é£ä¹å¶å人就æ¯å§æäºº |
| | | insOrder.setPrepareUser(insOrder.getCustom()); |
| | | } |
| | | //客æ·ä»£å· |
| | | Custom custom = customMapper.selectById(insOrder.getCompanyId()); |
| | | String customCode = custom.getCode2(); |
| | | if (!custom.getCompany().equals(insOrder.getCompany())) { |
| | | Custom one = customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, insOrder.getCompany())); |
| | | insOrder.setCompanyId(one.getId()); |
| | | customCode = one.getCode2(); |
| | | } |
| | | //å®éªå®¤ç¼å· |
| | | String laboratoryCode = baseMapper.selLaboratoryCode(insOrder.getLaboratory()); |
| | | if (StringUtils.isEmpty(laboratoryCode)) { |
| | | laboratoryCode = ""; |
| | | } |
| | | //å¤é¨å§æç¼å· |
| | | String outEntrustCodePrefix = getOutEntrustCodePrefix(customCode, laboratoryCode); |
| | | String outEntrustCode = numberGenerator.generateNumberWithPrefix(5, outEntrustCodePrefix, InsOrder::getOutEntrustCode); |
| | | insOrder.setOutEntrustCode(outEntrustCode); |
| | | // String giveCode = this.giveCode.giveCode("JCZX-" + customCode + "-", "ins_sample", "", "yyMMdd"); |
| | | String giveCode = ""; |
| | | // insOrder.setOutEntrustCode(giveCode.giveCode3("ZT/" + code2 + "-" + code + "-", insOrder.getCompanyId(), insOrder.getLaboratory(), "ins_order", "", "yyMM")); |
| | | // String giveCode = this.giveCode.giveCode("JCZX-" + code + "-", "ins_sample", "", "yyMMdd"); |
| | | insOrderMapper.insert(insOrder); |
| | | AtomicInteger count = new AtomicInteger(); |
| | | List<FiberDto> fiberList = new ArrayList<>(); |
| | | list.forEach(a -> { |
| | | count.getAndIncrement(); |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | if (StrUtil.isEmpty(a.getSampleCode())) { |
| | | a.setSampleCode(giveCode.split("-")[2] + "-" + count.get()); |
| | | } else { |
| | | //å»é¤æè¾çæ ·åç¼å·ä¸é¦å°¾å¯è½å
å«çç©ºæ ¼ |
| | | a.setSampleCode(a.getSampleCode().trim()); |
| | | } |
| | | insSampleMapper.insert(a); |
| | | if (ObjectUtil.isNotEmpty(a.getInsProduct())) { |
| | | addInsProductMethod(a.getId(), a.getInsProduct(), null, 0, false); |
| | | if (ObjectUtil.isNotEmpty(a.getBushing())) { |
| | | for (BushingDto bushingDto : a.getBushing()) { |
| | | bushingDto.setInsSampleId(a.getId()); |
| | | insBushingMapper.insert(bushingDto); |
| | | //å
纤ä¸ä¸ºç©º |
| | | if (!bushingDto.getFiber().isEmpty()) { |
| | | fiberList.addAll(bushingDto.getFiber()); |
| | | for (FiberDto fiberDto : bushingDto.getFiber()) { |
| | | fiberDto.setInsBushingId(bushingDto.getId()); |
| | | insFiberMapper.insert(fiberDto); |
| | | addInsProductMethod(a.getId(), a.getInsProduct(), fiberDto.getId(), 2, true); |
| | | addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false); |
| | | } |
| | | } |
| | | //å
纤带ä¸ä¸ºç©º |
| | | if (!bushingDto.getFibers().isEmpty()) { |
| | | for (FibersDto fibersDto : bushingDto.getFibers()) { |
| | | fibersDto.setInsBushingId(bushingDto.getId()); |
| | | if (StringUtils.isBlank(fibersDto.getCode())) { |
| | | // fibersDto.setCode(this.giveCode.giveCode("", "ins_fibers", "", "yyMMdd")); |
| | | fibersDto.setCode(""); |
| | | } |
| | | insFibersMapper.insert(fibersDto); |
| | | for (FiberDto fiberDto : fibersDto.getFiber()) { |
| | | fiberDto.setInsFibersId(fibersDto.getId()); |
| | | insFiberMapper.insert(fiberDto); |
| | | addInsProductMethod(a.getId(), a.getInsProduct(), fiberDto.getId(), 2, true); |
| | | addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false); |
| | | } |
| | | //addInsProductMethod(a.getId(), a.getInsProduct(), fibersDto.getId(), 1); |
| | | addInsProductMethod(a.getId(), fibersDto.getProductList(), fibersDto.getId(), 1, false); |
| | | } |
| | | } |
| | | //é½ä¸ºç©º åªé
ç½®äºå¥ç®¡ è¿ç§æ
åµåªéäºé¡¹ç®æå项æ¯å«ææ¾å¥ç®¡ç |
| | | if (StringUtils.isNotBlank(bushingDto.getColor())) { |
| | | //æ£éªé¡¹æ¼æ¥å符 |
| | | String insItem = a.getInsProduct().stream().map(InsProduct::getInspectionItem).distinct().collect(Collectors.joining(",")); |
| | | //æ£éªåé¡¹æ¼æ¥å符 |
| | | String insItemSubclass = a.getInsProduct().stream().map(InsProduct::getInspectionItemSubclass).distinct().collect(Collectors.joining(",")); |
| | | if (insItem.contains("æ¾å¥ç®¡") || insItemSubclass.contains("æ¾å¥ç®¡")) { |
| | | //è·åæ£éªé¡¹ç®åæå项ä¸å
嫿¾å¥ç®¡çæ£éªé¡¹ç® |
| | | List<InsProduct> products = a.getInsProduct().stream() |
| | | .filter(insProduct -> insProduct.getInspectionItem().contains("æ¾å¥ç®¡") || |
| | | insProduct.getInspectionItemSubclass().contains("æ¾å¥ç®¡")) |
| | | .collect(Collectors.toList()); |
| | | for (InsProduct product : products) { |
| | | product.setInsBushId(bushingDto.getId()); |
| | | product.setId(null); |
| | | product.setCreateTime(null); |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setInsSampleId(a.getId()); |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | insProductMapper.insert(product); |
| | | } |
| | | } |
| | | // else { |
| | | // throw new ErrorException("æ ·åçå
纤é
置信æ¯é颿²¡æé
ç½®å
纤带信æ¯ä¹æ²¡æå
纤信æ¯,è¯·éæ°é
ç½®ä¿ååæäº¤ä¸å!!!"); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (ObjectUtil.isNotEmpty(a.getInsulating())) { |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (Integer i = 0; i < a.getInsulating().getNum(); i++) { |
| | | ip2.addAll(a.getInsulating().getInsProduct()); |
| | | } |
| | | for (InsProduct product : ip2) { |
| | | product.setStandardMethodListId(a.getInsulating().getStandardMethodListId()); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2, null, 0, false); |
| | | } |
| | | if (ObjectUtil.isNotEmpty(a.getSheath())) { |
| | | for (InsProduct product : a.getSheath().getInsProduct()) { |
| | | product.setStandardMethodListId(a.getSheath().getStandardMethodListId()); |
| | | } |
| | | addInsProductMethod(a.getId(), a.getSheath().getInsProduct(), null, 0, false); |
| | | } |
| | | if (ObjectUtil.isNotEmpty(a.getChildSampleList())) { |
| | | for (SampleProductDto b : a.getChildSampleList()) { |
| | | for (int i = 0; i < b.getNum(); i++) { |
| | | b.setId(null); |
| | | b.setInsOrderId(insOrder.getId()); |
| | | b.setParentId(a.getId()); |
| | | if (StrUtil.isEmpty(b.getSampleCode())) { |
| | | // b.setSampleCode(this.giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | b.setSampleCode(""); |
| | | } |
| | | insSampleMapper.insert(b); |
| | | if (ObjectUtil.isNotEmpty(b.getInsProduct())) { |
| | | addInsProductMethod(b.getId(), b.getInsProduct(), null, 0, false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (ObjectUtil.isEmpty(a.getInsProduct()) && ObjectUtil.isNotEmpty(a.getBushing())) { |
| | | for (BushingDto bushingDto : a.getBushing()) { |
| | | bushingDto.setInsSampleId(a.getId()); |
| | | insBushingMapper.insert(bushingDto); |
| | | if (!bushingDto.getFiber().isEmpty()) { |
| | | fiberList.addAll(bushingDto.getFiber()); |
| | | for (FiberDto fiberDto : bushingDto.getFiber()) { |
| | | fiberDto.setInsBushingId(bushingDto.getId()); |
| | | insFiberMapper.insert(fiberDto); |
| | | addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false); |
| | | } |
| | | } else { |
| | | for (FibersDto fibersDto : bushingDto.getFibers()) { |
| | | fibersDto.setInsBushingId(bushingDto.getId()); |
| | | fibersDto.setCode(""); |
| | | insFibersMapper.insert(fibersDto); |
| | | for (FiberDto fiberDto : fibersDto.getFiber()) { |
| | | fiberDto.setInsFibersId(fibersDto.getId()); |
| | | insFiberMapper.insert(fiberDto); |
| | | addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false); |
| | | } |
| | | addInsProductMethod(a.getId(), fibersDto.getProductList(), fibersDto.getId(), 1, false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | //æå
纤æ¥å¤´æèç¹æ®é¡¹çæ ·åææ·»å 两两ç»å |
| | | for (List<Integer> i : pairing) { |
| | | SampleProductDto sample = JSON.parseObject(JSON.toJSONString(list.get(i.get(0) - 1)), SampleProductDto.class); |
| | | List<InsProduct> insProducts = sample.getInsProduct().stream().filter(a -> Objects.equals(a.getInspectionItem(), "å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | if (!insProducts.isEmpty()) { |
| | | sample.setSampleCode(list.get(i.get(0) - 1).getSampleCode() + "/" + list.get(i.get(1) - 1).getSampleCode()); |
| | | sample.setId(null); |
| | | sample.setIsPairing("1"); |
| | | insSampleMapper.insert(sample); |
| | | try { |
| | | for (InsProduct insProduct : insProducts) { |
| | | insProduct.setId(null); |
| | | insProduct.setInsSampleId(sample.getId()); |
| | | insProductMapper.insert(insProduct); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | //å
纤é
ç½®ççæ¥é
对 |
| | | if (!fiberPairing.isEmpty()) { |
| | | for (List<Integer> integers : fiberPairing) { |
| | | StringBuilder code1 = new StringBuilder(list.get(0).getSampleCode() + "-"); |
| | | StringBuilder code2 = new StringBuilder(list.get(1).getSampleCode() + "-"); |
| | | //é
对ç两个å
çº¤è²æ |
| | | FiberDto fiberDto1 = fiberList.get(integers.get(0) - 1); |
| | | code1.append(fiberDto1.getBushColor()).append("-").append(fiberDto1.getColor()); |
| | | FiberDto fiberDto2 = fiberList.get(integers.get(1) - 1); |
| | | code2.append(fiberDto2.getBushColor()).append("-").append(fiberDto2.getColor()); |
| | | //å¾éçå
纤æ¥å¤´æèæ£éªé¡¹ |
| | | //List<InsProduct> insProducts = fiberDto1.getProductList().stream().filter(a -> Objects.equals(a.getInspectionItem(), "å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | |
| | | //é
对åçæ ·å |
| | | InsSample insSample = new InsSample(); |
| | | BeanUtil.copyProperties(list.get(0), insSample); |
| | | insSample.setSampleCode(code1 + "/" + code2); |
| | | insSample.setId(null); |
| | | insSample.setIsPairing("1"); |
| | | insSampleMapper.insert(insSample); |
| | | |
| | | |
| | | // 妿æ¯å
纤é
ç½®ççæ¥é
对ï¼åªéè¦è·ålistçbushingå°±è¡ï¼çæçæ ·å个æ°ä¸ä¸åç颿 ·åä¸ªæ°æ å
³ |
| | | // ä¸ä¸ªæ ·åä¸é¢åªéè¦æ·»å 䏿¬¡product åªæ·»å å
纤æ¥å¤´æèçæ£éªé¡¹ |
| | | // æ·»å å¥ç®¡ |
| | | List<BushingDto> bushing = list.get(0).getBushing(); |
| | | if (CollectionUtils.isNotEmpty(bushing)) { |
| | | for (int j = 0; j < bushing.size(); j++) { |
| | | bushing.get(j).setId(null); |
| | | bushing.get(j).setInsSampleId(insSample.getId()); |
| | | insBushingMapper.insert(bushing.get(j)); |
| | | Integer bushingId = bushing.get(j).getId(); |
| | | // æ·»å å
纤带 |
| | | List<FibersDto> fibers = bushing.get(j).getFibers(); |
| | | if (CollectionUtils.isNotEmpty(fibers)) { |
| | | fibers.forEach(item -> { |
| | | item.setId(null); |
| | | item.setInsBushingId(bushingId); // å¥ç®¡id |
| | | insFibersMapper.insert(item); |
| | | // å°æ£éªé¡¹çå
纤带idèµå¼ |
| | | if (CollectionUtils.isNotEmpty(item.getProductList())) { |
| | | item.getProductList().forEach(insProduct -> { |
| | | if (insProduct.getInspectionItem().equals("å
纤æ¥å¤´æè")) { |
| | | insProduct.setInsFibersId(item.getId()); // å
纤带id |
| | | insProduct.setInsSampleId(insSample.getId()); // æ ·åid |
| | | insProduct.setId(null); |
| | | insProductMapper.insert(insProduct); |
| | | } |
| | | }); |
| | | } |
| | | // æ¯å¦å«æå
纤 |
| | | if (CollectionUtils.isNotEmpty(item.getFiber())) { |
| | | List<FiberDto> fiber = item.getFiber(); |
| | | fiber.forEach(f -> { |
| | | f.setId(null); |
| | | f.setInsBushingId(bushingId); // å¥ç®¡id |
| | | insFiberMapper.insert(f); |
| | | f.getProductList().forEach(insProduct -> { |
| | | if (insProduct.getInspectionItem().equals("å
纤æ¥å¤´æè")) { |
| | | insProduct.setInsFiberId(f.getId()); // å
纤id |
| | | insProduct.setInsSampleId(insSample.getId()); // æ ·åid |
| | | insProduct.setId(null); |
| | | insProductMapper.insert(insProduct); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | // åªæå
纤çæ
åµä¸ |
| | | else { |
| | | bushing.get(j).getFiber().forEach(f -> { |
| | | f.setInsBushingId(bushingId); // å¥ç®¡id |
| | | f.setId(null); |
| | | insFiberMapper.insert(f); |
| | | f.getProductList().forEach(insProduct -> { |
| | | if (insProduct.getInspectionItem().equals("å
纤æ¥å¤´æè")) { |
| | | insProduct.setInsFiberId(f.getId()); // å
纤id |
| | | insProduct.setInsSampleId(insSample.getId()); // æ ·åid |
| | | insProduct.setId(null); |
| | | insProductMapper.insert(insProduct); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 没æè¿è¡å
纤é
ç½®ççæ¥é
对ï¼ç´æ¥æ·»å æ ·å |
| | | // try { |
| | | // for (InsProduct insProduct : insProducts) { |
| | | // insProduct.setId(null); |
| | | // insProduct.setInsSampleId(insSample.getId()); |
| | | // insProductMapper.insert(insProduct); |
| | | // } |
| | | // } catch (Exception e) { |
| | | // } |
| | | } |
| | | } |
| | | return insOrder.getId(); |
| | | } |
| | | |
| | | /** |
| | | * çæå¤é¨å§æç¼å·åç¼ï¼ZT/TX-01-2411XXXXX |
| | | * |
| | | * @param customCode 客æ·ä»£å· |
| | | * @param labCode è¯éªå®¤ä»£å· |
| | | * @return |
| | | */ |
| | | private static String getOutEntrustCodePrefix(String customCode, String labCode) { |
| | | String currentMonth = LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")); |
| | | return "ZT/" + labCode + "-" + customCode + "-" + currentMonth; |
| | | } |
| | | |
| | | /** |
| | | * çææ£æµä¸å¿å§æç¼å·åç¼ï¼JCZX/TX-01-2411XXXXX |
| | | * |
| | | * @param customCode 客æ·ä»£å· |
| | | * @param labCode è¯éªå®¤ä»£å· |
| | | * @return |
| | | */ |
| | | private static String getEntrustCodePrefix(String customCode, String labCode) { |
| | | String currentMonth = LocalDate.now().format(DateTimeFormatter.ofPattern("yyMM")); |
| | | return "JCZX/" + labCode + "-" + customCode + "-" + currentMonth; |
| | | } |
| | | |
| | | private void addInsProductMethod(Integer sampleId, List<InsProduct> productList, Integer id, Integer type, Boolean is) { |
| | | InsOrder insOrder = insOrderMapper.selectById(insSampleMapper.selectById(sampleId).getInsOrderId()); |
| | | String name = insSampleMapper.selMethodById(sampleId); |
| | | for (InsProduct product : productList) { |
| | | if (product.getInspectionItem().contains("æ¾å¥ç®¡") || (!Objects.isNull(product.getInspectionItemSubclass()) && product.getInspectionItemSubclass().contains("æ¾å¥ç®¡"))) { |
| | | continue; |
| | | } |
| | | if (product.getState() == 1 && !product.getInspectionItem().equals("å
纤æ¥å¤´æè")) { |
| | | //夿å
ç¼ç温度循ç¯é¡¹ç®æ·»å |
| | | if (insOrder.getSampleType().equals("å
ç¼") && product.getInspectionItem().equals("温度循ç¯") && type != 0) { |
| | | //å¤æéæ©çæ åæ¹æ³æ¯å§æè¦æ±è¿æ¯å
¶ä»æ åæ¹æ³ |
| | | if (!name.equals("å§æè¦æ±")) { |
| | | //夿æ åæ¹æ³ç温度循ç¯çè¦æ±æè¿°æ¯å¦æå¡«å |
| | | if (ObjectUtils.isEmpty(product.getTell()) || product.getTell().isEmpty()) { |
| | | throw new ErrorException("å
ç¼ç温度循ç¯çè¦æ±æè¿°ä¸ºç©º,éè¦å¨æ ååºé
ç½®è¦æ±æè¿°!!!"); |
| | | } else { |
| | | //è§£æ(温度èå´ï¼20âï¼-40âï¼65âï¼ä¿æ¸©æ¶é´ï¼12hï¼ å¾ªç¯æ¬¡æ°ï¼2æ¬¡ï¼ å
纤ï¼1310nmï¼1550nmï¼éå è¡°åä¸å¤§äº0.03dB/km) |
| | | String tell = product.getTell().replace("ï¼", ")") |
| | | .replace("(", "ï¼") |
| | | .replace(")", "ï¼") |
| | | .replace("ï¼", ",") |
| | | .replace("ï¼", ":") |
| | | .replace("ï¼", ";") |
| | | .replace("ä¸å¤§äº", "â¤") |
| | | .replace("ä¸å°äº", "â¥") |
| | | .replace("大äº", ">") |
| | | .replace("å°äº", "<") |
| | | .replace("çäº", "="); |
| | | String[] message = null; |
| | | String[] nm = null; |
| | | String ask = null; |
| | | String count = null; |
| | | try { |
| | | String[] strings = tell.split(";"); |
| | | //温度 |
| | | String temperature = strings[0]; |
| | | String[] split = temperature.split(":"); |
| | | message = split[1].split(","); |
| | | //å¾ªç¯æ¬¡æ° |
| | | count = strings[2].split(":")[1].split("次")[0]; |
| | | //å
纤项ç®åè¦æ±å¼ |
| | | String string = strings[3]; |
| | | nm = string.split("ï¼")[1].split("ï¼")[0].split(","); |
| | | ask = string.split("è¡°å")[1].split("dB")[0]; |
| | | } catch (Exception e) { |
| | | throw new ErrorException("温度循ç¯çè¦æ±æè¿°æ ¼å¼å¼å¸¸,请åç
§æ¸©åº¦èå´ï¼20âï¼-40âï¼65âï¼ä¿æ¸©æ¶é´ï¼12hï¼ å¾ªç¯æ¬¡æ°ï¼2æ¬¡ï¼ å
纤ï¼1310nmï¼1550nmï¼éå è¡°åä¸å¤§äº0.03dB/km"); |
| | | } |
| | | //æ¼æ¥ |
| | | String s = ""; |
| | | for (int i = 0; i < nm.length; i++) { |
| | | s += "20â(常温)," + nm[i] + ",null;"; |
| | | for (int j = 0; j < message.length; j++) { |
| | | s += message[j] + "," + nm[i] + "," + ask + ";"; |
| | | } |
| | | } |
| | | s += count; |
| | | product.setAsk(s); |
| | | insProductMapper.updateById(product); |
| | | dealWithTemperatureLoop(type, id, sampleId, product); |
| | | } |
| | | } else { |
| | | //20â(常温),1310nm,null;-40â,1310nm,â¤0.2;75â,1310nm,<0.3;20â,1310nm,â¤0.1;20â(常温),1550nm,null;-40â,1550nm,â¤0.2;75â,1550nm,<0.3;20â,1550nm,â¤0.1;3 |
| | | dealWithTemperatureLoop(type, id, sampleId, product); |
| | | } |
| | | } |
| | | //夿ç循ç¯é¡¹ç®çæ·»å 忏©åè¯éªé¡¹ç®çæ·»å |
| | | else if (product.getInspectionItem().equals("ç循ç¯") || product.getInspectionItem().equals("温åè¯éª")) { |
| | | List<InsProduct> insProductess = new ArrayList<>(); |
| | | product.setId(null); |
| | | product.setInsSampleId(sampleId); |
| | | insProductMapper.insert(product); |
| | | // insProductess.add(product); |
| | | List<InsProduct> insProductes = new ArrayList<>(); |
| | | List<InsProduct> insProducts = new ArrayList<>(); |
| | | String[] strings = product.getAsk().split(";"); |
| | | //å¾ªç¯æ¬¡æ° |
| | | int count = Integer.parseInt(strings[strings.length - 1]); |
| | | for (int i = 0; i < strings.length - 1; i++) { |
| | | String[] split = strings[i].split(","); |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setInspectionItem("1");//æ£éªç¶é¡¹--å¾ªç¯æ¬¡æ° |
| | | insProduct.setInspectionItemSubclass(split[0]);//æ£éªå项--ç¯å¢æ¸©åº¦/导线温度/èå¼ æ¸©åº¦/æ¥ç»æ¸©åº¦ |
| | | insProduct.setInspectionItemSubclassEn(split[1]);//æ£éªåé¡¹è±æ--ç¯å¢æ¸©åº¦/导线温度/èå¼ æ¸©åº¦/æ¥ç»æ¸©åº¦ |
| | | insProduct.setAsk(null);//æ£éªè¦æ± |
| | | insProduct.setTell(null);//æ£éªæè¿° |
| | | insProduct.setInsSampleId(sampleId); |
| | | insProduct.setState(1); |
| | | insProduct.setFactory(product.getFactory()); |
| | | insProduct.setLaboratory(product.getLaboratory()); |
| | | insProduct.setSampleType(product.getSampleType()); |
| | | insProduct.setSample(product.getSample()); |
| | | insProduct.setModel(product.getModel()); |
| | | insProduct.setSonLaboratory(product.getSonLaboratory()); |
| | | insProduct.setUnit("â");//åä½ |
| | | insProduct.setManHour(product.getManHour());//å·¥æ¶ |
| | | insProduct.setManHourGroup(product.getManHourGroup()); |
| | | insProduct.setInspectionItemType("0"); |
| | | insProduct.setInspectionValueType("1"); |
| | | insProduct.setTemplateId(product.getTemplateId());//æ·»å æ¨¡æ¿id |
| | | insProduct.setSpecialItemParentId(product.getId());//ç¹æ®é¡¹ç¶id |
| | | if (product.getInspectionItem().equals("ç循ç¯")) { |
| | | insProduct.setInspectionItemClass("ç´æµçµé»");//æ£éªåå项--ç´æµçµé» |
| | | insProduct.setInspectionItemClassEn("DC resistance");//æ£éªååé¡¹è±æ--ç´æµçµé» |
| | | insProduct.setUnit("Ω/km");//åä½ |
| | | } |
| | | insProducts.add(insProduct); |
| | | insProductes.add(insProduct); |
| | | insProductess.add(insProduct); |
| | | } |
| | | //çå¾ªç¯ææå¤æ¬¡å¾ªç¯æ¬¡æ° |
| | | if (count > 1) { |
| | | //循ç¯è¶
è¿1次 |
| | | for (int j = 2; j <= count; j++) { |
| | | for (InsProduct insProduct : insProductes) { |
| | | InsProduct insProduct1 = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, insProduct1); |
| | | insProduct1.setInspectionItem(j + "");//å¾ªç¯æ¬¡æ° |
| | | insProductess.add(insProduct1); |
| | | } |
| | | } |
| | | } |
| | | insProductService.saveBatch(insProductess); |
| | | } |
| | | //å¼§åç¹æ®é¡¹ |
| | | else if (product.getInspectionItem().contains("å¼§å")) { |
| | | product.setId(null); |
| | | product.setInsSampleId(sampleId); |
| | | insProductMapper.insert(product); |
| | | //éè¦æ·»å çå项 |
| | | List<Map<String, Object>> childrenMapList = initChildrenList(); |
| | | //å项 |
| | | List<InsProduct> childrenProducts = new ArrayList<>(); |
| | | for (Map<String, Object> map : childrenMapList) { |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setInspectionItem(product.getInspectionItem()); |
| | | insProduct.setInspectionItemSubclass(map.get("inspectionItem").toString()); |
| | | insProduct.setUnit(map.get("unit").toString()); |
| | | insProduct.setAsk(null);//æ£éªè¦æ± |
| | | insProduct.setTell(null);//æ£éªæè¿° |
| | | insProduct.setInsSampleId(sampleId); |
| | | insProduct.setState(1); |
| | | insProduct.setFactory(product.getFactory()); |
| | | insProduct.setLaboratory(product.getLaboratory()); |
| | | insProduct.setSampleType(product.getSampleType()); |
| | | insProduct.setSample(product.getSample()); |
| | | insProduct.setModel(product.getModel()); |
| | | insProduct.setSonLaboratory(product.getSonLaboratory()); |
| | | insProduct.setManHour(product.getManHour());//å·¥æ¶ |
| | | insProduct.setManHourGroup(product.getManHourGroup()); |
| | | insProduct.setInspectionItemType("0"); |
| | | insProduct.setInspectionValueType("1"); |
| | | insProduct.setTemplateId(product.getTemplateId());//æ·»å æ¨¡æ¿id |
| | | insProduct.setSpecialItemParentId(product.getId());//ç¹æ®é¡¹ç¶id |
| | | childrenProducts.add(insProduct); |
| | | } |
| | | insProductService.saveBatch(childrenProducts); |
| | | } else { |
| | | if (!is) { |
| | | switch (type) { |
| | | case 1: |
| | | product.setInsFibersId(id); |
| | | break; |
| | | case 2: |
| | | product.setInsFiberId(id); |
| | | break; |
| | | } |
| | | product.setId(null); |
| | | product.setCreateTime(null); |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setInsSampleId(sampleId); |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | // æ®éé¡¹ç® å¦æaskå
å«äº % å°±å»é¤ |
| | | if(product.getAsk().contains("%")) { |
| | | String ask = product.getAsk().replace("%", "").trim(); |
| | | product.setAsk(ask); |
| | | } |
| | | insProductMapper.insert(product); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * åå§åå¼§åç¹æ®é¡¹ç®å项 |
| | | * åºå®å项ï¼é¢å®ææåï¼è·¨è·é¿åº¦ï¼è½½è·ï¼é«åº¦ï¼å¼§åï¼å¯¼çº¿æ¸©åº¦ï¼å®¤æ¸©ï¼å¼ å |
| | | * |
| | | * @return |
| | | */ |
| | | private List<Map<String, Object>> initChildrenList() { |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("inspectionItem", "é¢å®ææå"); |
| | | map1.put("unit", "kN"); |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("inspectionItem", "è·¨è·é¿åº¦"); |
| | | map2.put("unit", "m"); |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | map3.put("inspectionItem", "è½½è·"); |
| | | map3.put("unit", "kN"); |
| | | Map<String, Object> map5 = new HashMap<>(); |
| | | map5.put("inspectionItem", "å¼§å"); |
| | | map5.put("unit", "mm"); |
| | | Map<String, Object> map6 = new HashMap<>(); |
| | | map6.put("inspectionItem", "导线温度"); |
| | | map6.put("unit", "â"); |
| | | Map<String, Object> map7 = new HashMap<>(); |
| | | map7.put("inspectionItem", "室温"); |
| | | map7.put("unit", "â"); |
| | | Map<String, Object> map8 = new HashMap<>(); |
| | | map8.put("inspectionItem", "å¼ å"); |
| | | map8.put("unit", "kN"); |
| | | |
| | | maps.add(map1); |
| | | maps.add(map2); |
| | | maps.add(map3); |
| | | maps.add(map5); |
| | | maps.add(map6); |
| | | maps.add(map7); |
| | | maps.add(map8); |
| | | |
| | | return maps; |
| | | } |
| | | |
| | | //温度循ç¯çå¤ç |
| | | private void dealWithTemperatureLoop(Integer type, Integer id, Integer sampleId, InsProduct product) { |
| | | List<InsProduct> insProductes = new ArrayList<>(); |
| | | List<InsProduct> insProducts = new ArrayList<>(); |
| | | String[] strings = product.getAsk().split(";"); |
| | | for (int i = 0; i < strings.length; i++) { |
| | | int count = Integer.parseInt(strings[strings.length - 1]); |
| | | if (i != strings.length - 1) { |
| | | InsProduct insProduct = new InsProduct(); |
| | | switch (type) { |
| | | case 1: |
| | | insProduct.setInsFibersId(id); |
| | | break; |
| | | case 2: |
| | | insProduct.setInsFiberId(id); |
| | | break; |
| | | } |
| | | String[] split = strings[i].split(","); |
| | | if (split[0].equals("20â")) { |
| | | insProduct.setInspectionItem(count + "");//æ£éªé¡¹--å¾ªç¯æ¬¡æ° |
| | | } else { |
| | | insProduct.setInspectionItem("1");//æ£éªé¡¹--å¾ªç¯æ¬¡æ° |
| | | } |
| | | insProduct.setInspectionItemSubclass(split[0]);//æ£éªé¡¹--温度 |
| | | insProduct.setInspectionItemClass(split[1]);//æ£éªé¡¹--å
çº¤é¡¹ç® |
| | | insProduct.setAsk(split[2]);//æ£éªè¦æ± |
| | | insProduct.setTell(strings[i]);//æ£éªæè¿° |
| | | insProduct.setInsSampleId(sampleId); |
| | | insProduct.setState(1); |
| | | insProduct.setFactory(product.getFactory()); |
| | | insProduct.setLaboratory(product.getLaboratory()); |
| | | insProduct.setSampleType(product.getSampleType()); |
| | | insProduct.setSample(product.getSample()); |
| | | insProduct.setModel(product.getModel()); |
| | | insProduct.setSonLaboratory(product.getSonLaboratory()); |
| | | insProduct.setUnit(product.getUnit()); |
| | | insProduct.setManHourGroup(product.getManHourGroup()); |
| | | insProduct.setManHour(product.getManHour()); |
| | | insProduct.setInspectionItemType("0"); |
| | | insProduct.setInspectionValueType("1"); |
| | | insProduct.setTemplateId(product.getTemplateId());//æ·»å æ¨¡æ¿id |
| | | insProduct.setSpecialItemParentId(product.getId());//ç¹æ®é¡¹ç¶id |
| | | insProducts.add(insProduct); |
| | | insProductes.add(insProduct); |
| | | } else { |
| | | //æåä¸ä¸ªæ°æ®æ¯è¯´æä¼å¾ªç¯å¤å°æ¬¡ |
| | | if (count > 1) { |
| | | //循ç¯è¶
è¿1次 |
| | | for (int j = 2; j <= count; j++) { |
| | | for (InsProduct insProduct : insProducts) { |
| | | if (!insProduct.getInspectionItemSubclass().equals("20â") && !insProduct.getInspectionItemSubclass().equals("20â(常温)")) { |
| | | InsProduct insProduct1 = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, insProduct1); |
| | | insProduct1.setInspectionItem(j + ""); |
| | | insProductes.add(insProduct1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | insProductService.saveBatch(insProductes); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getInsOrder(Integer id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | InsOrder insOrder = insOrderMapper.selectById(id); |
| | | List<SampleProductDto> list = insSampleMapper.selectSampleProductListByOrderId2(id); |
| | | // 妿æ¯å
纤é
ç½®æ¥å¤´æèåªéå±ç¤ºA端ãB端ãå¹³åå¼ |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | for (SampleProductDto dto : list) { |
| | | // è·åæ£éªé¡¹ç® |
| | | List<InsProduct> insProducts = dto.getInsProduct(); |
| | | if (CollectionUtils.isNotEmpty(insProducts)) { |
| | | // è¿æ»¤åºå
纤é
ç½®çå
纤æ¥å¤´æèæ£éªé¡¹ç® |
| | | List<InsProduct> productList = insProducts.stream().filter(item -> item.getInspectionItem().equals("å
纤æ¥å¤´æè") |
| | | && (!Objects.isNull(item.getInsFiberId()) || !Objects.isNull(item.getInsFibersId()))).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(productList)) { |
| | | // åªè¿åå
纤è¡å¤´æèæ£éªé¡¹ç® ä¸ åªå±ç¤ºä¸æ¬¡ |
| | | // æ ¹æ®æ£éªé¡¹è¿è¡åç» |
| | | Map<String, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItemSubclass)); |
| | | List<InsProduct> productList2 = new ArrayList<>(); |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> entry = iterator.next(); |
| | | productList2.add(entry.getValue().get(0)); |
| | | } |
| | | dto.setInsProduct(productList2); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | map.put("insOrder", insOrder); |
| | | map.put("sampleProduct", list); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int upInsOrderOfState(InsOrder insOrder) { |
| | | InsOrder order = insOrderMapper.selectById(insOrder.getId()); |
| | | insOrder.setCompany(order.getCompany()); |
| | | insOrder.setExamineTime(LocalDateTime.now()); |
| | | if (insOrder.getState() == 1) { |
| | | //å®¡æ ¸éè¿æä¼çæå§æç¼å· |
| | | String laboratoryCode = baseMapper.selLaboratoryCode(insOrder.getLaboratory()); |
| | | if (StringUtils.isEmpty(laboratoryCode)) { |
| | | laboratoryCode = ""; |
| | | } |
| | | Custom custom = customMapper.selectById(order.getCompanyId()); |
| | | // System.out.println("============="+custom.getCompany()); |
| | | // System.out.println("-------------"+order.getCompany()); |
| | | String customCode = custom.getCode2(); |
| | | if (!custom.getCompany().equals(order.getCompany())) { |
| | | Custom one = customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, order.getCompany())); |
| | | insOrder.setCompanyId(one.getId()); |
| | | customCode = one.getCode2(); |
| | | } |
| | | String entrustCodePrefix = getEntrustCodePrefix(customCode, laboratoryCode); |
| | | String entrustCode = numberGenerator.generateNumberWithPrefix(4, entrustCodePrefix, InsOrder::getEntrustCode); |
| | | insOrder.setEntrustCode(entrustCode); |
| | | // insOrder.setEntrustCode(giveCode.giveCode2("JCZX/" + code + "-" + code2 + "-", insOrder.getCompanyId(), insOrder.getLaboratory(), "ins_order", "", "yyMM")); |
| | | /*å®¡æ ¸éè¿è¿éè¦æ°å¢ä¸æ¡cnasè¦æ±ãæ 书åååè¯å®¡*/ |
| | | ProcessOrder processOrder = new ProcessOrder(); |
| | | processOrder.setInsOrderId(insOrder.getId()); |
| | | processOrderMapper.insert(processOrder); |
| | | } |
| | | return insOrderMapper.updateById(insOrder); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | InsOrder insOrder = insOrderMapper.selectById(id); |
| | | Integer insState = insOrderStateMapper.selectOne(new LambdaQueryWrapper<InsOrderState>().eq(InsOrderState::getLaboratory, laboratory).eq(InsOrderState::getInsOrderId, id)).getInsState(); |
| | | List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory); |
| | | for (SampleProductDto sampleProductDto : list) { |
| | | List<Integer> ids = sampleProductDto.getInsProduct().stream().map(InsProduct::getId).collect(Collectors.toList()); |
| | | List<InsProductUser> insProductUsers = insProductUserMapper.selectList(Wrappers.<InsProductUser>lambdaQuery() |
| | | .in(InsProductUser::getInsProductId, ids)); |
| | | if (CollectionUtils.isNotEmpty(insProductUsers)) { |
| | | List<Integer> userIds = insProductUsers.stream().map(InsProductUser::getCreateUser).distinct().collect(Collectors.toList()); |
| | | String collect = userMapper.selectBatchIds(userIds).stream().map(User::getName).collect(Collectors.joining(",")); |
| | | sampleProductDto.setCheckName(collect); |
| | | } |
| | | } |
| | | map.put("insOrder", insOrder); |
| | | map.put("sampleProduct", list); |
| | | map.put("insState", insState); |
| | | //æ¥è¯¢ææè®°å½æ¨¡çå»é |
| | | List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(id, laboratory); |
| | | map.put("reportModel", list2); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectSampleAndProductByOrderId(SampleProductDto2 sampleProductDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> headList = new ArrayList<>(); |
| | | List<SampleProductDto2> SampleProductDto2S = null; |
| | | if (!Objects.isNull(sampleProductDto.getId())) { |
| | | String laboratory = insOrderMapper.selectById(sampleProductDto.getId()).getLaboratory(); |
| | | if (laboratory.equals("çµå产åå®éªå®¤")) { |
| | | //çµåè¯éªå®¤çæ°æ®æ¥çï¼å é¤å
纤é
ç½®ç¸å
³å段 |
| | | // headList = PrintChina.printChina(SampleProductDTODL.class); |
| | | SampleProductDto2S = insOrderMapper.selectSampleAndProductByOrderId( |
| | | QueryWrappers.queryWrappers(sampleProductDto).orderByAsc("ins_product_id"), |
| | | sampleProductDto.getId()); |
| | | } else { |
| | | // headList = PrintChina.printChina(SampleProductDto2.class); |
| | | SampleProductDto2S = insOrderMapper.selectSampleAndProductByOrderId( |
| | | QueryWrappers.queryWrappers(sampleProductDto) |
| | | .orderByAsc("son_laboratory"), |
| | | // .orderByAsc("inspection_item") |
| | | // .orderByAsc("inspection_item_subclass"), |
| | | sampleProductDto.getId()); |
| | | List<SampleProductDto2> collect = SampleProductDto2S |
| | | .stream() |
| | | .filter(item -> item.getInspectionItem().contains("æ¾å¥ç®¡") || item.getInspectionItemSubclass() |
| | | .contains("æ¾å¥ç®¡")).collect(Collectors.toList()); |
| | | // æ ·åä¸çæ¾å¥ç®¡ |
| | | Map<String, List<SampleProductDto2>> collect1 = collect |
| | | .stream() |
| | | .collect(Collectors.groupingBy(item -> item.getSampleCode() + '@' + item.getInspectionItemSubclass() + '@' + item.getInspectionItem())); |
| | | Iterator<Map.Entry<String, List<SampleProductDto2>>> iterator = collect1.entrySet().iterator(); |
| | | ArrayList<SampleProductDto2> list = new ArrayList<>(); |
| | | while (iterator.hasNext()) { |
| | | SampleProductDto2 sampleProductDto2 = new SampleProductDto2(); |
| | | double avg = 0.0; |
| | | double count = 0.0; |
| | | boolean flag = true; |
| | | Map.Entry<String, List<SampleProductDto2>> next = iterator.next(); |
| | | for (SampleProductDto2 s : next.getValue()) { |
| | | if (StringUtils.isNotEmpty(s.getLastValue()) && (NumberUtil.isNumber(s.getLastValue()))) { |
| | | count += Double.parseDouble(s.getLastValue()); |
| | | } else if (!NumberUtil.isNumber(s.getLastValue()) && StringUtils.isNotEmpty(s.getLastValue())) { |
| | | flag = false; |
| | | } |
| | | } |
| | | BeanUtil.copyProperties(next.getValue().get(0), sampleProductDto2); |
| | | sampleProductDto2.setBushColor(""); |
| | | List<SampleProductDto2> collect2 = next.getValue().stream().filter(item -> Objects.nonNull(item.getInsResult()) && item.getInsResult().equals(0)).collect(Collectors.toList()); // ä¸åæ ¼ |
| | | List<SampleProductDto2> collect3 = next.getValue().stream().filter(item -> Objects.nonNull(item.getInsResult()) && item.getInsResult().equals(3)).collect(Collectors.toList()); // ä¸å¤å® |
| | | List<SampleProductDto2> collect4 = next.getValue().stream().filter(item -> StringUtils.isNotEmpty(item.getLastValue())).collect(Collectors.toList()); // ä¸å¤å® |
| | | if (CollectionUtils.isNotEmpty(collect2)) { |
| | | sampleProductDto2.setInsResult(0); |
| | | sampleProductDto2.setLastValue(collect2.get(0).getLastValue()); |
| | | } else if (CollectionUtils.isNotEmpty(collect3)) { |
| | | sampleProductDto2.setInsResult(3); |
| | | } else if (CollectionUtils.isNotEmpty(collect4)) { |
| | | sampleProductDto2.setInsResult(1); |
| | | } else { |
| | | sampleProductDto2.setInsResult(null); |
| | | } |
| | | if (flag) { |
| | | avg = BigDecimal.valueOf(count).divide(BigDecimal.valueOf(next.getValue().size()), 4, RoundingMode.HALF_UP).doubleValue(); |
| | | if (avg == 0.0) { |
| | | sampleProductDto2.setLastValue(""); |
| | | } else { |
| | | sampleProductDto2.setLastValue(String.valueOf(avg)); |
| | | } |
| | | } |
| | | sampleProductDto2.setInspectionItem(next.getKey().split("@")[2]); |
| | | sampleProductDto2.setInspectionItemSubclass(next.getKey().split("@")[1]); |
| | | list.add(sampleProductDto2); |
| | | } |
| | | // è¿æ»¤åºä¸å
å«ä¸ºæ¾å¥ç®¡ä¸ä¸ä¸ºå
纤æ¥å¤´æèçæ°æ® |
| | | List<SampleProductDto2> collect2 = SampleProductDto2S |
| | | .stream() |
| | | .filter(item -> !item.getInspectionItem().contains("æ¾å¥ç®¡") && !item.getInspectionItemSubclass() |
| | | .contains("æ¾å¥ç®¡") && !item.getInspectionItem().equals("å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | // 妿æ¯å
纤æ¥å¤´æè ä¸ä¸ªæ ·ååªåå
¶ä¸ä¸ä¸ªçA端ãB端ãå¹³åå¼ |
| | | Map<String, List<SampleProductDto2>> fiberMap = SampleProductDto2S |
| | | .stream() |
| | | .filter(item -> item.getInspectionItem().equals("å
纤æ¥å¤´æè")) |
| | | .collect(Collectors.groupingBy(e -> e.getSampleCode() + e.getInspectionItem() + e.getInspectionItemSubclass())); |
| | | Iterator<Map.Entry<String, List<SampleProductDto2>>> iterator1 = fiberMap.entrySet().iterator(); |
| | | while (iterator1.hasNext()) { |
| | | Map.Entry<String, List<SampleProductDto2>> entry = iterator1.next(); |
| | | list.add(entry.getValue().get(0)); |
| | | } |
| | | collect2.addAll(list); |
| | | SampleProductDto2S = collect2; |
| | | // SampleProductDto2S.sort(new CustomComparator(enumService)); |
| | | } |
| | | } |
| | | for (SampleProductDto2 record : SampleProductDto2S) { |
| | | List<String> values = new ArrayList<>(); |
| | | //å
纤带ç¼å·ä¸ä¸ºç©º&&æ£éªè¿ç¨å¼ä¸ä¸ºç©º |
| | | if (StringUtils.isNotBlank(record.getCode()) && (StringUtils.isNotBlank(record.getInsValue()) || Objects.equals(record.getInsValue(), "[]"))) { |
| | | JSONArray insValueJsonArray = JSON.parseArray(record.getInsValue()); |
| | | for (Object o : insValueJsonArray) { |
| | | JSONObject insValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | if (StringUtils.isNotBlank(insValue.get("v").toString())) { |
| | | values.add(insValue.get("v").toString()); |
| | | } |
| | | } |
| | | record.setLastValue(String.join(",", values)); |
| | | } |
| | | } |
| | | map.put("head", headList); |
| | | map.put("body", SampleProductDto2S); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> viewDetails(Map<String, Object> map) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | String inspectionItem = map.get("inspectionItem").toString(); // æ£éªé¡¹ |
| | | if (inspectionItem.equals("åæ ¹åç´çç§")) { |
| | | ArrayList<Integer> numbers = new ArrayList<>(); |
| | | InsProduct insProduct = insProductMapper.selectById(Integer.parseInt(map.get("insProductId").toString())); |
| | | String[] split = insProduct.getTell().split(","); |
| | | Pattern pattern = Pattern.compile("-?\\d+"); |
| | | Matcher matcher = pattern.matcher(split[1]); |
| | | while (matcher.find()) { |
| | | String numberStr = matcher.group(); |
| | | numbers.add(Integer.parseInt(numberStr)); |
| | | } |
| | | InsProductResult result = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, Integer.parseInt(map.get("insProductId").toString()))); |
| | | |
| | | |
| | | for (int i = 0; i < numbers.get(0); i++) { |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("entrustCode", map.get("entrustCode")); // å§æç¼å· |
| | | map1.put("sampleCode", map.get("sampleCode")); // æ ·åç¼å· |
| | | map1.put("color", ""); // å¥ç®¡ |
| | | map1.put("inspectionItem", inspectionItem); // æ£éªé¡¹ |
| | | if (!Objects.isNull(result)) { |
| | | List<Map> maps = JSONArray.parseArray(result.getInsValue(), Map.class); |
| | | if (maps.size() - 1 < i) { |
| | | map1.put("insValue", ""); // æ£éªç»æ |
| | | } else { |
| | | map1.put("insValue", maps.get(i).get("v")); // æ£éªç»æ |
| | | } |
| | | } |
| | | list.add(map1); |
| | | } |
| | | } else if (inspectionItem.equals("ææå¼ºåº¦")) { |
| | | InsProduct insProduct = insProductMapper.selectById(Integer.parseInt(map.get("insProductId").toString())); |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | if(Objects.isNull(insProductResult)) { |
| | | return list; |
| | | } |
| | | List<Map<String, Object>> values = JSON.parseObject(insProductResult.getInsValue(), new TypeReference<List<Map<String, Object>>>() { |
| | | }); |
| | | // è¿è¡æåº æ ¹æ®åæ |
| | | values.sort((o1, o2) -> { |
| | | int i = Integer.parseInt(o1.get("r").toString()); |
| | | int i1 = Integer.parseInt(o2.get("r").toString()); |
| | | return Integer.compare(i,i1); |
| | | }); |
| | | // å°å¾å°ç宽度ãååº¦ãæ£éªå¼åå«è¿è¡åå¨ |
| | | Map<Object, List<Map<String, Object>>> group = values.stream().collect(Collectors.groupingBy(item -> item.get("r"))); |
| | | Iterator<Map.Entry<Object, List<Map<String, Object>>>> iterator = group.entrySet().iterator(); |
| | | List<String> widths = new ArrayList<>(); |
| | | List<String> thickness = new ArrayList<>(); |
| | | List<String> testValue = new ArrayList<>(); |
| | | Integer count = 0; |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<Object, List<Map<String, Object>>> entry = iterator.next(); |
| | | List<Map<String, Object>> value = entry.getValue(); |
| | | for(Map<String,Object> m : value) { |
| | | if(count == 0) { |
| | | widths.add(m.get("v").toString()); |
| | | }else if(count == 1) { |
| | | thickness.add(m.get("v").toString()); |
| | | }else { |
| | | testValue.add(m.get("v").toString()); |
| | | } |
| | | } |
| | | count++; |
| | | } |
| | | // è¿è¡å°è£
è¿å |
| | | // æ¾å°æé¿çé£ä¸ªéå |
| | | List<Integer> list1 = Arrays.asList(widths.size(), thickness.size(), testValue.size()); |
| | | list1.sort((a1, a2) -> { |
| | | return Integer.compare(a2,a1); |
| | | }); |
| | | for (int i = 0; i < list1.get(0); i++) { |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("inspectionItem",insProduct.getInspectionItem()); // æ£éªé¡¹ |
| | | map1.put("inspectionItemSubclass",insProduct.getInspectionItemSubclass()); // æ£éªå项 |
| | | map1.put("width",""); // 宽度 |
| | | map1.put("thickness",""); // å度 |
| | | map1.put("testValue",""); // æ£éªå¼ |
| | | if(i < widths.size() ) { |
| | | map1.put("width",widths.get(i)); |
| | | } |
| | | if(i < thickness.size()) { |
| | | map1.put("thickness",thickness.get(i)); |
| | | } |
| | | if(i < testValue.size()) { |
| | | map1.put("testValue",testValue.get(i)); |
| | | } |
| | | list.add(map1); |
| | | } |
| | | |
| | | } else if(inspectionItem.equals("æè£ä¼¸é¿ç")) { |
| | | InsProduct insProduct = insProductMapper.selectById(Integer.parseInt(map.get("insProductId").toString())); |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | if(Objects.isNull(insProductResult)) { |
| | | return list; |
| | | } |
| | | List<Map<String, Object>> values = JSON.parseObject(insProductResult.getInsValue(), new TypeReference<List<Map<String, Object>>>() { |
| | | }); |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("inspectionItem",insProduct.getInspectionItem()); // æ£é¡¹é¡¹ |
| | | map1.put("inspectionItemSubclass",insProduct.getInspectionItemSubclass()); // æ£é¡¹å项 |
| | | ArrayList<Map<String, Object>> tableHeader = new ArrayList<>(); |
| | | for (int i = 0; i < values.size(); i++) { |
| | | HashMap<String, Object> map2 = new HashMap<>(); |
| | | map2.put("testValue" + i,values.get(i).get("v")); // æ£é¡¹å¼ 表头 |
| | | tableHeader.add(map2); |
| | | map1.put("testValue" + i,values.get(i).get("v")); |
| | | } |
| | | map1.put("tableHeader",tableHeader); |
| | | list.add(map1); |
| | | } else { |
| | | // æ¾å¥ç®¡ è¿æ»¤åºæ£éªé¡¹åç§°ä¸è´çæ°æ® |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, Integer.parseInt(map.get("insSampleId").toString()))) |
| | | .stream() |
| | | .filter(item -> item.getInspectionItem().equals(inspectionItem)) |
| | | .collect(Collectors.toList()); |
| | | for (InsProduct product : productList) { |
| | | HashMap<String, Object> map2 = new HashMap<>(); |
| | | map2.put("entrustCode", map.get("entrustCode")); // å§æç¼å· |
| | | map2.put("sampleCode", map.get("sampleCode")); // æ ·åç¼å· |
| | | map2.put("inspectionItem", product.getInspectionItem()); // æ£éªé¡¹ |
| | | map2.put("insValue", product.getLastValue()); // æ£éªç»æ |
| | | // æ¿å°ç¸åºçå¥ç®¡ |
| | | String color = ""; |
| | | if (!Objects.isNull(product.getInsBushId())) { |
| | | color = insBushingMapper.selectById(product.getInsBushId()).getColor(); // å¥ç®¡ |
| | | } |
| | | map2.put("color", color); // å¥ç®¡é¢è² |
| | | // InsProductResult result = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | // .eq(InsProductResult::getInsProductId, product.getId())); |
| | | // if(!Objects.isNull(result)) { |
| | | // List<Map> maps = JSONArray.parseArray(result.getInsValue(), Map.class); |
| | | // map2.put("insValue",maps.get(0).get("v").toString()); // æ£éªç»æ |
| | | // } |
| | | list.add(map2); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå·²æ£å§æå |
| | | * |
| | | * @param data |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportChecked(Map<String, Object> data, HttpServletResponse response) { |
| | | // Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | Integer userId = Integer.valueOf(String.valueOf(SecurityUtils.getLoginUser().getUserId())); |
| | | User user = userMapper.selectById(userId); |
| | | List<String> names = null; |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if (data.containsKey("startTime")) { |
| | | startTime = data.get("startTime").toString() + " 00:00:00"; |
| | | } |
| | | if (data.containsKey("endTime")) { |
| | | endTime = data.get("endTime").toString() + " 23:59:59"; |
| | | } |
| | | List<ExcelChecked> list = new ArrayList<>(); |
| | | |
| | | // å¦ææ¯æ£æµä¸å¿äººåå¯ä»¥å¯¼å
¥ææå®¢æ·ä¸çå ï¼ å¦ææ¯å®¢æ·ï¼å¯ä»¥å¯¼åºè¯¥å使æçå |
| | | if (user.getIsCustom().equals(0)) { |
| | | names = new ArrayList<>(); |
| | | } else { |
| | | String company = user.getCompany(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>() |
| | | .eq(User::getCompany, company) |
| | | .eq(User::getIsCustom, 1) |
| | | .eq(User::getStatus, 0)); |
| | | if (CollectionUtils.isNotEmpty(users)) { |
| | | names = users.stream().map(item -> item.getName()).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | //æ»çæ£éªç»æ |
| | | List<ExportInsProductVO> exportInsProductVOS = insOrderMapper.exportChecked(names, startTime, endTime); |
| | | //æé¤å
纤带å ä½åæ°(å°ºå¯¸åæ°)ï¼æ¸©åº¦å¾ªç¯çæ£éªç»æ |
| | | // List<ExcelChecked> excelCheckeds = exportInsProductVOS.stream().map(e -> { |
| | | // ExcelChecked excelChecked = new ExcelChecked(); |
| | | // BeanUtil.copyProperties(e, excelChecked); |
| | | // return excelChecked; |
| | | // }).collect(Collectors.toList()); |
| | | // æé¤å
纤带å ä½åæ°(å°ºå¯¸åæ°)ï¼æ¸©åº¦å¾ªç¯çæ£éªç»æ |
| | | List<ExportInsProductVO> excelCheckeds = exportInsProductVOS.stream().filter(e -> !e.getInspectionItem().equals("温度循ç¯") |
| | | && !(NumberUtil.isInteger(e.getInspectionItem()) && Objects.nonNull(e.getSpecialItemParentId())) |
| | | && !(e.getInspectionItem().equals("å°ºå¯¸åæ°") |
| | | && e.getSampleType().equals("å
纤带"))) |
| | | .collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(excelCheckeds)) { |
| | | for (ExportInsProductVO a : excelCheckeds) { |
| | | ExcelChecked excelChecked = new ExcelChecked(); |
| | | BeanUtil.copyProperties(a, excelChecked); |
| | | list.add(excelChecked); |
| | | } |
| | | } |
| | | //è¿æ»¤åºå
纤带å ä½åæ°çæ£éªç»æ |
| | | List<ExportInsProductVO> sizeParameter = exportInsProductVOS.stream().filter(e -> |
| | | e.getInspectionItem().equals("å°ºå¯¸åæ°") |
| | | && e.getSampleType().equals("å
纤带")) |
| | | .collect(Collectors.toList()); |
| | | List<FiberRibboGeometricalParameterExcelData> fiberList = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(sizeParameter)) { |
| | | // æ ¹æ®å§æåå·ãæ ·åç¼å·ãå¥ç®¡ãå
纤带ç¼å·è¿è¡åç» |
| | | Map<String, List<ExportInsProductVO>> groupData = sizeParameter.stream().sorted(Comparator.comparing(ExportInsProductVO::getSampleCode)) |
| | | .collect(Collectors.toMap(e -> |
| | | e.getEntrustCode() + '@' + e.getSampleCode() + '@' + e.getBushColor() + '@' + e.getCode(), |
| | | Collections::singletonList, |
| | | (left, right) -> { |
| | | ArrayList<ExportInsProductVO> list1 = new ArrayList<>(left); |
| | | list1.addAll(right); |
| | | return list1; |
| | | }, |
| | | TreeMap::new)); |
| | | Iterator<Map.Entry<String, List<ExportInsProductVO>>> iterator = groupData.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<ExportInsProductVO>> entry = iterator.next(); |
| | | FiberRibboGeometricalParameterExcelData fiber = new FiberRibboGeometricalParameterExcelData(); |
| | | ExportInsProductVO exportInsProductVO = entry.getValue().get(0); |
| | | fiber.setEntrustCode(exportInsProductVO.getEntrustCode()); // å§æåå· |
| | | fiber.setSampleCode(exportInsProductVO.getSampleCode()); // æ ·åç¼å· |
| | | fiber.setBushColor(exportInsProductVO.getBushColor()); // å¥ç®¡è²æ |
| | | fiber.setCode(exportInsProductVO.getCode()); // å
纤带ç¼å· |
| | | fiber.setInspectionItemType("å
纤å ä½åæ°"); // æ£éªé¡¹ |
| | | fiber.setInspector(exportInsProductVO.getCheckName()); // æ£éªäºº |
| | | |
| | | for (ExportInsProductVO a : entry.getValue()) { |
| | | if (Objects.isNull(fiber.getInsTime())) { |
| | | if (Objects.nonNull(a.getCheckTime())) { |
| | | String format = a.getCheckTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | fiber.setInsTime(LocalDate.parse(format)); // æ£éªæ¶é´ |
| | | } |
| | | } |
| | | switch (a.getInspectionItemSubclass()) { |
| | | case "宽度": |
| | | List<Map> maps1 = getInsValueList(a.getInsValue()); |
| | | if (CollectionUtils.isNotEmpty(maps1)) { |
| | | if (maps1.size() >= 2) { |
| | | fiber.setWidthA(maps1.get(0).get("v").toString()); |
| | | fiber.setWidthB(maps1.get(1).get("v").toString()); |
| | | } else { |
| | | fiber.setWidthA(maps1.get(0).get("v").toString()); |
| | | } |
| | | } |
| | | break; |
| | | case "å度": |
| | | List<Map> maps2 = getInsValueList(a.getInsValue()); |
| | | if (CollectionUtils.isNotEmpty(maps2)) { |
| | | if (maps2.size() >= 2) { |
| | | fiber.setThicknessA(maps2.get(0).get("v").toString()); |
| | | fiber.setThicknessB(maps2.get(1).get("v").toString()); |
| | | } else { |
| | | fiber.setThicknessA(maps2.get(0).get("v").toString()); |
| | | } |
| | | } |
| | | break; |
| | | case "ç¸é»å
纤水平é´è·": |
| | | List<Map> maps3 = getInsValueList(a.getInsValue()); |
| | | if (CollectionUtils.isNotEmpty(maps3)) { |
| | | if (maps3.size() >= 2) { |
| | | fiber.setAdjacentSpacingA(maps3.get(0).get("v").toString()); |
| | | fiber.setAdjacentSpacingB(maps3.get(1).get("v").toString()); |
| | | } else { |
| | | fiber.setAdjacentSpacingA(maps3.get(0).get("v").toString()); |
| | | } |
| | | } |
| | | break; |
| | | case "两侧å
纤水平é´è·": |
| | | List<Map> maps4 = getInsValueList(a.getInsValue()); |
| | | if (CollectionUtils.isNotEmpty(maps4)) { |
| | | if (maps4.size() >= 2) { |
| | | fiber.setSideSpacingA(maps4.get(0).get("v").toString()); |
| | | fiber.setSideSpacingB(maps4.get(1).get("v").toString()); |
| | | } else { |
| | | fiber.setSideSpacingA(maps4.get(0).get("v").toString()); |
| | | } |
| | | } |
| | | break; |
| | | case "å¹³æ´åº¦": |
| | | List<Map> maps5 = getInsValueList(a.getInsValue()); |
| | | if (CollectionUtils.isNotEmpty(maps5)) { |
| | | if (maps5.size() >= 2) { |
| | | fiber.setEvennessA(maps5.get(0).get("v").toString()); |
| | | fiber.setEvennessB(maps5.get(1).get("v").toString()); |
| | | } else { |
| | | fiber.setEvennessA(maps5.get(0).get("v").toString()); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | fiberList.add(fiber); |
| | | } |
| | | } |
| | | |
| | | //è¿æ»¤åºæ¸©åº¦å¾ªç¯ |
| | | List<ExportInsProductVO> temperatureCycling = exportInsProductVOS.stream().filter(e -> |
| | | NumberUtil.isInteger(e.getInspectionItem()) && Objects.nonNull(e.getSpecialItemParentId()) && e.getSonLaboratory().equals("å
纤è¯éªå®¤")) |
| | | .collect(Collectors.toList()); |
| | | |
| | | List<TemperatureCycling> temperatureCyclingList = getTemList(temperatureCycling); |
| | | try { |
| | | String fileName = URLEncoder.encode("å·²æ£å§æå", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | HorizontalCellStyleStrategy arveStyleStrategy = EasyExcelUtils.getStyleStrategy(); |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(arveStyleStrategy).build(); |
| | | WriteSheet build = EasyExcel.writerSheet().sheetName("Sheet1").head(ExcelChecked.class).build(); |
| | | excelWriter.write(list, build); |
| | | if (CollectionUtils.isNotEmpty(fiberList)) { |
| | | WriteSheet build1 = EasyExcel.writerSheet().sheetName("å
纤å ä½åæ°").head(FiberRibboGeometricalParameterExcelData.class).build(); |
| | | excelWriter.write(fiberList, build1); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(temperatureCycling)) { |
| | | WriteSheet build2 = EasyExcel.writerSheet().sheetName("温度循ç¯").head(TemperatureCycling.class).build(); |
| | | excelWriter.write(temperatureCyclingList, build2); |
| | | } |
| | | excelWriter.finish(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.out.println("导åºå¤±è´¥" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getInsOrderTemList(Map<String, Object> data) { |
| | | String entrustCode = data.get("entrustCode").toString(); |
| | | Integer createUser = null; |
| | | String name= ""; |
| | | if (StringUtils.isNotBlank(data.get("createUser").toString())) { |
| | | createUser = Integer.parseInt(data.get("createUser").toString()); |
| | | // name = userMapper.selectByCreaterUser(createUser); |
| | | } |
| | | String sampleCode = data.get("sampleCode").toString(); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | if (StringUtils.isNotBlank(data.get("insTime").toString()) && !Objects.isNull(data.get("insTime"))) { |
| | | List insTime = objectMapper.readValue(JSONUtil.toJsonStr(data.get("insTime")), List.class); |
| | | startTime = insTime.get(0).toString(); |
| | | endTime = insTime.get(1).toString(); |
| | | } |
| | | List<ExportInsProductVO> insOrderTemList = insOrderMapper.getInsOrderTemList(entrustCode, sampleCode, startTime, endTime,name); |
| | | List<TemperatureCycling> temList = getTemList(insOrderTemList);; |
| | | // if (StringUtils.isEmpty(name)) { |
| | | // temList = getTemList(insOrderTemList); |
| | | // } else { |
| | | // temList = getTemList(insOrderTemList).stream() |
| | | // .filter(tl -> name.equals(tl.getCheckName())) |
| | | // .collect(Collectors.toList()); |
| | | // } |
| | | maps = new ArrayList<>(temList.size()); |
| | | for (TemperatureCycling map : temList) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | resultMap.put("entrustCode", map.getEntrustCode()); //å§æåå· |
| | | resultMap.put("sampleCode", map.getSampleCode()); //æ ·åç¼å· |
| | | resultMap.put("bushing", map.getBushColor()); //å¥ç®¡ |
| | | resultMap.put("fiber", map.getColor()); //å
纤 |
| | | resultMap.put("fibers", map.getCode()); //å
纤带 |
| | | resultMap.put("userName", map.getCheckName()); //æ£éªäºº |
| | | resultMap.put("insTime", map.getInsTime()); //æ£æµæ¶é´ |
| | | resultMap.put("sendTime", map.getSendTime()); //ä¸åæ¶é´ |
| | | // resultMap.put("inspectionItem", map.getSample()); //æ£éªé¡¹ç® |
| | | //温度循ç¯å项 |
| | | resultMap.put("inspectionItems", map.getInspectionItem()); |
| | | resultMap.put("inspectionItemSubclass", map.getInspectionItemSubclass()); |
| | | resultMap.put("attenuationCoefficient1310", map.getAttenuationCoefficient1310()); |
| | | resultMap.put("attenuationDifference1", map.getAttenuationDifference1()); |
| | | resultMap.put("attenuationCoefficient1550", map.getAttenuationCoefficient1550()); |
| | | resultMap.put("attenuationDifference2", map.getAttenuationDifference2()); |
| | | resultMap.put("attenuationCoefficient1625", map.getAttenuationCoefficient1625()); |
| | | resultMap.put("attenuationDifference3", map.getAttenuationDifference3()); |
| | | resultMap.put("attenuationCoefficient1383", map.getAttenuationCoefficient1383()); |
| | | resultMap.put("attenuationDifference4", map.getAttenuationDifference4()); |
| | | resultMap.put("attenuationCoefficient1490", map.getAttenuationCoefficient1490()); |
| | | resultMap.put("attenuationDifference5", map.getAttenuationDifference5()); |
| | | resultMap.put("attenuationDifferenceMax", map.getAttenuationDifferenceMax()); |
| | | resultMap.put("insResult", map.getInsResult()); |
| | | maps.add(resultMap); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return maps; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String,Object> permute(Integer num,Boolean isValue) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | ArrayList<Integer> integers = new ArrayList<>(); |
| | | for (int i = 1; i <= num; i++) { // 使ç¨è¾å°çæ°åèå´è¿è¡æµè¯ |
| | | integers.add(i); |
| | | } |
| | | List<List<Integer>> result = permutes(integers); |
| | | if(isValue) { |
| | | map.put("resultData",result); |
| | | }else { |
| | | map.put("resultData",result.size()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | private static List<List<Integer>> permutes(List<Integer> nums) { |
| | | List<List<Integer>> result = new ArrayList<>(); |
| | | backtrack(new ArrayList<>(), nums, result); |
| | | return result; |
| | | } |
| | | |
| | | private static void backtrack(List<Integer> temp, List<Integer> nums, List<List<Integer>> result) { |
| | | if (temp.size() == 2) { |
| | | result.add(new ArrayList<>(temp)); // æ·»å å½åç»åå°ç»æå表 |
| | | return; |
| | | } |
| | | |
| | | for (int i = 0; i < nums.size(); i++) { |
| | | // è§å®é¡ºåºï¼é¿å
éå¤ç»å |
| | | if (temp.size() > 0 && nums.get(i) < temp.get(temp.size() - 1)) continue; |
| | | temp.add(nums.get(i)); // æ·»å å½åæ°åå°ä¸´æ¶ç»å |
| | | backtrack(temp, nums, result); // éå½è°ç¨ |
| | | temp.remove(temp.size() - 1); // æ¢å¤ç¶æ |
| | | } |
| | | } |
| | | |
| | | public List<TemperatureCycling> getTemList(List<ExportInsProductVO> temperatureCycling) { |
| | | List<TemperatureCycling> temperatureCyclingList = new ArrayList<>(); |
| | | List<TemperatureCycling> newTemperatureCyclingList = new ArrayList<>(); // è¿åçæ¸©åº¦å¾ªç¯æ°æ® |
| | | if (CollectionUtils.isNotEmpty(temperatureCycling)) { |
| | | // æ ¹æ®å§æåå·ãæ ·åç¼å·ãå¥ç®¡ãå
çº¿è²æ ã循ç¯ç次æ°è¿è¡åç» |
| | | List<ExportInsProductVO> collect = temperatureCycling.stream() |
| | | .sorted(Comparator.comparing(ExportInsProductVO::getInspectionItem)).collect(Collectors.toList()); |
| | | Map<String, List<ExportInsProductVO>> temperatureGroup = collect.stream() |
| | | .sorted(Comparator.comparing(t -> getInspectionItemSubclassOrder(t.getInspectionItemSubclass()))).collect(Collectors.groupingBy(e -> |
| | | e.getEntrustCode() + "@" + e.getSampleCode() + "@" + e.getBushColor() + "@" + e.getColor() + "@" + e.getInspectionItem() + "@" + e.getInspectionItemSubclass(), |
| | | TreeMap::new, |
| | | Collectors.toList())); |
| | | // è·å20âçæ°æ® æ¥è¿è¡å·®å¼çè¿ç® åªè·åç¬¬ä¸æ¬¡ç20âå¸¸æ¸©çæ°æ®,æ ¹æ®åå·ãæ ·åç¼å·å¥½ãå¥ç®¡åå
纤æ¥ï¼ä¼åå¨å¤ä¸ªååå¤ä¸ªæ ·åï¼ |
| | | Map<String, BigDecimal> map = new HashMap<>(); |
| | | for (ExportInsProductVO a : collect) { |
| | | if (a.getInspectionItem().equals("1") && a.getInspectionItemSubclass().equals("20â(常温)")) { |
| | | switch (a.getInspectionItemClass()) { |
| | | case "1310nm": |
| | | List<Map> insValue = getInsValueList(a.getComValue()); |
| | | BigDecimal decay1310 = BigDecimal.ZERO; |
| | | if (CollectionUtils.isNotEmpty(insValue)) { |
| | | decay1310 = new BigDecimal(isNumber(insValue.get(0).get("v").toString())); |
| | | |
| | | } |
| | | map.put(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass(), decay1310); |
| | | break; |
| | | case "1550nm": |
| | | List<Map> insValue1 = getInsValueList(a.getComValue()); |
| | | BigDecimal decay1550 = BigDecimal.ZERO; |
| | | if (CollectionUtils.isNotEmpty(insValue1)) { |
| | | decay1550 = new BigDecimal(isNumber(insValue1.get(0).get("v").toString())); |
| | | } |
| | | map.put(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass(), decay1550); |
| | | break; |
| | | case "1625nm": |
| | | List<Map> insValue2 = getInsValueList(a.getComValue()); |
| | | BigDecimal decay1625 = BigDecimal.ZERO; |
| | | if (CollectionUtils.isNotEmpty(insValue2)) { |
| | | decay1625 = new BigDecimal(isNumber(insValue2.get(0).get("v").toString())); |
| | | } |
| | | map.put(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass(), decay1625); |
| | | break; |
| | | case "1383nm": |
| | | List<Map> insValue3 = getInsValueList(a.getComValue()); |
| | | BigDecimal decay1383 = BigDecimal.ZERO; |
| | | if (CollectionUtils.isNotEmpty(insValue3)) { |
| | | decay1383 = new BigDecimal(isNumber(insValue3.get(0).get("v").toString())); |
| | | } |
| | | map.put(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass(), decay1383); |
| | | break; |
| | | case "1490nm": |
| | | List<Map> insValue4 = getInsValueList(a.getComValue()); |
| | | BigDecimal decay1490 = BigDecimal.ZERO; |
| | | if (CollectionUtils.isNotEmpty(insValue4)) { |
| | | decay1490 = new BigDecimal(isNumber(insValue4.get(0).get("v").toString())); |
| | | } |
| | | map.put(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass(), decay1490); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ ¹æ®å§æç¼å·ãæ ·åç¼å·ãå¾ªç¯æ¬¡æ°ã温度ç¹è¿è¡åç» |
| | | Map<String, List<ExportInsProductVO>> collect1 = temperatureCycling.stream() |
| | | .collect(Collectors.groupingBy(e -> e.getEntrustCode() + "@" + e.getSampleCode() + "@" + e.getInspectionItem() + "@" + e.getInspectionItemSubclass())); |
| | | |
| | | |
| | | // å°å·®å¼ä¿å |
| | | Map<String, List<BigDecimal>> map1 = new HashMap<>(); |
| | | Set<String> strings = new HashSet<>(); |
| | | Iterator<Map.Entry<String, List<ExportInsProductVO>>> iterator1 = collect1.entrySet().iterator(); |
| | | while (iterator1.hasNext()) { |
| | | Map.Entry<String, List<ExportInsProductVO>> entry = iterator1.next(); |
| | | for (ExportInsProductVO a : entry.getValue()) { |
| | | // å°å¾å°çè¡°åç³»æ°ä¿å åé¢è¦ç¨å° |
| | | strings.add(a.getInspectionItemClass()); |
| | | switch (a.getInspectionItemClass()) { |
| | | case "1310nm": |
| | | case "1490nm": |
| | | case "1383nm": |
| | | case "1550nm": |
| | | case "1625nm": |
| | | List<Map> insValue = getInsValueList(a.getComValue()); |
| | | if (CollectionUtils.isNotEmpty(insValue)) { |
| | | ArrayList<BigDecimal> bigDecimals = new ArrayList<>(); |
| | | BigDecimal bigDecimal = new BigDecimal(isNumber(insValue.get(0).get("v").toString()));// å½åè¡°åå¼ |
| | | BigDecimal bigDecimal1 = map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass());// 20âçè¡°åå¼ |
| | | BigDecimal v = bigDecimal.subtract(bigDecimal1); |
| | | bigDecimals.add(v.abs()); |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + a.getInspectionItemClass())) { |
| | | map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + a.getInspectionItemClass()).addAll(bigDecimals); |
| | | } else { |
| | | map1.put(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + a.getInspectionItemClass(), bigDecimals); |
| | | } |
| | | } else { |
| | | if (!map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + a.getInspectionItemClass())) { |
| | | map1.put(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + a.getInspectionItemClass(), new ArrayList<>()); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | Iterator<Map.Entry<String, List<ExportInsProductVO>>> iterator = temperatureGroup.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<ExportInsProductVO>> entry = iterator.next(); |
| | | TemperatureCycling temperature = new TemperatureCycling(); |
| | | for (ExportInsProductVO a : entry.getValue()) { |
| | | BeanUtils.copyProperties(a, temperature); |
| | | // æ¶é´æ ¼å¼å |
| | | if (Objects.nonNull(a.getCheckTime())) { |
| | | String format = a.getCheckTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | LocalDate parse = LocalDate.parse(format); |
| | | temperature.setInsTime(parse); |
| | | } |
| | | // è¡°åç³»æ°è·å计ç®å¼ |
| | | List<Map> insValue = getInsValueList(a.getComValue()); |
| | | if (CollectionUtils.isNotEmpty(insValue)) { |
| | | switch (a.getInspectionItemClass()) { |
| | | case "1310nm": |
| | | temperature.setAttenuationCoefficient1310(isNumber(insValue.get(0).get("v").toString())); |
| | | // 20â(常温)çæ¯æ²¡æå·®å¼ç |
| | | if (!a.getInspectionItemSubclass().contains("20â(常温)")) { |
| | | BigDecimal v = new BigDecimal(isNumber(insValue.get(0).get("v").toString())).subtract(map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass())); |
| | | String attenuationDifference = v.abs().toString(); |
| | | temperature.setAttenuationDifference1(attenuationDifference); |
| | | } |
| | | break; |
| | | case "1550nm": |
| | | temperature.setAttenuationCoefficient1550(isNumber(insValue.get(0).get("v").toString())); |
| | | // 20â(常温)çæ¯æ²¡æå·®å¼ç |
| | | if (!a.getInspectionItemSubclass().contains("20â(常温)")) { |
| | | BigDecimal v = new BigDecimal(isNumber(insValue.get(0).get("v").toString())).subtract(map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass())); |
| | | String attenuationDifference = v.abs().toString(); |
| | | temperature.setAttenuationDifference2(attenuationDifference); |
| | | } |
| | | break; |
| | | case "1625nm": |
| | | temperature.setAttenuationCoefficient1625(isNumber(insValue.get(0).get("v").toString())); |
| | | // 20â(常温)çæ¯æ²¡æå·®å¼ç |
| | | if (!a.getInspectionItemSubclass().contains("20â(常温)")) { |
| | | BigDecimal v = new BigDecimal(isNumber(insValue.get(0).get("v").toString())).subtract(map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass())); |
| | | String attenuationDifference = v.abs().toString(); |
| | | temperature.setAttenuationDifference3(attenuationDifference); |
| | | } |
| | | break; |
| | | case "1383nm": |
| | | temperature.setAttenuationCoefficient1383(isNumber(insValue.get(0).get("v").toString())); |
| | | // 20â(常温)çæ¯æ²¡æå·®å¼ç |
| | | if (!a.getInspectionItemSubclass().contains("20â(常温)")) { |
| | | BigDecimal v = new BigDecimal(isNumber(insValue.get(0).get("v").toString())).subtract(map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass())); |
| | | String attenuationDifference = v.abs().toString(); |
| | | temperature.setAttenuationDifference4(attenuationDifference); |
| | | } |
| | | break; |
| | | case "1490nm": |
| | | temperature.setAttenuationCoefficient1490(isNumber(insValue.get(0).get("v").toString())); |
| | | // 20â(常温)çæ¯æ²¡æå·®å¼ç |
| | | if (!a.getInspectionItemSubclass().contains("20â(常温)")) { |
| | | BigDecimal v = new BigDecimal(isNumber(insValue.get(0).get("v").toString())).subtract(map.get(a.getEntrustCode() + a.getSampleCode() + a.getBushColor() + a.getColor() + a.getInspectionItemClass())); |
| | | String attenuationDifference = v.abs().toString(); |
| | | temperature.setAttenuationDifference5(attenuationDifference); |
| | | } |
| | | break; |
| | | } |
| | | // è¿è¡è¡°åå·®å¼çæå¤§å¼èµå¼ |
| | | StringBuffer value = new StringBuffer(); |
| | | if (strings.contains("1310nm")) { |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1310nm")) { |
| | | bigDecimal = Optional.ofNullable(map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1310nm")) |
| | | .orElse(Collections.emptyList()) // 妿å¼ä¸º nullï¼è¿å空å表 |
| | | .stream() |
| | | .sorted(Comparator.reverseOrder()) // éåºæåº |
| | | .findFirst() // è·å第ä¸ä¸ªå
ç´ ï¼æå¤§å¼ï¼ |
| | | .orElse(BigDecimal.ZERO); // 妿å表为空ï¼è¿åé»è®¤å¼ï¼ä¾å¦ BigDecimal.ZEROï¼ |
| | | } |
| | | if (bigDecimal.abs().compareTo(BigDecimal.ZERO) > 0) { |
| | | value.append("|âÉ|1310nm max").append(bigDecimal.abs()).append("dB/km"); |
| | | } |
| | | } |
| | | if (strings.contains("1550nm")) { |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1550nm")) { |
| | | List<BigDecimal> valuesList = map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1550nm").stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()); |
| | | bigDecimal = valuesList.isEmpty() ? BigDecimal.ZERO : valuesList.get(0); |
| | | } |
| | | if (bigDecimal.abs().compareTo(BigDecimal.ZERO) > 0) { |
| | | value.append("|âÉ|1550nm max").append(bigDecimal.abs()).append("dB/km"); |
| | | } |
| | | } |
| | | if (strings.contains("1625nm")) { |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1625nm")) { |
| | | bigDecimal = map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1625nm").stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).get(0); |
| | | } |
| | | if (bigDecimal.abs().compareTo(BigDecimal.ZERO) > 0) { |
| | | value.append("|âÉ|1625nm max").append(bigDecimal.abs()).append("dB/km"); |
| | | } |
| | | } |
| | | |
| | | if (strings.contains("1383nm")) { |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1383nm")) { |
| | | bigDecimal = map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1383nm").stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).get(0); |
| | | } |
| | | if (bigDecimal.abs().compareTo(BigDecimal.ZERO) > 0) { |
| | | value.append("|âÉ|1383nm max").append(bigDecimal.abs()).append("dB/km"); |
| | | } |
| | | } |
| | | |
| | | if (strings.contains("1490nm")) { |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (map1.containsKey(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1490nm")) { |
| | | bigDecimal = map1.get(a.getEntrustCode() + a.getSampleCode() + a.getInspectionItemSubclass() + "1490nm").stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).get(0); |
| | | } |
| | | if (bigDecimal.abs().compareTo(BigDecimal.ZERO) > 0) { |
| | | value.append("|âÉ|1490nm max").append(bigDecimal.abs()).append("dB/km"); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(value.toString())) { |
| | | value.insert(0, a.getInspectionItemSubclass() + " "); |
| | | } |
| | | temperature.setAttenuationDifferenceMax(value.toString()); |
| | | } |
| | | temperatureCyclingList.add(temperature); |
| | | } |
| | | } |
| | | } |
| | | temperatureCyclingList = temperatureCyclingList.stream().distinct().collect(Collectors.toList()); |
| | | //æ¥è¯¢å
¨è²è°±ï¼è¿æ»¤è²æ å¹¶æåº |
| | | List<String> colorList = dictTypeService.selectDictDataByType("color_type").stream() |
| | | .sorted(Comparator.comparing(SysDictData::getDictSort)) |
| | | .map(SysDictData::getDictLabel) |
| | | .collect(Collectors.toList()); |
| | | Map<String, List<TemperatureCycling>> collect = temperatureCyclingList.stream().collect(Collectors.groupingBy(TemperatureCycling::getEntrustCode)); |
| | | Iterator<Map.Entry<String, List<TemperatureCycling>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<TemperatureCycling>> entry = iterator.next(); |
| | | //æ¸©åº¦å¾ªç¯æ ¹æ®è²æ æåº |
| | | entry.getValue().sort((o1, o2) -> { |
| | | //æ ¹æ®å¥ç®¡è²æ 以åå
çº¤è²æ æåº |
| | | if (StringUtils.isNotBlank(o1.getBushColor()) && StringUtils.isNotBlank(o2.getBushColor())) { |
| | | //å
ææ ·åç¼å·ååº |
| | | if (!Objects.equals(o1.getSampleCode(), o2.getSampleCode())) { |
| | | if (containsOnlyDigits(o1.getSampleCode()) && containsOnlyDigits(o2.getSampleCode())) { |
| | | Long o1Num = Long.parseLong(o1.getSampleCode()); |
| | | Long o2Num = Long.parseLong(o2.getSampleCode()); |
| | | return o1Num.compareTo(o2Num); |
| | | } |
| | | return o1.getSampleCode().compareTo(o2.getSampleCode()); |
| | | } |
| | | //å¾ªç¯æ¬¡æ°æåº |
| | | if (StringUtils.isNotBlank(o1.getInspectionItem()) && StringUtils.isNotBlank(o2.getInspectionItem())) { |
| | | if (!Objects.equals(o1.getInspectionItem(), o2.getInspectionItem())) { |
| | | Integer o1Index = Integer.parseInt(o1.getInspectionItem()); |
| | | Integer o2Index = Integer.parseInt(o2.getInspectionItem()); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | } |
| | | //å¥ç®¡è²æ æåº |
| | | if (!Objects.equals(o1.getBushColor(), o2.getBushColor())) { |
| | | Integer o1Index = colorList.indexOf(o1.getBushColor()); |
| | | Integer o2Index = colorList.indexOf(o2.getBushColor()); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | //å
纤带æåº |
| | | if (StringUtils.isNotBlank(o1.getCode()) && StringUtils.isNotBlank(o2.getCode())) { |
| | | if (!Objects.equals(o1.getCode(), o2.getCode())) { |
| | | return o1.getCode().compareTo(o2.getCode()); |
| | | } |
| | | } |
| | | //å
çº¤è²æ æåº |
| | | if (StringUtils.isNotBlank(o1.getColor()) && StringUtils.isNotBlank(o2.getColor())) { |
| | | if (!Objects.equals(o1.getColor(), o2.getColor())) { |
| | | Integer o1Index = colorList.indexOf(o1.getColor()); |
| | | Integer o2Index = colorList.indexOf(o2.getColor()); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | } |
| | | } |
| | | return 0; |
| | | }); |
| | | newTemperatureCyclingList.addAll(entry.getValue()); |
| | | } |
| | | //æ¸©åº¦å¾ªç¯æ ¹æ®è²æ æåº |
| | | // temperatureCyclingList.sort((o1, o2) -> { |
| | | // // å¤ç null å¼ |
| | | // if (o1 == null && o2 == null) return 0; |
| | | // if (o1 == null) return -1; |
| | | // if (o2 == null) return 1; |
| | | // |
| | | // // ---------------------- 1. ææ ·åç¼å·æåº ---------------------- |
| | | // int sampleCodeCompare = compareSampleCode(o1.getSampleCode(), o2.getSampleCode()); |
| | | // if (sampleCodeCompare != 0) return sampleCodeCompare; |
| | | // |
| | | // // ---------------------- 2. æå¥ç®¡è²æ æåº ---------------------- |
| | | // int bushColorCompare = compareColor(o1.getBushColor(), o2.getBushColor(), colorList); |
| | | // if (bushColorCompare != 0) return bushColorCompare; |
| | | // |
| | | // // ---------------------- 3. æå
纤带æåº ---------------------- |
| | | // int codeCompare = compareNullableString(o1.getCode(), o2.getCode()); |
| | | // if (codeCompare != 0) return codeCompare; |
| | | // |
| | | // // ---------------------- 4. æå
çº¤è²æ æåº ---------------------- |
| | | // return compareColor(o1.getColor(), o2.getColor(), colorList); |
| | | // }); |
| | | return newTemperatureCyclingList; |
| | | } |
| | | |
| | | //1: æ ·åç¼å·æ¯è¾ï¼æ¯ææ°ååå符串混åæåºï¼ |
| | | private static int compareSampleCode(String code1, String code2) { |
| | | if (Objects.equals(code1, code2)) return 0; |
| | | |
| | | boolean isCode1Numeric = containsOnlyDigits(code1); |
| | | boolean isCode2Numeric = containsOnlyDigits(code2); |
| | | |
| | | // 妿齿¯æ°åï¼è½¬ä¸º Long æ¯è¾ |
| | | if (isCode1Numeric && isCode2Numeric) { |
| | | return Long.compare(Long.parseLong(code1), Long.parseLong(code2)); |
| | | } |
| | | |
| | | // 妿ä¸ä¸ªæ¯æ°åï¼å¦ä¸ä¸ªä¸æ¯ï¼æ°åä¼å
|
| | | if (isCode1Numeric != isCode2Numeric) { |
| | | return isCode1Numeric ? -1 : 1; |
| | | } |
| | | |
| | | // å
¶ä»æ
嵿å符串æ¯è¾ |
| | | return code1.compareTo(code2); |
| | | } |
| | | |
| | | //2: è²æ æ¯è¾ï¼å¤çä¸å¨ colorList ä¸çæ
åµï¼ |
| | | private static int compareColor(String color1, String color2, List<String> colorList) { |
| | | if (Objects.equals(color1, color2)) return 0; |
| | | |
| | | // å¤ç colorList ä¸çç´¢å¼ |
| | | int index1 = colorList.indexOf(color1); |
| | | int index2 = colorList.indexOf(color2); |
| | | |
| | | // å°ä¸å¨å表ä¸çè²æ ç»ä¸æåºå°æåï¼èµäºæå¤§å¼ï¼ |
| | | index1 = index1 == -1 ? Integer.MAX_VALUE : index1; |
| | | index2 = index2 == -1 ? Integer.MAX_VALUE : index2; |
| | | |
| | | return Integer.compare(index1, index2); |
| | | } |
| | | |
| | | //3: å¤çå¯è½ä¸ºç©ºçå符串æ¯è¾ |
| | | private static int compareNullableString(String str1, String str2) { |
| | | if (Objects.equals(str1, str2)) return 0; |
| | | |
| | | // 空å符串è§ä¸ºè¾å°å¼ |
| | | boolean isStr1Blank = StringUtils.isBlank(str1); |
| | | boolean isStr2Blank = StringUtils.isBlank(str2); |
| | | |
| | | if (isStr1Blank && isStr2Blank) return 0; |
| | | if (isStr1Blank) return -1; |
| | | if (isStr2Blank) return 1; |
| | | |
| | | // éç©ºæ¶æèªç¶é¡ºåºæ¯è¾ |
| | | return str1.compareTo(str2); |
| | | } |
| | | |
| | | public List<Map> getInsValueList(String insValue) { |
| | | List<Map> list = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(insValue)) { |
| | | List<Map> maps = JSONArray.parseArray(insValue, Map.class); |
| | | list.addAll(maps); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦å¯ä»¥è½¬æ°å |
| | | */ |
| | | public String isNumber(String str) { |
| | | if (NumberUtil.isDouble(str)) { |
| | | return str; |
| | | } else { |
| | | return "0"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æåºè§æ ¼ |
| | | * |
| | | * @param t |
| | | * @return |
| | | */ |
| | | public Integer getInspectionItemSubclassOrder(String t) { |
| | | switch (t) { |
| | | case "20â(常温)": |
| | | return 1; |
| | | case "20â": |
| | | return 2; |
| | | case "-40â": |
| | | return 3; |
| | | case "65â": |
| | | return 4; |
| | | default: |
| | | return 5; // æªç¥æ¸©åº¦ç¹ |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) { |
| | | String dates = costStatisticsDto.getDates(); |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | costStatisticsDto.setDates(null); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // map.put("head", PrintChina.printChina(CostStatisticsDto.class)); |
| | | Map<String, Integer> map1 = new HashMap<>(); |
| | | if (map1.get("look") == 1) costStatisticsDto.setCreateUser(map1.get("userId")); |
| | | // è·åå½å人æå¨å®éªå®¤ |
| | | Integer userId = 1; |
| | | String departLimsId = userMapper.selectById(userId).getDepartLimsId(); |
| | | String laboratory = ""; |
| | | if (StringUtils.isNotBlank(departLimsId)) { |
| | | String[] split1 = departLimsId.split(","); |
| | | for (String s : split1) { |
| | | if (StringUtils.isNotBlank(s) && (!Arrays.asList("1", "22").contains(s))) { |
| | | laboratory = insOrderMapper.getDepartment(Integer.parseInt(s)); |
| | | } |
| | | } |
| | | } |
| | | LocalDate today = LocalDate.parse(split[1]); |
| | | LocalTime end = LocalTime.of(23, 59, 59); |
| | | IPage<CostStatisticsDto> dtoIPage = insOrderMapper.selectCostStatistics(page, QueryWrappers.queryWrappers(costStatisticsDto), split[0], today.atTime(end).toString(), laboratory); |
| | | List<CostStatisticsDto> collect = dtoIPage.getRecords().stream().map(dto -> { |
| | | Set<String> uniqueTags = new HashSet<>(); |
| | | if (dto.getInspectionItem().contains(",")) { |
| | | for (String s : dto.getInspectionItem().split(",")) { |
| | | uniqueTags.add(s.split("@")[0]); |
| | | } |
| | | } else { |
| | | uniqueTags.add(dto.getInspectionItem().split("@")[0]); |
| | | } |
| | | dto.setInspectionItem(uniqueTags.toString()); |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | dtoIPage.setRecords(collect); |
| | | map.put("body", dtoIPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> costStatistics2(CostStatisticsDto costStatisticsDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String dates = costStatisticsDto.getDates(); |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | costStatisticsDto.setDates(null); |
| | | // è·åå½å人æå¨å®éªå®¤ |
| | | Integer userId = 1; |
| | | String departLimsId = userMapper.selectById(userId).getDepartLimsId(); |
| | | String laboratory = ""; |
| | | if (StringUtils.isNotBlank(departLimsId)) { |
| | | String[] split1 = departLimsId.split(","); |
| | | for (String s : split1) { |
| | | if (StringUtils.isNotBlank(s) && (!Arrays.asList("1", "22").contains(s))) { |
| | | laboratory = insOrderMapper.getDepartment(Integer.parseInt(s)); |
| | | } |
| | | } |
| | | } |
| | | LocalDate today = LocalDate.parse(split[1]); |
| | | LocalTime end = LocalTime.of(23, 59, 59); |
| | | List<CostStatisticsDto> costStatisticsDtos = insOrderMapper.selectCostStatistics2(QueryWrappers.queryWrappers(costStatisticsDto), split[0], today.atTime(end).toString(), laboratory); |
| | | // double totalPrice = costStatisticsDtos.stream() |
| | | // .filter(dto -> dto.getPrice() != null) // è¿æ»¤æä»·æ ¼ä¸º null ç对象 |
| | | // .mapToDouble(value -> value.getPrice().doubleValue() * value.getNum()) |
| | | // .sum(); |
| | | BigDecimal total = BigDecimal.ZERO; |
| | | for (CostStatisticsDto dto : costStatisticsDtos) { |
| | | if (Objects.isNull(dto.getPrice()) || dto.getPrice().compareTo(BigDecimal.ZERO) == 0) { |
| | | dto.setPrice(new BigDecimal(0)); |
| | | } |
| | | total = total.add(dto.getPrice()); |
| | | } |
| | | map.put("total", total); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectSampleDefects(Page page, String inspectionItems, String orderNumber) { |
| | | List<SampleDefectsFatherVo> sampleDefectsFatherVos = insOrderMapper.selectSampleDefects(page, inspectionItems, orderNumber); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("records", sampleDefectsFatherVos); |
| | | Long aLong = insOrderMapper.getCount(inspectionItems, orderNumber); |
| | | map.put("total", aLong); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int updateStatus(Integer id) { |
| | | return insOrderMapper.updateStatus(id); |
| | | } |
| | | |
| | | //æ ç¾æå° |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED) |
| | | public List<SampleProductDto3> labelPrinting(String ids) { |
| | | List<Integer> list = Arrays.stream(ids.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | List<SampleProductDto3> sampleProductDtos = insSampleMapper.selectSampleProductListByOrderId3(list); |
| | | Set<String> processedCodes = new HashSet<>(); |
| | | //é»è®¤åªæå°ç¬¬ä¸ä¸ª:å
纤ãå
纤带ãé¢ç»çº¿ãå
çº¤çæ¥ |
| | | List<SampleProductDto3> sampleProductDto3s = sampleProductDtos.stream().filter(sampleProductDto3 -> { |
| | | if (!"å
纤".equals(sampleProductDto3.getIoSampleType()) && |
| | | !"å
纤带".equals(sampleProductDto3.getIoSampleType()) && |
| | | !"é¢ç»çº¿".equals(sampleProductDto3.getIoSampleType()) && |
| | | sampleProductDto3.getInsProduct().stream().noneMatch(i -> StringUtils.equals("å
纤æ¥å¤´æè", i.getInspectionItem())) |
| | | ) { |
| | | return true; |
| | | } |
| | | if (processedCodes.contains(sampleProductDto3.getCode())) { |
| | | return false; |
| | | } else { |
| | | processedCodes.add(sampleProductDto3.getCode()); |
| | | return true; |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | return sampleProductDto3s; |
| | | } |
| | | |
| | | @Override |
| | | public void export(CostStatisticsDto costStatisticsDto, HttpServletResponse response) throws IOException { |
| | | // 夿å½å人å±äºçµå è¿æ¯ éä¿¡ è¿æ»¤æä¸º1 |
| | | List<String> dept = new ArrayList<>(); |
| | | Map<String, Integer> map1 = new HashMap<>(); |
| | | User user = userMapper.selectById(map1.get("userId"));//å½åç»å½ç人 |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = ""; |
| | | if (StringUtils.isNotBlank(departLimsId) && Objects.nonNull(departLimsId)) { |
| | | String[] split = departLimsId.split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | if (StringUtils.isNotBlank(split[i])) { |
| | | if (split[i].equals("1") || split[i].equals("22")) { |
| | | continue; |
| | | } |
| | | laboratory = insOrderMapper.getDepartment(Integer.parseInt(split[i])); |
| | | dept.add(insOrderMapper.getDepartment(Integer.parseInt(split[i]))); |
| | | } |
| | | } |
| | | } |
| | | //æ¥è¯¢å¯¼åºçè´¹ç¨ç»è®¡æ°æ® |
| | | String dates = costStatisticsDto.getDates(); |
| | | String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | costStatisticsDto.setDates(null); |
| | | |
| | | |
| | | LocalDate today = LocalDate.parse(split[1]); |
| | | LocalTime end = LocalTime.of(23, 59, 59); |
| | | List<CostStatisticsDto> costStatisticsDtos = insOrderMapper.selectCostStatistics2(QueryWrappers.queryWrappers(costStatisticsDto), split[0], today.atTime(end).toString(), laboratory); |
| | | costStatisticsDtos = costStatisticsDtos.stream().map(dto -> { |
| | | Set<String> uniqueTags = new HashSet<>(); |
| | | if (dto.getInspectionItem().contains(",")) { |
| | | for (String s : dto.getInspectionItem().split(",")) { |
| | | uniqueTags.add(s.split("@")[0]); |
| | | } |
| | | } else { |
| | | uniqueTags.add(dto.getInspectionItem().split("@")[0]); |
| | | } |
| | | dto.setInspectionItem(uniqueTags.toString()); |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | String fileName = URLEncoder.encode("æ ·åè´¹ç¨ç»è®¡å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | Map<String, List<CostStatisticsDto>> groupByCompany = |
| | | costStatisticsDtos.stream().filter(e -> StrUtil.isNotEmpty(e.getCompany())) |
| | | .collect(Collectors.groupingBy(CostStatisticsDto::getCompany)); |
| | | try { |
| | | // æ°å»ºExcelWriter |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25)) |
| | | .build(); |
| | | List<CostStatisticsDto> costStatisticsDtos1 = new ArrayList<>(); |
| | | for (Map.Entry<String, List<CostStatisticsDto>> companyDataEntry : groupByCompany.entrySet()) { |
| | | String sheetName = companyDataEntry.getKey(); |
| | | List<CostStatisticsDto> dataList = companyDataEntry.getValue(); |
| | | // æ ¹æ®è¯¥ååçå®éªå®¤ æ¥å¤ææ¯å¦å±äºå½åç»å½äººçé¨é¨ |
| | | for (CostStatisticsDto costStatisticsDto1 : dataList) { |
| | | if (StringUtils.isNotBlank(costStatisticsDto1.getLaboratory()) && Objects.nonNull(costStatisticsDto1.getLaboratory())) { |
| | | if (dept.contains(costStatisticsDto1.getLaboratory())) { |
| | | costStatisticsDtos1.add(costStatisticsDto1); |
| | | } |
| | | } |
| | | } |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(sheetName) |
| | | .head(CostStatisticsDto.class) |
| | | .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25)) |
| | | .build(); |
| | | excelWriter.write(costStatisticsDtos1, mainSheet); |
| | | costStatisticsDtos1.clear(); |
| | | } |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | public static boolean containsOnlyDigits(String str) { |
| | | String regex = "\\d+"; // å¹é
ä¸ä¸ªæå¤ä¸ªæ°å |
| | | return Pattern.matches(regex, str); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED) |
| | | public Boolean hasSendUrgentOrder() { |
| | | Integer userId = 1; |
| | | //æ¥è¯¢å½å客æ·çç´§æ¥é¢åº¦ |
| | | Map<String, Object> quotaMap = baseMapper.selectCurrentCompanyUrgentQuota(userId); |
| | | if (quotaMap == null) { |
| | | return false; |
| | | } |
| | | //æ¥è¯¢å½å¤©å®¢æ·å·²å建çç´§æ¥è®¢å |
| | | long count = baseMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getCompany, quotaMap.get("company")) |
| | | .eq(InsOrder::getType, 2) |
| | | .gt(InsOrder::getCreateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MIN)) |
| | | .lt(InsOrder::getCreateTime, LocalDateTime.of(LocalDate.now(), LocalTime.MAX))); |
| | | int quota = Integer.parseInt(quotaMap.get("quota").toString()); |
| | | return quota > count; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderTemplateMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import com.ruoyi.inspect.service.InsOrderTemplateService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-18 14:14:54 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsOrderTemplateServiceImpl extends ServiceImpl<InsOrderTemplateMapper, InsOrderTemplate> |
| | | implements InsOrderTemplateService { |
| | | |
| | | private InsOrderTemplateMapper insOrderTemplateMapper; |
| | | |
| | | |
| | | @Override |
| | | public int addInsOrderTemplate(InsOrderTemplate insOrderTemplate) { |
| | | return insOrderTemplateMapper.insert(insOrderTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public List<InsOrderTemplate> selectInsOrderTemplate(String company) { |
| | | if (ObjectUtils.isEmpty(company) || company.equals("")) { |
| | | return insOrderTemplateMapper.selectList(Wrappers.<InsOrderTemplate>lambdaQuery() |
| | | .select(InsOrderTemplate.class, info -> !info.getColumn().equals("thing"))); |
| | | } else { |
| | | //æ ¹æ®å§æåä½è¿è¡çé |
| | | return insOrderTemplateMapper.selectList(Wrappers.<InsOrderTemplate>lambdaQuery() |
| | | .like(InsOrderTemplate::getThing,"\"company\":\""+ company+"\"") |
| | | .select(InsOrderTemplate.class, info -> !info.getColumn().equals("thing"))); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String,Object> selectInsOrderTemplateById(Integer id) { |
| | | Map<String,Object> map = new HashMap<>(); |
| | | String thing = insOrderTemplateMapper.selectById(id).getThing(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | map = objectMapper.readValue(thing, Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int delInsOrderTemplate(Integer id) { |
| | | return insOrderTemplateMapper.deleteById(id); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.InsProductDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderStateMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsProductServiceImpl extends ServiceImpl<InsProductMapper, InsProduct> |
| | | implements InsProductService { |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | |
| | | @Override |
| | | public int selectOrderManDay(Integer orderId) { |
| | | return insProductMapper.selectOrderManDay(orderId); |
| | | } |
| | | |
| | | @Override |
| | | public int updateInspected(Integer id, String ids) { |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(id); |
| | | insOrder.setIsRevocation(1);//éè¦å®¡æ ¸ |
| | | insOrder.setRevocationInsProductIds(ids); |
| | | return insOrderMapper.updateById(insOrder); |
| | | } |
| | | |
| | | @Override |
| | | public boolean write(InsProductDto insProductDto) { |
| | | // List<InsProduct> insProducts = baseMapper.selectBatchIds(insProductDto.getIds()); |
| | | // for (InsProduct insProduct : insProducts) { |
| | | // insProduct.setTemperature(insProductDto.getTemperature()); |
| | | // insProduct.setHumidity(insProductDto.getHumidity()); |
| | | // } |
| | | List<Integer> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insProductDto.getInsOrderId()) |
| | | .select(InsSample::getId)) |
| | | .stream() |
| | | .map(InsSample::getId) |
| | | .collect(Collectors.toList()); |
| | | // Integer insSampleId = baseMapper.selectById(insProductDto.getIds().get(0)).getInsSampleId(); |
| | | return baseMapper.update(null, new LambdaUpdateWrapper<InsProduct>().in(InsProduct::getInsSampleId, insSamples) |
| | | .set(Strings.isNotBlank(insProductDto.getTemperature()),InsProduct::getTemperature, insProductDto.getTemperature()) |
| | | .set(Strings.isNotBlank(insProductDto.getHumidity()),InsProduct::getHumidity, insProductDto.getHumidity()))>0; |
| | | } |
| | | |
| | | //æ¥è¯¢å¾
æ£é¡¹ç® |
| | | @Override |
| | | public Map<String, Object> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // map.put("head", PrintChina.printChina(InsProduct.class)); |
| | | IPage<InsProduct> insProductIPage = baseMapper.selectNoProducts(page, orderId); |
| | | if (ObjectUtils.isNotEmpty(ids)) { |
| | | List<Integer> collect = Arrays.asList(ids.split(",")).stream() |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | List<InsProduct> products = insProductIPage.getRecords().stream().filter(record -> collect.contains(record.getId())).collect(Collectors.toList()); |
| | | insProductIPage.setRecords(products); |
| | | } |
| | | map.put("body", insProductIPage); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | // æ¥è¯¢æ¤éé¡¹ç® |
| | | public List<List<Integer>> selectRevocation(Integer orderId) { |
| | | // æ¥è¯¢æ¤éç¶æçæ ·å ä»¥å æ£éªé¡¹ |
| | | String revocationInsProductIds = insOrderMapper.selectById(orderId).getRevocationInsProductIds(); |
| | | List<Integer> productIds = new ArrayList<>(); |
| | | List<Integer> sampleIds = new ArrayList<>(); |
| | | // å¦ææ¯æ°çæ°æ® ä¼åå¨sampleçid 以åproductçid 以@åé |
| | | if(StringUtils.isNotEmpty(revocationInsProductIds)) { |
| | | if(revocationInsProductIds.contains("@")) { |
| | | List<List<Integer>> collect = Arrays.stream(revocationInsProductIds.split("@")).map(item -> { |
| | | List<Integer> list = JSONArray.parseArray(item, Integer.class); |
| | | return list; |
| | | }).collect(Collectors.toList()); |
| | | sampleIds = collect.get(0); |
| | | productIds = collect.get(1); |
| | | }else { |
| | | // 以åçæ°æ®åæ¯productIdï¼ä»¥ ,åé |
| | | productIds = Arrays.stream(revocationInsProductIds.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return Arrays.asList(sampleIds,productIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String,Object>> selectSampleByOrderId(Integer orderId) { |
| | | List<List<Integer>> collect = selectRevocation(orderId); |
| | | List<Integer> sampleIds = collect.get(0); |
| | | List<Integer> productIds = collect.get(1); |
| | | |
| | | |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>() |
| | | .eq(InsSample::getInsOrderId, orderId) |
| | | .notIn(CollectionUtils.isNotEmpty(sampleIds), InsSample::getId,sampleIds)); |
| | | for(InsSample insSample : insSamples) { |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1) |
| | | .notIn(CollectionUtils.isNotEmpty(productIds), InsProduct::getId,productIds)); |
| | | if(CollectionUtils.isNotEmpty(productList)) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("sampleCode", insSample.getSampleCode()); // æ ·åç¼å· |
| | | map.put("sampleId", insSample.getId()); // å端éè¦ |
| | | map.put("id", insSample.getId()); |
| | | map.put("hasChildren", true); // æ¯å¦æå项 |
| | | list.add(map); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String,Object>> selectProductsBySampleId(Integer sampleId,Integer orderId) { |
| | | List<List<Integer>> collect1 = selectRevocation(orderId); |
| | | List<Integer> sampleIds = collect1.get(0); |
| | | List<Integer> productIds = collect1.get(1); |
| | | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | if(!sampleIds.contains(sampleId)) { |
| | | InsSample insSample = insSampleMapper.selectById(sampleId); |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState,1) |
| | | .notIn(CollectionUtils.isNotEmpty(productIds), InsProduct::getId,productIds)); |
| | | for (InsProduct insProduct : productList) { |
| | | // åºåæ¸©åº¦å¾ªç¯ å æ®éé¡¹ç® |
| | | if(Objects.isNull(insProduct.getSpecialItemParentId()) || !NumberUtil.isInteger(insProduct.getInspectionItem())) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // å¦ææ¯æ¸©åº¦å¾ªç¯å°±è¿å¾å¨å¤åµå¥å å± |
| | | if(insProduct.getInspectionItem().equals("温度循ç¯")) { |
| | | map.put("sampleCode", insSample.getSampleCode()); // æ ·åç¼å· |
| | | map.put("inspectionItem",insProduct.getInspectionItem()); // æ£éªé¡¹ç® |
| | | map.put("sampleId", insSample.getId()); // æ ·åid |
| | | map.put("hasChildren",true); |
| | | // 温度循ç¯ç¹æ®æ è¯ |
| | | map.put("temperature",true); |
| | | map.put("id",insProduct.getId()); |
| | | }else { |
| | | map.put("sampleId", insSample.getId()); // æ ·åid |
| | | map.put("sampleCode", insSample.getSampleCode()); // æ ·åç¼å· |
| | | map.put("inspectionItem",insProduct.getInspectionItem()); // æ£éªé¡¹ç® |
| | | |
| | | map.put("inspectionItemSubclass",insProduct.getInspectionItemSubclass()); // æ£éªå项 |
| | | map.put("sampleType",insProduct.getSampleType()); // æ ·ååç±» |
| | | map.put("sample",insProduct.getSample()); // æ ·å |
| | | map.put("model",insProduct.getModel()); // åå· |
| | | map.put("sonLaboratory",insProduct.getSonLaboratory()); // åå®éªå®¤ |
| | | map.put("tell",insProduct.getTell()); // è¦æ±å¼ |
| | | map.put("id",insProduct.getId()); |
| | | } |
| | | list.add(map); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectTemperatureByProductId(Integer productId) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | List<InsProduct> productList = null; |
| | | // å·²ç»å°æ¤é页é¢çå°±ä¸å¨æ¥åºæ¥ |
| | | InsProduct insProduct = insProductMapper.selectById(productId); |
| | | InsSample insSample = insSampleMapper.selectById(insProduct.getInsSampleId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | List<List<Integer>> lists = selectRevocation(insOrder.getId()); |
| | | List<Integer> productIds = lists.get(1); |
| | | |
| | | productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getSpecialItemParentId, productId) |
| | | .notIn(CollectionUtils.isNotEmpty(productIds),InsProduct::getId,productIds)); |
| | | |
| | | |
| | | if(CollectionUtils.isNotEmpty(productList)) { |
| | | Map<String, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | // æ¿å°å¾ªç¯æ¬¡æ° |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> next = iterator.next(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("hasChildren",true); |
| | | // 温度循ç¯ç¹æ®æ è¯ å¾ªç¯æ¬¡æ° |
| | | map.put("temperatureNumber",true); |
| | | map.put("sampleId", next.getValue().get(0).getInsSampleId()); // æ ·åid |
| | | map.put("inspectionItem",next.getKey() + " (å¾ªç¯æ¬¡æ°)"); // æ£éªé¡¹ç® |
| | | map.put("inspectionItemTwo",next.getKey()); // æ¹ä¾¿æ¥çå
·ä½æ¬¡æ° ï¼ä¼ å¼éè¦ï¼ |
| | | map.put("parentId",productId); // ç¶id |
| | | map.put("ids",next.getValue().stream().map(InsProduct::getId).collect(Collectors.toList())); |
| | | map.put("sampleCode", next.getValue().get(0).getSampleCode()); // æ ·åç¼å· |
| | | map.put("id",productId + Integer.parseInt(next.getKey())); |
| | | list.add(map); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectTemperatureNumberByProductId(Integer parentId, String inspectionItem) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // å·²ç»å°æ¤é页é¢çå°±ä¸å¨æ¥åºæ¥ |
| | | InsProduct ip = insProductMapper.selectById(parentId); |
| | | InsSample insSample = insSampleMapper.selectById(ip.getInsSampleId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | List<List<Integer>> lists = selectRevocation(insOrder.getId()); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | |
| | | |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getSpecialItemParentId, parentId) |
| | | .eq(InsProduct::getInspectionItem, inspectionItem) |
| | | .notIn(CollectionUtils.isNotEmpty(productIds),InsProduct::getId,productIds)); |
| | | // æ ¹æ®æ£éªå项å¾å°æ¸©åº¦ç¹ |
| | | Map<String, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItemSubclass)); |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> next = iterator.next(); |
| | | InsProduct insProduct = next.getValue().get(0); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("sampleId", next.getValue().get(0).getInsSampleId()); // æ ·åid |
| | | map.put("inspectionItem",""); // æ£éªé¡¹ç® |
| | | map.put("inspectionItemSubclass",next.getKey()); // æ£éªå项 |
| | | map.put("sampleType",insProduct.getSampleType()); // æ ·ååç±» |
| | | map.put("sample",insProduct.getSample()); // æ ·å |
| | | map.put("model",insProduct.getModel()); // åå· |
| | | map.put("sonLaboratory",insProduct.getSonLaboratory()); // åå®éªå®¤ |
| | | map.put("sampleCode", next.getValue().get(0).getSampleCode()); // æ ·åç¼å· |
| | | map.put("tell",insProduct.getTell()); // è¦æ±å¼ |
| | | map.put("number",inspectionItem); // å¾ªç¯æ¬¡æ° |
| | | map.put("parentId",parentId); // ç¶id |
| | | map.put("ids",next.getValue().stream().map(InsProduct::getId).collect(Collectors.toList())); // è¯¥æ¸©åº¦ç¹ææçid |
| | | map.put("id",Math.random()); |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void revoke(Map<String, Object> data) { |
| | | List<List<Integer>> lists = selectRevocation(Integer.parseInt(data.get("orderId").toString())); |
| | | // æ´æ°orderçç¶æ 以忷»å éè¦æ¤éçé¡¹ç® |
| | | Integer orderId = Integer.parseInt(data.get("orderId").toString()); |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | insOrder.setIsRevocation(1); |
| | | List<Integer> sampleIds = new ArrayList<>(); |
| | | List<Integer> productIds = new ArrayList<>(); |
| | | if(data.containsKey("sampleIds")) { |
| | | sampleIds = JSONArray.parseArray(data.get("sampleIds").toString(), Integer.class); |
| | | } |
| | | if(data.containsKey("productIds")) { |
| | | productIds = JSONArray.parseArray(data.get("productIds").toString(), Integer.class); |
| | | |
| | | } |
| | | sampleIds.addAll(lists.get(0)); |
| | | productIds.addAll(lists.get(1)); |
| | | String SampleJsonString = JSON.toJSONString(sampleIds); |
| | | String ProductJsonString = JSON.toJSONString(productIds); |
| | | insOrder.setRevocationInsProductIds(SampleJsonString + "@" + ProductJsonString); |
| | | insOrderMapper.updateById(insOrder); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> revokeReviewSample(Integer orderId) { |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | List<List<Integer>> lists = selectRevocation(orderId); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | List<Integer> newSampleIds = new ArrayList<>(); |
| | | // æ ¹æ®é¡¹ç®æ¥è·åæ ·å |
| | | if(CollectionUtils.isNotEmpty(productIds)) { |
| | | newSampleIds = insProductMapper.selectBatchIds(productIds).stream().map(InsProduct::getInsSampleId).distinct().collect(Collectors.toList()); |
| | | } |
| | | // æ¥è¯¢éè¦æ¤éçæ ·å |
| | | if(CollectionUtils.isNotEmpty(newSampleIds)) { |
| | | List<InsSample> insSamples = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>() |
| | | .in(InsSample::getId, newSampleIds)); |
| | | |
| | | for (InsSample insSample : insSamples) { |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1) |
| | | .in(CollectionUtils.isNotEmpty(productIds), InsProduct::getId, productIds)); |
| | | if(CollectionUtils.isNotEmpty(productList)) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("sampleCode", insSample.getSampleCode()); // æ ·åç¼å· |
| | | map.put("sampleId", insSample.getId()); // å端éè¦ |
| | | map.put("id", insSample.getId()); |
| | | map.put("hasChildren", true); // æ¯å¦æå项 |
| | | list.add(map); |
| | | } |
| | | } |
| | | } |
| | | if(CollectionUtils.isNotEmpty(sampleIds)) { |
| | | List<InsSample> insSamples2 = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>() |
| | | .in(InsSample::getId, sampleIds)); |
| | | for (InsSample insSample : insSamples2) { |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1)); |
| | | if(CollectionUtils.isNotEmpty(productList)) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("sampleCode", insSample.getSampleCode()); // æ ·åç¼å· |
| | | map.put("sampleId", insSample.getId()); // å端éè¦ |
| | | map.put("id", insSample.getId()); |
| | | map.put("hasChildren", true); // æ¯å¦æå项 |
| | | list.add(map); |
| | | } |
| | | } |
| | | } |
| | | |
| | | list = list.stream().sorted(Comparator.comparing(map -> Integer.parseInt(map.get("id")+""))).collect(Collectors.toList()); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> revokeReviewProduct(Integer orderId, Integer sampleId) { |
| | | String sampleCode = insSampleMapper.selectById(sampleId).getSampleCode(); |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | List<List<Integer>> lists = selectRevocation(orderId); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | List<InsProduct> productList = new ArrayList<>(); |
| | | // 妿æ¯ä¸æ´ä¸ªæ ·åæ¤é |
| | | if(sampleIds.contains(sampleId)) { |
| | | // è¿æ»¤åºæ¸©åº¦å¾ªç¯æ¬¡æ°çæ°æ® |
| | | productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, sampleId).eq(InsProduct::getState,1)); |
| | | productList = productList.stream().filter(item -> !NumberUtil.isNumber(item.getInspectionItem()) && Objects.isNull(item.getSpecialItemParentId())).collect(Collectors.toList()); |
| | | }else { |
| | | // 妿æ¯åä¸ªé¡¹ç®æ¤é |
| | | productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getState,1) |
| | | .in(InsProduct::getId, productIds)); |
| | | // 夿æ¯å¦æ¯æ¸©åº¦å¾ªç¯ä¸é¢çæ¸©åº¦ç¹ |
| | | // 1.è¿æ»¤åºä¸æ¯æ¸©åº¦ç¹çæ°æ® |
| | | List<InsProduct> collect = productList.stream().filter(item -> Objects.isNull(item.getSpecialItemParentId()) |
| | | || !NumberUtil.isInteger(item.getInspectionItem())).collect(Collectors.toList()); |
| | | if(productList.size() != collect.size()) { |
| | | // 2.è¿åæ¸©åº¦å¾ªç¯æ°æ®å³å¯ |
| | | List<InsProduct> collect1 = productList.stream().filter(item -> Objects.nonNull(item.getSpecialItemParentId()) |
| | | && NumberUtil.isInteger(item.getInspectionItem())).collect(Collectors.toList()); |
| | | InsProduct insProduct = insProductMapper.selectById(collect1.get(0).getSpecialItemParentId()); |
| | | collect.add(insProduct); |
| | | productList =collect.stream().distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |
| | | for (InsProduct insProduct : productList) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(insProduct.getInspectionItem().equals("温度循ç¯")) { |
| | | map.put("sampleCode", sampleCode); // æ ·åç¼å· |
| | | map.put("inspectionItem",insProduct.getInspectionItem()); // æ£éªé¡¹ç® |
| | | map.put("sampleId", sampleId); // æ ·åid |
| | | map.put("hasChildren",true); |
| | | // 温度循ç¯ç¹æ®æ è¯ |
| | | map.put("temperature",true); |
| | | map.put("id",insProduct.getId()); |
| | | }else { |
| | | map.put("sampleId", sampleId); // æ ·åid |
| | | map.put("sampleCode", sampleCode); // æ ·åç¼å· |
| | | map.put("inspectionItem",insProduct.getInspectionItem()); // æ£éªé¡¹ç® |
| | | map.put("inspectionItemSubclass",insProduct.getInspectionItemSubclass()); // æ£éªå项 |
| | | map.put("sampleType",insProduct.getSampleType()); // æ ·ååç±» |
| | | map.put("sample",insProduct.getSample()); // æ ·å |
| | | map.put("model",insProduct.getModel()); // åå· |
| | | map.put("sonLaboratory",insProduct.getSonLaboratory()); // åå®éªå®¤ |
| | | map.put("tell",insProduct.getTell()); // è¦æ±å¼ |
| | | map.put("id",insProduct.getId()); |
| | | } |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> revokeReviewTemperatureByProductId(Integer productId) { |
| | | // æ ¹æ®æ¸©åº¦å¾ªç¯id æ¥æ¾order 以å sample |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | InsProduct insProduct = insProductMapper.selectById(productId); |
| | | InsSample insSample = insSampleMapper.selectById(insProduct.getInsSampleId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | List<List<Integer>> lists = selectRevocation(insOrder.getId()); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | // 妿å½åæ ·åæ¯æ´ä¸ªæ¤é |
| | | if(sampleIds.contains(insSample.getId())) { |
| | | list = selectTemperatureByProductId(productId); |
| | | }else { |
| | | // æ¤éçæ¯æ£éªé¡¹ |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getSpecialItemParentId,productId) |
| | | .in(InsProduct::getId, productIds)); |
| | | Map<String, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | // æ¿å°å¾ªç¯æ¬¡æ° |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> next = iterator.next(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("hasChildren",true); |
| | | // 温度循ç¯ç¹æ®æ è¯ å¾ªç¯æ¬¡æ° |
| | | map.put("temperatureNumber",true); |
| | | map.put("sampleId", next.getValue().get(0).getInsSampleId()); // æ ·åid |
| | | map.put("inspectionItem",next.getKey() + " (å¾ªç¯æ¬¡æ°)"); // æ£éªé¡¹ç® |
| | | map.put("inspectionItemTwo",next.getKey()); // æ¹ä¾¿æ¥çå
·ä½æ¬¡æ° ï¼ä¼ å¼éè¦ï¼ |
| | | map.put("parentId",productId); // ç¶id |
| | | map.put("ids",next.getValue().stream().map(InsProduct::getId).collect(Collectors.toList())); |
| | | map.put("sampleCode", next.getValue().get(0).getSampleCode()); // æ ·åç¼å· |
| | | map.put("id",productId + Integer.parseInt(next.getKey())); |
| | | list.add(map); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> revokeReviewConsistentByProductId(Integer parentId, String inspectionItem) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | InsProduct insProduct = insProductMapper.selectById(parentId); |
| | | InsSample insSample = insSampleMapper.selectById(insProduct.getInsSampleId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | List<List<Integer>> lists = selectRevocation(insOrder.getId()); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | // 妿æ¯å½åæ ·åæ¤é æ¥è¯¢ææ |
| | | if(sampleIds.contains(insSample.getId())) { |
| | | list = selectTemperatureNumberByProductId(parentId, inspectionItem); |
| | | }else { |
| | | // æ¥è¯¢æ¤éçæ¸©åº¦ç¹ |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getSpecialItemParentId, parentId) |
| | | .eq(InsProduct::getInspectionItem, inspectionItem) |
| | | .in(InsProduct::getId, productIds)); |
| | | // æ ¹æ®æ£éªå项å¾å°æ¸©åº¦ç¹ |
| | | Map<String, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItemSubclass)); |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> next = iterator.next(); |
| | | InsProduct ip = next.getValue().get(0); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("sampleId", next.getValue().get(0).getInsSampleId()); // æ ·åid |
| | | map.put("inspectionItem",""); // æ£éªé¡¹ç® |
| | | map.put("inspectionItemParent",inspectionItem + " (å¾ªç¯æ¬¡æ°)"); // æ£éªç¶é¡¹ç® |
| | | map.put("inspectionItemSubclass",next.getKey()); // æ£éªå项 |
| | | map.put("sampleType",ip.getSampleType()); // æ ·ååç±» |
| | | map.put("sample",ip.getSample()); // æ ·å |
| | | map.put("model",ip.getModel()); // åå· |
| | | map.put("sonLaboratory",ip.getSonLaboratory()); // åå®éªå®¤ |
| | | map.put("sampleCode", next.getValue().get(0).getSampleCode()); // æ ·åç¼å· |
| | | map.put("tell",ip.getTell()); // è¦æ±å¼ |
| | | map.put("parentId",parentId); // ç¶id |
| | | map.put("ids",next.getValue().stream().map(InsProduct::getId).collect(Collectors.toList())); // è¯¥æ¸©åº¦ç¹ææçid |
| | | map.put("id",Math.random()); |
| | | list.add(map); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public void revocationPassed(Integer id) { |
| | | List<List<Integer>> lists = selectRevocation(id); |
| | | List<Integer> sampleIds = lists.get(0); |
| | | List<Integer> productIds = lists.get(1); |
| | | if(CollectionUtils.isNotEmpty(sampleIds)) { |
| | | insProductMapper.update(null,new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getState,0) |
| | | .in(InsProduct::getInsSampleId,sampleIds)); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(productIds)) { |
| | | insProductMapper.update(null,new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getState,0) |
| | | .in(InsProduct::getId,productIds)); |
| | | // æ¿å°çproductId |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .in(InsProduct::getId, productIds)); |
| | | if(CollectionUtils.isNotEmpty(productList)) { |
| | | // å¾å¤æä¸ä¸ æ¯å¦å«ææ¸©åº¦å¾ªç¯é¡¹ç® |
| | | List<InsProduct> collect2 = productList.stream().filter(item -> Objects.nonNull(item.getSpecialItemParentId()) |
| | | && NumberUtil.isInteger(item.getInspectionItem())).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(collect2)) { |
| | | // å°±æ¯ææ¸©åº¦å¾ªç¯ç |
| | | Map<Integer, List<InsProduct>> collect = productList.stream().collect(Collectors.groupingBy(InsProduct::getSpecialItemParentId)); |
| | | // è·å温度循ç¯çid |
| | | for(Map.Entry<Integer,List<InsProduct>> entry1 : collect.entrySet()) { |
| | | String number = ""; |
| | | Integer parentId = entry1.getKey(); |
| | | // æ¥è¯¢è¯¥æ¸©åº¦å¾ªç¯ å¾å°å¾ªç¯æ¬¡æ° |
| | | List<InsProduct> productList2 = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentId) |
| | | .eq(InsProduct::getState, 1)); |
| | | if(CollectionUtils.isNotEmpty(productList2)) { |
| | | Map<String, List<InsProduct>> group = productList2.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | number = group.size() + ""; |
| | | } |
| | | // æ¤éçæ¸©åº¦å¾ªç¯åä¸ªæ¸©åº¦ç¹ |
| | | List<InsProduct> productList1 = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getState, 0) |
| | | .eq(InsProduct::getSpecialItemParentId, parentId) |
| | | .in(InsProduct::getId, productIds)); |
| | | // æ ¹æ®æ¸©åº¦ç¹è¿è¡åç» |
| | | Map<String, List<InsProduct>> collect1 = productList1.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItemSubclass)); |
| | | Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect1.entrySet().iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, List<InsProduct>> entry = iterator.next(); |
| | | String key = entry.getKey(); |
| | | // æ¿å°æ¸©åº¦å¾ªç¯çask |
| | | InsProduct insProduct = insProductMapper.selectById(parentId); |
| | | String ask = insProduct.getAsk(); |
| | | String newAsk = ""; |
| | | String[] split = ask.split(";"); |
| | | // åªæå¾ªç¯çæ¬¡æ° é½ä¸å
å«è¯¥æ¸©åº¦ç¹æéè¦æ´æ¹ |
| | | List<InsProduct> productList3 = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentId) |
| | | .eq(InsProduct::getInspectionItemSubclass, key) |
| | | .eq(InsProduct::getState, 1)); |
| | | if(CollectionUtils.isEmpty(productList3)) { |
| | | if(key.equals("20â")) { |
| | | newAsk = Arrays.stream(split).filter(item -> (!item.contains(key) || item.contains("20â(常温)")) && !NumberUtil.isInteger(item.trim())).collect(Collectors.joining(";")) + ";" + number; |
| | | }else { |
| | | newAsk = Arrays.stream(split).filter(item -> !item.contains(key) && !NumberUtil.isInteger(item)).collect(Collectors.joining(";")) + ";" + number; |
| | | |
| | | } |
| | | }else { |
| | | newAsk = Arrays.stream(split).filter(item -> !NumberUtil.isInteger(item)).collect(Collectors.joining(";")) + ";" + number; |
| | | } |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getAsk, newAsk) |
| | | .eq(InsProduct::getId, parentId)); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | insOrderMapper.update(null,new LambdaUpdateWrapper<InsOrder>().set(InsOrder::getIsRevocation,0).eq(InsOrder::getId,id)); |
| | | // 妿æ£éªé¡¹ç®å
¨é¨æ¤éåéè¦æ¤éæ£éªå |
| | | InsOrder insOrder = insOrderMapper.selectById(id); |
| | | insOrder.setRevocationTime(LocalDateTime.now()); |
| | | //æ¥è¯¢è¯¥å§æåä¸åçè¯éªå®¤ |
| | | List<InsOrderState> insOrderStates = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery().eq(InsOrderState::getInsOrderId, id)); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>().eq(InsSample::getInsOrderId, id)); |
| | | List<Integer> collect = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>().eq(InsProduct::getState, 1).in(InsProduct::getInsSampleId, collect)); |
| | | if(CollectionUtils.isEmpty(insProducts)) { |
| | | insOrder.setState(3); |
| | | insOrderMapper.updateById(insOrder); |
| | | }else{ |
| | | //éååè¯éªå®¤ï¼å¦æè¯éªå®¤ä¸ç项ç®ä¸ºç©ºï¼åå é¤è¯¥è¯éªå®¤ä¸ç订å |
| | | insOrderStates.forEach(insOrderState -> { |
| | | //è¿æ»¤è¯éªå®¤ä¸çé¡¹ç® |
| | | long productCount = insProducts.stream().filter(insProduct -> insProduct.getSonLaboratory().equals(insOrderState.getLaboratory())).count(); |
| | | if(productCount == 0){ |
| | | insOrderStateMapper.delete(new LambdaUpdateWrapper<InsOrderState>().eq(InsOrderState::getId, insOrderState.getId())); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void revocationCancel(Integer orderId) { |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | insOrder.setIsRevocation(0); |
| | | insOrder.setRevocationInsProductIds(""); |
| | | insOrderMapper.updateById(insOrder); |
| | | } |
| | | |
| | | |
| | | // public List<Map<String,Object>> selectProductsByOrderId(Integer orderId) { |
| | | // List<Map<String,Object>> list = new ArrayList<>(); |
| | | // List<InsSample> insSamples = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>().eq(InsSample::getInsOrderId, orderId)); |
| | | // if(CollectionUtils.isNotEmpty(insSamples)) { |
| | | // for (InsSample insSample : insSamples) { |
| | | // List<Map<String, Object>> lists = new ArrayList<>(); |
| | | // List<InsProduct> insProducts = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>().eq(InsProduct::getInsSampleId, insSample.getId())); |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // map.put("label", insSample.getSampleCode()); |
| | | // map.put("value", insSample.getId()); |
| | | // if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | // Map<String, List<InsProduct>> collect = insProducts.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | // Iterator<Map.Entry<String, List<InsProduct>>> iterator = collect.entrySet().iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // Map.Entry<String, List<InsProduct>> entry = iterator.next(); |
| | | // lists.add(getInspectionItem(entry.getKey(), entry.getValue())); |
| | | // } |
| | | // map.put("children", lists); |
| | | // } |
| | | // list.add(map); |
| | | // } |
| | | // } |
| | | // return list; |
| | | // } |
| | | |
| | | public Map<String, Object> getInspectionItem(String inspectionItem, List<InsProduct> insProducts) { |
| | | List<Integer> ids = new ArrayList<>(); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("label", inspectionItem); |
| | | for (InsProduct insProduct : insProducts) { |
| | | ids.add(insProduct.getId()); |
| | | list.add(getProductsSubclass(insProduct)); |
| | | } |
| | | map.put("value", ids); |
| | | map.put("children", list); |
| | | return map; |
| | | } |
| | | public Map<String, Object> getProductsSubclass(InsProduct insProduct) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(StringUtils.isNotEmpty(insProduct.getInspectionItemSubclass())) { |
| | | map.put("label",insProduct.getInspectionItemSubclass()); |
| | | }else { |
| | | map.put("label",insProduct.getInspectionItem()); |
| | | } |
| | | map.put("value",insProduct.getId()); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //å®¡æ ¸å¾
æ£æ¤é |
| | | @Override |
| | | public void checkUpdate(Integer orderId, Integer state) { |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | if (state == 1) { |
| | | List<String> list = new ArrayList<>(); |
| | | try { |
| | | list = Arrays.asList(insOrder.getRevocationInsProductIds().split(",")); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("è¿æ²¡æéæ©åºè¯¥è¦æ¤éçæ£éªé¡¹ç®"); |
| | | } |
| | | List<Integer> ids = list.stream() |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | List<Integer> collect = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).in(InsProduct::getInsSampleId, collect)); |
| | | if (insProducts.stream().map(InsProduct::getId).collect(Collectors.toList()).equals(ids)) { |
| | | //å¦æè¯¥æ£éªåä¸çææé¡¹ç®å
¨é¨é½æ¤é,é£ä¹è¿ä¸ªååä¹éè¦æ¤é |
| | | insOrder.setState(3); |
| | | } else { |
| | | List<InsProduct> products = insProductMapper.selectBatchIds(ids); |
| | | //é¦å
æ ¹æ®éæ©ç项ç®idè¿è¡æ¤éé¡¹ç® |
| | | updateBatchById(products.stream().map(insProduct -> { |
| | | insProduct.setState(0); |
| | | return insProduct; |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | //insProductMapper.updateInspected(id); |
| | | } |
| | | //ä¸éè¿ |
| | | insOrder.setIsRevocation(0); |
| | | insOrderMapper.updateById(insOrder); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int write2(Integer id, String elasticityModulus) { |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setId(id); |
| | | insProduct.setElasticityModulus(elasticityModulus); |
| | | insProductMapper.updateById(insProduct); |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.WarehouseCellMapper; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | import com.ruoyi.inspect.service.WarehouseCellService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample_user(æ ·åè´è´£äººè®°å½)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-14 17:12:02 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class WarehouseCellServiceImpl extends ServiceImpl<WarehouseCellMapper, WarehouseCell> |
| | | implements WarehouseCellService { |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.HistoryDto; |
| | | import com.ruoyi.inspect.dto.WarehouseCellAndSampleDto; |
| | | import com.ruoyi.inspect.dto.WarehouseDto; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.WarehouseCellService; |
| | | import com.ruoyi.inspect.service.WarehouseService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample_user(æ ·åè´è´£äººè®°å½)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-14 17:12:02 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> |
| | | implements WarehouseService { |
| | | |
| | | private WarehouseMapper warehouseMapper; |
| | | |
| | | private WarehouseShelfMapper warehouseShelfMapper; |
| | | |
| | | private WarehouseCellMapper warehouseCellMapper; |
| | | |
| | | private WarehouseHistoryMapper warehouseHistoryMapper; |
| | | |
| | | private WarehouseCellService warehouseCellService; |
| | | |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | @Override |
| | | public int addWarehouse(String name) { |
| | | Warehouse warehouse = new Warehouse(); |
| | | warehouse.setName(name); |
| | | return warehouseMapper.insert(warehouse); |
| | | } |
| | | |
| | | @Override |
| | | public List<WarehouseDto> selectWarehouse() { |
| | | return warehouseMapper.selectWarehouseList(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addShelf(WarehouseShelf warehouseShelf) { |
| | | warehouseShelfMapper.insert(warehouseShelf); |
| | | List<WarehouseCell> cells = new ArrayList<>(); |
| | | for (int i = 1; i < warehouseShelf.getRow() + 1; i++) { |
| | | for (int a = 1; a < warehouseShelf.getCol() + 1; a++) { |
| | | WarehouseCell cell = new WarehouseCell(); |
| | | cell.setRow(i); |
| | | cell.setCol(a); |
| | | cell.setState(1); |
| | | cell.setShelfId(warehouseShelf.getId()); |
| | | cells.add(cell); |
| | | } |
| | | } |
| | | warehouseCellService.saveBatch(cells); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delWarehouse(Integer id) { |
| | | warehouseShelfMapper.delete(Wrappers.<WarehouseShelf>lambdaUpdate().eq(WarehouseShelf::getWarehouseId, id)); |
| | | return warehouseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int upWarehouse(Warehouse warehouse) { |
| | | return warehouseMapper.updateById(warehouse); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delShelf(Integer id) { |
| | | warehouseCellMapper.update(null ,Wrappers.<WarehouseCell>lambdaUpdate().eq(WarehouseCell::getShelfId, id).set(WarehouseCell::getState, 0)); |
| | | return warehouseShelfMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upShelf(WarehouseShelf warehouseShelf) { |
| | | warehouseCellMapper.update(null, Wrappers.<WarehouseCell>lambdaUpdate() |
| | | .eq(WarehouseCell::getShelfId, warehouseShelf.getWarehouseId()) |
| | | .gt(WarehouseCell::getRow, warehouseShelf.getRow()) |
| | | .gt(WarehouseCell::getCol, warehouseShelf.getCol()) |
| | | .set(WarehouseCell::getState, 0)); |
| | | warehouseShelfMapper.updateById(warehouseShelf); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<WarehouseCellAndSampleDto> getWarehouse(Integer shelfId) { |
| | | return warehouseCellMapper.getWarehouse(shelfId); |
| | | } |
| | | |
| | | @Override |
| | | public int inWarehouse(String trees, String sampleCode) { |
| | | String[] tree = trees.split("-"); |
| | | if(tree.length < 4){ |
| | | throw new ErrorException("åºä½éæ©é误"); |
| | | } |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, sampleCode).select(InsSample::getId,InsSample::getCellId)); |
| | | if(samples.size()!=1){ |
| | | throw new ErrorException("æ ·åç¼å·è¾å
¥æè¯¯"); |
| | | } |
| | | if(samples.get(0).getCellId()!=null){ |
| | | throw new ErrorException("æ ·å " + sampleCode + " æªåºåº"); |
| | | } |
| | | WarehouseCell cell = warehouseCellMapper.selectOne(Wrappers.<WarehouseCell>lambdaQuery().eq(WarehouseCell::getShelfId, tree[1]).eq(WarehouseCell::getRow, tree[2]).eq(WarehouseCell::getCol, tree[3]).eq(WarehouseCell::getState, 1).select(WarehouseCell::getId,WarehouseCell::getRow,WarehouseCell::getCol)); |
| | | WarehouseShelf shelf = warehouseShelfMapper.selectById(tree[1]); |
| | | Warehouse warehouse = warehouseMapper.selectById(tree[0]); |
| | | WarehouseHistory history = new WarehouseHistory(); |
| | | history.setCellId(cell.getId()); |
| | | history.setState(1); |
| | | history.setInsSampleId(samples.get(0).getId()); |
| | | history.setWarehouseCode(warehouse.getName()+"-"+shelf.getName()+"-"+cell.getRow()+"-"+cell.getCol()); |
| | | samples.get(0).setCellId(cell.getId()); |
| | | insSampleMapper.updateById(samples.get(0)); |
| | | return warehouseHistoryMapper.insert(history); |
| | | } |
| | | |
| | | @Override |
| | | public int outWarehouse(String sampleCode) { |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, sampleCode).select(InsSample::getId,InsSample::getCellId)); |
| | | if(samples.size()!=1){ |
| | | throw new ErrorException("æ ·åç¼å·è¾å
¥æè¯¯"); |
| | | } |
| | | if(samples.get(0).getCellId()==null){ |
| | | throw new ErrorException("æ ·å " + sampleCode + " æªå
¥åº"); |
| | | } |
| | | WarehouseHistory history = new WarehouseHistory(); |
| | | history.setState(2); |
| | | history.setInsSampleId(samples.get(0).getId()); |
| | | history.setCellId(samples.get(0).getCellId()); |
| | | history.setWarehouseCode(warehouseHistoryMapper.selectOne(Wrappers.<WarehouseHistory>lambdaQuery().eq(WarehouseHistory::getInsSampleId, samples.get(0).getId()).select(WarehouseHistory::getWarehouseCode).orderByDesc(WarehouseHistory::getId).last("limit 1")).getWarehouseCode()); |
| | | insSampleMapper.update(null, Wrappers.<InsSample>lambdaUpdate().eq(InsSample::getId, samples.get(0).getId()).set(InsSample::getCellId, null)); |
| | | return warehouseHistoryMapper.insert(history); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getSampleRecord(Integer id) { |
| | | InsSample insSample = insSampleMapper.selectById(id); |
| | | List<HistoryDto> histories = warehouseHistoryMapper.getHistoryListBySampleId(id); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Map<String, String> sampleHistory = new HashMap<>(); |
| | | WarehouseHistory history = histories.get(histories.size() - 1); |
| | | if(history.getState() == 1){ |
| | | sampleHistory.put("date", history.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | sampleHistory.put("user", warehouseHistoryMapper.getUserNameById(history.getCreateUser())); |
| | | sampleHistory.put("code", history.getWarehouseCode()); |
| | | } |
| | | map.put("sampleHistory", sampleHistory); |
| | | map.put("insSample", insSample); |
| | | map.put("histories", histories); |
| | | map.put("products", insProductMapper.getProductAndResult(id)); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int searchSampleId(String sampleCode) { |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, sampleCode).select(InsSample::getId)); |
| | | if(samples.size()!=1){ |
| | | throw new ErrorException("æ ·åç¼å·è¾å
¥æè¯¯"); |
| | | } |
| | | return samples.get(0).getId(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.util; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.ss.util.CellRangeAddress; |
| | | |
| | | public class SheetWriteHandlerUtil implements SheetWriteHandler { |
| | | private final String title; |
| | | private final Integer header; |
| | | |
| | | public SheetWriteHandlerUtil(String title, Integer header) { |
| | | this.title = title; |
| | | this.header = header; |
| | | } |
| | | |
| | | @Override |
| | | public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) { |
| | | Workbook workbook = writeWorkbookHolder.getWorkbook(); |
| | | Sheet sheet = workbook.getSheetAt(0); |
| | | //设置æ é¢ |
| | | Row row1 = sheet.createRow(0); |
| | | row1.setHeight((short) 700); |
| | | Cell cell = row1.createCell(0); |
| | | //设置åå
æ ¼å
容 |
| | | cell.setCellValue(title); |
| | | CellStyle cellStyle = workbook.createCellStyle(); |
| | | cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | cellStyle.setAlignment(HorizontalAlignment.CENTER); |
| | | Font font = workbook.createFont(); |
| | | font.setBold(true); |
| | | font.setFontHeight((short) 450); |
| | | cellStyle.setFont(font); |
| | | cell.setCellStyle(cellStyle); |
| | | // 第ä¸è¡å¤§æ é¢å ä½è®¾ç½® |
| | | sheet.addMergedRegionUnsafe(new CellRangeAddress(0, 0, 0, header-1)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class DeviceVO implements Serializable { |
| | | |
| | | /** |
| | | * 设å¤åç§° |
| | | */ |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * 设å¤ç®¡çç¼å· |
| | | */ |
| | | private String managementNumber; |
| | | |
| | | /** |
| | | * è®¾å¤æææ ¡åæ¥æ |
| | | */ |
| | | private String latestTraceability; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class ExportInsProductVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸åæ¶é´ |
| | | */ |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | private LocalDate createTime; |
| | | |
| | | /** |
| | | *客æ·åç§° |
| | | */ |
| | | @ApiModelProperty("客æ·åç§°") |
| | | private String customName; |
| | | |
| | | /** |
| | | *å§æåå· |
| | | */ |
| | | @ApiModelProperty("å§æåå·") |
| | | private String entrustCode; |
| | | |
| | | /** |
| | | *æ ·åç¼å· |
| | | */ |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | /** |
| | | *æ ·å大类 |
| | | */ |
| | | @ApiModelProperty("æ ·å大类") |
| | | private String sampleType; |
| | | |
| | | /** |
| | | *æ ·ååç§° |
| | | */ |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | /** |
| | | *åå· |
| | | */ |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | /** |
| | | *åä½ |
| | | */ |
| | | @ApiModelProperty("åä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | *æ£éªé¡¹ |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | /** |
| | | *æ£éªå项 |
| | | */ |
| | | @ApiModelProperty("æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | /** |
| | | *åè¯éªå®¤ |
| | | */ |
| | | @ApiModelProperty("åè¯éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | /** |
| | | *æ åè¦æ± |
| | | */ |
| | | @ApiModelProperty("æ åè¦æ±") |
| | | private String tell; |
| | | |
| | | /** |
| | | *æ£éªç»æ |
| | | */ |
| | | @ApiModelProperty("æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | /** |
| | | *ç»æå¤å® |
| | | */ |
| | | @ApiModelProperty("ç»æå¤å®") |
| | | private String insResult; |
| | | |
| | | /** |
| | | *å
纤带ç¼å· |
| | | */ |
| | | @ApiModelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | *æ£éªè¿ç¨å¼ |
| | | */ |
| | | @ApiModelProperty("æ£éªè¿ç¨å¼") |
| | | private String insValue; |
| | | |
| | | /** |
| | | *æ£éªæ¶é´ |
| | | */ |
| | | @ApiModelProperty("æ£éªæ¶é´") |
| | | private LocalDateTime checkTime; |
| | | |
| | | /** |
| | | *æ£éªäºº |
| | | */ |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | /** |
| | | *å¥ç®¡è²æ |
| | | */ |
| | | @ApiModelProperty("å¥ç®¡è²æ ") |
| | | private String bushColor; |
| | | |
| | | /** |
| | | * å
çº¤è²æ |
| | | */ |
| | | @ApiModelProperty("å
çº¤è²æ ") |
| | | private String color; |
| | | |
| | | /** |
| | | *ç¹æ®é¡¹ç¶id |
| | | */ |
| | | @ApiModelProperty("ç¹æ®é¡¹ç¶id") |
| | | private Integer specialItemParentId; |
| | | |
| | | |
| | | /** |
| | | * æ¸©åº¦å¾ªç¯ æ£éªé¡¹åç±» |
| | | */ |
| | | @ApiModelProperty("æ¸©åº¦å¾ªç¯ æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | |
| | | /** |
| | | * 计ç®å¼ |
| | | */ |
| | | @ApiModelProperty("计ç®å¼") |
| | | private String comValue; |
| | | |
| | | @TableField(exist = false) |
| | | private LocalDate sendTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsFibers; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class InsFibersVO extends InsFibers implements Serializable { |
| | | |
| | | /** |
| | | * å¥ç®¡è²æ |
| | | */ |
| | | @ApiModelProperty(value = "å¥ç®¡è²æ ") |
| | | private String bushingColor; |
| | | |
| | | /** |
| | | * æ¯å¦å卿£éªé¡¹ç® |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å卿£éªé¡¹ç®") |
| | | private Boolean isExistProduct; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class InsOrderPlanTaskSwitchVo { |
| | | private String id; |
| | | |
| | | @ApiModelProperty(name = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(name = "æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty(name = "ç´§æ¥ç¨åº¦") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(name = "ç¶æ") |
| | | private String insState; |
| | | |
| | | @ApiModelProperty(name = "çº¦å®æ¶é´") |
| | | private String appointed; |
| | | |
| | | @ApiModelProperty(name = "ä¸åæ¶é´") |
| | | private String sendTime; |
| | | |
| | | private Integer userId; |
| | | |
| | | private String sonLaboratory; |
| | | private String laboratory; |
| | | |
| | | private Integer orderUserId; |
| | | |
| | | private Integer verifyUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class InsOrderPlanVO { |
| | | |
| | | |
| | | private String id; |
| | | |
| | | @ApiModelProperty(name = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(name = "å§æåä½") |
| | | private String company; |
| | | |
| | | @ApiModelProperty(name = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty(name = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(name = "ç´§æ¥ç¨åº¦") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(name = "ç¶æ") |
| | | private String insState; |
| | | |
| | | @ApiModelProperty(name = "æ£éªäºº") |
| | | private String userName; |
| | | @ApiModelProperty(name = "夿 ¸äºº") |
| | | private String checkName; |
| | | |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(name = "æ£éªå¼å§æ¶é´") |
| | | private String insTime; |
| | | |
| | | @ApiModelProperty(name = "çº¦å®æ¶é´") |
| | | private String appointed; |
| | | |
| | | @ApiModelProperty(name = "ä¸åæ¶é´") |
| | | private String sendTime; |
| | | |
| | | @ApiModelProperty(name = "çç±") |
| | | private String verifyTell; |
| | | |
| | | |
| | | private String sonLaboratory; |
| | | |
| | | private Integer orderUserId; |
| | | |
| | | private Integer verifyUser; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class InsProductFiberVO extends InsProduct implements Serializable { |
| | | |
| | | /** |
| | | * å¥ç®¡è²æ |
| | | */ |
| | | @ApiModelProperty("å¥ç®¡è²æ ") |
| | | private String bushColor; |
| | | |
| | | /** |
| | | * å
çº¤è²æ |
| | | */ |
| | | @ApiModelProperty("å
çº¤è²æ ") |
| | | private String color; |
| | | |
| | | /** |
| | | * å
纤带ç¼å· |
| | | */ |
| | | @ApiModelProperty("å
纤带ç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * æ£éªè¿ç¨å¼ |
| | | */ |
| | | @ApiModelProperty("æ£éªè¿ç¨å¼") |
| | | private String insValue; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class InsProductVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æ ·åid") |
| | | private Integer sampleId; |
| | | |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty(value = "æ ·åç¶æ") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty(value = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹") |
| | | private String testItem; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå项") |
| | | private String testItemChildren; |
| | | |
| | | @ApiModelProperty(value = "è¯éªæ¹æ³") |
| | | private String testMethod; |
| | | |
| | | @ApiModelProperty(value = "æ åè¦æ±") |
| | | private String requirement; |
| | | |
| | | @ApiModelProperty(value = "æ£éªäºº") |
| | | private String inspectName; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductVo { |
| | | |
| | | //ç®¡è²æ |
| | | private String bushColor; |
| | | |
| | | //å
çº¤è²æ |
| | | private String color; |
| | | |
| | | //å
纤带ç¼å· |
| | | private String code; |
| | | |
| | | //æ£éªé¡¹ç® |
| | | private InsProduct insProduct; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SampleDefectsChildrenVo { |
| | | private String entrust_code;//å§æç¼ç |
| | | private String inspection_item;//æ£éªé¡¹ |
| | | private String name;//æ£éªäºº |
| | | private LocalDateTime create_time;//æ£éªæ¥æ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SampleDefectsFatherVo { |
| | | private Integer id;//æ ·åid |
| | | private String sample;//æ ·ååç§° |
| | | |
| | | private List<SampleDefectsChildrenVo> children;//åç±» |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SampleVo extends InsSample { |
| | | //è¯éªæ¹æ³ |
| | | private String methodName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ååºé
置工æ¶è¿å对象 |
| | | */ |
| | | @Data |
| | | public class StandardProductVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "å·¥æ¶(H)") |
| | | private String manHour; |
| | | |
| | | @ApiModelProperty(value = "å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | @ApiModelProperty(value = "åºé´è®¾ç½®") |
| | | private String section; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ColumnWidth(25) |
| | | public class UnInsProductsVO { |
| | | |
| | | @ExcelProperty("æ¥æ") |
| | | @ApiModelProperty(value = "æ¥æ") |
| | | private String sendTime; |
| | | |
| | | @ExcelProperty("å§æåå·") |
| | | @ApiModelProperty(value = "å§æåå·") |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty("æ ·ååç§°") |
| | | @ApiModelProperty(value = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @ExcelProperty("æ ·åç¼å·") |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ExcelProperty("å¾
æ£é¡¹ç®") |
| | | @ApiModelProperty(value = "å¾
æ£é¡¹ç®") |
| | | private String unInsProduct; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsBushingMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsBushing"> |
| | | <id column="id" property="id" /> |
| | | <result column="color" property="color" /> |
| | | <result column="stand_num" property="standNum" /> |
| | | <result column="test_num" property="testNum" /> |
| | | <result column="ins_sample_id" property="insSampleId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="selectFibersByBushingId" resultMap="FibersDto"> |
| | | select |
| | | fs.id, fs.code, fs.model, fs.standard, fs.num, fs.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fibers fs |
| | | left join ins_product p on p.ins_fibers_id = fs.id |
| | | left join ins_product_result ipr on p.id = ipr.ins_product_id |
| | | where fs.ins_bushing_id = #{bushingId} |
| | | </select> |
| | | |
| | | <select id="selectFiberByBushingId" resultMap="FiberDto"> |
| | | select f.id, f.bush_color, f.color, f.model, f.standard, f.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fiber f |
| | | left join ins_product p on p.ins_fiber_id = f.id |
| | | left join ins_product_result ipr on p.id = ipr.ins_product_id |
| | | where f.ins_bushing_id = #{bushingId} |
| | | </select> |
| | | |
| | | <select id="selectFiberByFibersId" resultMap="FiberDto"> |
| | | select f.id, f.bush_color, f.color, f.model, f.standard, f.ins_bushing_id, |
| | | p.id pid, p.inspection_item, p.inspection_item_subclass, p.factory, p.laboratory, p.sample_type, p.sample, p.model pmodel, p.son_laboratory, p.unit, p.price, p.man_hour, p.man_hour_group, p.inspection_item_type, p.inspection_value_type, p.device_group, p.checkout_number, p.section, p.value_type, p.method, p.man_day, p.bsm, p.ask, p.tell, p.`last_value`, p.ins_result, p.state, p.ins_sample_id, p.template_id, p.dic, p.method_s, |
| | | ipr.ins_value,ipr.com_value,ipr.equip_value,ipr.equip_name |
| | | from ins_fiber f |
| | | left join ins_product p on p.ins_fiber_id = f.id |
| | | left join ins_product_result ipr on p.id = ipr.ins_product_id |
| | | where f.ins_fibers_id = #{fibersId} |
| | | </select> |
| | | |
| | | <resultMap id="FibersDto" type="com.ruoyi.inspect.dto.FibersDto"> |
| | | <id property="id" column="id"/> |
| | | <result property="code" column="code"/> |
| | | <result property="insBushingId" column="ins_bushing_id"/> |
| | | <result property="model" column="model"/> |
| | | <result property="standard" column="standard"/> |
| | | <result property="num" column="num"/> |
| | | <collection property="productList" resultMap="product"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="FiberDto" type="com.ruoyi.inspect.dto.FiberDto"> |
| | | <id property="id" column="id"/> |
| | | <result property="bushColor" column="bush_color"/> |
| | | <result property="insBushingId" column="ins_bushing_id"/> |
| | | <result property="model" column="model"/> |
| | | <result property="standard" column="standard"/> |
| | | <result property="color" column="color"/> |
| | | <collection property="productList" resultMap="product"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="product" type="com.ruoyi.inspect.pojo.InsProduct"> |
| | | <id property="id" column="pid" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="model" column="pmodel" jdbcType="VARCHAR"/> |
| | | <result property="sonLaboratory" column="son_laboratory" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | <result property="price" column="price" jdbcType="DECIMAL"/> |
| | | <result property="manHour" column="man_hour" jdbcType="DOUBLE"/> |
| | | <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/> |
| | | <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/> |
| | | <result property="deviceGroup" column="device_group" jdbcType="VARCHAR"/> |
| | | <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/> |
| | | <result property="section" column="section" jdbcType="VARCHAR"/> |
| | | <result property="valueType" column="value_type" jdbcType="VARCHAR"/> |
| | | <result property="method" column="method" jdbcType="VARCHAR"/> |
| | | <result property="manDay" column="man_day" jdbcType="INTEGER"/> |
| | | <result property="bsm" column="bsm" jdbcType="VARCHAR"/> |
| | | <result property="ask" column="ask" jdbcType="VARCHAR"/> |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="templateId" column="template_id" jdbcType="INTEGER"/> |
| | | <result property="methodS" column="method_s"/> |
| | | <result property="tell" column="tell"/> |
| | | <result property="dic" column="dic"/> |
| | | <collection property="insProductResult" resultMap="insProductResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="insProductResult" type="com.ruoyi.inspect.pojo.InsProductResult"> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equip_name" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsFiberMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsFiber"> |
| | | <id column="id" property="id" /> |
| | | <result column="bush_color" property="bushColor" /> |
| | | <result column="color" property="color" /> |
| | | <result column="model" property="model" /> |
| | | <result column="standard" property="standard" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="ins_bushing_id" property="insBushingId" /> |
| | | <result column="ins_fibers_id" property="insFibersId" /> |
| | | </resultMap> |
| | | <select id="selectInsFibersByInsFiberId" resultType="com.ruoyi.inspect.pojo.InsFibers"> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsFibersMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsFibers"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="model" property="model" /> |
| | | <result column="standard" property="standard" /> |
| | | <result column="num" property="num" /> |
| | | <!-- <result column="ins_product_id" property="insProductId" />--> |
| | | <result column="ins_bushing_id" property="insBushingId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsOrderFileMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsOrderFile"> |
| | | <id column="id" property="id"/> |
| | | <result column="ins_order_id" property="insOrderId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="file_url" property="fileUrl"/> |
| | | <result column="file_name" property="fileName"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | <select id="getFileList" resultType="com.ruoyi.inspect.pojo.InsOrderFile"> |
| | | select A.* |
| | | from (select iof.*, name |
| | | from ins_order_file iof |
| | | left join user u on iof.create_user = u.id |
| | | where iof.ins_order_id = #{insOrderId}) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsOrderMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsOrder"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="outEntrustCode" column="out_entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="otcCode" column="otc_code" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="revocationInsProductIds" column="revocation_ins_product_ids" /> |
| | | <result property="isRevocation" column="is_revocation" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="OrderThingDto" type="com.ruoyi.inspect.dto.OrderThingDto"> |
| | | <result property="id" column="id"/> |
| | | <result property="company" column="company"/> |
| | | <result property="entrustCode" column="entrust_code"/> |
| | | <result property="sampleCode" column="sample_code"/> |
| | | <result property="custom" column="custom"/> |
| | | <result property="sample" column="sample"/> |
| | | <result property="model" column="model"/> |
| | | <result property="sampleNum" column="sample_num"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <collection property="products" resultMap="ProductThingDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ProductThingDto" type="com.ruoyi.inspect.dto.ProductThingDto"> |
| | | <result property="productId" column="id"/> |
| | | <result property="inspectionItem" column="inspection_item"/> |
| | | <result property="lastValue" column="last_value"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <collection property="productResults" resultMap="productResultDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="productResultDto" type="com.ruoyi.inspect.dto.productResultDto"> |
| | | <result property="id" column="id"/> |
| | | <result property="insValue" column="ins_value"/> |
| | | <result property="insResult" column="ins_result"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="selectSampleDefectsMap" type="com.ruoyi.inspect.vo.SampleDefectsFatherVo"> |
| | | <id column="id" property="id"/> |
| | | <result column="sample" property="sample"/> |
| | | <association property="children" resultMap="SampleDefectsChildrenMap" javaType="java.util.List"/> |
| | | </resultMap> |
| | | <select id="getInsOrderPlanList" resultType="map"> |
| | | SELECT |
| | | io.id, |
| | | io.entrust_code As entrustCode, |
| | | isa.sample_code As sampleCode, |
| | | ip.inspection_item As inspectionItem, |
| | | ip.inspection_item_subclass As inspectionItemSubclass, |
| | | ip.last_value As lastValue, |
| | | ips.create_user As createUser, |
| | | (SELECT `name` FROM `user` u WHERE u.id = ips.create_user) AS userName, |
| | | io.send_time As sendTime, |
| | | ios.ins_time As insTime, |
| | | CASE |
| | | when ifi.bush_color is not null then ifi.bush_color |
| | | when ib.color is not null then ib.color |
| | | else '-' |
| | | END AS bushing, |
| | | CASE |
| | | when ifi.color is not null then ifi.color |
| | | else '-' |
| | | END AS fiber, |
| | | '-' as fibers |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_sample isa ON io.id = isa.ins_order_id |
| | | LEFT JOIN ins_product ip ON isa.id = ip.ins_sample_id |
| | | LEFT JOIN ins_product_result ips ON ip.id = ips.ins_product_id |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = io.id |
| | | left join ins_fiber ifi on ip.ins_fiber_id = ifi.id |
| | | LEFT JOIN ins_bushing ib ON ip.ins_bush_id = ib.id |
| | | WHERE ip.ins_result IN (0,1,3) |
| | | AND ip.son_laboratory = #{sonLaboratory} |
| | | AND ios.laboratory = #{sonLaboratory} |
| | | AND ip.sample_type = #{sampleType} |
| | | AND ip.special_item_parent_id IS NULL |
| | | <if test="entrustCode != null and entrustCode != ''"> |
| | | AND io.entrust_code like concat('%',#{entrustCode},'%') |
| | | </if> |
| | | <if test="sampleCode != null and sampleCode != ''"> |
| | | AND isa.sample_code like concat('%',#{sampleCode},'%') |
| | | </if> |
| | | <if test="createUser != null and createUser != ''"> |
| | | AND ips.create_user = #{createUser} |
| | | </if> |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
| | | AND ios.ins_time between #{startTime} and #{endTime} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="getTabHeader" resultType="map"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | ( |
| | | SELECT |
| | | A.id, |
| | | laboratory, |
| | | sample, |
| | | son_laboratory AS sonLaboratory, |
| | | inspection_item AS inspectionItem, |
| | | inspection_item_subclass AS inspectionItemSubclass |
| | | FROM |
| | | ( |
| | | SELECT |
| | | *, |
| | | CASE |
| | | |
| | | WHEN INSTR( sample, ',' ) > 0 THEN |
| | | SUBSTRING_INDEX( SUBSTRING_INDEX( sample, '","', 1 ), '"', - 1 ) |
| | | WHEN sample = '[""]' THEN |
| | | NULL |
| | | WHEN sample = '[]' THEN |
| | | NULL ELSE TRIM( |
| | | BOTH '["]' |
| | | FROM |
| | | SUBSTRING_INDEX( REPLACE ( sample, '[["', '' ), '"]]', 1 )) |
| | | END AS samples |
| | | FROM |
| | | structure_item_parameter |
| | | ) A |
| | | LEFT JOIN structure_test_object sto ON samples = specimen_name |
| | | WHERE son_laboratory = #{sonLaboratory} |
| | | <if test="sample != null and sample != ''"> |
| | | AND sample like concat('%',#{sample},'%') |
| | | </if> |
| | | )B ORDER BY id |
| | | </select> |
| | | <select id="selectInsOrderPage" resultType="com.ruoyi.inspect.dto.SampleOrderDto"> |
| | | select |
| | | id, |
| | | entrust_code, |
| | | custom, |
| | | company, |
| | | code, |
| | | type, |
| | | appointed, |
| | | state, |
| | | tell, |
| | | remark, |
| | | otc_code, |
| | | user_id, |
| | | mating, |
| | | create_user, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | send_time, |
| | | ins_state, |
| | | factory, |
| | | laboratory, |
| | | sample_type, |
| | | sample, |
| | | ins_result, |
| | | ins_time, |
| | | processing, |
| | | is_leave, |
| | | order_type, |
| | | send, |
| | | form_type, |
| | | phone, |
| | | examine_time, |
| | | engineering, |
| | | engineering_en, |
| | | production, |
| | | production_en, |
| | | company_id, |
| | | prepare_user, |
| | | out_entrust_code, |
| | | is_revocation, |
| | | revocation_ins_product_ids, |
| | | revocation_time, |
| | | issuing_date, |
| | | assign, |
| | | inspect_id, |
| | | report_id, |
| | | is_ratify, |
| | | url, |
| | | url_s, |
| | | temp_url_pdf, |
| | | sample_num, |
| | | insProgress, |
| | | sample_code, |
| | | sample_name, |
| | | sample_model, |
| | | name |
| | | from ( |
| | | SELECT |
| | | io.id, |
| | | io.entrust_code, |
| | | io.custom, |
| | | io.company, |
| | | io.code, |
| | | io.type, |
| | | io.appointed, |
| | | io.state, |
| | | io.tell, |
| | | io.remark, |
| | | io.otc_code, |
| | | io.user_id, |
| | | io.mating, |
| | | io.create_user, |
| | | io.create_time, |
| | | io.update_user, |
| | | io.update_time, |
| | | io.send_time, |
| | | io.ins_state, |
| | | io.factory, |
| | | io.laboratory, |
| | | io.sample_type, |
| | | io.sample, |
| | | io.ins_result, |
| | | io.ins_time, |
| | | io.processing, |
| | | io.is_leave, |
| | | io.order_type, |
| | | io.send, |
| | | io.form_type, |
| | | io.phone, |
| | | io.examine_time, |
| | | io.engineering, |
| | | io.engineering_en, |
| | | io.production, |
| | | io.production_en, |
| | | io.company_id, |
| | | io.prepare_user, |
| | | io.out_entrust_code, |
| | | io.is_revocation, |
| | | io.revocation_ins_product_ids, |
| | | io.revocation_time, |
| | | io.issuing_date, |
| | | COUNT(iot.id) assign, |
| | | isau.id as inspect_id, |
| | | ir.id report_id, |
| | | ir.is_ratify, |
| | | ir.url, |
| | | ir.url_s, |
| | | ir.temp_url_pdf, |
| | | total_product_counts.sample_num, |
| | | CONCAT(ROUND(total_product_counts.approved_count / total_product_counts.total_count * 100, 2), '%') AS insProgress, |
| | | -- sample_counts.sample_num, |
| | | -- CONCAT(ROUND(approved_product_counts.approved_count / total_product_counts.total_count * 100, 2), '%') AS insProgress, |
| | | GROUP_CONCAT(DISTINCT isa.sample_code SEPARATOR 'ï¼') AS sample_code, |
| | | GROUP_CONCAT(DISTINCT isa.sample SEPARATOR ' ') AS sample_name, |
| | | GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model, |
| | | u.name |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN |
| | | ins_sample isa ON io.id = isa.ins_order_id |
| | | LEFT JOIN |
| | | ins_sample_user isau ON isau.ins_sample_id = io.id |
| | | LEFT JOIN |
| | | ins_order_state iot ON iot.ins_order_id = io.id |
| | | LEFT JOIN |
| | | ins_report ir ON io.id = ir.ins_order_id |
| | | LEFT JOIN |
| | | user u ON io.create_user = u.id |
| | | LEFT JOIN ( |
| | | SELECT ins_sample.ins_order_id, |
| | | COUNT(DISTINCT ins_sample_id) as sample_num, |
| | | COUNT(ins_product.id) AS total_count, |
| | | COUNT(CASE WHEN ins_product.ins_result is not null and ins_product.ins_result !='2' THEN ins_product.ins_result END) AS approved_count |
| | | FROM ins_product |
| | | JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id |
| | | WHERE ins_product.state = 1 |
| | | GROUP BY ins_sample.ins_order_id |
| | | ) total_product_counts |
| | | ON io.id = total_product_counts.ins_order_id |
| | | -- LEFT JOIN |
| | | -- ( |
| | | -- SELECT |
| | | -- ins_order_id, |
| | | -- COUNT(*) AS sample_num |
| | | -- FROM ins_sample |
| | | -- WHERE |
| | | -- id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = ip.ins_sample_id where ip.id is not null)s ) |
| | | -- GROUP BY ins_order_id |
| | | -- ) sample_counts ON io.id = sample_counts.ins_order_id |
| | | -- LEFT JOIN |
| | | -- (SELECT ins_sample.ins_order_id, COUNT(*) AS total_count |
| | | -- FROM ins_product |
| | | -- JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id |
| | | -- WHERE ins_product.state = 1 |
| | | -- GROUP BY ins_sample.ins_order_id) total_product_counts ON io.id = total_product_counts.ins_order_id |
| | | -- LEFT JOIN |
| | | -- (SELECT ins_sample.ins_order_id, COUNT(*) AS approved_count |
| | | -- FROM ins_product |
| | | -- JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id |
| | | -- WHERE ins_product.state = 1 AND ins_product.ins_result is not null AND ins_product.ins_result != '2' |
| | | -- GROUP BY ins_sample.ins_order_id) approved_product_counts ON io.id = approved_product_counts.ins_order_id |
| | | <where> |
| | | <if test="laboratory!=null and laboratory!=''"> |
| | | AND io.laboratory=#{laboratory} |
| | | </if> |
| | | <if test="eqState!=null and eqState!=''"> |
| | | AND io.state=#{eqState} |
| | | </if> |
| | | <if test="neState!=null and neState!=''"> |
| | | AND io.state != #{neState} |
| | | </if> |
| | | <if test="startTime != '' and startTime != null and endTime != null and endTime != ''"> |
| | | AND io.create_time between #{startTime} and #{endTime} |
| | | </if> |
| | | </where> |
| | | GROUP BY io.id,type |
| | | order by type desc,io.id desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="exportChecked" resultType="com.ruoyi.inspect.vo.ExportInsProductVO"> |
| | | SELECT |
| | | i.create_time, |
| | | i.custom AS custom_name, |
| | | i.id, |
| | | i.entrust_code, |
| | | isa.id ins_sample_id, |
| | | isa.sample_code, |
| | | isa.sample, |
| | | isa.model, |
| | | isa.ins_state, |
| | | ip.id ins_product_id, |
| | | ip.state, |
| | | ip.unit, |
| | | ip.sample_type, |
| | | ip.inspection_item, |
| | | ip.inspection_item_subclass, |
| | | ip.son_laboratory, |
| | | ip.inspection_item_type, |
| | | ip.inspection_value_type, |
| | | ip.special_item_parent_id, |
| | | ip.tell, |
| | | ip.`last_value`, |
| | | case |
| | | WHEN ip.ins_result = 0 THEN 'ä¸åæ ¼' |
| | | WHEN ip.ins_result = 1 THEN 'åæ ¼' |
| | | WHEN ip.ins_result = 3 THEN 'ä¸å¤å®' |
| | | ELSE '' |
| | | END AS ins_result, |
| | | ipr.equip_value, |
| | | ipr.com_value, |
| | | ip.inspection_item_class, |
| | | ifis.CODE, |
| | | ipr.ins_value, |
| | | ipr.create_time AS check_time, |
| | | u.NAME AS check_name, |
| | | CASE |
| | | WHEN ifi.bush_color IS NOT NULL THEN |
| | | ifi.bush_color |
| | | WHEN ib1.color IS NOT NULL THEN |
| | | ib1.color |
| | | WHEN ib2.color IS NOT NULL THEN |
| | | ib2.color ELSE '' |
| | | END AS bush_color, |
| | | ifi.color |
| | | FROM |
| | | ins_sample isa |
| | | LEFT JOIN ins_order i ON isa.ins_order_id = i.id |
| | | LEFT JOIN ins_product ip ON isa.id = ip.ins_sample_id |
| | | LEFT JOIN ins_product_result ipr ON ip.id = ipr.ins_product_id |
| | | LEFT JOIN ins_fiber ifi ON ip.ins_fiber_id = ifi.id |
| | | LEFT JOIN ins_fibers ifis ON ip.ins_fibers_id = ifis.id |
| | | LEFT JOIN ins_bushing ib1 ON ip.ins_bush_id = ib1.id |
| | | LEFT JOIN ins_bushing ib2 ON ib2.id = ifis.ins_bushing_id |
| | | LEFT JOIN USER u ON u.id = ipr.create_user |
| | | WHERE |
| | | ip.state = 1 AND |
| | | (i.state = 4 or i.state = 1) |
| | | <if test="startTime != '' and startTime != null and endTime != null and endTime != ''"> |
| | | AND i.create_time BETWEEN #{startTime} AND #{endTime} |
| | | </if> |
| | | <if test="names != null and names.size > 0"> |
| | | AND i.custom in |
| | | <foreach collection="names" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY |
| | | i.create_time, |
| | | ins_product_id ASC |
| | | </select> |
| | | |
| | | |
| | | |
| | | <resultMap id="SampleDefectsChildrenMap" type="com.ruoyi.inspect.vo.SampleDefectsChildrenVo"> |
| | | <result column="entrust_code" property="entrust_code"/> |
| | | <result column="inspection_item" property="inspection_item"/> |
| | | <result column="name" property="name"/> |
| | | <result column="create_time" property="create_time"/> |
| | | </resultMap> |
| | | <select id="selectInsOrderParameter" resultType="com.ruoyi.inspect.pojo.InsOrder"> |
| | | select * |
| | | from ( |
| | | select |
| | | id, |
| | | appointed, |
| | | user_id, |
| | | create_user, |
| | | otc_code, |
| | | code, |
| | | custom, |
| | | update_user, |
| | | update_time, |
| | | type, |
| | | entrust_code, |
| | | company, |
| | | remark, |
| | | create_time, |
| | | state |
| | | from ins_order |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getLaboratoryCode" resultType="java.lang.String"> |
| | | select laboratory_number |
| | | from laboratory |
| | | where laboratory_name = #{name} |
| | | </select> |
| | | <select id="selectSampleAndProductByOrderId" resultType="com.ruoyi.inspect.dto.SampleProductDto2"> |
| | | select * |
| | | from ( |
| | | select |
| | | i.id, |
| | | i.entrust_code, |
| | | isa.id ins_sample_id, |
| | | isa.sample_code, |
| | | isa.sample, |
| | | isa.model, |
| | | isa.ins_state, |
| | | ip.id ins_product_id, |
| | | ip.state, |
| | | ip.unit, |
| | | ip.inspection_item, |
| | | ip.inspection_item_subclass, |
| | | ip.son_laboratory, |
| | | ip.inspection_item_type, |
| | | ip.inspection_value_type, |
| | | ip.tell, |
| | | ip.`last_value`, |
| | | ip.ins_result, |
| | | ipr.equip_value, |
| | | ifis.code, |
| | | ipr.ins_value, |
| | | ipr.create_time as check_time, |
| | | u.name as check_name, |
| | | CASE |
| | | when ifi.bush_color is not null then ifi.bush_color |
| | | when ib1.color is not null then ib1.color |
| | | when ib2.color is not null then ib2.color |
| | | else '' |
| | | END AS bush_color, |
| | | ifi.color |
| | | from ins_sample isa |
| | | left join ins_order i on isa.ins_order_id = i.id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_fiber ifi on ip.ins_fiber_id = ifi.id |
| | | LEFT JOIN ins_fibers ifis ON ip.ins_fibers_id = ifis.id |
| | | -- LEFT JOIN ins_bushing ib ON ip.ins_bush_id = ib.id or ib.id = ifis.ins_bushing_id |
| | | LEFT join ins_bushing ib1 on ip.ins_bush_id = ib1.id |
| | | LEFT JOIN ins_bushing ib2 on ib2.id = ifis.ins_bushing_id |
| | | LEFT JOIN user u ON u.id = ipr.update_user |
| | | where ip.state = 1 |
| | | and i.id=#{id} |
| | | order by case |
| | | when ip.man_hour_group is NULL then 1 |
| | | when ip.man_hour_group = '' then 1 |
| | | else 0 end, |
| | | CASE |
| | | WHEN ip.man_hour_group REGEXP '^[0-9]' THEN CAST(ip.man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN ip.man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(ip.man_hour_group, 2) AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | , ins_product_id asc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectCostStatistics" resultType="com.ruoyi.inspect.dto.CostStatisticsDto"> |
| | | select * from ( |
| | | SELECT |
| | | A.id, |
| | | A.entrust_code, |
| | | A.create_time, |
| | | A.sample, |
| | | A.model, |
| | | A.inspection_item, |
| | | A.company, |
| | | A.`name`, |
| | | COUNT( 1 ) num, |
| | | SUM( A.price ) price, |
| | | SUM( A.cost ) cost |
| | | FROM |
| | | ( |
| | | SELECT |
| | | i.id, |
| | | i.laboratory, |
| | | i.entrust_code, |
| | | i.create_time, |
| | | isa.sample, |
| | | isa.sample_code, |
| | | isa.model, |
| | | c.price, |
| | | c.cost, |
| | | c.inspection_item, |
| | | i.company, |
| | | u.`name`, |
| | | i.create_user, |
| | | c.ins_sample_id |
| | | FROM |
| | | ins_order i |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = i.id |
| | | LEFT JOIN `user` u ON u.id = i.user_id |
| | | LEFT JOIN custom cus ON cus.id = u.company |
| | | LEFT JOIN ( |
| | | SELECT |
| | | SUM( b.price ) price, |
| | | sum( b.man_hour ) cost, |
| | | b.ins_sample_id, |
| | | GROUP_CONCAT( b.inspection_item2 SEPARATOR ',' ) inspection_item |
| | | FROM |
| | | ( |
| | | SELECT |
| | | ip.ins_sample_id, |
| | | ip.man_hour, |
| | | ip.man_hour_group, |
| | | case |
| | | WHEN LOCATE('[', spl.price)>0 THEN |
| | | REPLACE(JSON_EXTRACT(spl.price, REPLACE(JSON_SEARCH(spl.section, 'one', ip.section), '"', '')),'"','') |
| | | ELSE spl.price |
| | | END AS price , |
| | | GROUP_CONCAT( CONCAT( ip.inspection_item, '@', ip.inspection_item_subclass ) SEPARATOR ',' ) inspection_item2 |
| | | FROM |
| | | ins_product ip |
| | | LEFT JOIN standard_product_list spl ON ip.laboratory = spl.laboratory |
| | | AND ip.sample_type = spl.sample_type |
| | | AND ip.sample = spl.sample |
| | | AND ip.model = spl.model |
| | | AND ip.inspection_item = spl.inspection_item |
| | | AND ip.inspection_item_subclass = spl.inspection_item_subclass |
| | | AND ip.son_laboratory = spl.son_laboratory |
| | | AND ip.standard_method_list_id = spl.standard_method_list_id |
| | | WHERE |
| | | ip.state = 1 |
| | | AND ip.create_time between #{startTime} and #{endTime} |
| | | AND ip.template_id IS NOT NULL |
| | | GROUP BY |
| | | ip.ins_sample_id, |
| | | ip.man_hour_group |
| | | ) b |
| | | GROUP BY |
| | | b.ins_sample_id |
| | | ) c ON c.ins_sample_id = isa.id |
| | | WHERE |
| | | ( i.state = 1 OR i.state = 3 OR i.state = 4 ) |
| | | AND c.ins_sample_id IS NOT NULL |
| | | ) A |
| | | where 1 = 1 |
| | | <if test="laboratory != '' and laboratory != null"> |
| | | AND A.laboratory = #{laboratory} |
| | | </if> |
| | | GROUP BY |
| | | A.id, |
| | | A.entrust_code, |
| | | A.create_time, |
| | | A.sample, |
| | | A.model, |
| | | A.inspection_item, |
| | | A.company, |
| | | A.`name` |
| | | )B |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceList" resultType="com.ruoyi.inspect.vo.DeviceVO"> |
| | | select |
| | | d.device_name, |
| | | d.specification_model, |
| | | d.management_number, |
| | | date_format(CASE |
| | | WHEN dmr.next_calibration_date is not null THEN dmr.next_calibration_date |
| | | WHEN d.next_calibration_date > CURDATE() THEN d.next_calibration_date |
| | | END,'%Y-%m-%d') AS latest_traceability |
| | | from device d left join |
| | | device_metric_record dmr on d.id = dmr.device_id |
| | | where d.management_number = #{name} |
| | | order by latest_traceability desc |
| | | limit 1 |
| | | </select> |
| | | |
| | | <update id="upInsOrderParameter" parameterType="com.ruoyi.inspect.pojo.InsOrder"> |
| | | UPDATE ins_order |
| | | <set> |
| | | <if test="appointed!=null and appointed!='' "> |
| | | appointed=#{appointed}, |
| | | </if> |
| | | <if test="userId!=null "> |
| | | user_id=#{userId}, |
| | | </if> |
| | | <if test="createUser!=null "> |
| | | create_user=#{createUser} |
| | | </if> |
| | | <if test="otcCode!=null "> |
| | | otc_code=#{otcCode} |
| | | </if> |
| | | <if test="code!=null "> |
| | | code=#{code} |
| | | </if> |
| | | <if test="custom!=null "> |
| | | custom=#{custom} |
| | | </if> |
| | | <if test="updateUser!=null "> |
| | | update_user=#{updateUser} |
| | | </if> |
| | | <if test="updateTime!=null "> |
| | | update_time=#{updateTime} |
| | | </if> |
| | | <if test="type!=null "> |
| | | type=#{type} |
| | | </if> |
| | | <if test="entrustCode!=null "> |
| | | entrust_code=#{entrustCode} |
| | | </if> |
| | | <if test="company!=null "> |
| | | company=#{company} |
| | | </if> |
| | | <if test="remark!=null "> |
| | | remark=#{remark} |
| | | </if> |
| | | <if test="createTime!=null "> |
| | | create_time=#{createTime} |
| | | </if> |
| | | <if test="state!=null "> |
| | | state=#{state} |
| | | </if> |
| | | </set> |
| | | <where> |
| | | id=#{id} |
| | | </where> |
| | | </update> |
| | | <update id="updateStatus"> |
| | | update ins_order |
| | | set state=3 |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="selectSampleDefects" resultMap="selectSampleDefectsMap"> |
| | | SELECT io.entrust_code,sam.sample,ip.inspection_item,u.name,b.create_time, sam.id |
| | | from ins_order io |
| | | left JOIN ins_sample sam on io.id=sam.ins_order_id |
| | | LEFT JOIN ins_product ip on ip.ins_sample_id=sam.id |
| | | LEFT JOIN |
| | | (SELECT create_time,create_user,ins_product_id FROM |
| | | (select * FROM ins_product_user ORDER BY ins_product_user.create_time DESC) a |
| | | GROUP BY a.ins_product_id) b |
| | | on b.ins_product_id=ip.id |
| | | left JOIN `user` u on u.id=b.create_user |
| | | WHERE (ip.ins_result=0 OR ip.state=0) |
| | | <if test="inspectionItems != null and inspectionItems != ''"> |
| | | and inspection_item like concat('%', #{inspectionItems}, '%') |
| | | </if> |
| | | <if test="orderNumber != null and orderNumber != ''"> |
| | | and io.entrust_code like concat('%', #{orderNumber}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getCount" resultType="long"> |
| | | select count(1) |
| | | from ( |
| | | SELECT io.entrust_code,sam.sample,ip.inspection_item,u.name,b.create_time, sam.id |
| | | from ins_order io |
| | | left JOIN ins_sample sam on io.id=sam.ins_order_id |
| | | LEFT JOIN ins_product ip on ip.ins_sample_id=sam.id |
| | | LEFT JOIN |
| | | (SELECT create_time,create_user,ins_product_id FROM (select * FROM ins_product_user ORDER BY |
| | | ins_product_user.create_time DESC) a GROUP BY a.ins_product_id) b |
| | | on b.ins_product_id=ip.id |
| | | left JOIN `user` u on u.id=b.create_user |
| | | where (ip.ins_result=0 OR ip.state=0) |
| | | <if test="inspectionItems != null and inspectionItems != ''"> |
| | | and inspection_item like concat('%', #{inspectionItems}, '%') |
| | | </if> |
| | | <if test="orderNumber != null and orderNumber != ''"> |
| | | and io.entrust_code like concat('%', #{orderNumber}, '%') |
| | | </if> |
| | | ) temp |
| | | </select> |
| | | <select id="getEnumLabelByValue" resultType="java.lang.String"> |
| | | select label |
| | | from enums |
| | | where value = #{value} |
| | | </select> |
| | | <select id="getStandardMethodCode" resultType="java.lang.String"> |
| | | select code |
| | | from standard_method |
| | | where id = #{id} |
| | | </select> |
| | | <select id="selLaboratoryCode" resultType="java.lang.String"> |
| | | select laboratory_code |
| | | from laboratory |
| | | where laboratory_name = #{laboratory} |
| | | </select> |
| | | <select id="selectReportModelByOrderId" resultType="java.util.Map"> |
| | | select distinct id, name |
| | | from standard_template |
| | | where id in (select template_id |
| | | from ins_product |
| | | where son_laboratory = #{laboratory} |
| | | and ins_sample_id in |
| | | (select id from ins_sample where ins_order_id = #{id})) |
| | | </select> |
| | | |
| | | <select id="selectCostStatistics2" resultType="com.ruoyi.inspect.dto.CostStatisticsDto"> |
| | | select * from ( |
| | | SELECT |
| | | A.id, |
| | | A.entrust_code, |
| | | A.create_time, |
| | | A.sample, |
| | | A.model, |
| | | A.inspection_item, |
| | | A.company, |
| | | A.`name`, |
| | | COUNT( 1 ) num, |
| | | SUM( A.price ) price, |
| | | SUM( A.cost ) cost |
| | | FROM |
| | | ( |
| | | SELECT |
| | | i.id, |
| | | i.laboratory, |
| | | i.entrust_code, |
| | | i.create_time, |
| | | isa.sample, |
| | | isa.sample_code, |
| | | isa.model, |
| | | c.price, |
| | | c.cost, |
| | | c.inspection_item, |
| | | i.company, |
| | | u.`name`, |
| | | i.create_user, |
| | | c.ins_sample_id |
| | | FROM |
| | | ins_order i |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = i.id |
| | | LEFT JOIN `user` u ON u.id = i.user_id |
| | | LEFT JOIN custom cus ON cus.id = u.company |
| | | LEFT JOIN ( |
| | | SELECT |
| | | SUM( b.price ) price, |
| | | sum( b.man_hour ) cost, |
| | | b.ins_sample_id, |
| | | GROUP_CONCAT( b.inspection_item2 SEPARATOR ',' ) inspection_item |
| | | FROM |
| | | ( |
| | | SELECT |
| | | ip.ins_sample_id, |
| | | ip.man_hour, |
| | | ip.man_hour_group, |
| | | case |
| | | WHEN LOCATE('[', spl.price)>0 THEN |
| | | REPLACE(JSON_EXTRACT(spl.price, REPLACE(JSON_SEARCH(spl.section, 'one', ip.section), '"', '')),'"','') |
| | | ELSE spl.price |
| | | END AS price , |
| | | GROUP_CONCAT( CONCAT( ip.inspection_item, '@', ip.inspection_item_subclass ) SEPARATOR ',' ) inspection_item2 |
| | | FROM |
| | | ins_product ip |
| | | LEFT JOIN standard_product_list spl ON ip.laboratory = spl.laboratory |
| | | AND ip.sample_type = spl.sample_type |
| | | AND ip.sample = spl.sample |
| | | AND ip.model = spl.model |
| | | AND ip.inspection_item = spl.inspection_item |
| | | AND ip.inspection_item_subclass = spl.inspection_item_subclass |
| | | AND ip.son_laboratory = spl.son_laboratory |
| | | AND ip.standard_method_list_id = spl.standard_method_list_id |
| | | WHERE |
| | | ip.state = 1 |
| | | AND ip.create_time between #{startTime} and #{endTime} |
| | | AND ip.template_id IS NOT NULL |
| | | GROUP BY |
| | | ip.ins_sample_id, |
| | | ip.man_hour_group |
| | | ) b |
| | | GROUP BY |
| | | b.ins_sample_id |
| | | ) c ON c.ins_sample_id = isa.id |
| | | WHERE |
| | | ( i.state = 1 OR i.state = 3 OR i.state = 4 ) |
| | | AND c.ins_sample_id IS NOT NULL |
| | | ) A |
| | | where 1 = 1 |
| | | <if test="laboratory != '' and laboratory != null"> |
| | | AND A.laboratory = #{laboratory} |
| | | </if> |
| | | GROUP BY |
| | | A.id, |
| | | A.entrust_code, |
| | | A.create_time, |
| | | A.sample, |
| | | A.model, |
| | | A.inspection_item, |
| | | A.company, |
| | | A.`name` |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ) B |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="seldepLimsId" resultType="java.lang.String"> |
| | | select name |
| | | from department_lims |
| | | where id = #{depLimsId} |
| | | </select> |
| | | |
| | | <select id="getDepartment" resultType="string"> |
| | | select name from department_lims where id = #{id} |
| | | </select> |
| | | |
| | | <select id="getLaboratory" resultType="string"> |
| | | select distinct laboratory from ins_product where ins_sample_id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectCommissionFees" resultType="com.ruoyi.inspect.dto.CommissionFeesDto"> |
| | | <!-- SELECT--> |
| | | <!-- date_format(create_time, '%Y-%m-%d') AS create_time,--> |
| | | <!-- entrust_code,--> |
| | | <!-- sample_name,--> |
| | | <!-- sample_model,--> |
| | | <!-- sample_num,--> |
| | | <!-- ins_item,--> |
| | | <!-- production,--> |
| | | <!-- company,--> |
| | | <!-- custom,--> |
| | | <!-- engineering,--> |
| | | <!-- total_price--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- io.*,--> |
| | | <!-- sample_counts.sample_num,--> |
| | | <!-- GROUP_CONCAT( DISTINCT isa.sample SEPARATOR 'ã' ) AS sample_name,--> |
| | | <!-- GROUP_CONCAT( DISTINCT isa.model SEPARATOR 'ã' ) AS sample_model,--> |
| | | <!-- total_product_counts.ins_item,--> |
| | | <!-- total_price--> |
| | | <!-- FROM--> |
| | | <!-- ins_order io--> |
| | | <!-- LEFT JOIN ins_sample isa ON io.id = isa.ins_order_id--> |
| | | <!-- LEFT JOIN ins_sample_user isau ON isau.ins_sample_id = io.id--> |
| | | <!-- LEFT JOIN ins_order_state iot ON iot.ins_order_id = io.id--> |
| | | <!-- LEFT JOIN ins_report ir ON io.id = ir.ins_order_id--> |
| | | <!-- AND ir.is_ratify = 1--> |
| | | <!-- LEFT JOIN USER u ON io.create_user = u.id--> |
| | | <!-- LEFT JOIN (--> |
| | | <!-- SELECT--> |
| | | <!-- ins_order_id,--> |
| | | <!-- COUNT(*) AS sample_num--> |
| | | <!-- FROM--> |
| | | <!-- ins_sample--> |
| | | <!-- WHERE--> |
| | | <!-- id IN (--> |
| | | <!-- SELECT--> |
| | | <!-- id1--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- is2.id id1,--> |
| | | <!-- ip.id--> |
| | | <!-- FROM--> |
| | | <!-- ins_sample is2--> |
| | | <!-- LEFT JOIN ins_product ip ON is2.id = ip.ins_sample_id--> |
| | | <!-- WHERE--> |
| | | <!-- ip.id IS NOT NULL--> |
| | | <!-- ) s--> |
| | | <!-- )--> |
| | | <!-- GROUP BY--> |
| | | <!-- ins_order_id--> |
| | | <!-- ) sample_counts ON io.id = sample_counts.ins_order_id--> |
| | | <!-- LEFT JOIN (--> |
| | | <!-- SELECT--> |
| | | <!-- SUM( price ) AS total_price,--> |
| | | <!-- sample_id,--> |
| | | <!-- ins_order_id,--> |
| | | <!-- man_hour_group,--> |
| | | <!-- ins_item--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- ins_sample.id AS sample_id,--> |
| | | <!-- ins_sample.ins_order_id,--> |
| | | <!-- ins_product.man_hour_group,--> |
| | | <!-- GROUP_CONCAT( DISTINCT inspection_item SEPARATOR ',' ) AS ins_item,--> |
| | | <!-- price--> |
| | | <!-- FROM--> |
| | | <!-- ins_product--> |
| | | <!-- JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id--> |
| | | <!-- WHERE--> |
| | | <!-- ins_product.state = 1--> |
| | | <!-- GROUP BY--> |
| | | <!-- ins_sample.ins_order_id,--> |
| | | <!-- ins_sample.id,--> |
| | | <!-- ins_product.man_hour_group--> |
| | | <!-- ) b--> |
| | | <!-- GROUP BY--> |
| | | <!-- ins_order_id--> |
| | | <!-- ) total_product_counts ON io.id = total_product_counts.ins_order_id--> |
| | | <!-- WHERE--> |
| | | <!-- <if test="laboratory!=null and laboratory!=''">--> |
| | | <!-- io.laboratory=#{laboratory} AND--> |
| | | <!-- </if>--> |
| | | <!-- io.create_time between #{startTime} and #{endTime}--> |
| | | <!-- AND--> |
| | | <!-- io.state NOT IN ( 0, 2, 3 )--> |
| | | <!-- GROUP BY--> |
| | | <!-- io.id,--> |
| | | <!-- type--> |
| | | <!-- ORDER BY--> |
| | | <!-- type DESC,--> |
| | | <!-- io.id DESC--> |
| | | <!-- ) a--> |
| | | |
| | | |
| | | |
| | | SELECT |
| | | A.entrust_code, |
| | | A.engineering, |
| | | date_format(A.create_time, '%Y-%m-%d') AS create_time, |
| | | A.sample as sample_name, |
| | | A.model as sample_model, |
| | | A.inspection_item as ins_item, |
| | | A.company, |
| | | A.`name` as custom, |
| | | A.production, |
| | | COUNT( 1 ) sample_num, |
| | | SUM( A.price ) total_price |
| | | FROM |
| | | ( |
| | | SELECT |
| | | i.id, |
| | | i.engineering, |
| | | i.production, |
| | | i.laboratory, |
| | | i.entrust_code, |
| | | i.create_time, |
| | | isa.sample, |
| | | isa.sample_code, |
| | | isa.model, |
| | | c.price, |
| | | c.cost, |
| | | c.inspection_item, |
| | | i.company, |
| | | u.`name`, |
| | | i.create_user, |
| | | c.ins_sample_id |
| | | FROM |
| | | ins_order i |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = i.id |
| | | LEFT JOIN `user` u ON u.id = i.user_id |
| | | LEFT JOIN custom cus ON cus.id = u.company |
| | | LEFT JOIN ( |
| | | SELECT |
| | | SUM( b.price ) price, |
| | | sum( b.man_hour ) cost, |
| | | b.ins_sample_id, |
| | | GROUP_CONCAT( b.inspection_item2 SEPARATOR ',' ) inspection_item |
| | | FROM |
| | | ( |
| | | SELECT |
| | | ip.ins_sample_id, |
| | | ip.man_hour, |
| | | ip.man_hour_group, |
| | | case |
| | | WHEN LOCATE('[', spl.price)>0 THEN |
| | | REPLACE(JSON_EXTRACT(spl.price, REPLACE(JSON_SEARCH(spl.section, 'one', ip.section), '"', '')),'"','') |
| | | ELSE spl.price |
| | | END AS price , |
| | | ip.inspection_item, |
| | | ip.inspection_item_subclass, |
| | | GROUP_CONCAT( CONCAT( ip.inspection_item, '@', ip.inspection_item_subclass ) SEPARATOR ',' ) inspection_item2 |
| | | FROM |
| | | ins_product ip |
| | | LEFT JOIN standard_product_list spl ON ip.laboratory = spl.laboratory |
| | | AND ip.sample_type = spl.sample_type |
| | | AND ip.sample = spl.sample |
| | | AND ip.model = spl.model |
| | | AND ip.inspection_item = spl.inspection_item |
| | | AND ip.inspection_item_subclass = spl.inspection_item_subclass |
| | | AND ip.son_laboratory = spl.son_laboratory |
| | | AND ip.standard_method_list_id = spl.standard_method_list_id |
| | | WHERE |
| | | ip.state = 1 |
| | | AND ip.create_time between #{startTime} and #{endTime} |
| | | AND ip.template_id IS NOT NULL |
| | | GROUP BY |
| | | ip.ins_sample_id, |
| | | ip.man_hour_group |
| | | ) b |
| | | GROUP BY |
| | | b.ins_sample_id |
| | | ) c ON c.ins_sample_id = isa.id |
| | | WHERE |
| | | ( i.state = 1 OR i.state = 3 OR i.state = 4 ) |
| | | AND c.ins_sample_id IS NOT NULL |
| | | ) A |
| | | where A.entrust_code != '' AND A.entrust_code is not null |
| | | <if test="laboratory != '' and laboratory != null"> |
| | | and A.laboratory = #{laboratory} |
| | | </if> |
| | | <if test="company != null and company != ''"> |
| | | and A.company = #{company} |
| | | </if> |
| | | GROUP BY |
| | | A.entrust_code, |
| | | A.create_time, |
| | | A.sample, |
| | | A.model, |
| | | A.inspection_item, |
| | | A.company, |
| | | A.`name` |
| | | </select> |
| | | <select id="selectUnInsProducts" resultType="com.ruoyi.inspect.vo.UnInsProductsVO"> |
| | | select |
| | | date_format(io.send_time,'%Y-%m-%d') as send_time, |
| | | io.entrust_code, |
| | | isa.sample, |
| | | group_concat(distinct isa.sample_code SEPARATOR 'ã') sample_code, |
| | | group_concat(distinct IF(ip.inspection_item_subclass!='' and ip.inspection_item_subclass is not null,ip.inspection_item_subclass,ip.inspection_item) SEPARATOR 'ã') un_ins_product |
| | | from ins_order io |
| | | left join ins_sample isa on io.id = isa.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_order_state ios on io.id=ios.ins_order_id |
| | | <where> |
| | | <if test="laboratory!=null and laboratory!=''"> |
| | | AND io.laboratory=#{laboratory} |
| | | </if> |
| | | <if test="dto.insState!=null and dto.insState!=''"> |
| | | AND ios.ins_state=#{dto.insState} |
| | | </if> |
| | | <if test="dto.sonLaboratory!=null and dto.sonLaboratory!=''"> |
| | | AND ip.son_laboratory=#{dto.sonLaboratory} |
| | | </if> |
| | | <if test="dto.sampleCode!=null and dto.sampleCode!=''"> |
| | | AND isa.sample_code like concat('%',#{dto.sampleCode},'%') |
| | | </if> |
| | | <if test="dto.sample!=null and dto.sample!=''"> |
| | | AND (isa.sample like concat('%',#{dto.sample},'%') or ip.sample_type like concat('%',#{dto.sample},'%')) |
| | | </if> |
| | | and io.send_time between #{startDateTime} and #{endDateTime} |
| | | AND io.state = 1 |
| | | AND ip.state = 1 |
| | | AND (ip.ins_result = 2 or ip.ins_result is null) |
| | | </where> |
| | | group by io.entrust_code |
| | | order by send_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getTasksShow" resultType="com.ruoyi.inspect.dto.TasksShowDto"> |
| | | SELECT |
| | | io.entrust_code, |
| | | iss.sample, |
| | | io.company, |
| | | DATE_FORMAT(io.send_time,'%Y/%m/%d') AS create_time, |
| | | CASE |
| | | WHEN ios.ins_state = 0 THEN 'å¾
æ£' |
| | | WHEN ios.ins_state = 1 THEN '卿£' |
| | | ELSE 'å·²æ£' |
| | | END AS state, |
| | | CASE |
| | | WHEN ios.ins_state = 3 THEN 'å¾
夿 ¸' |
| | | WHEN ios.ins_state = 4 THEN 'é夿 ¸' |
| | | WHEN ios.ins_state = 5 THEN '已夿 ¸' |
| | | ELSE '-' |
| | | END AS ins_state, |
| | | CASE |
| | | -- WHEN ios.ins_state=5 and (ir.`code` IS NULL OR ir.`code` = '') THEN 'å¾
çæ' |
| | | -- WHEN ir.`code` is not null THEN 'å·²çæ' |
| | | -- ELSE '-' |
| | | WHEN ir.state = 1 THEN 'å·²çæ' |
| | | WHEN ir.state = 0 THEN 'å¾
çæ' |
| | | ELSE '-' |
| | | END `code`, |
| | | CASE |
| | | WHEN ir.is_examine = 1 THEN 'éè¿' |
| | | WHEN ir.is_examine = 0 THEN 'æªéè¿' |
| | | WHEN ir.is_examine = -9 THEN 'å¾
å®¡æ ¸' |
| | | ELSE '-' |
| | | END AS is_examine, |
| | | CASE |
| | | when ir.is_ratify = 1 THEN 'å·²æ¹å' |
| | | when ir.is_ratify = 0 THEN '䏿¹å' |
| | | WHEN ir.is_ratify = -9 THEN 'å¾
æ¹å' |
| | | ELSE '-' |
| | | END AS is_ratify, |
| | | GROUP_CONCAT( DISTINCT TRIM( u.`name` ) SEPARATOR 'ã' ) AS `name`, |
| | | CASE |
| | | WHEN io.type = 0 THEN 'æ®é' |
| | | WHEN io.type = 1 THEN 'ä¼å
' |
| | | WHEN io.type = 2 THEN 'ç´§æ¥' |
| | | END AS `type` |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = io.id |
| | | LEFT JOIN ins_sample iss ON io.id = iss.ins_order_id |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = iss.id |
| | | LEFT JOIN ins_product_result ips ON ip.id = ips.ins_product_id |
| | | LEFT JOIN ins_report ir ON io.id = ir.ins_order_id |
| | | LEFT JOIN `user` u ON ips.update_user = u.id |
| | | WHERE |
| | | io.entrust_code IS NOT NULL |
| | | AND u.state = 1 |
| | | AND io.state in (1,4) |
| | | AND IFNULL(ir.is_ratify,-1) != 1 |
| | | AND ios.laboratory = #{sonLaboratory} |
| | | AND ip.son_laboratory = #{sonLaboratory} |
| | | GROUP BY |
| | | io.id |
| | | ORDER BY |
| | | CASE |
| | | WHEN iss.ins_state = 0 THEN 0 -- å¾
æ£ |
| | | WHEN iss.ins_state = 1 THEN 1 -- 卿£ |
| | | ELSE 2 -- å·²æ£ |
| | | END, |
| | | io.type desc, |
| | | io.id desc |
| | | </select> |
| | | <select id="selectCurrentCompanyUrgentQuota" resultType="map"> |
| | | select c.num as quota,c.company from user u left join custom c on u.company = c.id where u.id = #{userId} |
| | | </select> |
| | | <select id="selectPlanCountBySonLaboratory" resultType="java.lang.Integer"> |
| | | select |
| | | count(io.id) |
| | | from ins_order io |
| | | left join ins_order_state ios on io.id = ios.ins_order_id |
| | | where |
| | | ios.laboratory = #{sonLaboratory} |
| | | and io.state in (1,4) |
| | | AND io.send_time between #{startOfMonth} and #{endOfMonth} |
| | | </select> |
| | | <select id="getInsOrderTemList" resultType="com.ruoyi.inspect.vo.ExportInsProductVO"> |
| | | SELECT |
| | | i.create_time, |
| | | i.custom AS custom_name, |
| | | i.id, |
| | | i.entrust_code, |
| | | isa.id ins_sample_id, |
| | | isa.sample_code, |
| | | isa.sample, |
| | | isa.model, |
| | | isa.ins_state, |
| | | ip.id ins_product_id, |
| | | ip.state, |
| | | ip.unit, |
| | | ip.sample_type, |
| | | ip.inspection_item, |
| | | ip.inspection_item_subclass, |
| | | ip.son_laboratory, |
| | | ip.inspection_item_type, |
| | | ip.inspection_value_type, |
| | | ip.special_item_parent_id, |
| | | ip.tell, |
| | | ip.`last_value`, |
| | | case |
| | | WHEN ip.ins_result = 0 THEN 'ä¸åæ ¼' |
| | | WHEN ip.ins_result = 1 THEN 'åæ ¼' |
| | | WHEN ip.ins_result = 3 THEN 'ä¸å¤å®' |
| | | ELSE '' |
| | | END AS ins_result, |
| | | ipr.equip_value, |
| | | ipr.com_value, |
| | | ip.inspection_item_class, |
| | | ifis.CODE, |
| | | ipr.ins_value, |
| | | ipr.create_time AS check_time, |
| | | u.NAME AS check_name, |
| | | CASE |
| | | WHEN ifi.bush_color IS NOT NULL THEN |
| | | ifi.bush_color |
| | | WHEN ib1.color IS NOT NULL THEN |
| | | ib1.color |
| | | WHEN ib2.color IS NOT NULL THEN |
| | | ib2.color ELSE '' |
| | | END AS bush_color, |
| | | i.send_time As sendTime, |
| | | ifi.color |
| | | FROM |
| | | ins_sample isa |
| | | LEFT JOIN ins_order i ON isa.ins_order_id = i.id |
| | | LEFT JOIN ins_product ip ON isa.id = ip.ins_sample_id |
| | | LEFT JOIN ins_product_result ipr ON ip.id = ipr.ins_product_id |
| | | LEFT JOIN ins_fiber ifi ON ip.ins_fiber_id = ifi.id |
| | | LEFT JOIN ins_fibers ifis ON ip.ins_fibers_id = ifis.id |
| | | LEFT JOIN ins_bushing ib1 ON ip.ins_bush_id = ib1.id |
| | | LEFT JOIN ins_bushing ib2 ON ib2.id = ifis.ins_bushing_id |
| | | LEFT JOIN USER u ON u.id = ipr.create_user |
| | | WHERE |
| | | ip.state = 1 AND |
| | | (i.state = 4 or i.state = 1) |
| | | AND ip.special_item_parent_id IS NOT NULL |
| | | AND ip.son_laboratory = 'å
纤è¯éªå®¤' |
| | | <if test="entrustCode != null and entrustCode != ''"> |
| | | AND i.entrust_code like concat('%',#{entrustCode},'%') |
| | | </if> |
| | | <if test="sampleCode != null and sampleCode != ''"> |
| | | AND isa.sample_code like concat('%',#{sampleCode},'%') |
| | | </if> |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
| | | AND i.ins_time between #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="checkName != '' and checkName != null"> |
| | | AND u.name = #{checkName} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsOrderStateMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsOrderState"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,ins_order_id,laboratory, |
| | | ins_state,create_user,create_time, |
| | | update_user,update_time |
| | | </sql> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsOrderTemplateMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsOrderTemplate"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="thing" column="thing" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,thing, |
| | | create_user,update_user,create_time, |
| | | update_time |
| | | </sql> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsProductMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsProduct"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sonLaboratory" column="son_laboratory" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | <result property="price" column="price" jdbcType="DECIMAL"/> |
| | | <result property="manHour" column="man_hour" jdbcType="DOUBLE"/> |
| | | <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/> |
| | | <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/> |
| | | <result property="deviceGroup" column="device_group" jdbcType="VARCHAR"/> |
| | | <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/> |
| | | <result property="section" column="section" jdbcType="VARCHAR"/> |
| | | <result property="valueType" column="value_type" jdbcType="VARCHAR"/> |
| | | <result property="method" column="method" jdbcType="VARCHAR"/> |
| | | <result property="manDay" column="man_day" jdbcType="INTEGER"/> |
| | | <result property="bsm" column="bsm" jdbcType="VARCHAR"/> |
| | | <result property="ask" column="ask" jdbcType="VARCHAR"/> |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="templateId" column="template_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | <update id="updateInspected"> |
| | | UPDATE ins_product p |
| | | SET p.state=0 |
| | | WHERE EXISTS( |
| | | SELECT 1 |
| | | FROM ins_sample s |
| | | WHERE s.ins_order_id IN ( |
| | | SELECT o.id |
| | | FROM ins_order o |
| | | WHERE o.id = #{id} |
| | | ) |
| | | AND p.ins_sample_id = s.id |
| | | AND p.state = 1 |
| | | AND p.ins_result IS NULL |
| | | ); |
| | | </update> |
| | | |
| | | <select id="selectOrderManDay" resultType="java.lang.Integer"> |
| | | select coalesce(max(ip.man_day), 0) |
| | | from ins_order io |
| | | left join ins_sample isa on io.id = isa.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | where io.id = #{orderId} |
| | | </select> |
| | | <select id="selectUserById" resultType="java.util.Map"> |
| | | select name, company, phone, address, name_en |
| | | from user |
| | | where id = #{userId} |
| | | </select> |
| | | <select id="getProductAndResult" resultType="com.ruoyi.inspect.dto.ProductResultDto2"> |
| | | select ip.id, |
| | | ip.inspection_item, |
| | | ip.inspection_item_subclass, |
| | | ip.laboratory, |
| | | ip.unit, |
| | | ipr.equip_name equipValue, |
| | | io.entrust_code, |
| | | ipr.update_time, |
| | | ip.ins_result, |
| | | u.name updateUserName |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_sample isa on isa.id = ip.ins_sample_id |
| | | left join ins_order io on io.id = isa.ins_order_id |
| | | left join user u on u.id = ipr.update_user |
| | | where ip.ins_sample_id = #{sampleId} |
| | | and ip.ins_result is not null |
| | | and template_id is not null |
| | | </select> |
| | | <select id="selectFiberInsProduct" resultType="com.ruoyi.inspect.pojo.InsProduct"> |
| | | select * from ins_product |
| | | where state = 1 |
| | | and (ins_fibers_id is not null or ins_fiber_id is not null) |
| | | and ins_result is null |
| | | and son_laboratory = #{laboratory} |
| | | and ins_sample_id in |
| | | <foreach collection="ids" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectNoProducts" resultType="com.ruoyi.inspect.pojo.InsProduct"> |
| | | select * |
| | | from (select ip.*, sample_code |
| | | from ins_product ip |
| | | left join ins_sample is2 on ip.ins_sample_id = is2.id |
| | | where ip.ins_result is null |
| | | and state = 1 |
| | | and is2.ins_order_id = #{orderId}) A |
| | | </select> |
| | | <select id="selectInsProductCountByOrderId" resultType="java.lang.Integer"> |
| | | select COUNT(1) |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order io on isa.ins_order_id = io.id |
| | | where io.id = #{orderId} |
| | | and (ip.ins_result is null or ip.ins_result = 2) |
| | | and ip.state = 1 |
| | | </select> |
| | | <select id="findSagTemperatureProducts" resultType="com.ruoyi.inspect.pojo.InsProduct"> |
| | | select |
| | | * |
| | | from ins_product |
| | | where |
| | | ins_sample_id = #{sampleId} |
| | | and |
| | | inspection_item = 'å¼§å-温度' |
| | | and |
| | | special_item_parent_id is not null |
| | | and |
| | | state = 1 |
| | | </select> |
| | | <select id="selectProductByOrderId" resultType="com.ruoyi.inspect.vo.InsProductVO"> |
| | | select |
| | | ip.id, |
| | | isa.id as sample_id, |
| | | isa.sample_code, |
| | | isa.model, |
| | | ip.inspection_item as test_item, |
| | | ip.inspection_item_subclass as test_item_children, |
| | | ip.method_s as test_method, |
| | | ip.tell as requirement, |
| | | u.name as inspect_name |
| | | from |
| | | ins_order io |
| | | left join |
| | | ins_sample isa |
| | | on |
| | | io.id = isa.ins_order_id |
| | | left join |
| | | ins_product ip |
| | | on |
| | | isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join user u on ipr.create_user = u.id |
| | | <if test="orderId!=null and orderId!=''"> |
| | | <where> |
| | | io.id = #{orderId} |
| | | <if test="sonLaboratory!='' and sonLaboratory!=null"> |
| | | AND ip.son_laboratory=#{sonLaboratory} |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </select> |
| | | <select id="selectInsProductInsFiberList" resultType="com.ruoyi.inspect.vo.InsProductFiberVO"> |
| | | select ip.*,ifi.bush_color,ifi.color from ins_product ip |
| | | left join ins_fiber ifi on ip.ins_fiber_id = ifi.id |
| | | where ip.state=1 |
| | | AND ip.ins_fiber_id is not null |
| | | AND (ip.inspection_item_class is null or ip.inspection_item_class='') |
| | | AND ip.ins_sample_id=#{sampleId} |
| | | </select> |
| | | <select id="selectInsProductInsBushList" resultType="com.ruoyi.inspect.vo.InsProductFiberVO"> |
| | | select ip.*, |
| | | ib.color as bush_color, |
| | | '/' as color |
| | | from ins_product ip |
| | | left join ins_bushing ib on ip.ins_bush_id = ib.id |
| | | where ip.state=1 |
| | | AND ip.ins_bush_id is not null |
| | | AND (ip.inspection_item_class is null or ip.inspection_item_class='') |
| | | AND ip.ins_sample_id=#{sampleId} |
| | | </select> |
| | | <select id="selectInsProductInsFibersList" resultType="com.ruoyi.inspect.vo.InsProductFiberVO"> |
| | | select ip.*, |
| | | ips.ins_value, |
| | | ib.color as bush_color, |
| | | ifs.code |
| | | from ins_product ip |
| | | inner join ins_product_result ips on ip.id = ips.ins_product_id |
| | | left join ins_fibers ifs on ip.ins_fibers_id = ifs.id |
| | | left join ins_bushing ib on ifs.ins_bushing_id = ib.id |
| | | where ip.state=1 |
| | | AND ip.ins_fibers_id is not null |
| | | AND (ip.inspection_item_class is null or ip.inspection_item_class='') |
| | | AND ip.ins_sample_id=#{sampleId} |
| | | </select> |
| | | <select id="selectProductBySampleId" resultType="com.ruoyi.inspect.vo.InsProductFiberVO"> |
| | | select ip.*, |
| | | ips.ins_value, |
| | | ib.color as bush_color, |
| | | ifs.code |
| | | from ins_product ip |
| | | inner join ins_product_result ips on ip.id = ips.ins_product_id |
| | | left join ins_fibers ifs on ip.ins_fibers_id = ifs.id |
| | | left join ins_bushing ib on ifs.ins_bushing_id = ib.id |
| | | where ip.state=1 |
| | | AND (ip.inspection_item_class is null or ip.inspection_item_class='') |
| | | AND ip.ins_sample_id=#{sampleId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsProductResultMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsProductResult"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insProductId" column="ins_product_id" jdbcType="INTEGER"/> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <select id="selDetail" resultMap="BaseResultMap"> |
| | | select * |
| | | from ins_product_result |
| | | where 1=1 |
| | | <!--and ins_product_id in (#{ips})--> |
| | | <if test="ips != null and ips.size > 0"> |
| | | <!-- 使ç¨foreachå
ç´ æå»ºINåå¥ --> |
| | | and ins_product_id in |
| | | <foreach item="item" collection="ips" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsProductUserMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsProductUser"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="VARCHAR"/> |
| | | <result property="insProductId" column="ins_product_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,create_user,create_time, |
| | | ins_product_id |
| | | </sql> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsReportApproveConfigMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsReportApproveConfig"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="editor" column="editor" jdbcType="INTEGER"/> |
| | | <result property="examiner" column="examiner" jdbcType="INTEGER"/> |
| | | <result property="approver" column="approver" jdbcType="INTEGER"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,editor,examiner, |
| | | approver,laboratory |
| | | </sql> |
| | | <select id="selectApprovalConfigByLaboratory" resultType="java.util.Map"> |
| | | select |
| | | u1.signature_url as writeUrl, |
| | | u2.signature_url as examineUrl, |
| | | u3.signature_url as ratifyUrl, |
| | | u1.id as writeId, |
| | | u2.id as examineId, |
| | | u3.id as ratifyId |
| | | from |
| | | ins_report_approve_config irac |
| | | left join user u1 on irac.editor=u1.id |
| | | left join user u2 on irac.examiner=u2.id |
| | | left join user u3 on irac.approver=u3.id |
| | | where irac.laboratory = #{laboratory} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsReportMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsReport"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="url" column="url" jdbcType="VARCHAR"/> |
| | | <result property="urlS" column="url_s" jdbcType="VARCHAR"/> |
| | | <result property="isRatify" column="is_ratify" jdbcType="INTEGER"/> |
| | | <result property="isExamine" column="is_examine" jdbcType="INTEGER"/> |
| | | <result property="ratifyUserId" column="ratify_user_id" jdbcType="INTEGER"/> |
| | | <result property="examineUserId" column="examine_user_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageInsReport" resultType="com.ruoyi.inspect.dto.ReportPageDto"> |
| | | select * |
| | | from ( |
| | | select |
| | | ir.*, |
| | | io.entrust_code, |
| | | u.name write_user_name, |
| | | u1.name ratify_user, |
| | | u2.name examine_user, |
| | | io.laboratory, |
| | | CASE |
| | | WHEN (ir.url_s is null or ir.url_s='') and ir.is_ratify=-9 THEN 0 |
| | | ELSE 1 |
| | | END AS is_upload |
| | | from ins_report ir |
| | | left join ins_order io on io.id = ir.ins_order_id |
| | | left join user u on u.id = ir.write_user_id |
| | | left join user u1 on u1.id = ir.ratify_user_id |
| | | left join user u2 on u2.id = ir.examine_user_id |
| | | where 1=1 |
| | | <if test="laboratory!=null and laboratory!=''"> |
| | | and laboratory=#{laboratory} |
| | | </if> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getLaboratoryByName" resultType="java.lang.String"> |
| | | select s.address from seal s |
| | | left join laboratory l on s.lab_id = l.id |
| | | where l.laboratory_name = #{name} |
| | | and s.type = 'æ¥åç±»å' |
| | | order by s.create_time desc |
| | | limit 1 |
| | | </select> |
| | | <select id="findReportCountInfo" resultType="com.ruoyi.inspect.dto.ReportPageDto"> |
| | | select |
| | | * |
| | | from ( |
| | | select |
| | | ir.*, |
| | | io.entrust_code, |
| | | u.name write_user_name, |
| | | u1.name ratify_user, |
| | | u2.name examine_user, |
| | | io.laboratory, |
| | | CASE |
| | | WHEN ir.url_s is null or ir.url_s='' THEN 0 |
| | | ELSE 1 |
| | | END AS is_upload |
| | | from ins_report ir |
| | | left join ins_order io on io.id = ir.ins_order_id |
| | | left join user u on u.id = ir.write_user_id |
| | | left join user u1 on u1.id = ir.ratify_user_id |
| | | left join user u2 on u2.id = ir.examine_user_id |
| | | where 1=1 |
| | | AND (${queryField} = -9 or ${queryField} is null) |
| | | <if test="laboratory!=null and laboratory!=''"> |
| | | and laboratory=#{laboratory} |
| | | </if> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsSampleMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsSample"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="isPairing" column="is_pairing" jdbcType="CHAR"/> |
| | | </resultMap> |
| | | |
| | | <select id="findInsSampleAndOrder" resultType="com.ruoyi.inspect.vo.InsOrderPlanVO"> |
| | | SELECT |
| | | a.appointed, |
| | | a.checkName, |
| | | a.company, |
| | | a.entrust_code, |
| | | a.id, |
| | | a.ins_time, |
| | | a.model, |
| | | a.sample, |
| | | a.send_time, |
| | | a.son_laboratory, |
| | | a.type, |
| | | a.userName, |
| | | a.ins_state, |
| | | a.verify_tell, |
| | | a.verify_user, |
| | | a.sample_type, |
| | | a.laboratory, |
| | | a.sample_code |
| | | FROM |
| | | ( |
| | | SELECT |
| | | io.id, |
| | | io.entrust_code, |
| | | io.company, |
| | | io.type, |
| | | io.appointed, |
| | | io.send_time, |
| | | group_concat(distinct isa.sample,' ') sample, |
| | | group_concat(distinct ip.model SEPARATOR ',') model, |
| | | userName, |
| | | checkName, |
| | | ip.son_laboratory, |
| | | ios.ins_time, |
| | | ios.ins_state, |
| | | ios.verify_tell, |
| | | ios.verify_user, |
| | | isa.sample_code, |
| | | io.laboratory, |
| | | io.sample_type |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id |
| | | LEFT JOIN ( |
| | | SELECT ins_sample_id, |
| | | GROUP_CONCAT(DISTINCT CASE WHEN u.state = 0 THEN uu.name END SEPARATOR |
| | | ',') AS userName, |
| | | GROUP_CONCAT(DISTINCT CASE WHEN u.state = 1 THEN uu.name END SEPARATOR |
| | | ',') AS checkName |
| | | FROM ins_sample_user u |
| | | LEFT JOIN user uu ON u.user_id = uu.id |
| | | WHERE u.son_laboratory=#{sonLaboratory} |
| | | GROUP BY ins_sample_id |
| | | ) isu ON isu.ins_sample_id = io.id |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id AND ip.son_laboratory = #{sonLaboratory} |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = io.id AND ios.laboratory = #{sonLaboratory} |
| | | left join ins_report ir on ir.ins_order_id = io.id |
| | | WHERE |
| | | io.state in (1,4) |
| | | and send_time is not null |
| | | and COALESCE(ir.is_ratify, 0) != 1 |
| | | AND ios.ins_state is not null |
| | | <if test="insState!=null and insState!=''"> |
| | | AND ios.ins_state = #{insState} |
| | | </if> |
| | | <if test="laboratory!=null and laboratory!=''"> |
| | | AND ip.laboratory=#{laboratory} |
| | | </if> |
| | | <if test="entrustCode!=null and entrustCode!=''"> |
| | | AND io.entrust_code LIKE concat('%',#{entrustCode},'%') |
| | | </if> |
| | | <if test="sampleCode!=null and sampleCode!=''"> |
| | | AND isa.sample_code LIKE concat('%',#{sampleCode},'%') |
| | | </if> |
| | | <if test="sample!=null and sample!=''"> |
| | | AND (ip.sample_type LIKE concat('%',#{sample},'%') OR ip.sample LIKE concat('%',#{sample},'%')) |
| | | </if> |
| | | <if test="userName !=null and userName!=''"> |
| | | and ( (userName like CONCAT ('%', #{userName},'%') ) |
| | | or (checkName like CONCAT ('%', #{userName},'%') ) ) |
| | | </if> |
| | | <if test="checkName != null and checkName != ''"> |
| | | and checkName like CONCAT ('%', #{checkName},'%') |
| | | </if> |
| | | <if test="sendTimeRange!=null and sendTimeRange.size()>1"> |
| | | AND io.send_time BETWEEN #{sendTimeRange[0]} AND #{sendTimeRange[1]} |
| | | </if> |
| | | and ip.son_laboratory=#{sonLaboratory} |
| | | GROUP BY |
| | | ip.son_laboratory, |
| | | io.id |
| | | ORDER BY |
| | | io.type DESC, |
| | | io.id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="inspectionOrderDetailsTaskSwitching" resultType="com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo"> |
| | | select * from( |
| | | SELECT |
| | | a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id,verify_user |
| | | FROM |
| | | ( |
| | | SELECT |
| | | io.id, |
| | | io.entrust_code, |
| | | io.type, |
| | | io.appointed, |
| | | io.send_time, |
| | | group_concat(distinct isa.sample,' ') sampleType, |
| | | isu.user_id, |
| | | user.name userName, |
| | | ip.son_laboratory, |
| | | io.ins_time, |
| | | io.laboratory |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id |
| | | LEFT JOIN ( |
| | | SELECT * |
| | | FROM ins_sample_user u |
| | | WHERE son_laboratory=#{sonLaboratory} and (ins_sample_id, id) IN ( |
| | | SELECT ins_sample_id, MAX(id) |
| | | FROM ins_sample_user |
| | | WHERE son_laboratory=#{sonLaboratory} |
| | | GROUP BY ins_sample_id |
| | | ) |
| | | ORDER BY ins_sample_id, id |
| | | ) isu ON isu.ins_sample_id = io.id |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | LEFT JOIN user ON isu.user_id = user.id |
| | | WHERE |
| | | io.state = 1 |
| | | and send_time is not null |
| | | <if test="userId !=null and userId!=''"> |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL ) |
| | | </if> |
| | | OR isu.user_id is NULL |
| | | GROUP BY |
| | | ip.son_laboratory, |
| | | io.id |
| | | ) a |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory |
| | | left join (SELECT td.user_id order_user_id, td.ins_sample_id FROM ins_sample_user td,(SELECT max(id) id FROM |
| | | ins_sample_user where son_laboratory=#{sonLaboratory} GROUP BY ins_sample_id) md where td.id = md.id |
| | | <if test="userId !=null and userId!=''"> |
| | | and user_id = #{userId} OR user_id is NULL |
| | | </if> |
| | | OR user_id is NULL |
| | | ) isu2 on |
| | | isu2.ins_sample_id = a.id |
| | | where ins_state is not null |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | and a.laboratory=#{laboratory} |
| | | </if> |
| | | ORDER BY |
| | | <!--a.user_id DESC,--> |
| | | a.type DESC, |
| | | a.id |
| | | ) b |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectSampleProductListByOrderId" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.ins_bush_id, |
| | | ip.ins_fiber_id, |
| | | ip.ins_fibers_id, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | tell, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.id ipr_id, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ip.method_s, |
| | | elasticity_modulus |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and state = 1 |
| | | and ip.special_item_parent_id is null |
| | | -- and ins_fiber_id is null |
| | | -- and ins_fibers_id is null |
| | | and <!--isa.sample_code NOT REGEXP '/'--> |
| | | isa.id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = |
| | | ip.ins_sample_id where ip.id is not null)s ) |
| | | order by case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | ,id asc |
| | | </select> |
| | | <select id="getInsOrderAndSample" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.id ipr_id, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic, |
| | | ip.temperature, |
| | | ip.humidity, |
| | | elasticity_modulus |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | </select> |
| | | <select id="getSampleEn" resultType="java.lang.String"> |
| | | select name_en |
| | | from product |
| | | where name = #{sample} |
| | | limit 1 |
| | | </select> |
| | | <select id="selectSampleProductListByOrderId2" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | tell, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.id ipr_id, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ip.method_s, |
| | | elasticity_modulus, |
| | | ip.ins_fiber_id, |
| | | ip.ins_fibers_id |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and ip.standard_method_list_id is not null |
| | | and state = 1 |
| | | order by case |
| | | when man_hour_group is NULL then 1 |
| | | when man_hour_group = '' then 1 |
| | | end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(man_hour_group, 2) AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | , id asc |
| | | </select> |
| | | |
| | | <select id="selectSampleProductListByOrderId3" resultMap="sampleDto3"> |
| | | select isa.id, |
| | | sample_code, |
| | | isa.sample, |
| | | entrust_code, |
| | | is_leave, |
| | | isa.model, |
| | | isa.ins_state, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_subclass, |
| | | io.sample_type io_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.state, |
| | | ins_sample_id |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_order io on io.id = ins_order_id |
| | | where ip.state = 1 |
| | | and ins_order_id in |
| | | <foreach collection="ids" open="(" close=")" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | order by case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | ,id asc |
| | | </select> |
| | | |
| | | <select id="getInsProduct1" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | elasticity_modulus, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.id ipr_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | <if test="laboratory!='ææè¯éªå®¤'"> |
| | | and ins_fiber_id is null |
| | | </if> |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | <select id="getInsProduct5" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | elasticity_modulus, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.id ipr_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | <select id="getInsProduct2" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fibers_id = #{id} |
| | | and ip.son_laboratory = #{sonLaboratory} |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | <select id="getInsProduct3" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fiber_id = #{id} |
| | | and ip.son_laboratory = #{sonLaboratory} |
| | | and state = 1 |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | |
| | | <select id="getInsProduct6" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fibers_id = #{id} |
| | | and ip.son_laboratory = #{sonLaboratory} |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | |
| | | <select id="getInsProduct4" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.ins_bush_id, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_bush_id = #{id} |
| | | and ip.son_laboratory = #{sonLaboratory} |
| | | and state = 1 |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | <select id="getReportModel" resultType="java.util.Map"> |
| | | </select> |
| | | |
| | | <resultMap id="sampleDto" type="com.ruoyi.inspect.dto.SampleProductDto"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id"/> |
| | | <result property="unit" column="unit"/> |
| | | <collection property="insProduct" resultMap="product"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="product" type="com.ruoyi.inspect.pojo.InsProduct"> |
| | | <id property="id" column="ip_id" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemEn" column="inspection_item_en" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclassEn" column="inspection_item_subclass_en" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClass" column="inspection_item_class" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemClassEn" column="inspection_item_class_en" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="ip_factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="ip_laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="ip_sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="ip_sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="ip_model" jdbcType="VARCHAR"/> |
| | | <result property="sonLaboratory" column="son_laboratory" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="ip_unit" jdbcType="VARCHAR"/> |
| | | <result property="price" column="price" jdbcType="DECIMAL"/> |
| | | <result property="manHour" column="man_hour" jdbcType="DOUBLE"/> |
| | | <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/> |
| | | <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/> |
| | | <result property="deviceGroup" column="device_group" jdbcType="VARCHAR"/> |
| | | <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/> |
| | | <result property="section" column="section" jdbcType="VARCHAR"/> |
| | | <result property="valueType" column="value_type" jdbcType="VARCHAR"/> |
| | | <result property="method" column="method" jdbcType="VARCHAR"/> |
| | | <result property="manDay" column="man_day" jdbcType="INTEGER"/> |
| | | <result property="bsm" column="bsm" jdbcType="VARCHAR"/> |
| | | <result property="ask" column="ask" jdbcType="VARCHAR"/> |
| | | <result property="tell" column="tell" jdbcType="VARCHAR"/> |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ip_ins_result" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="insBushId" column="ins_bush_id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="ip_create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="ip_update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="ip_create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="ip_update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="templateId" column="template_id" jdbcType="INTEGER"/> |
| | | <result property="methodS" column="method_s"/> |
| | | <result property="tell" column="tell"/> |
| | | <result property="dic" column="dic"/> |
| | | <result property="temperature" column="temperature"/> |
| | | <result property="humidity" column="humidity"/> |
| | | <result property="elasticityModulus" column="elasticity_modulus"/> |
| | | <result property="insFiberId" column="ins_fiber_id"/> |
| | | <result property="insFibersId" column="ins_fibers_id"/> |
| | | <collection property="insProductResult" resultMap="insProductResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="sampleDto3" type="com.ruoyi.inspect.dto.SampleProductDto3"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="ioSampleType" column="io_sample_type" jdbcType="VARCHAR"/> |
| | | <result property="code" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id"/> |
| | | <result property="unit" column="unit"/> |
| | | <collection property="insProduct" resultMap="product"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="insProductResult" type="com.ruoyi.inspect.pojo.InsProductResult"> |
| | | <id property="id" column="ipr_id" jdbcType="INTEGER"/> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equip_name" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="sampleVo" type="com.ruoyi.inspect.vo.SampleVo"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id"/> |
| | | <result property="methodName" column="methodName" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit"/> |
| | | </resultMap> |
| | | |
| | | <select id="getDetailById" resultMap="sampleVo"> |
| | | select is2.*, |
| | | code methodName |
| | | from ins_sample is2 |
| | | inner join standard_method sm on standard_method_list_id = sm.id |
| | | where is2.id = #{sampleId} |
| | | </select> |
| | | |
| | | <select id="selMethodById" resultType="java.lang.String"> |
| | | select code |
| | | from standard_method |
| | | where id = (select standard_method_list_id from ins_sample where id = #{sampleId}) |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsSampleUserMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsSampleUser"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="userId" column="user_id" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,ins_sample_id,user_id, |
| | | state,create_user,create_time |
| | | </sql> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.InsUnPassMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.InsUnPass"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="handleSuggestion" column="handle_suggestion" jdbcType="VARCHAR"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <select id="pageInsUnPass" resultType="com.ruoyi.inspect.dto.UnPassPageDto"> |
| | | SELECT * FROM |
| | | ins_un_pass iu |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.SampleOrderMapper"> |
| | | <resultMap id="map" type="com.ruoyi.inspect.dto.SampleOrderDto"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> |
| | | <result property="leaveNum" column="leave_num" jdbcType="INTEGER"/> |
| | | <result property="insProgress" column="ins_progress" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="sendTime" column="send_time" jdbcType="TIMESTAMP"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <association property="insOrderList" javaType="com.ruoyi.inspect.pojo.InsOrder"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="entrustCode" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="custom" column="custom" jdbcType="VARCHAR"/> |
| | | <result property="company" column="company" jdbcType="VARCHAR"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="type" column="type" jdbcType="INTEGER"/> |
| | | <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="otcCode" column="otc_code" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </association> |
| | | </resultMap> |
| | | <select id="selectSampleOrderList" resultMap="map"> |
| | | select * from( |
| | | select s.id, |
| | | s.join_name, |
| | | o.create_user, |
| | | o.create_time, |
| | | o.update_user, |
| | | o.update_time |
| | | from ins_sample s |
| | | left join ins_order o on s.ins_order_id = o.id |
| | | )a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.WarehouseCellMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.WarehouseCell"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="shelfId" column="shelf_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <select id="getWarehouse" resultMap="WarehouseCellAndHistoryDto"> |
| | | select wc.id, wc.row, wc.col, i.id sampleId, i.sample, i.model, i.sample_code from warehouse_cell wc |
| | | left join ins_sample i on i.cell_id = wc.id |
| | | where wc.state = 1 |
| | | and wc.shelf_id = #{shelfId} |
| | | order by wc.id |
| | | </select> |
| | | |
| | | <resultMap id="WarehouseCellAndHistoryDto" type="com.ruoyi.inspect.dto.WarehouseCellAndSampleDto"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <collection property="samples" resultMap="InsSample"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="InsSample" type="com.ruoyi.inspect.pojo.InsSample"> |
| | | <id property="id" column="sampleId"/> |
| | | <result property="sample" column="sample"/> |
| | | <result property="model" column="model"/> |
| | | <result property="sampleCode" column="sample_code"/> |
| | | </resultMap> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.WarehouseHistoryMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.WarehouseHistory"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="cellId" column="cell_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <select id="getUserNameById" resultType="java.lang.String"> |
| | | select name from user where id = #{userId} |
| | | </select> |
| | | <select id="getHistoryListBySampleId" resultType="com.ruoyi.inspect.dto.HistoryDto"> |
| | | select wh.*,u.name createUserName from warehouse_history wh |
| | | left join user u on u.id = wh.create_user |
| | | where wh.ins_sample_id = #{sampleId} |
| | | order by wh.id desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.WarehouseMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.Warehouse"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="Warehouse" type="com.ruoyi.inspect.dto.WarehouseDto"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <collection property="warehouseShelfList" resultMap="shelf"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="shelf" type="com.ruoyi.inspect.pojo.WarehouseShelf"> |
| | | <id property="id" column="sId" jdbcType="INTEGER"/> |
| | | <result property="name" column="sName" jdbcType="VARCHAR"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectWarehouseList" resultMap="Warehouse"> |
| | | select w.id,w.name,ws.id sId,ws.name sName,ws.row,ws.col,ws.warehouse_id from warehouse w |
| | | left join warehouse_shelf ws on w.id = ws.warehouse_id |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.inspect.mapper.WarehouseShelfMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.WarehouseShelf"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="row" column="row" jdbcType="INTEGER"/> |
| | | <result property="col" column="col" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="warehouseId" column="warehouse_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | <hutool.version>5.8.18</hutool.version> |
| | | <easyexcel.version>3.3.2</easyexcel.version> |
| | | <poi.tl.version>1.12.2</poi.tl.version> |
| | | <amqp.version>3.2.6</amqp.version> |
| | | </properties> |
| | | |
| | | <!-- ä¾èµå£°æ --> |
| | | <dependencyManagement> |
| | | <dependencies> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | <version>${amqp.version}</version> |
| | | </dependency> |
| | | <!-- è¦çSpringFrameworkçä¾èµé
ç½®--> |
| | | <dependency> |
| | | <groupId>org.springframework</groupId> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.utils; |
| | | |
| | | import com.alibaba.excel.support.ExcelTypeEnum; |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.metadata.style.WriteFont; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import org.apache.poi.ss.usermodel.BorderStyle; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.IndexedColors; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | /** |
| | | *@author: Zou, Yu |
| | | *@description: |
| | | *@date: 2023/9/24 0024 13:18 |
| | | **/ |
| | | public class EasyExcelUtils { |
| | | |
| | | public static HorizontalCellStyleStrategy getStyleStrategy(){ |
| | | return getStyleStrategy(IndexedColors.WHITE); |
| | | } |
| | | |
| | | /** |
| | | * coloræä¸¾: IndexedColors |
| | | * @param color |
| | | * @return |
| | | */ |
| | | public static HorizontalCellStyleStrategy getStyleStrategy(IndexedColors color) { |
| | | // 头ççç¥ |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | // èæ¯è®¾ç½®ä¸ºç°è² |
| | | headWriteCellStyle.setFillForegroundColor(color.getIndex()); |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontHeightInPoints((short) 10); |
| | | // å使 ·å¼ |
| | | headWriteFont.setFontName("å®ä½"); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); |
| | | // èªå¨æ¢è¡ |
| | | headWriteCellStyle.setWrapped(false); |
| | | // æ°´å¹³å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | // åç´å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | |
| | | // å
容ççç¥ |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | // è¿ééè¦æå® FillPatternType 为FillPatternType.SOLID_FOREGROUND ä¸ç¶æ æ³æ¾ç¤ºèæ¯é¢è².头é»è®¤äº FillPatternTypeæä»¥å¯ä»¥ä¸æå® |
| | | // contentWriteCellStyle.setFillPatternType(FillPatternType.SQUARES); |
| | | // contentWriteCellStyle.setDataFormat((short) 49); |
| | | // èæ¯ç½è² |
| | | contentWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex()); |
| | | WriteFont contentWriteFont = new WriteFont(); |
| | | // åä½å¤§å° |
| | | contentWriteFont.setFontHeightInPoints((short) 11); |
| | | // å使 ·å¼ |
| | | contentWriteFont.setFontName("å®ä½"); |
| | | contentWriteCellStyle.setWriteFont(contentWriteFont); |
| | | // å
容å±
ä¸å¯¹é½ |
| | | contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | //å
容åç´å±
ä¸ |
| | | contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | //è¾¹æ¡è®¾ç½® |
| | | contentWriteCellStyle.setBorderTop(BorderStyle.THIN); |
| | | contentWriteCellStyle.setBorderRight(BorderStyle.THIN); |
| | | contentWriteCellStyle.setBorderBottom(BorderStyle.THIN); |
| | | contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); |
| | | // è¿ä¸ªçç¥æ¯ 头æ¯å¤´çæ ·å¼ å
容æ¯å
å®¹çæ ·å¼ å
¶ä»ççç¥å¯ä»¥èªå·±å®ç° |
| | | return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | } |
| | | |
| | | public static HorizontalCellStyleStrategy getStyleFixedStrategy() { |
| | | // 头ççç¥ |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | // èæ¯è®¾ç½®ä¸ºç°è² |
| | | headWriteCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontHeightInPoints((short) 12); |
| | | // å使 ·å¼ |
| | | headWriteFont.setFontName("Calibri"); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); |
| | | // èªå¨æ¢è¡ |
| | | headWriteCellStyle.setWrapped(false); |
| | | // æ°´å¹³å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | // åç´å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | // å
容ççç¥ |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | // è¿ééè¦æå® FillPatternType 为FillPatternType.SOLID_FOREGROUND ä¸ç¶æ æ³æ¾ç¤ºèæ¯é¢è².头é»è®¤äº FillPatternTypeæä»¥å¯ä»¥ä¸æå® |
| | | // contentWriteCellStyle.setFillPatternType(FillPatternType.SQUARES); |
| | | // èæ¯ç½è² |
| | | contentWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex()); |
| | | WriteFont contentWriteFont = new WriteFont(); |
| | | // åä½å¤§å° |
| | | contentWriteFont.setFontHeightInPoints((short) 10); |
| | | // å使 ·å¼ |
| | | contentWriteFont.setFontName("Calibri"); |
| | | contentWriteCellStyle.setWriteFont(contentWriteFont); |
| | | // å
å®¹å·¦å¯¹é½ |
| | | contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT); |
| | | // è¿ä¸ªçç¥æ¯ 头æ¯å¤´çæ ·å¼ å
容æ¯å
å®¹çæ ·å¼ å
¶ä»ççç¥å¯ä»¥èªå·±å®ç° |
| | | return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | } |
| | | |
| | | public static HorizontalCellStyleStrategy getArveStyleStrategy() { |
| | | // 头ççç¥ |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | // èæ¯è®¾ç½®ä¸º |
| | | headWriteCellStyle.setFillForegroundColor(IndexedColors.BLACK.getIndex()); |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontHeightInPoints((short) 12); |
| | | // å使 ·å¼ |
| | | headWriteFont.setFontName("Calibri"); |
| | | headWriteFont.setColor(IndexedColors.WHITE.getIndex()); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); |
| | | |
| | | headWriteCellStyle.setBorderBottom(BorderStyle.MEDIUM); |
| | | headWriteCellStyle.setLeftBorderColor(IndexedColors.WHITE.getIndex()); |
| | | headWriteCellStyle.setRightBorderColor(IndexedColors.WHITE.getIndex()); |
| | | // èªå¨æ¢è¡ |
| | | headWriteCellStyle.setWrapped(true); |
| | | // æ°´å¹³å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT); |
| | | // åç´å¯¹é½æ¹å¼ |
| | | headWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | // å
容ççç¥ |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | // è¿ééè¦æå® FillPatternType 为FillPatternType.SOLID_FOREGROUND ä¸ç¶æ æ³æ¾ç¤ºèæ¯é¢è².头é»è®¤äº FillPatternTypeæä»¥å¯ä»¥ä¸æå® |
| | | // contentWriteCellStyle.setFillPatternType(FillPatternType.SQUARES); |
| | | // èæ¯ç½è² |
| | | contentWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex()); |
| | | WriteFont contentWriteFont = new WriteFont(); |
| | | // åä½å¤§å° |
| | | contentWriteFont.setFontHeightInPoints((short) 10); |
| | | // å使 ·å¼ |
| | | contentWriteFont.setFontName("Calibri"); |
| | | contentWriteCellStyle.setWriteFont(contentWriteFont); |
| | | // è¿ä¸ªçç¥æ¯ 头æ¯å¤´çæ ·å¼ å
容æ¯å
å®¹çæ ·å¼ å
¶ä»ççç¥å¯ä»¥èªå·±å®ç° |
| | | return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | } |
| | | |
| | | /** |
| | | * 设置response |
| | | * @param response |
| | | * @param targetName |
| | | * @return |
| | | */ |
| | | public static OutputStream getResponse(HttpServletResponse response, String targetName) throws IOException { |
| | | return getResponse(response,targetName,ExcelTypeEnum.XLS.getValue()); |
| | | } |
| | | |
| | | /** |
| | | * 设置response |
| | | * @param response |
| | | * @param targetName |
| | | * @param suffix æä»¶åç¼ |
| | | * @return |
| | | */ |
| | | public static OutputStream getResponse(HttpServletResponse response, String targetName,String suffix) throws IOException { |
| | | String fileName; |
| | | try { |
| | | fileName = targetName + suffix; |
| | | fileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | return response.getOutputStream(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | } |