检验下单标签打印+标准库枚举筛选+报告生成修改+检验下单委托编号生成
| | |
| | | insProductService.updateInspected(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("æ£éªä¸å") |
| | | @ApiOperation(value = "æ ç¾æå°") |
| | | @PostMapping("/labelPrinting") |
| | | public Result<?> labelPrinting(String ids) { |
| | | return Result.success(insOrderService.labelPrinting(ids)); |
| | | } |
| | | } |
| | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/standardTree") |
| | | @Api(tags="æ ååº") |
| | | @Api(tags = "æ ååº") |
| | | public class StandardTreeController { |
| | | |
| | | private StandardTreeService standardTreeService; |
| | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "è·åæ åæ ") |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList(){ |
| | | public Result selectStandardTreeList() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "æ·»å æ åæ ") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree){ |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId){ |
| | | public Result addStandardMethodList(String tree, Integer standardId) { |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @PostMapping("/selectsStandardMethodByFLSSM") |
| | | @ValueAuth |
| | | public Result selectsStandardMethodByFLSSM(String tree){ |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çå
容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(String str){ |
| | | public Result upStandardProductList(String str) { |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id){ |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids){ |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree){ |
| | | public Result addStandardProduct(String ids, String tree) { |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree){ |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductList") |
| | | @ValueAuth |
| | | public Result selectStandardProductList(@RequestBody InsSample insSample){ |
| | | public Result selectStandardProductList(@RequestBody InsSample insSample) { |
| | | return Result.success(standardProductListService.selectStandardProductList(insSample)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | @ValueAuth |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page){ |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductByMethodId") |
| | | @ValueAuth |
| | | public Result selectStandardProductByMethodId(Integer id, String tree, Integer page,String laboratory,String item,String items){ |
| | | public Result selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) { |
| | | return Result.success(standardProductListService.selectStandardProductByMethodId(id, tree, page, laboratory, item, items)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @PostMapping("/selectStandardProductEnumByMethodId") |
| | | @ValueAuth |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree){ |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree)); |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ ä¸æ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | @ValueAuth |
| | | public Result selectStandardMethodEnum(){ |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åäº§åæ¶æ") |
| | | @GetMapping("/getStandardTree2") |
| | | @ValueAuth |
| | | public Result getStandardTree2(){ |
| | | public Result getStandardTree2() { |
| | | return Result.success(standardTreeService.getStandardTree2()); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "æ¹éä¿®æ¹é¡¹ç®å
容") |
| | | @PostMapping("/upStandardProducts") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "standardProductList",dataTypeClass = StandardProductList.class), |
| | | @ApiImplicitParam(name = "ids",dataTypeClass = Integer.class) |
| | | @ApiImplicitParam(name = "standardProductList", dataTypeClass = StandardProductList.class), |
| | | @ApiImplicitParam(name = "ids", dataTypeClass = Integer.class) |
| | | }) |
| | | public Result upStandardProducts(@RequestBody Map<String, Object> product){ |
| | | public Result upStandardProducts(@RequestBody Map<String, Object> product) { |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("ä»
è·åå
纤çåå·") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType){ |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ValueClassify("æ ååº") |
| | | @ApiOperation("导å
¥æ ååº") |
| | | @PostMapping("/inExcelOfTree") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file){ |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | return Result.success(); |
| | | } |
| | |
| | | @ValueAuth |
| | | @ApiOperation("éç½®æ ååºåä»·") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId){ |
| | | public Result resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | |
| | | @ValueAuth |
| | | @ApiOperation("éç½®æ ååºå·¥æ¶ç³»æ°") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(String tree, Integer standardId){ |
| | | public Result resetTreeOfHour(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("éç½®æ ååºè¦æ±æè¿°åè¦æ±å¼") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.InsProduct; |
| | | import com.yuanchu.mom.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; |
| | | |
| | | } |
| | |
| | | String getStandardMethodCode(Integer id); |
| | | |
| | | int updateStatus( Integer id); |
| | | |
| | | String selLaboratoryCode(String laboratory); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.InsOrderPlanDTO; |
| | | import com.yuanchu.mom.dto.SampleProductDto; |
| | | import com.yuanchu.mom.dto.SampleProductDto3; |
| | | import com.yuanchu.mom.pojo.InsProduct; |
| | | import com.yuanchu.mom.pojo.InsSample; |
| | | import com.yuanchu.mom.vo.InsOrderPlanTaskSwitchVo; |
| | |
| | | |
| | | List<SampleProductDto> selectSampleProductListByOrderId2(Integer id); |
| | | |
| | | List<SampleProductDto3> selectSampleProductListByOrderId3(List<Integer> ids); |
| | | |
| | | List<SampleProductDto> getInsOrderAndSample(Integer id, String laboratory); |
| | | |
| | | String getSampleEn(String sample); |
| | |
| | | Map<String, Object> selectSampleDefects(Page page, String inspectionItems, String orderNumber); |
| | | |
| | | int updateStatus(Integer id); |
| | | |
| | | List<SampleProductDto3> labelPrinting(String ids); |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | public interface StandardProductListService extends IService<StandardProductList> { |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | |
| | | |
| | | IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items); |
| | | |
| | | Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree); |
| | | Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree, String item); |
| | | |
| | | } |
| | |
| | | |
| | | void resetTreeOfHour(String tree, Integer standardId); |
| | | |
| | | void resetTreeOfAsk(String tree, Integer standardId); |
| | | } |
| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.lang.Console; |
| | | import cn.hutool.core.lang.UUID; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | if (p != null && v.get("ps") != null) { |
| | | String value = JSON.parseObject(JSON.toJSONString(v.get("ps"))).get("value") + ""; |
| | | if (value.equals("è¦æ±å¼")) { |
| | | textRenderData.setText(p.getAsk()); |
| | | textRenderData.setText(ObjectUtils.isNotEmpty(p.getTell()) ? p.getTell() : ""); |
| | | } else if (value.equals("åä½")) { |
| | | textRenderData.setText(p.getUnit()); |
| | | } else if (value.equals("ç»è®º")) { |
| | |
| | | textRenderData.setText(a.getSample()); |
| | | } else if (value.equals("è¯éªæ¹æ³")) { |
| | | textRenderData.setText(p.getMethodS()); |
| | | } else if (value.equals("æ£éªé¡¹")) { |
| | | Console.log(p.getInspectionItem() + "\n" + p.getInspectionItemEn()); |
| | | textRenderData.setText(p.getInspectionItem() + "\n" + p.getInspectionItemEn()); |
| | | } else if (value.equals("æ£éªå项")) { |
| | | Console.log(p.getInspectionItemSubclass() + "\n" + p.getInspectionItemSubclassEn()); |
| | | if (ObjectUtils.isEmpty(p.getInspectionItemSubclassEn())) { |
| | | textRenderData.setText(p.getInspectionItemSubclass()); |
| | | } else { |
| | | textRenderData.setText(p.getInspectionItemSubclass() + "\n" + p.getInspectionItemSubclassEn()); |
| | | } |
| | | } else { |
| | | textRenderData.setText(v.get("v") == null ? "" : v.get("v") + ""); |
| | | } |
| | |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
çº¤è²æ \tScanning Numberâ101"); |
| | | textRenderData.setText("å
çº¤è²æ \nScanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | |
| | | if (insProducts1.get((int) (j - 2)).getInspectionItemSubclass().equals("") || insProducts1.get((int) (j - 2)).getInspectionItemSubclass() == null) { |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItem() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemEn() + "â" + (j + 101)); |
| | | } else { |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItemSubclass() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemSubclassEn()); |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItemSubclass() + "\n\n" + insProducts1.get((int) (j - 2)).getInspectionItemSubclassEn()); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | |
| | | if (CollectionUtils.isNotEmpty(insOrderFiles)) { |
| | | insOrderFiles.forEach(insOrderFile -> { |
| | | Map<String, Object> image = new HashMap<>(); |
| | | PictureRenderData pictureRenderData = Pictures.ofLocal(imgUrl + "/" + insOrderFile.getFileUrl()).sizeInCm(17,20).create(); |
| | | PictureRenderData pictureRenderData = Pictures.ofLocal(imgUrl + "/" + insOrderFile.getFileUrl()).sizeInCm(17, 20).create(); |
| | | image.put("url", pictureRenderData); |
| | | image.put("report", insReport); |
| | | images.add(image); |
| | | }); |
| | | } |
| | | //å§æäººåçµè¯åæ®µå¤æ |
| | | if (ObjectUtils.isEmpty(insOrder.getPrepareUser())) { |
| | | insOrder.setPrepareUser("/"); |
| | | } |
| | | if (ObjectUtils.isEmpty(insOrder.getPhone())) { |
| | | insOrder.setPhone("/"); |
| | | } |
| | | |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("order", insOrder); |
| | | put("report", insReport); |
| | | put("user", user); |
| | | //put("user", user); |
| | | put("custom", custom); |
| | | put("sampleSize", samples.size()); |
| | | put("tables", tables); |
| | |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.SampleDefectsFatherVo; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | sampleOrderDto.setCreateUser(map1.get("userId")); |
| | | }else { |
| | | } else { |
| | | //ç»ç» |
| | | try { |
| | | sampleOrderDto.setCompany(customMapper.selectById(user.getCompany()).getCompany()); |
| | | }catch (NullPointerException e){ |
| | | } catch (NullPointerException e) { |
| | | throw new ErrorException("æ¾ä¸å°æå±åä½"); |
| | | } |
| | | } |
| | |
| | | public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing) { |
| | | insOrder.setState(0); |
| | | String code = customMapper.selectById(insOrder.getCompanyId()).getCode2(); |
| | | insOrder.setEntrustCode(giveCode.giveCode("JCZX-" + code + "-", "ins_order", "", "yyMMdd")); |
| | | //insOrder.setEntrustCode(giveCode.giveCode("JCZX-" + code + "-", "ins_order", "", "yyMMdd")); |
| | | String giveCode = this.giveCode.giveCode("JCZX-" + code + "-", "ins_order", "", "yyMMdd"); |
| | | insOrderMapper.insert(insOrder); |
| | | AtomicInteger count = new AtomicInteger(); |
| | | list.forEach(a -> { |
| | |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | if (StrUtil.isEmpty(a.getSampleCode())) { |
| | | a.setSampleCode(insOrder.getEntrustCode().split("-")[2]+"-"+count.get()); |
| | | a.setSampleCode(giveCode.split("-")[2] + "-" + count.get()); |
| | | } |
| | | insSampleMapper.insert(a); |
| | | if (ObjectUtil.isNotEmpty(a.getInsProduct())) { |
| | | addInsProductMethod(a.getId(), a.getInsProduct(), null, 0); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(a.getInsulating())){ |
| | | if (ObjectUtil.isNotEmpty(a.getInsulating())) { |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (Integer i = 0; i < a.getInsulating().getNum(); i++) { |
| | | ip2.addAll(a.getInsulating().getInsProduct()); |
| | |
| | | } |
| | | addInsProductMethod(a.getId(), ip2, null, 0); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(a.getSheath())){ |
| | | if (ObjectUtil.isNotEmpty(a.getSheath())) { |
| | | for (InsProduct product : a.getSheath().getInsProduct()) { |
| | | product.setStandardMethodListId(a.getSheath().getStandardMethodListId()); |
| | | } |
| | | addInsProductMethod(a.getId(), a.getSheath().getInsProduct(), null, 0); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(a.getChildSampleList())){ |
| | | 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(giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | b.setSampleCode(this.giveCode.giveCode("", "ins_sample", "", "yyMMdd")); |
| | | } |
| | | insSampleMapper.insert(b); |
| | | if (ObjectUtil.isNotEmpty(b.getInsProduct())) { |
| | |
| | | for (BushingDto bushingDto : a.getBushing()) { |
| | | bushingDto.setInsSampleId(a.getId()); |
| | | insBushingMapper.insert(bushingDto); |
| | | if(bushingDto.getFiber().size()!=0){ |
| | | if (bushingDto.getFiber().size() != 0) { |
| | | for (FiberDto fiberDto : bushingDto.getFiber()) { |
| | | fiberDto.setInsBushingId(bushingDto.getId()); |
| | | insFiberMapper.insert(fiberDto); |
| | | addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2); |
| | | } |
| | | }else{ |
| | | } else { |
| | | for (FibersDto fibersDto : bushingDto.getFibers()) { |
| | | fibersDto.setInsBushingId(bushingDto.getId()); |
| | | fibersDto.setCode(giveCode.giveCode("", "ins_fibers", "", "yyMMdd")); |
| | | fibersDto.setCode(this.giveCode.giveCode("", "ins_fibers", "", "yyMMdd")); |
| | | insFibersMapper.insert(fibersDto); |
| | | for (FiberDto fiberDto : fibersDto.getFiber()) { |
| | | fiberDto.setInsFibersId(fibersDto.getId()); |
| | |
| | | } |
| | | } |
| | | } |
| | | }) ; |
| | | }); |
| | | for (List<Integer> i : pairing) { |
| | | SampleProductDto sample = JSON.parseObject(JSON.toJSONString(list.get(i.get(0) - 1)), SampleProductDto.class); |
| | | sample.setSampleCode(list.get(i.get(0)-1).getSampleCode() + "/" +list.get(i.get(1)-1).getSampleCode()); |
| | | sample.setSampleCode(list.get(i.get(0) - 1).getSampleCode() + "/" + list.get(i.get(1) - 1).getSampleCode()); |
| | | sample.setId(null); |
| | | insSampleMapper.insert(sample); |
| | | try { |
| | |
| | | insProduct.setId(null); |
| | | insProduct.setInsSampleId(sample.getId()); |
| | | insProductMapper.insert(insProduct); |
| | | }catch (Exception e){} |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | return insOrder.getId(); |
| | | } |
| | |
| | | ||product.getAsk().indexOf("RTS")>-1||product.getAsk().indexOf("H")>-1||product.getAsk().indexOf("L")>-1)){ |
| | | throw new ErrorException("æäº¤å¤±è´¥ï¼å卿ªå¡«åçåéï¼"+product.getInspectionItem()+" "+product.getInspectionItemSubclass()); |
| | | }*/ |
| | | if(product.getState()==1 && !product.getInspectionItem().equals("çæ¥æè")){ |
| | | switch (type){ |
| | | if (product.getState() == 1 && !product.getInspectionItem().equals("çæ¥æè")) { |
| | | switch (type) { |
| | | case 1: |
| | | product.setInsFibersId(id); |
| | | break; |
| | |
| | | @Override |
| | | public int upInsOrderOfState(InsOrder insOrder) { |
| | | insOrder.setExamineTime(LocalDateTime.now()); |
| | | String code = baseMapper.selLaboratoryCode(insOrder.getLaboratory()); |
| | | if (StringUtils.isEmpty(code)) { |
| | | code = ""; |
| | | } |
| | | insOrder.setEntrustCode(giveCode.giveCode("JC/" + code + "-", "ins_order", "", "yyMMdd")); |
| | | return insOrderMapper.updateById(insOrder); |
| | | } |
| | | |
| | |
| | | public int updateStatus(Integer id) { |
| | | return insOrderMapper.updateStatus(id); |
| | | } |
| | | |
| | | //æ ç¾æå° |
| | | @Override |
| | | 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())) { |
| | | return true; |
| | | } |
| | | if (processedCodes.contains(sampleProductDto3.getCode())) { |
| | | return false; |
| | | } else { |
| | | processedCodes.add(sampleProductDto3.getCode()); |
| | | return true; |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | return sampleProductDto3s; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | 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; |
| | |
| | | && Objects.equals((sp.getInspectionItemSubclass() == null) ? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass()) |
| | | // && Objects.equals(sp.getSample(), pl.getSample()) |
| | | && Objects.equals(sp.getModel(), pl.getModel()) |
| | | && sp.getTree().indexOf(pl.getSample()==null?"null":pl.getSample())>-1 |
| | | && sp.getTree().indexOf(pl.getSample() == null ? "null" : pl.getSample()) > -1 |
| | | && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) { |
| | | pl.setId(sp.getId()); |
| | | if (sp.getState() != null && !sp.getState().equals("")) { |
| | |
| | | String field1 = o1.getManHourGroup(); |
| | | String field2 = o2.getManHourGroup(); |
| | | |
| | | int num1 = extractNumber(field1); |
| | | int num2 = extractNumber(field2); |
| | | boolean isEmpty1 = field1 == null || field1.isEmpty(); |
| | | boolean isEmpty2 = field2 == null || field2.isEmpty(); |
| | | |
| | | return Integer.compare(num1, num2); |
| | | if (isEmpty1 && isEmpty2) { |
| | | return 0; |
| | | } else if (isEmpty1) { |
| | | return 1; |
| | | } else if (isEmpty2) { |
| | | return -1; |
| | | } else { |
| | | int num1 = extractNumber(field1); |
| | | int num2 = extractNumber(field2); |
| | | return Integer.compare(num1, num2); |
| | | } |
| | | }); |
| | | try { |
| | | map.put("productList", list.subList((page - 1) * 50, page * 50)); |
| | |
| | | |
| | | private int extractNumber(String s) { |
| | | // ä»åç¬¦ä¸²ä¸æåæ°åçé»è¾ï¼è¿éåè®¾åæ®µçæ ¼å¼æ¯ "text<number>" |
| | | String number = s.replaceAll("\\D", ""); |
| | | String number = s; |
| | | if (!s.matches("\\d+")) { |
| | | number = s.replaceAll("\\D", ""); |
| | | } |
| | | return Integer.parseInt(number); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree) { |
| | | public Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | HashMap<String, List<?>> map = new HashMap<>(); |
| | | map.put("item", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItem) |
| | | .groupBy(StandardProductList::getInspectionItem))); |
| | | map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItemSubclass) |
| | | .groupBy(StandardProductList::getInspectionItemSubclass))); |
| | | if (ObjectUtils.isNotEmpty(item)) { |
| | | map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getInspectionItem, item) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItemSubclass) |
| | | .groupBy(StandardProductList::getInspectionItemSubclass))); |
| | | } else { |
| | | map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItemSubclass) |
| | | .groupBy(StandardProductList::getInspectionItemSubclass))); |
| | | } |
| | | return map; |
| | | } |
| | | } |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import cn.hutool.core.lang.Console; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | |
| | | public int upStandardProducts(Map<String, Object> product) { |
| | | List<Integer> ids = JSON.parseArray(product.get("ids") + ""); |
| | | StandardProductList productList = JSON.parseObject(JSON.toJSONString(product.get("standardProductList")), StandardProductList.class); |
| | | if(productList.getMethodS() != null){ |
| | | if (productList.getMethodS() != null) { |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids).like(StandardProductList::getMethod, productList.getMethodS())); |
| | | return 1; |
| | | } |
| | |
| | | } |
| | | StandardProductList db_str; |
| | | try { |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(),str.getInspectionItem(),str.getSample(),str.getInspectionItemSubclass(),str.getModel()); |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(), str.getInspectionItem(), str.getSample(), str.getInspectionItemSubclass(), str.getModel()); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("é夿¥è¯¢ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | |
| | | str.setStructureItemParameterId(db_str.getStructureItemParameterId()); |
| | | } |
| | | if (list.get(8) != null) { |
| | | str.setMethodS(list.get(8)+""); |
| | | str.setMethodS(list.get(8) + ""); |
| | | } |
| | | |
| | | if (list.get(11) == null) { |
| | |
| | | str.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | str.setLaboratory(laboratory.get()); |
| | | str.setState(1); |
| | | str.setTree(str.getFactory() + " - " + str.getLaboratory() + " - " + str.getSampleType() + " - " + str.getSample() + " - " + (str.getModel() == null?"":str.getModel())); |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\""+str.getSampleType()+"\"", str.getInspectionItem(), str.getInspectionItemSubclass())); |
| | | if(str.getStructureItemParameterId() == null){ |
| | | str.setTree(str.getFactory() + " - " + str.getLaboratory() + " - " + str.getSampleType() + " - " + str.getSample() + " - " + (str.getModel() == null ? "" : str.getModel())); |
| | | try { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass())); |
| | | } catch (Exception e) { |
| | | Console.log("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\""); |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass())); |
| | | } |
| | | if (str.getStructureItemParameterId() == null) { |
| | | throw new ErrorException("æ£éªé¡¹ç®ä¸åå¨ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | lists.forEach(a->{ |
| | | if(a.getId() != null){ |
| | | lists.forEach(a -> { |
| | | if (a.getId() != null) { |
| | | standardProductListMapper.updateById(a); |
| | | }else{ |
| | | } else { |
| | | standardProductListMapper.insert(a); |
| | | } |
| | | }); |
| | |
| | | public void resetTreeOfHour(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId).set(StandardProductList::getManHour, null)); |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId) |
| | | .set(StandardProductList::getAsk, null) |
| | | .set(StandardProductList::getTell, null) |
| | | .set(StandardProductList::getSection, null) |
| | | .set(StandardProductList::getPrice, null) |
| | | .set(StandardProductList::getManHour, null)); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | <select id="selectSampleAndProductByOrderId" resultType="com.yuanchu.mom.dto.SampleProductDto2"> |
| | | select * |
| | | from ( |
| | | select i.id,isa.sample_code,isa.sample,isa.model,isa.ins_state,ip.state,ip.unit,ip.inspection_item,ip.inspection_item_subclass, |
| | | select |
| | | i.id,isa.sample_code,isa.sample,isa.model,isa.ins_state,ip.state,ip.unit,ip.inspection_item,ip.inspection_item_subclass, |
| | | ip.son_laboratory,ip.inspection_item_type,ip.inspection_value_type,ip.ask,ip.`last_value`,ip.ins_result,ipr.equip_value |
| | | from ins_sample isa |
| | | left join ins_order i on isa.ins_order_id = i.id |
| | |
| | | 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 *,GROUP_CONCAT(inspection_item |
| | | SEPARATOR ',') inspection_item2 from ins_product where state = 1 GROUP BY ins_sample_id,man_hour_group) b GROUP |
| | | SEPARATOR ',') inspection_item2 from ins_product where state = 1 GROUP BY ins_sample_id,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) |
| | | ) a |
| | |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceList" resultType="java.util.Map"> |
| | | select device_name,specification_model,management_number,DATE_ADD(date_format(last_calibration_date, '%Y-%m-%d'),INTERVAL calibration_date month) latest_traceability |
| | | select device_name,specification_model,management_number,DATE_ADD(date_format(last_calibration_date, |
| | | '%Y-%m-%d'),INTERVAL calibration_date month) latest_traceability |
| | | from device |
| | | where device.management_number in |
| | | <foreach collection="names" index="index" open="(" separator="," close=")" item="val"> |
| | |
| | | <update id="upInsOrderParameter" parameterType="com.yuanchu.mom.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> |
| | | <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} |
| | |
| | | ) temp |
| | | </select> |
| | | <select id="getEnumLabelByValue" resultType="java.lang.String"> |
| | | select label from `center-lims`.enums |
| | | select label |
| | | from `center-lims`.enums |
| | | where value = #{value} |
| | | </select> |
| | | <select id="getStandardMethodCode" resultType="java.lang.String"> |
| | | select code from `center-lims`.standard_method |
| | | select code |
| | | from `center-lims`.standard_method |
| | | where id = #{id} |
| | | </select> |
| | | <select id="selLaboratoryCode" resultType="java.lang.String"> |
| | | select laboratory_code |
| | | from laboratory |
| | | where laboratory_name = #{laboratory} |
| | | </select> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InsSampleMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsSample"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insResult" column="ins_result" jdbcType="INTEGER"/> |
| | |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | WHERE |
| | | io.state = 1 |
| | | # AND io.ins_state != 5 |
| | | # AND io.ins_state != 5 |
| | | and send_time is not null |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL) |
| | | GROUP BY |
| | |
| | | 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 GROUP BY ins_sample_id) md where td.id = md.id and user_id = #{userId}) isu2 on isu2.ins_sample_id = a.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 GROUP BY ins_sample_id) md where td.id = md.id and user_id = #{userId}) isu2 on |
| | | isu2.ins_sample_id = a.id |
| | | ORDER BY |
| | | a.user_id DESC, |
| | | a.type DESC, |
| | |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | WHERE |
| | | io.state = 1 |
| | | # AND io.ins_state != 5 |
| | | # AND io.ins_state != 5 |
| | | and send_time is not null |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL) |
| | | GROUP BY |
| | |
| | | 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 GROUP BY ins_sample_id) md where td.id = md.id and user_id = #{userId}) isu2 on isu2.ins_sample_id = a.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 GROUP BY ins_sample_id) md where td.id = md.id and user_id = #{userId}) isu2 on |
| | | isu2.ins_sample_id = a.id |
| | | ORDER BY |
| | | a.user_id DESC, |
| | | a.type DESC, |
| | |
| | | |
| | | <select id="selectSampleProductListByOrderId" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | ipr.equip_value, |
| | | ip.method_s |
| | | 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_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 ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | </select> |
| | | <select id="getInsOrderAndSample" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | ip.tell, |
| | | ip.dic |
| | | 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_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} |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | </select> |
| | | <select id="getSampleEn" resultType="java.lang.String"> |
| | | select name_en from `center-lims`.product |
| | | select name_en |
| | | from `center-lims`.product |
| | | where name = #{sample} |
| | | </select> |
| | | <select id="selectSampleProductListByOrderId2" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | where ins_order_id = #{id} |
| | | and state = 1 |
| | | </select> |
| | | |
| | | <select id="selectSampleProductListByOrderId3" resultMap="sampleDto3"> |
| | | select isa.id, |
| | | sample_code, |
| | | 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> |
| | | </select> |
| | | |
| | | <select id="getInsProduct1" resultMap="product"> |
| | | select ip.id ip_id, |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | 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 ins_fibers_id is null |
| | | </select> |
| | | <select id="getInsProduct2" resultMap="product"> |
| | | select ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fibers_id = #{id} |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | </select> |
| | | <select id="getInsProduct3" resultMap="product"> |
| | | select ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fiber_id = #{id} |
| | | and state = 1 |
| | | and ins_fibers_id is null |
| | |
| | | <collection property="insProductResult" resultMap="insProductResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="sampleDto3" type="com.yuanchu.mom.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.yuanchu.mom.pojo.InsProductResult"> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |