第一次改动(检验任务与样品关联,附件与样品关联,报告与样品关联)
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ£éªåé
") |
| | | @PostMapping("/upInsOrder") |
| | | //ææ¶åç¨ |
| | | public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId,String sonLaboratory) { |
| | | return Result.success(insOrderService.upInsOrder(orderId, sampleId, appointed, userId,sonLaboratory)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ·»å æ£éªä¸åæ°æ®") |
| | | @PostMapping("/addInsOrder") |
| | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "æ§è¡æ£éªæä½") |
| | | @PostMapping("/doInsOrder") |
| | | public Result<?> doInsOrder(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.doInsOrder(id, laboratory)); |
| | | public Result<?> doInsOrder(Integer sampleId, String laboratory) { |
| | | return Result.success(insOrderPlanService.doInsOrder(sampleId, laboratory)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getInsProduct") |
| | | @ApiOperation("è·åæ£éªé¡¹ç®å模æ¿å
容") |
| | | //è¿éçidå°±æ¯æ ·åid |
| | | public Result<?> getInsProduct(Integer id, Integer type, String laboratory, HttpServletRequest request) { |
| | | return Result.success(insOrderPlanService.getInsProduct(id, type, laboratory, request)); |
| | | } |
| | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "ä»»å¡äº¤æ¥") |
| | | @PostMapping("/upPlanUser") |
| | | public Result<?> upPlanUser(Integer userId, Integer orderId, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, orderId, sonLaboratory)); |
| | | public Result<?> upPlanUser(Integer userId, Integer sampleId, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, sampleId, sonLaboratory)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "å¤æäº¤æ¥çè¯éªå®¤") |
| | | @PostMapping("/upPlanUser2") |
| | | public Result<?> upPlanUser2(Integer orderId) { |
| | | return Result.success(insOrderPlanService.upPlanUser2(orderId)); |
| | | public Result<?> upPlanUser2(Integer sampleId) { |
| | | return Result.success(insOrderPlanService.upPlanUser2(sampleId)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "夿 ¸æ£éªä»»å¡") |
| | | @PostMapping("/verifyPlan") |
| | | public Result<?> verifyPlan(Integer orderId, String laboratory, Integer type, String tell) throws IOException { |
| | | return Result.success(insOrderPlanService.verifyPlan(orderId, laboratory, type, tell)); |
| | | public Result<?> verifyPlan(Integer sampleId, String laboratory, Integer type, String tell) throws IOException { |
| | | return Result.success(insOrderPlanService.verifyPlan(sampleId, laboratory, type, tell)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ ¡éªæ£éªä»»å¡æäº¤") |
| | | @PostMapping("/checkSubmitPlan") |
| | | public Result<?> checkSubmitPlan(Integer orderId, String laboratory) { |
| | | return Result.success(insOrderPlanService.checkSubmitPlan(orderId, laboratory)); |
| | | public Result<?> checkSubmitPlan(Integer sampleId, String laboratory) { |
| | | return Result.success(insOrderPlanService.checkSubmitPlan(sampleId, laboratory)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | | @ApiOperation(value = "ä¸ä¼ éä»¶") |
| | | @PostMapping("/uploadFile") |
| | | public Result<?> uploadFile(Integer orderId, MultipartFile file, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.uploadFile(orderId, file, sonLaboratory)); |
| | | public Result<?> uploadFile(Integer orderId, MultipartFile file, String sonLaboratory,Integer sampleId) { |
| | | return Result.success(insOrderPlanService.uploadFile(orderId, file, sonLaboratory,sampleId)); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä»»å¡") |
| | |
| | | @ValueAuth |
| | | @PostMapping("/getInsProduct2") |
| | | @ApiOperation("æ¥çæ£éªåå²") |
| | | //è¿éçidæ¯æ ·åid |
| | | public Result<?> getInsProduct2(Integer id, Integer type, String laboratory, HttpServletRequest request, Integer num) { |
| | | return Result.success(insOrderPlanService.getInsProduct2(id, type, laboratory, request, num)); |
| | | } |
| | |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | /*@ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æ¥åå¨çº¿ç¼å¶") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | }*/ |
| | | |
| | | @ValueClassify("æ¥åç¼å¶") |
| | | @ApiOperation(value = "æäº¤") |
| | |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥åºè¯¥è®¢å䏿¯ä¸ªç«ç¹ä¸çæ£éªæ¬¡æ°") |
| | | @ApiOperation(value = "æ¥åºè¯¥è®¢å䏿¯ä¸ªæ ·å䏿¯ä¸ªç«ç¹çæ£éªæ¬¡æ°") |
| | | @GetMapping("/getInsOrderStateCount") |
| | | public Result getInsOrderStateCount(Integer id){ |
| | | return Result.success(insReportService.getInsOrderStateCount(id)); |
| | |
| | | @Data |
| | | public class InsOrderPlanDTO extends OrderBy implements Serializable { |
| | | |
| | | @ApiModelProperty("æ£éªä»»å¡ä¸»é®id") |
| | | @ApiModelProperty("æ ·åid") |
| | | private Long insSampleId; |
| | | |
| | | @ApiModelProperty("ç¨æ·id") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InsOrderState; |
| | | import com.yuanchu.mom.pojo.InsSample; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | //æ¥è¯¢ä¸ä¸ªè®¢åä¸æææ ·åçæææ£éªä»»å¡ |
| | | public class InsOrderStateDto { |
| | | |
| | | private InsSample insSample; |
| | | |
| | | private List<InsOrderState> insOrderStates; |
| | | } |
| | |
| | | private Integer state; |
| | | |
| | | //éæ©çæ¯ä¸ªç«ç¹çç¬¬å æ¬¡æ°æ® |
| | | @NotNull |
| | | private List<InsReportDto1> insReportDto1s; |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InsReportDto1 { |
| | | |
| | | private String laboratory; |
| | | |
| | | private Integer num; |
| | | |
| | | private Integer insOrderUsersId; |
| | | private Integer sampleId; |
| | | |
| | | private List<InsReportDto2> insReportDto2s; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class InsReportDto2 { |
| | | |
| | | private String laboratory; |
| | | |
| | | private Integer num; |
| | | |
| | | private Integer insOrderUsersId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ValueTableShow(value = 3,name = "æäº¤äºº") |
| | | private String writeUserName; |
| | | |
| | |
| | | @Data |
| | | public class SubmitPlanDto { |
| | | |
| | | private Integer orderId; |
| | | private Integer sampleId; |
| | | |
| | | private String laboratory; |
| | | |
| | |
| | | */ |
| | | public interface InsOrderFileMapper extends BaseMapper<InsOrderFile> { |
| | | |
| | | IPage<InsOrderFile> getFileList(@Param("page") Page page, @Param("ew") QueryWrapper<InsOrderFile> ew , @Param("insOrderId") Integer insOrderId, @Param("sonLaboratory") String sonLaboratory); |
| | | IPage<InsOrderFile> getFileList(@Param("page") Page page, @Param("ew") QueryWrapper<InsOrderFile> ew , @Param("insOrderId") Integer insOrderId, @Param("sonLaboratory") String sonLaboratory, @Param("sampleId") Integer sampleId); |
| | | } |
| | |
| | | |
| | | import com.yuanchu.mom.pojo.InsOrderState; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public interface InsOrderStateMapper extends BaseMapper<InsOrderState> { |
| | | |
| | | |
| | | List<InsOrderState> getInsOrderStateCount(Integer id); |
| | | List<InsOrderState> getInsOrderStateCount(@Param("id") Integer id, @Param("sampleId") Integer sampleId); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | IPage<InsProduct> selectNoProducts(Page page, Integer orderId); |
| | | |
| | | int selectInsProductCountByOrderId(int orderId); |
| | | int selectInsProductCountByOrderId(int sampleId); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public interface InsReportMapper extends BaseMapper<InsReport> { |
| | | |
| | | IPage<ReportPageDto> pageInsReport(IPage<ReportPageDto> page, @Param("ew") QueryWrapper<ReportPageDto> ew, @Param("laboratory") String laboratory); |
| | | IPage<ReportPageDto> pageInsReport(IPage<ReportPageDto> page, @Param("ew") QueryWrapper<ReportPageDto> ew); |
| | | |
| | | String getLaboratoryByName(String name); |
| | | |
| | |
| | | |
| | | 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); |
| | | SampleProductDto selectSampleProductListByOrderId(Integer id); |
| | | |
| | | List<SampleProductDto> selectSampleProductListByOrderId2(Integer id); |
| | | List<SampleProductDto> selectSampleProductListByOrder2Id2(Integer id); |
| | | |
| | | List<SampleProductDto3> selectSampleProductListByOrderId3(List<Integer> ids); |
| | | |
| | | List<SampleProductDto> getInsOrderAndSample(Integer id, String laboratory); |
| | | List<SampleProductDto> getInsOrderAndSample2(Integer id, String laboratory); |
| | | SampleProductDto getInsOrderAndSample(Integer sampleId, String laboratory); |
| | | SampleProductDto getInsOrderAndSample2(Integer sampleId, String laboratory); |
| | | |
| | | String getSampleEn(String sample); |
| | | |
| | |
| | | |
| | | //æ¥è¯¢ä¸è¿æ»¤åºæçµè·¯è¯éªçæ ·å |
| | | List<InsSample> selectSample(Integer insOrderId); |
| | | |
| | | List<SampleProductDto> selectList1(Integer id); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiModelProperty("æå±ç«ç¹") |
| | | @ValueTableShow(6) |
| | | private String sonLaboratory; |
| | | |
| | | @ApiModelProperty("å
³è æ ·åå¤é®id") |
| | | private Integer insSampleId; |
| | | } |
| | |
| | | @TableField(select = false,exist = false) |
| | | private List<InsOrderUser> insOrderUserList; |
| | | |
| | | @ApiModelProperty("å
³è æ ·åå¤é®id") |
| | | private Integer insSampleId; |
| | | |
| | | } |
| | |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ ·åidid |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | /** |
| | | * ç³»ç»çææ¥åå°å |
| | | */ |
| | | private String url; |
| | |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ£éªæ ·åins_sample表id(å®é
å
³èins_order表id) |
| | | * å¤é®ï¼æ£éªæ ·åins_sample表id |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | |
| | | //çµè·¯è¯éªçä¿åæ£éªå
容 |
| | | List<Integer> saveInsContext2(InsProductResultDto insProductResultDtos); |
| | | |
| | | Map<String, Object> doInsOrder(Integer id, String laboratory); |
| | | Map<String, Object> doInsOrder(Integer sampleId, String laboratory); |
| | | |
| | | int upPlanUser(Integer userId, Integer orderId,String sonLaboratory); |
| | | int upPlanUser(Integer userId, Integer sampleId,String sonLaboratory); |
| | | |
| | | int verifyPlan(Integer orderId, String laboratory, Integer type, String tell) throws IOException; |
| | | int verifyPlan(Integer sampleId, String laboratory, Integer type, String tell) throws IOException; |
| | | |
| | | int submitPlan(SubmitPlanDto submitPlanDto); |
| | | |
| | | List<InsProduct> getInsProduct(Integer id, Integer type, String laboratory, HttpServletRequest request); |
| | | List<InsProduct> getInsProduct2(Integer id, Integer type, String laboratory, HttpServletRequest request,Integer num); |
| | | |
| | | List<String> checkSubmitPlan(Integer orderId, String laboratory); |
| | | List<String> checkSubmitPlan(Integer sampleId, String laboratory); |
| | | |
| | | Map<String,Object> getFileList(Page page, InsOrderFile insOrderFile); |
| | | |
| | | int uploadFile(Integer orderId, MultipartFile file,String sonLaboratory); |
| | | int uploadFile(Integer orderId, MultipartFile file,String sonLaboratory,Integer sampleId); |
| | | |
| | | List<String> upPlanUser2(Integer orderId); |
| | | List<String> upPlanUser2(Integer sampleId); |
| | | |
| | | int deleteInsContext(InsProductResultVo insProductResultVo); |
| | | |
| | |
| | | //è·åå使£éªä¸åæ°æ® |
| | | Map<String, Object> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto); |
| | | |
| | | //åé
ç«ç¹ |
| | | int upInsOrder(Integer orderId,Integer sampleId, String appointed, Integer userId,String sonLaboratory); |
| | | |
| | | int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing, List<MultipartFile> files); |
| | | |
| | | Map<String, Object> getInsOrder(Integer id); |
| | |
| | | |
| | | int upInsOrderOfState2(InsOrder insOrder); |
| | | |
| | | Map<String, Object> getInsOrderAndSample(Integer id, String laboratory); |
| | | Map<String, Object> getInsOrderAndSample(Integer sampleId, String laboratory); |
| | | |
| | | Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto); |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.InsOrderStateDto; |
| | | import com.yuanchu.mom.dto.InsReportDto; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.pojo.InsOrderState; |
| | |
| | | //æ¯å¦çææ»æ¥å |
| | | int isReport(InsReportDto insReportDto); |
| | | |
| | | //æ¥åºè¯¥è®¢å䏿¯ä¸ªç«ç¹ä¸çæ£éªæ¬¡æ° |
| | | List<InsOrderState> getInsOrderStateCount(Integer id); |
| | | //æ¥åºè¯¥è®¢å䏿¯ä¸ªæ ·å䏿¯ä¸ªç«ç¹ä¸çæ£éªæ¬¡æ° |
| | | List<InsOrderStateDto> getInsOrderStateCount(Integer id); |
| | | } |
| | |
| | | private ShiftTimeMapper shiftTimeMapper; |
| | | @Resource |
| | | private PerformanceShiftMapper performanceShiftMapper; |
| | | @Resource |
| | | private WarehouseHistoryMapper warehouseHistoryMapper; |
| | | |
| | | @Resource |
| | | private WarehouseService warehouseService; |
| | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${twoCode}") |
| | | private String twoCode; |
| | | |
| | | @Resource |
| | | WordUtils wordUtils; |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | | |
| | | @Resource |
| | | private InsProductResultMapper insProductResultMapper; |
| | |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private CustomMapper customMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> doInsOrder(Integer id, String laboratory) { |
| | | public Map<String, Object> doInsOrder(Integer sampleId, String laboratory) { |
| | | InsSample insSample = insSampleMapper.selectById(sampleId); |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(id); |
| | | InsOrder order = insOrderMapper.selectById(id); |
| | | insOrder.setId(insSample.getInsOrderId()); |
| | | InsOrder order = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | if (BeanUtil.isEmpty(order.getInsTime())) { |
| | | insOrder.setInsTime(LocalDateTime.now()); |
| | | insOrder.setInsTime(LocalDateTime.now());//订åçæ£éªæ¶é´ |
| | | insOrderMapper.updateById(insOrder); |
| | | //æ´æ°æ£éªä»»å¡è¡¨çæ£éªæ¶é´ |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, id) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, sampleId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsTime, LocalDateTime.now()) |
| | | .set(InsOrderState::getInsState, 1)); |
| | | } |
| | | Map<String, Object> map = insOrderService.getInsOrderAndSample(id, laboratory); |
| | | Map<String, Object> map = insOrderService.getInsOrderAndSample(sampleId, laboratory); |
| | | List<SampleProductDto> list = JSON.parseArray(JSON.toJSONString(map.get("sampleProduct")), SampleProductDto.class); |
| | | map.put("sampleProduct", list); |
| | | return map; |
| | |
| | | insProduct.setInsProductResult(insProductResult); |
| | | } |
| | | } |
| | | /*if (insProducts.size() == 0) { |
| | | insProducts = insSampleMapper.getIns2Product1(id, laboratory); |
| | | }*/ |
| | | break; |
| | | case 1: |
| | | //å
纤带 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> checkSubmitPlan(Integer orderId, String laboratory) { |
| | | public List<String> checkSubmitPlan(Integer sampleId, String laboratory) { |
| | | List<String> collect = new ArrayList<>(); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getSonLaboratory, laboratory) |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsResult, 0)); |
| | |
| | | Integer insOrderId = insOrderFile.getInsOrderId(); |
| | | insOrderFile.setInsOrderId(null); |
| | | String sonLaboratory = null; |
| | | Integer sampleId = null; |
| | | if (ObjectUtils.isNotEmpty(insOrderFile.getSonLaboratory())) { |
| | | sonLaboratory = insOrderFile.getSonLaboratory(); |
| | | insOrderFile.setSonLaboratory(null); |
| | | } |
| | | IPage<InsOrderFile> insOrderFileIPage = insOrderFileMapper.getFileList(page, QueryWrappers.queryWrappers(insOrderFile), insOrderId, sonLaboratory); |
| | | if (ObjectUtils.isNotEmpty(insOrderFile.getInsSampleId())) { |
| | | sampleId = insOrderFile.getInsSampleId(); |
| | | insOrderFile.setInsSampleId(null); |
| | | } |
| | | IPage<InsOrderFile> insOrderFileIPage = insOrderFileMapper.getFileList(page, QueryWrappers.queryWrappers(insOrderFile), insOrderId, sonLaboratory,sampleId); |
| | | map.put("body", insOrderFileIPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int uploadFile(Integer orderId, MultipartFile file, String sonLaboratory) { |
| | | public int uploadFile(Integer orderId, MultipartFile file, String sonLaboratory, Integer sampleId) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | |
| | | String contentType = file.getContentType(); |
| | | InsOrderFile insOrderFile = new InsOrderFile(); |
| | | insOrderFile.setInsOrderId(orderId); |
| | | if (ObjectUtils.isNotEmpty(sampleId)) { |
| | | insOrderFile.setInsSampleId(sampleId); |
| | | } |
| | | insOrderFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = file.getOriginalFilename().replace("#", "&"); |
| | | pathName = UUID.randomUUID() + "_"+file.getOriginalFilename().replace("#", "&"); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | insOrderFile.setFileUrl(pathName); |
| | | if (ObjectUtils.isNotEmpty(sonLaboratory)) { |
| | | insOrderFile.setSonLaboratory(sonLaboratory); |
| | | //å é¤éå¤çæ°æ® |
| | | insOrderFileMapper.delete(Wrappers.<InsOrderFile>lambdaQuery() |
| | | .eq(InsOrderFile::getInsOrderId, orderId) |
| | | .eq(InsOrderFile::getType, insOrderFile.getType()) |
| | | .eq(InsOrderFile::getFileName, insOrderFile.getFileName()) |
| | | .eq(InsOrderFile::getSonLaboratory, insOrderFile.getSonLaboratory()) |
| | | .eq(InsOrderFile::getFileUrl, insOrderFile.getFileUrl())); |
| | | } else { |
| | | //å é¤éå¤çæ°æ® |
| | | insOrderFileMapper.delete(Wrappers.<InsOrderFile>lambdaQuery() |
| | | .eq(InsOrderFile::getInsOrderId, orderId) |
| | | .eq(InsOrderFile::getType, insOrderFile.getType()) |
| | | .eq(InsOrderFile::getFileName, insOrderFile.getFileName()) |
| | | .isNull(InsOrderFile::getSonLaboratory) |
| | | .eq(InsOrderFile::getFileUrl, insOrderFile.getFileUrl())); |
| | | } |
| | | insOrderFileMapper.insert(insOrderFile); |
| | | //妿æ¯è¾å°è¯éª(è¿åº/è¿ç¨ä¸ä¼ çcsvæä»¶) |
| | | String[] split = filename.split("\\."); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> upPlanUser2(Integer orderId) { |
| | | List<Integer> sampleId = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)).stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<String> sonLaboratory = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).in(InsProduct::getInsSampleId, sampleId)).stream().map(InsProduct::getSonLaboratory).distinct().collect(Collectors.toList()); |
| | | public List<String> upPlanUser2(Integer sampleId) { |
| | | List<String> sonLaboratory = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sampleId)) |
| | | .stream().map(InsProduct::getSonLaboratory).distinct().collect(Collectors.toList()); |
| | | return sonLaboratory; |
| | | } |
| | | |
| | |
| | | /*æ ·åå
¥åº*/ |
| | | warehouseService.inWarehouse(trees, sampleCode); |
| | | /*æ°å¢æ£éªä»»å¡*/ |
| | | //å
å¤æè¯¥è®¢åæ¯å¦æè¿ä¸ªç«ç¹çé¡¹ç® |
| | | //å
å¤æè¯¥æ ·åæ¯å¦æè¿ä¸ªç«ç¹çé¡¹ç® |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, sampleCode)); |
| | | List<Integer> sampleIds = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insSample.getInsOrderId())).stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<String> collect = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, sampleIds)).stream().map(InsProduct::getSonLaboratory).collect(Collectors.toList()); |
| | | .eq(InsProduct::getInsSampleId, insSample.getId())).stream().map(InsProduct::getSonLaboratory).collect(Collectors.toList()); |
| | | if (!collect.contains(sonLaboratory)) { |
| | | throw new ErrorException("è¯¥è®¢åæ²¡æ" + sonLaboratory + "ç«ç¹çç¸å
³é¡¹ç®,请æ¥çä¸å详æ
!"); |
| | | throw new ErrorException("è¯¥æ ·åæ²¡æ" + sonLaboratory + "ç«ç¹çç¸å
³é¡¹ç®,请æ¥çä¸å详æ
!"); |
| | | } |
| | | //å¤æè¯¥è®¢åæ¯å¦ç«ç¹ä»»å¡æç»æè¯éª |
| | | //å¤æè¯¥è®¢åæ¯å¦ç«ç¹ä»»å¡æç»æè¯éª(åªè¦ä»»ä¸ä»»å¡ç»æè¯éªé½ä¸è½å次è¯éª) |
| | | List<InsOrderState> orderStates = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsState, 5)); |
| | |
| | | } |
| | | InsOrderState orderState = insOrderStateMapper.selectOne(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, insSample.getId()) |
| | | .eq(InsOrderState::getLaboratory, sonLaboratory)); |
| | | if (ObjectUtils.isNotEmpty(orderState)) { |
| | | //ç»§ç»è¯éª |
| | |
| | | } else { |
| | | InsOrderState insOrderState = new InsOrderState(); |
| | | insOrderState.setInsOrderId(insSample.getInsOrderId()); |
| | | insOrderState.setInsOrderId(insSample.getId()); |
| | | insOrderState.setLaboratory(sonLaboratory); |
| | | insOrderState.setInsState(0); |
| | | insOrderState.setNum(1);//åå§æ¯ç¬¬ä¸æ¬¡ |
| | |
| | | @Override |
| | | public int outInsOrderState(String sonLaboratory, String sampleCode) { |
| | | //å¤æè¯¥æ ·åçæ£éªä»»å¡æ¯å¦å·²ç»ç»æ(ç»§ç»è¯éªæè
æ¯ç»æè¯éª) |
| | | //å
å¤æè¯¥è®¢åæ¯å¦æè¿ä¸ªç«ç¹çé¡¹ç® |
| | | //å
å¤æè¯¥æ ·åæ¯å¦æè¿ä¸ªç«ç¹çé¡¹ç® |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, sampleCode)); |
| | | List<Integer> sampleIds = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insSample.getInsOrderId())).stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<String> collect = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, sampleIds)).stream().map(InsProduct::getSonLaboratory).collect(Collectors.toList()); |
| | | .eq(InsProduct::getInsSampleId, insSample.getId())).stream().map(InsProduct::getSonLaboratory).collect(Collectors.toList()); |
| | | if (!collect.contains(sonLaboratory)) { |
| | | throw new ErrorException("è¯¥è®¢åæ²¡æ" + sonLaboratory + "ç«ç¹çç¸å
³é¡¹ç®,请æ¥çä¸å详æ
!"); |
| | | throw new ErrorException("è¯¥æ ·åæ²¡æ" + sonLaboratory + "ç«ç¹çç¸å
³é¡¹ç®,请æ¥çä¸å详æ
!"); |
| | | } |
| | | //å¤æè¯¥è®¢åæ¯å¦ç«ç¹ä»»å¡æ(ç»§ç»è¯éªæè
æ¯ç»æè¯éª) |
| | | List<InsOrderState> orderStates = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsState, 5)); |
| | | .eq(InsOrderState::getInsState, 5));//ç»æè¯éª |
| | | if (CollectionUtils.isEmpty(orderStates)) { |
| | | List<InsOrderState> orderStates1 = insOrderStateMapper.selectList(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, insSample.getId()) |
| | | .eq(InsOrderState::getLaboratory, sonLaboratory) |
| | | .eq(InsOrderState::getInsState, 6)); |
| | | .eq(InsOrderState::getInsState, 6));//ç»§ç»è¯éª |
| | | if (CollectionUtils.isEmpty(orderStates1)) { |
| | | throw new ErrorException("è¯¥æ ·åçæ£éªä»»å¡è¿æ²¡æç»æè¯éªæç»§ç»è¯éª,ææ¶æ æ³åºåº!"); |
| | | } |
| | |
| | | int pId = Integer.parseInt(res.replaceAll("\\D+", "")); |
| | | InsProduct insProduct = insProductMapper.selectById(pId); |
| | | // éè¿æ ·æ¬idè·å订åid |
| | | int orderId = insSampleMapper.selectById(insProduct.getInsSampleId()).getInsOrderId(); |
| | | int count = insProductMapper.selectInsProductCountByOrderId(orderId); |
| | | InsSample insSample = insSampleMapper.selectById(insProduct.getInsSampleId()); |
| | | int orderId = insSample.getInsOrderId(); |
| | | int count = insProductMapper.selectInsProductCountByOrderId(insSample.getId()); |
| | | if (count == 0) { |
| | | insOrderStateMapper.update(new InsOrderState(), Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getInsSampleId, insSample.getId()) |
| | | .eq(InsOrderState::getLaboratory, insProduct.getSonLaboratory()) |
| | | .set(InsOrderState::getInsState, 2)); |
| | | } |
| | |
| | | InsOrder insOrder = insOrderMapper.selectById(insProductResultDtos.getOrderId()); |
| | | InsOrderState orderState = insOrderStateMapper.selectOne(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insProductResultDtos.getOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, insProductResultDtos.getSampleId()) |
| | | .eq(InsOrderState::getLaboratory, insProductResultDtos.getSonLaboratory()) |
| | | .orderByDesc(InsOrderState::getId) |
| | | .last("LIMIT 1"));// ç¡®ä¿åªå䏿¡è®°å½ |
| | |
| | | if (count == 0) { |
| | | insOrderStateMapper.update(new InsOrderState(), Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, insProductResultDtos.getOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, insProductResultDtos.getSampleId()) |
| | | .eq(InsOrderState::getLaboratory, insProductResultDtos.getSonLaboratory()) |
| | | .set(InsOrderState::getInsState, 2)); |
| | | } |
| | |
| | | |
| | | //äº¤æ¥ |
| | | @Override |
| | | public int upPlanUser(Integer userId, Integer orderId, String sonLaboratory) { |
| | | public int upPlanUser(Integer userId, Integer sampleId, String sonLaboratory) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setUserId(userId); |
| | | insSampleUser.setInsSampleId(orderId); |
| | | insSampleUser.setInsSampleId(sampleId); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setSonLaboratory(sonLaboratory); |
| | | return insSampleUserMapper.insert(insSampleUser); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int verifyPlan(Integer orderId, String laboratory, Integer type, String tell) throws IOException { |
| | | public int verifyPlan(Integer sampleId, String laboratory, Integer type, String tell) throws IOException { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | List<InsUnPass> insUnPasses = new ArrayList<>(); |
| | | /*æ ·åä¸ç项ç®åªè¦æä¸ä¸ªé¡¹ç®ä¸åæ ¼åæ£éªç»æä¸º0,å¦å为1*/ |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | for (InsSample insSample : samples) { |
| | | InsSample insSample = insSampleMapper.selectById(sampleId); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getSonLaboratory, laboratory) |
| | |
| | | } |
| | | insSampleMapper.updateById(insSample); |
| | | /*夿 ¸åï¼å°ä¸åæ ¼ç项ç®ä¿¡æ¯æ·»å å°ins_un_pass表ä¸*/ |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | for (InsProduct insProduct : insProducts) { |
| | | if (insProduct.getInsResult() == 0) { |
| | | InsUnPass insUnPass = new InsUnPass(); |
| | |
| | | insUnPass.setInspectionItem(insProduct.getInspectionItem()); |
| | | insUnPass.setInspectionItemSubclass(insProduct.getInspectionItemSubclass()); |
| | | insUnPass.setLastValue(insProduct.getLastValue()); |
| | | insUnPass.setEntrustCode(insOrderMapper.selectById(orderId).getEntrustCode()); |
| | | insUnPass.setEntrustCode(insOrder.getEntrustCode()); |
| | | List<Integer> userIds = insProductUserMapper.selectList(Wrappers.<InsProductUser>lambdaQuery().eq(InsProductUser::getInsProductId, insProduct.getId())).stream().map(InsProductUser::getCreateUser).distinct().collect(Collectors.toList()); |
| | | String name = userMapper.selectBatchIds(userIds).stream().map(User::getName).collect(Collectors.joining(",")); |
| | | insUnPass.setName(name); |
| | | insUnPasses.add(insUnPass); |
| | | } |
| | | } |
| | | } |
| | | insUnPassService.saveBatch(insUnPasses); |
| | | /*type=0 忬¡è¯éª; type=1 ç»§ç»è¯éª ; type=2 ç»æè¯éª*/ |
| | | // æ¥è¯¢æ ¹æ® id ååºæåçç¬¬ä¸æ¡è®°å½ |
| | | InsOrderState record = insOrderStateMapper.selectOne(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, sampleId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .orderByDesc(InsOrderState::getId) |
| | | .last("LIMIT 1")); // ç¡®ä¿åªå䏿¡è®°å½ |
| | |
| | | case 1: |
| | | //ç»§ç»è¯éª:该ç«ç¹ä»»å¡ç»æ(å¯ä»¥å次æ«ç æ£éª)ï¼ |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, sampleId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsState, 6) |
| | | .set(InsOrderState::getVerifyTell, tell) |
| | |
| | | case 2: |
| | | //ç»æè¯éª:æ¤å§æå忢è¯éª(æ æ³å次æ£éª)ã |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, sampleId) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsState, 5) |
| | | .set(InsOrderState::getVerifyTell, tell) |
| | | .set(InsOrderState::getVerifyUser, userId)); |
| | | //å¦æè®¢åç±»åæ¯åçæ ·æº,å该订åç´æ¥éç¯ |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | if (insOrder.getFormType().equals("åçæ ·æº")) { |
| | | for (InsSample sample : samples) { |
| | | //åºåº |
| | | try { |
| | | outInsOrderState(laboratory, sample.getSampleCode()); |
| | | outInsOrderState(laboratory, insSample.getSampleCode()); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | insOrder.setState(4); |
| | | insOrderMapper.updateById(insOrder); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public int submitPlan(SubmitPlanDto submitPlanDto) { |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, submitPlanDto.getOrderId()).select(InsSample::getId)); |
| | | InsSample insSample = insSampleMapper.selectById(submitPlanDto.getSampleId()); |
| | | InsOrderState orderState = insOrderStateMapper.selectOne(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, submitPlanDto.getOrderId()) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, submitPlanDto.getSampleId()) |
| | | .eq(InsOrderState::getLaboratory, submitPlanDto.getLaboratory()) |
| | | .orderByDesc(InsOrderState::getId) |
| | | .last("LIMIT 1"));// ç¡®ä¿åªå䏿¡è®°å½ |
| | |
| | | insOrderUser.setNote(ObjectUtils.isNotEmpty(submitPlanDto.getNote()) ? submitPlanDto.getNote() : null); |
| | | insOrderUser.setTerm(ObjectUtils.isNotEmpty(submitPlanDto.getTerm()) ? submitPlanDto.getTerm() : null); |
| | | insOrderUserMapper.insert(insOrderUser); |
| | | List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getSonLaboratory, submitPlanDto.getLaboratory()) |
| | | .eq(InsProduct::getState, 1) |
| | | .and(wrapper -> wrapper |
| | | .isNull(InsProduct::getInsResult) |
| | | .or() |
| | | .eq(InsProduct::getInsResult, 2) |
| | | )); |
| | | .eq(InsProduct::getState, 1)); |
| | | if (insProducts.size() > 0) { |
| | | String str = ""; |
| | | int count = 0; |
| | |
| | | } |
| | | } |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, submitPlanDto.getOrderId()) |
| | | .eq(InsOrderState::getInsOrderId, insSample.getInsOrderId()) |
| | | .eq(InsOrderState::getInsSampleId, submitPlanDto.getSampleId()) |
| | | .eq(InsOrderState::getLaboratory, submitPlanDto.getLaboratory()) |
| | | .set(InsOrderState::getInsState, 3) |
| | | .set(InsOrderState::getVerifyUser, submitPlanDto.getVerifyUser())); |
| | | InsOrder insOrder = insOrderMapper.selectById(submitPlanDto.getOrderId()); |
| | | /*è¿ä¸ªæ
åµå
å
³é----妿æ¯C类订å䏿¯ä¸åå°è´¨éé¨,åç´æ¥å¤æ ¸éè¿(ç»æè¯éª)*/ |
| | | // if (insOrder.getOrderType().equals("C") && insOrder.getDepartmentLims().equals("è´¨éé¨")) { |
| | | // try { |
| | | // verifyPlan(orderId, laboratory, 2, null); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } else { |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | //LIMSç³»ç»æ¶æ¯æ¨é |
| | | InformationNotification info = new InformationNotification(); |
| | |
| | | map.put("enable_id_trans", 0);//æ¯å¦å¼å¯id转è¯.0å¦ |
| | | map.put("enable_duplicate_check", 0);//æ¯å¦å¼å¯é夿¶æ¯æ£æ¥.0å¦ |
| | | qywxApi.send(map); |
| | | // } |
| | | //夿 ¸äºº--æ£éªåç¸å
³è´è´£äºº |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setUserId(submitPlanDto.getVerifyUser()); |
| | | insSampleUser.setInsSampleId(submitPlanDto.getOrderId()); |
| | | insSampleUser.setInsSampleId(submitPlanDto.getSampleId()); |
| | | insSampleUser.setState(1); |
| | | insSampleUser.setSonLaboratory(submitPlanDto.getLaboratory()); |
| | | insSampleUserMapper.insert(insSampleUser); |
| | |
| | | @Resource |
| | | InsProductResultMapper insProductResultMapper; |
| | | @Resource |
| | | private WarehouseHistoryMapper warehouseHistoryMapper; |
| | | @Resource |
| | | private InsProductMapper insProductMapper; |
| | | @Resource |
| | | private InsProductService insProductService; |
| | | @Resource |
| | | private InsProductUserMapper insProductUserMapper; |
| | | @Resource |
| | | private GiveCode giveCode; |
| | | @Resource |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | InformationNotificationService informationNotificationService; |
| | | @Resource |
| | |
| | | }); |
| | | map.put("body", sampleOrderDtoIPage); |
| | | return map; |
| | | } |
| | | |
| | | //åé
ç«ç¹ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId, String sonLaboratory) { |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(orderId); |
| | | //insOrder.setAppointed(LocalDate.parse(appointed)); |
| | | insOrder.setSendTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(insOrder); |
| | | //ä¿®æ¹æåªç»å½åéæ©çè¯éªå®¤ä¸ååå |
| | | InsOrderState insOrderState = new InsOrderState(); |
| | | insOrderState.setInsOrderId(orderId); |
| | | insOrderState.setLaboratory(sonLaboratory); |
| | | insOrderState.setInsState(0); |
| | | insOrderState.setNum(1);//åå§æ¯ç¬¬ä¸æ¬¡ |
| | | insOrderStateMapper.insert(insOrderState); |
| | | //è¿éæ¯å¨ç»åé
çæå®ç人åè¯éªå®¤ä¸åæ£éªäºº |
| | | if (userId != null) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setUserId(userId); |
| | | insSampleUser.setInsSampleId(orderId); |
| | | insSampleUser.setSonLaboratory(sonLaboratory); |
| | | insSampleUserMapper.insert(insSampleUser); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename().replace("#", "&"); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | insOrderFile.setFileUrl(pathName); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) { |
| | | public Map<String, Object> getInsOrderAndSample(Integer sampleId, String laboratory) { |
| | | InsSample insSample = insSampleMapper.selectById(sampleId); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | InsOrder insOrder = insOrderMapper.selectById2(id); |
| | | List<SampleProductDto> insSamples = insSampleMapper.selectList1(insOrder.getId()); |
| | | List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory); |
| | | InsOrder insOrder = insOrderMapper.selectById2(insSample.getInsOrderId()); |
| | | SampleProductDto sampleProductDto = insSampleMapper.getInsOrderAndSample(sampleId, laboratory); |
| | | //忬¡è¯éªä¼åºç°ä¸ºç©ºçæ
åµ |
| | | if (list.size() != insSamples.size()) { |
| | | List<Integer> ids = list.stream().map(sampleProductDto -> sampleProductDto.getId()).distinct().collect(Collectors.toList()); |
| | | List<SampleProductDto> samples = insSamples.stream().filter(insSample -> |
| | | !ids.contains(insSample.getId()) |
| | | ).collect(Collectors.toList()); |
| | | for (SampleProductDto insSample : samples) { |
| | | if (ObjectUtils.isEmpty(sampleProductDto)) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1) |
| | |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId()).isNull(InsProductResult::getNum)); |
| | | insProduct.setInsProductResult(insProductResult); |
| | | } |
| | | insSample.setInsProduct(insProducts); |
| | | list.add(insSample); |
| | | BeanUtils.copyProperties(insSample,sampleProductDto); |
| | | sampleProductDto.setInsProduct(insProducts); |
| | | } |
| | | |
| | | } |
| | | 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)); |
| | |
| | | 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("sampleProduct", sampleProductDto); |
| | | //æ¥è¯¢ææè®°å½æ¨¡çå»é |
| | | List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(id, laboratory); |
| | | List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(insSample.getInsOrderId(), laboratory); |
| | | map.put("reportModel", list2); |
| | | return map; |
| | | } |
| | |
| | | import com.itextpdf.text.pdf.PdfStamper; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.InsReportDto; |
| | | import com.yuanchu.mom.dto.InsReportDto1; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.*; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | |
| | | map.put("head", PrintChina.printChina(ReportPageDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageInsReport"); |
| | | if (map1.get("look") == 1) reportPageDto.setCreateUser(map1.get("userId")); |
| | | User user = userMapper.selectById(map1.get("userId"));//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto), laboratory)); |
| | | map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto))); |
| | | return map; |
| | | } |
| | | |
| | |
| | | if (files != null) { |
| | | for (File f : files) { |
| | | // æ ¹æ®æä»¶åæ¥è¯¢id |
| | | String name = f.getName(); |
| | | InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().like(InsReport::getCode, f.getName().replace(".docx", ""))); |
| | | if (ObjectUtils.isEmpty(insReport)) { |
| | | throw new ErrorException("æ²¡ææ¾å° " + f.getName() + " è¿ä¸ªæä»¶å¯¹åºçæ¥åæ°æ®"); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int isReport(InsReportDto insReportDto) { |
| | | //å
å¤æè¯¥è®¢åæ¯å¦å¯ä»¥å»ç产æ¥å |
| | | Long count = insOrderStateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery().eq(InsOrderState::getInsOrderId, insReportDto.getId()).eq(InsOrderState::getInsState, 5)); |
| | | //å
å¤æè¯¥è®¢åæ¯å¦å¯ä»¥å»ç产æ¥å(æ¯å¦ç»æè¯éª) |
| | | Long count = insOrderStateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, insReportDto.getId()).eq(InsOrderState::getInsState, 5)); |
| | | if (count > 0) { |
| | | if (insReportDto.getState() == 1) { |
| | | List<InsReportDto1> insReportDto1s = insReportDto.getInsReportDto1s(); |
| | | wordUtils.generateReport(insReportDto.getId(), insReportDto1s); |
| | | } else { |
| | | //ç»æè®¢å |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(insReportDto.getId()); |
| | | insOrder.setState(4); |
| | | insOrderMapper.updateById(insOrder); |
| | | for (InsReportDto1 insReportDto1 : insReportDto1s) { |
| | | wordUtils.generateReport(insReportDto.getId(), insReportDto1); |
| | | } |
| | | } else { |
| | | throw new ErrorException("该订åè¿æªç»æè¯éª,æ æ³ç产æ¥å!"); |
| | | //妿ä¸çæå°±ä¸ç´æç |
| | | } |
| | | } else { |
| | | throw new ErrorException("该订åè¿æªç»æè¯éª,æ æ³çææ¥å!"); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //æ¥åºè¯¥è®¢å䏿¯ä¸ªç«ç¹ä¸çæ£éªæ¬¡æ° |
| | | @Override |
| | | public List<InsOrderState> getInsOrderStateCount(Integer id) { |
| | | List<InsOrderState> insOrderStates = insOrderStateMapper.getInsOrderStateCount(id); |
| | | return insOrderStates; |
| | | public List<InsOrderStateDto> getInsOrderStateCount(Integer id) { |
| | | List<InsOrderStateDto> insOrderStateDtos = new ArrayList<>(); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, id)); |
| | | for (InsSample insSample : insSamples) { |
| | | InsOrderStateDto insOrderStateDto = new InsOrderStateDto(); |
| | | insOrderStateDto.setInsSample(insSample); |
| | | List<InsOrderState> insOrderStates = insOrderStateMapper.getInsOrderStateCount(id, insSample.getId()); |
| | | insOrderStateDto.setInsOrderStates(insOrderStates); |
| | | insOrderStateDtos.add(insOrderStateDto); |
| | | } |
| | | return insOrderStateDtos; |
| | | } |
| | | |
| | | |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.InsOrderFileMapper; |
| | | import com.yuanchu.mom.mapper.InsOrderMapper; |
| | | import com.yuanchu.mom.mapper.InsSampleMapper; |
| | | import com.yuanchu.mom.pojo.InsOrder; |
| | | import com.yuanchu.mom.pojo.InsOrderFile; |
| | | import com.yuanchu.mom.pojo.InsSample; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.openxml4j.util.ZipSecureFile; |
| | |
| | | |
| | | @Resource |
| | | InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | InsSampleMapper insSampleMapper; |
| | | |
| | | public void getFuSheWord1(String sonLaboratory, InsOrderFile insOrderFile) { |
| | | //读åexcelæä»¶å
容 |
| | |
| | | default: |
| | | System.out.print("NULL\t"); |
| | | } |
| | | } |
| | | else { |
| | | } else { |
| | | switch (cell.getCellType()) { |
| | | case STRING: |
| | | if (StringUtils.isNotEmpty(s)) { |
| | |
| | | } |
| | | // è¾åºå°æä»¶ |
| | | try { |
| | | InsOrder insOrder = insOrderMapper.selectById(insOrderFile.getInsOrderId()); |
| | | InsSample insSample = insSampleMapper.selectById(insOrderFile.getInsSampleId()); |
| | | String[] split = insOrderFile.getFileName().split("\\."); |
| | | String name = insOrderFile.getFileName().substring(0, (insOrderFile.getFileName().length() - split[split.length - 1].length())); |
| | | FileOutputStream out = new FileOutputStream(wordUrl + "/" + insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | FileOutputStream out = new FileOutputStream(wordUrl + "/" + UUID.randomUUID() + "_" + insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | document.write(out); |
| | | out.close(); |
| | | document.close(); |
| | | InsOrderFile orderFile = new InsOrderFile(); |
| | | orderFile.setInsOrderId(insOrderFile.getInsOrderId()); |
| | | orderFile.setFileUrl(insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setInsSampleId(insOrderFile.getInsSampleId()); |
| | | orderFile.setFileUrl(UUID.randomUUID() + "_" + insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setType(2); |
| | | orderFile.setFileName(insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setFileName(insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setSonLaboratory(sonLaboratory); |
| | | insOrderFileMapper.insert(orderFile); |
| | | } catch (IOException e) { |
| | |
| | | XWPFParagraph paragraph18 = table1.getRow(1).getCell(0).getParagraphArray(0); |
| | | XWPFRun run18 = paragraph18.createRun(); |
| | | run18.setText("颿®µï¼ "+result1+"MHz "+"ä¸å¾è§"+result); |
| | | |
| | | |
| | | |
| | | List<String> collect = Arrays.stream(split).collect(Collectors.toList()); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | XWPFParagraph paragraph3 = table.getRow(0).getCell(3).getParagraphArray(0); |
| | | XWPFRun run3 = paragraph3.createRun(); |
| | | run3.setText(bz.get(s2).toString()); |
| | |
| | | |
| | | // è¾åºå°æä»¶ |
| | | try { |
| | | InsOrder insOrder = insOrderMapper.selectById(insOrderFile.getInsOrderId()); |
| | | InsSample insSample = insSampleMapper.selectById(insOrderFile.getInsSampleId()); |
| | | String[] split = insOrderFile.getFileName().split("\\."); |
| | | String name = insOrderFile.getFileName().replace("#","&").substring(0, (insOrderFile.getFileName().length() - split[split.length - 1].length())); |
| | | FileOutputStream out = new FileOutputStream(wordUrl + "/" + insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | FileOutputStream out = new FileOutputStream(wordUrl + "/" + UUID.randomUUID() + "_" + insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | document.write(out); |
| | | out.close(); |
| | | document.close(); |
| | | InsOrderFile orderFile = new InsOrderFile(); |
| | | orderFile.setInsOrderId(insOrderFile.getInsOrderId()); |
| | | orderFile.setFileUrl(insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setInsSampleId(insOrderFile.getInsSampleId()); |
| | | orderFile.setFileUrl(UUID.randomUUID() + "_" + insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setType(2); |
| | | orderFile.setFileName(insOrder.getEntrustCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setFileName(insSample.getSampleCode() + "&" + sonLaboratory + name + "è§£æçè¾å°ç«ç¹æ¥å.docx"); |
| | | orderFile.setSonLaboratory(sonLaboratory); |
| | | insOrderFileMapper.insert(orderFile); |
| | | } catch (IOException e) { |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.util.TableTools; |
| | | import com.yuanchu.mom.dto.InsReportDto1; |
| | | import com.yuanchu.mom.dto.InsReportDto2; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.*; |
| | |
| | | @Resource |
| | | InsSampleUserMapper insSampleUserMapper; |
| | | |
| | | @Resource |
| | | GiveCode giveCode; |
| | | |
| | | |
| | | //çæç«ç¹çµè·¯è¯éªæ¥å |
| | | public void generateWord(String term, InsOrderState insOrderState) { |
| | |
| | | List<Map<String, Object>> tables = new ArrayList<>(); |
| | | //æ¥è¯¢è®¢å |
| | | InsOrder insOrder = insOrderMapper.selectById(insOrderState.getInsOrderId()); |
| | | //æ¥è¯¢ä¸è¿æ»¤åºæçµè·¯è¯éªçæ ·å |
| | | List<InsSample> insSamples = insSampleMapper.selectSample(insOrderState.getInsOrderId()); |
| | | insSamples.forEach(insSample -> { |
| | | //æ¥è¯¢æ ·å |
| | | InsSample insSample = insSampleMapper.selectById(insOrderState.getInsSampleId()); |
| | | //æ¥è¯¢é¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | |
| | | tables.add(table); |
| | | lable.getAndIncrement(); |
| | | }); |
| | | }); |
| | | |
| | | ZipSecureFile.setMinInflateRatio(0.0001); |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word1.docx"); |
| | | |
| | |
| | | put("title", title); |
| | | put("tables", tables); |
| | | }}); |
| | | String name = insOrder.getEntrustCode().replace("/", "") + "-" + title + ".docx"; |
| | | String name = insOrder.getEntrustCode().replace("/", "") + "-" +insSample.getSampleCode()+"-"+ title + ".docx"; |
| | | String url = UUID.randomUUID() + "_" + name; |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + url))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | // å¤çåå¹¶åå
æ ¼çé®é¢ |
| | | String path = wordUrl + "/" + name; |
| | | String path = wordUrl + "/" + url; |
| | | try { |
| | | ZipSecureFile.setMinInflateRatio(0.0001); |
| | | FileInputStream stream = new FileInputStream(path); |
| | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | InsOrderFile insOrderFile = new InsOrderFile(); |
| | | insOrderFile.setInsOrderId(insOrderState.getInsOrderId()); |
| | | insOrderFile.setInsSampleId(insOrderState.getInsSampleId()); |
| | | insOrderFile.setFileName(name); |
| | | insOrderFile.setType(2); |
| | | insOrderFile.setFileUrl(name); |
| | | insOrderFile.setFileUrl(url); |
| | | insOrderFile.setSonLaboratory("çµè·¯è¯éª"); |
| | | insOrderFileMapper.insert(insOrderFile); |
| | | } |
| | | |
| | | //çææ»æ¥å |
| | | public void generateReport(Integer orderId, List<InsReportDto1> insReportDto1s) { |
| | | public void generateReport(Integer orderId, InsReportDto1 insReportDto1) { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | //å§æé¨é¨ departLims |
| | | String departLims = userMapper.selectDepartLims(insOrder.getPrepareUser()); |
| | | //samplesæ¯è¿æ»¤ææ²¡ææ£éªé¡¹ç®çæ ·å |
| | | List<SampleProductDto> samples = insSampleMapper.selectSampleProductListByOrderId(orderId); |
| | | String sampleCode = samples.get(0).getSampleCode(); |
| | | SampleProductDto insSample = insSampleMapper.selectSampleProductListByOrderId(insReportDto1.getSampleId()); |
| | | String sampleCode = insSample.getSampleCode(); |
| | | InsReport insReport = new InsReport(); |
| | | insReport.setCode(insOrder.getEntrustCode().replace("WT", "TXJC")); |
| | | insReport.setCode(giveCode.giveCode("TXJC-", "ins_report", "-", "yyMMdd")); |
| | | insReport.setInsSampleId(insSample.getId()); |
| | | insReport.setInsOrderId(orderId); |
| | | Set<String> standardMethod = new HashSet<>(); |
| | | Set<String> deviceSet = new HashSet<>(); |
| | |
| | | AtomicReference<Integer> productSize2 = new AtomicReference<>(0); |
| | | AtomicReference<Integer> productSize3 = new AtomicReference<>(0); |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | samples.forEach(s -> { |
| | | SampleProductDto s=insSample; |
| | | models.add(s.getModel()); |
| | | standardMethod.addAll(standardMethodListMapper.selectList(Wrappers.<StandardMethodList>lambdaQuery() |
| | | .in(StandardMethodList::getId, Arrays.stream(s.getStandardMethodListId().replaceAll("[\\[\\]]", "").split(",")) |
| | |
| | | .collect(Collectors.toSet()); |
| | | labToDeviceMap.put(entry.getKey(), productIds); |
| | | } |
| | | for (InsReportDto1 insReportDto1 : insReportDto1s) { |
| | | String laboratory = insReportDto1.getLaboratory(); |
| | | for (InsReportDto2 insReportDto2 : insReportDto1.getInsReportDto2s()) { |
| | | String laboratory = insReportDto2.getLaboratory(); |
| | | if (!labToDeviceMap.containsKey(laboratory)) { |
| | | continue; |
| | | } |
| | | Set<Integer> productIds = labToDeviceMap.get(laboratory); |
| | | Integer num = insReportDto1.getNum(); |
| | | Integer num = insReportDto2.getNum(); |
| | | //æ®éè¯éªç»æè¡¨ |
| | | List<InsProductResult> insProductResults = insProductResultMapper.selectList( |
| | | Wrappers.<InsProductResult>lambdaQuery() |
| | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | /*æ£éªæ
åµä¸è§è¡¨*/ |
| | | List<Map<String, String>> tables = new ArrayList<>(); |
| | |
| | | List<Map<String, Object>> tables4 = new ArrayList<>(); |
| | | Integer indexs = 1; |
| | | //夿æ¯å¦æçµè·¯è¯éª,ç¯å¢è¯éª |
| | | List<String> strings = insReportDto1s.stream().map(InsReportDto1::getLaboratory).distinct().collect(Collectors.toList()); |
| | | List<String> strings = insReportDto1.getInsReportDto2s().stream().map(InsReportDto2::getLaboratory).distinct().collect(Collectors.toList()); |
| | | if (strings.contains("è¿åº") || strings.contains("è¿åº")) { |
| | | Map<String, String> table = new HashMap<>(); |
| | | table.put("indexs", indexs + ""); |
| | |
| | | /*è¾å°çè¯éªè¡¨*/ |
| | | List<InsOrderFile> insOrderFiles = insOrderFileMapper.selectList(Wrappers.<InsOrderFile>lambdaQuery() |
| | | .eq(InsOrderFile::getInsOrderId, orderId) |
| | | .eq(InsOrderFile::getInsSampleId, insReportDto1.getSampleId()) |
| | | .like(InsOrderFile::getFileName, "è§£æçè¾å°ç«ç¹æ¥å") |
| | | .and(wrapper -> wrapper |
| | | .eq(InsOrderFile::getSonLaboratory, "è¿åº") |
| | |
| | | strings.remove("çµè·¯è¯éª"); |
| | | strings.remove("è¿åº"); |
| | | strings.remove("è¿åº"); |
| | | List<Integer> productIdes = samples.stream().flatMap(sampleProductDto -> |
| | | sampleProductDto.getInsProduct().stream().map(InsProduct::getId)).collect(Collectors.toList()); |
| | | List<Integer> productIdes = insSample.getInsProduct().stream().map(InsProduct::getId).collect(Collectors.toList()); |
| | | List<Integer> collect = insProductResult2Mapper.selectList(Wrappers.<InsProductResult2>lambdaQuery() |
| | | .in(InsProductResult2::getInsProductId, productIdes)) |
| | | .stream().map(InsProductResult2::getResult).distinct().collect(Collectors.toList()); |
| | |
| | | indexs += 1; |
| | | |
| | | /*å建ç¯å¢è¯éªæ¡ä»¶è¡¨2*(é¡¹ç®æ°+1)*/ |
| | | List<InsProduct> products = samples.stream().flatMap(sampleProductDto -> sampleProductDto.getInsProduct().stream() |
| | | List<InsProduct> products = insSample.getInsProduct().stream() |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("çµè·¯è¯éª")) |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("è¾å°è¯éª"))) |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("è¾å°è¯éª")) |
| | | .map(insProduct -> { |
| | | InsProduct product = new InsProduct(); |
| | | product.setInspectionItemSubclass(insProduct.getInspectionItemSubclass()); |
| | |
| | | indexs += 1; |
| | | } |
| | | /*å¾éççµè·¯è¯éªè¡¨*/ |
| | | List<InsSample> insSamples = insSampleMapper.selectSample(orderId); |
| | | for (InsReportDto1 insReportDto1 : insReportDto1s) { |
| | | InsOrderUser insOrderUser = insOrderUserMapper.selectById(insReportDto1.getInsOrderUsersId()); |
| | | for (InsReportDto2 insReportDto2 : insReportDto1.getInsReportDto2s()) { |
| | | InsOrderUser insOrderUser = insOrderUserMapper.selectById(insReportDto2.getInsOrderUsersId()); |
| | | InsOrderState orderState = insOrderStateMapper.selectById(insOrderUser.getInsOrderStateId()); |
| | | if (orderState.getLaboratory().equals("çµè·¯è¯éª")) { |
| | | orderState.setNum(insOrderUser.getNum()); |
| | | getWord1(insOrderUser.getTerm(), orderState, insSamples, tables2); |
| | | getWord1(insOrderUser.getTerm(), orderState, tables2); |
| | | } |
| | | } |
| | | } |
| | |
| | | tables.add(table2); |
| | | |
| | | /*å建ç¯å¢è¯éªæ¡ä»¶è¡¨2*(é¡¹ç®æ°+1)*/ |
| | | List<InsProduct> products = samples.stream().flatMap(sampleProductDto -> sampleProductDto.getInsProduct().stream() |
| | | List<InsProduct> products = insSample.getInsProduct().stream() |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("çµè·¯è¯éª")) |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("è¾å°è¯éª"))) |
| | | .filter(insProduct -> !insProduct.getInspectionItem().equals("è¾å°è¯éª")) |
| | | .map(insProduct -> { |
| | | InsProduct product = new InsProduct(); |
| | | product.setInspectionItemSubclass(insProduct.getInspectionItemSubclass()); |
| | |
| | | ZipSecureFile.setMinInflateRatio(0.0001); |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx"); |
| | | StringBuilder standardMethod2 = new StringBuilder(); |
| | | for (String s : standardMethod) { |
| | | standardMethod2.append("ï¼\n").append(s); |
| | | for (String s1 : standardMethod) { |
| | | standardMethod2.append("ï¼\n").append(s1); |
| | | } |
| | | standardMethod2.append("ï¼\n").append("GB/T 9410-2008 ãç§»å¨é信天线éç¨ææ¯è§èã"); |
| | | standardMethod2.replace(0, 1, ""); |
| | |
| | | } |
| | | Map<String, String> codeStr = new HashMap<>(); |
| | | codeStr.put("æ¥åç¼å·", insReport.getCode()); |
| | | codeStr.put("æ ·ååç§°", insOrder.getSample()); |
| | | codeStr.put("è§æ ¼åå·", samples.get(0).getModel()); |
| | | codeStr.put("æ ·ååç§°", insSample.getSample()); |
| | | codeStr.put("è§æ ¼åå·", insSample.getModel()); |
| | | codeStr.put("åæ¾æ¥æ", now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | String codePath; |
| | | try { |
| | |
| | | List<Map<String, String>> finalDeviceList = deviceList; |
| | | List<Map<String, String>> sampleList = insSampleMapper.selectSampleList(orderId); |
| | | Integer userId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery() |
| | | .eq(InsSampleUser::getInsSampleId, orderId).last("limit 1")).getUserId(); |
| | | .eq(InsSampleUser::getInsSampleId, insReportDto1.getSampleId()).last("limit 1")).getUserId(); |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(userId).getSignatureUrl(); |
| | |
| | | insOrder.setPhone("/"); |
| | | } |
| | | //æ£éªé¡¹ç®çç¯å¢ |
| | | InsProduct insProduct = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).eq(InsProduct::getInsSampleId, samples.get(0).getId())).get(0); |
| | | InsProduct insProduct = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, insReportDto1.getSampleId())).get(0); |
| | | String environment = ""; |
| | | environment = (ObjectUtils.isNotEmpty(insProduct.getTemperature()) ? insProduct.getTemperature() + "â " : "") + (ObjectUtils.isNotEmpty(insProduct.getHumidity()) ? insProduct.getHumidity() + "%" : ""); |
| | | String finalEnvironment = environment; |
| | | List<SampleProductDto> finalSamples = samples; |
| | | String title3 = ""; |
| | | if (tables3.size() > 0) { |
| | | title3 = "è¾å°æ¹åå¾åæ°"; |
| | |
| | | put("sampleCode", sampleCode); |
| | | put("environment", finalEnvironment); |
| | | put("custom", custom); |
| | | put("sampleSize", finalSamples.size()); |
| | | put("sampleSize", "1"); |
| | | put("standardMethod", (standardMethod2.toString().equals("null") ? "" : standardMethod2)); |
| | | put("deviceList", finalDeviceList); |
| | | put("tables", tables); |
| | |
| | | |
| | | |
| | | //çµè·¯æ¥åç¨äºæ»æ¥åçæ¹æ³ |
| | | private void getWord1(String term, InsOrderState insOrderState, List<InsSample> insSamples, List<Map<String, Object>> tables2) { |
| | | private void getWord1(String term, InsOrderState insOrderState,List<Map<String, Object>> tables2) { |
| | | AtomicInteger lable = new AtomicInteger(1); |
| | | AtomicInteger index = new AtomicInteger(); |
| | | String title = term + "çµè·¯åæ°"; |
| | | insSamples.forEach(insSample -> { |
| | | InsSample insSample = insSampleMapper.selectById(insOrderState.getInsSampleId()); |
| | | |
| | | //æ¥è¯¢é¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | |
| | | table2.put("title", title); |
| | | tables2.add(table2); |
| | | lable.getAndIncrement(); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | |
| | | @ValueTableShow(value = 1,name = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | |
| | | @ValueTableShow(value = 2,name = "æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | |
| | | |
| | | private Integer orderUserId; |
| | | |
| | | private Integer sampleId; |
| | | |
| | | private Integer verifyUser; |
| | | } |
| | |
| | | |
| | | private Integer orderUserId; |
| | | |
| | | private Integer sampleId; |
| | | |
| | | private Integer verifyUser; |
| | | |
| | | private Integer orderStateId; |
| | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsOrderFile"> |
| | | <id column="id" property="id"/> |
| | | <result column="ins_order_id" property="insOrderId"/> |
| | | <result property="insSampleId" column="ins_sample_id" /> |
| | | <result column="type" property="type"/> |
| | | <result column="file_url" property="fileUrl"/> |
| | | <result column="file_name" property="fileName"/> |
| | |
| | | and (son_laboratory=#{sonLaboratory} |
| | | or son_laboratory is null) |
| | | </if> |
| | | <if test="sampleId!=null and sampleId!=''"> |
| | | and (ins_sample_id=#{sampleId} |
| | | or ins_sample_id is null) |
| | | </if> |
| | | ) A |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsOrderState"> |
| | | <id property="id" column="idd" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="sort" column="sort" jdbcType="INTEGER"/> |
| | |
| | | left join ins_order_user iou on ios.id = iou.ins_order_state_id |
| | | left join user on submit_user=user.id |
| | | where ios.ins_order_id = #{id} |
| | | and ios.ins_sample_id = #{sampleId} |
| | | </select> |
| | | </mapper> |
| | |
| | | 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} |
| | | where isa.id = #{sampleId} |
| | | and (ip.ins_result is null or ip.ins_result = 2) |
| | | and ip.state = 1 |
| | | </select> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InsReportMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsReport"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_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"/> |
| | |
| | | select * |
| | | from ( |
| | | select |
| | | ir.*,io.entrust_code,u.name write_user_name,u1.name ratify_user,u2.name examine_user,io.laboratory,l.id labId |
| | | ir.*,io.entrust_code,sample_code,u.name write_user_name,u1.name ratify_user,u2.name |
| | | examine_user,io.laboratory,l.id labId |
| | | from ins_report ir |
| | | left join ins_order io on io.id = ir.ins_order_id |
| | | left join ins_sample isa on isa.id = ir.ins_sample_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 |
| | | left join laboratory l on io.laboratory=laboratory_name |
| | | 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 |
| | | select s.address |
| | | from seal s |
| | | left join laboratory l on s.lab_id = l.id |
| | | where l.laboratory_name = #{name} |
| | | and s.type = 'æ¥åç±»å' |
| | |
| | | verify_user, |
| | | ios.id orderStateId, |
| | | ios.create_time, |
| | | (SELECT ins_time FROM ins_order_state WHERE ins_order_id = a.id AND laboratory = a.son_laboratory ORDER BY ins_time DESC LIMIT 1) AS ins_time , |
| | | (SELECT ins_time FROM ins_order_state WHERE ins_order_id = a.id AND laboratory = a.son_laboratory and |
| | | ins_order_state.ins_sample_id=a.sampleId ORDER BY ins_time DESC LIMIT 1) AS ins_time , |
| | | iou.submit_time , |
| | | ios.sort, |
| | | sort_time, |
| | | version, |
| | | ios.num-1 num1 |
| | | FROM |
| | | ins_order_state ios |
| | | LEFT JOIN |
| | | ( |
| | | SELECT |
| | | io.id, |
| | |
| | | io.type, |
| | | io.appointed, |
| | | io.send_time, |
| | | group_concat(distinct isa.sample,' ') sample, |
| | | group_concat(distinct isa.sample_code,' ') sampleCode, |
| | | isa.id sampleId, |
| | | isa.sample sample, |
| | | isa.sample_code sampleCode, |
| | | userName, |
| | | checkName, |
| | | ip.son_laboratory, |
| | |
| | | and u.state=0 |
| | | GROUP BY ins_sample_id |
| | | ORDER BY ins_sample_id |
| | | ) isu ON isu.ins_sample_id = io.id |
| | | ) isu ON isu.ins_sample_id = isa.id |
| | | LEFT JOIN ( |
| | | SELECT ins_sample_id,uu.name checkName |
| | | FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id |
| | |
| | | and u.state=1 |
| | | GROUP BY ins_sample_id |
| | | ORDER BY ins_sample_id |
| | | )isu2 ON isu2.ins_sample_id = io.id |
| | | )isu2 ON isu2.ins_sample_id = isa.id |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | WHERE io.state = 1 and send_time is not null |
| | | <if test="userName !=null and userName!=''"> |
| | |
| | | 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 |
| | | ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory and ios.ins_sample_id=a.sampleId |
| | | LEFT JOIN ins_order_user iou ON ios.id = iou.ins_order_state_id and ios.num=iou.num |
| | | ORDER BY |
| | | ios.sort, |
| | |
| | | <select id="inspectionOrderDetailsTaskSwitching" resultType="com.yuanchu.mom.vo.InsOrderPlanTaskSwitchVo"> |
| | | select * from( |
| | | SELECT |
| | | a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id,<!--(ios.verify_user = #{userId})--> verify_user |
| | | a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id,verify_user |
| | | FROM |
| | | ins_order_state ios |
| | | LEFT JOIN |
| | | ( |
| | | SELECT |
| | | io.id, |
| | |
| | | io.type, |
| | | io.appointed, |
| | | io.send_time, |
| | | group_concat(distinct isa.sample,' ') sampleType, |
| | | group_concat(distinct isa.sample_code,' ') sampleCode, |
| | | isa.id sampleId, |
| | | isa.sample sampleType, |
| | | isa.sample_code sampleCode, |
| | | isu.user_id, |
| | | user.name userName, |
| | | ip.son_laboratory, |
| | |
| | | FROM |
| | | ins_order io |
| | | LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id |
| | | LEFT JOIN ( <!--SELECT * FROM ins_sample_user GROUP BY ins_sample_id, user_id --> |
| | | LEFT JOIN ( |
| | | SELECT * |
| | | FROM ins_sample_user u |
| | | WHERE son_laboratory=#{sonLaboratory} and (ins_sample_id, id) IN ( |
| | |
| | | GROUP BY ins_sample_id |
| | | ) |
| | | ORDER BY ins_sample_id, id |
| | | ) isu ON isu.ins_sample_id = io.id |
| | | ) isu ON isu.ins_sample_id = isa.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 io.ins_state != 5 |
| | | and send_time is not null |
| | | <if test="userId !=null and userId!=''"> |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL ) |
| | |
| | | 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 |
| | | ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory and a.sampleId=ios.ins_sample_id |
| | | 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 |
| | | isu2.ins_sample_id = a.sampleId |
| | | 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 |
| | |
| | | ip.method_s |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | where isa.ins_order_id = #{id} |
| | | where isa.id = #{id} |
| | | and state = 1 |
| | | and isa.id in (select id1 |
| | | from (select is2.id id1, ip.id |
| | |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ios.ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | |
| | | ip.temperature, |
| | | ip.humidity |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_order_state ios on isa.id = ios.ins_sample_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_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | where isa.id = #{sampleId} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ios.laboratory = #{laboratory} |
| | |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ios.ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | |
| | | ip.temperature, |
| | | ip.humidity |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_order_state ios on isa.id = ios.ins_sample_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_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | where isa.id = #{sampleId} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ios.laboratory = #{laboratory} |
| | |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ios.ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_order_state ios on ios.ins_sample_id = isa.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | where ios.ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ios.ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_order_state ios on ios.ins_sample_id = isa.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | where ios.ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ios.ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_order_state ios on ios.ins_sample_id = isa.id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | where ios.ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | |
| | | where son_laboratory = 'çµè·¯è¯éª' |
| | | and state = 1 |
| | | and ins_order_id = #{insOrderId} |
| | | </select> |
| | | <select id="selectList1" resultType="com.yuanchu.mom.dto.SampleProductDto"> |
| | | select * from ins_sample where ins_order_id=#{id |
| | | } |
| | | </select> |
| | | </mapper> |