| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.dto.InsProductResultDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.SubmitPlanDto; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | |
| | | |
| | | @Resource |
| | | FuSheUtils fuSheUtils; |
| | | |
| | | @Resource |
| | | DianLuUtils dianLuUtils; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int uploadFile(Integer orderId, MultipartFile file, String sonLaboratory, Integer sampleId) { |
| | | public Object uploadFile(Integer orderId, MultipartFile file, String sonLaboratory, Integer sampleId) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | |
| | | file.transferTo(new File(urlString)); |
| | | insOrderFile.setFileUrl(pathName); |
| | | insOrderFileMapper.insert(insOrderFile); |
| | | //如果是辐射试验(近场/远程上传的csv文件) |
| | | String[] split = filename.split("\\."); |
| | | if (ObjectUtils.isNotEmpty(sonLaboratory) && (sonLaboratory.equals("近场") || sonLaboratory.equals("远场")) && |
| | | split[split.length - 1].equals("csv")) { |
| | | //判断是哪种csv文件,是否有—— |
| | | if (sonLaboratory.equals("近场")) { |
| | | fuSheUtils.getFuSheWord1(sonLaboratory, insOrderFile); |
| | | } else { |
| | | fuSheUtils.getFuSheWord2(sonLaboratory, insOrderFile); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(sonLaboratory) && sonLaboratory.equals("近场") && split[split.length - 1].equals("csv")) { |
| | | fuSheUtils.getFuSheWord1(sonLaboratory, insOrderFile); |
| | | } else if (ObjectUtils.isNotEmpty(sonLaboratory) && sonLaboratory.equals("远场") && split[split.length - 1].equals("xlsx")) { |
| | | fuSheUtils.getFuSheWord2(sonLaboratory, insOrderFile); |
| | | } else if (ObjectUtils.isNotEmpty(sonLaboratory) && sonLaboratory.equals("电路试验") && split[split.length - 1].equals("xlsx") && filename.contains("交调")) { |
| | | dianLuUtils.readDianLuFile1(sampleId, insOrderFile); |
| | | } else if (ObjectUtils.isNotEmpty(sonLaboratory) && sonLaboratory.equals("电路试验") && split[split.length - 1].equals("csv") && filename.contains("驻波")) { |
| | | dianLuUtils.readDianLuFile2(sampleId, insOrderFile); |
| | | } |
| | | } catch (Exception e) { |
| | | System.err.println("附件上传错误"); |
| | |
| | | return list; |
| | | } |
| | | |
| | | //电路试验的保存检验内容(返回/提交) |
| | | @Override |
| | | public int saveInsContext2s(InsProductResultDtos insProductResultDtos) { |
| | | for (InsProductResultDto insProductResultDto : insProductResultDtos.getInsProductResultDtos()) { |
| | | saveInsContext2(insProductResultDto); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | //温湿度试验+功率试验的保存检验内容 |
| | | @Override |
| | | public int saveInsContext3(InsProductResult insProductResult) { |
| | |
| | | if (insOrder.getFormType().equals("原理样机")) { |
| | | //出库 |
| | | try { |
| | | outInsOrderState(laboratory, insSample.getSampleCode(), insOrder.getEntrustCode()); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, insSample.getInsOrderId())); |
| | | for (InsSample sample : insSamples) { |
| | | outInsOrderState(laboratory, sample.getSampleCode(), insOrder.getEntrustCode()); |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |