feat(migration): 按 dev_新疆_新聚 重新对齐 basic/performance/inspect 三模块
原移植自 master 分支,与新版 dev_新疆_新聚 存在代码代差,导致 inspect-server
大量编译错误。改为以 dev_新疆_新聚 为准:
- basic-server:60 个 java + 9 个 mapper XML 以源覆盖,补 16 个新文件,
删除 master 独有的 StandardMethodList*/StandardProductListService2* 6 个文件
- performance-server:23 个 java + 4 个 XML 覆盖,补 CustomerDoubleSerialize
- inspect-server:补全 214 个 java + 28 个 XML 及报表模板
- ruoyi-common:User.id/deptId 由 Long 改回 Integer,QueryWrappers 恢复
非字符串字段用 eq 的语义(均为 dev 分支的较新实现)
- ruoyi-system:补回 UserMapper/UserService/UserServiceImpl/UserMapper.xml
及 ISysDictTypeService.selectLabelByDict
- Result.getMessage() → getMsg()(与目标字段改名对齐)
六个模块 mvn install -DskipTests 全部 BUILD SUCCESS。
已修改87个文件
已添加287个文件
已删除7个文件
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import com.ruoyi.basic.dto.PageTestObjectDto; |
| | | import com.ruoyi.basic.dto.ProductDTO1; |
| | | import com.ruoyi.basic.excel.StructureTestObjectData; |
| | | import com.ruoyi.basic.excel.StructureTestObjectListener; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.CapacityScopeService; |
| | | import com.ruoyi.basic.service.ProductService; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)表æ§å¶å± |
| | |
| | | |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @Operation(summary = "è·åé¡¹ç®æ£éªåæ°å表") |
| | | @PostMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(Page page,StructureItemParameter itemParameter) throws Exception { |
| | | @GetMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(Page page,StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.selectItemParameterList(page, itemParameter)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/delItemParameter") |
| | | @DeleteMapping("/delItemParameter") |
| | | public Result<?> delItemParameter(Integer id) { |
| | | return Result.success(capacityScopeService.delItemParameter(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "è·åæ£éªå¯¹è±¡") |
| | | @PostMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(Page page,PageTestObjectDto pageTestObjectDto) throws Exception { |
| | | @GetMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(Page page,PageTestObjectDto pageTestObjectDto) { |
| | | return Result.success(capacityScopeService.selectTestObjectList(page, pageTestObjectDto)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å 餿£éªå¯¹è±¡") |
| | | @PostMapping("/delTestObject") |
| | | @DeleteMapping("/delTestObject") |
| | | public Result<?> delTestObject(Integer id) { |
| | | return Result.success(capacityScopeService.delTestObject(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ)") |
| | | @PostMapping("/getInsProduction") |
| | | @GetMapping("/getInsProduction") |
| | | public Result getInsProduction() { |
| | | return Result.success(capacityScopeService.getInsProduction()); |
| | | } |
| | | |
| | | @Operation(summary = "ç»´æ¤æ£éªå¯¹è±¡ç产å") |
| | | @PostMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(Page page,ProductDTO1 productDTO) throws Exception { |
| | | @GetMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(Page page,ProductDTO1 productDTO) { |
| | | return Result.success(productService.selectProductListByObjectId(page, productDTO)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤äº§å") |
| | | @PostMapping("/delProduct") |
| | | @DeleteMapping("/delProduct") |
| | | public Result delProduct(Integer id) { |
| | | return Result.success(productService.delProduct(id)); |
| | | } |
| | |
| | | @PostMapping("/importEquipData") |
| | | @Transactional |
| | | public Result importEquipData(@RequestParam("file") MultipartFile file) throws Exception { |
| | | InputStream inputStream = file.getInputStream(); |
| | | List<StructureItemParameter> lists = new ArrayList<>(); |
| | | AtomicReference<String> sample = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, -1, (i, l, list1) -> { |
| | | if (l == 1) { |
| | | sample.set(list1.get(1) + ""); |
| | | } |
| | | if (l >= 1) { |
| | | StructureItemParameter str = new StructureItemParameter(); |
| | | // æµè¯å¯¹è±¡ |
| | | if (list1.get(1) == null) { |
| | | str.setSample(null); |
| | | } else { |
| | | String brand = (String) list1.get(1); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append("["); |
| | | // 产å |
| | | if (ObjectUtil.isNotEmpty(list1.get(2))) { |
| | | String production = (String) list1.get(2); |
| | | if (!production.contains("ï¼")) { |
| | | builder.append(String.format("[\"%s\",\"%s\"]", brand, production)); |
| | | } else { |
| | | Arrays.stream(production.split("ï¼")).forEach(item -> { |
| | | builder.append(String.format("[\"%s\",\"%s\"],", brand, item)); |
| | | }); |
| | | builder.deleteCharAt(builder.length() - 1); |
| | | } |
| | | } else { |
| | | builder.append("["); |
| | | builder.append(String.format("\"%s\"", brand)); |
| | | builder.append("]"); |
| | | } |
| | | builder.append("]"); |
| | | str.setSample(builder.toString()); |
| | | } |
| | | // æ£éªé¡¹ |
| | | str.setInspectionItem(list1.get(4).toString().trim()); |
| | | // æ£éªé¡¹è±æ |
| | | if (list1.get(5) != null) { |
| | | str.setInspectionItemEn(list1.get(5).toString()); |
| | | } |
| | | // æ£éªå项 |
| | | if (list1.get(6) == null) { |
| | | str.setInspectionItemSubclass(null); |
| | | } else { |
| | | str.setInspectionItemSubclass(list1.get(6).toString().trim()); |
| | | } |
| | | // æ£éªåé¡¹è±æ |
| | | if (list1.get(7) == null) { |
| | | str.setInspectionItemSubclassEn(null); |
| | | } else { |
| | | str.setInspectionItemSubclassEn(String.valueOf(list1.get(7).toString())); |
| | | } |
| | | // æ£éªé¡¹åç±» |
| | | if (list1.get(22) != null && list1.get(22) != "") { |
| | | str.setInspectionItemClass(list1.get(22).toString().trim()); |
| | | } else { |
| | | str.setInspectionItemClass(null); |
| | | } |
| | | // æ£éªé¡¹åç±»è±æ |
| | | if (list1.get(23) != null && list1.get(23) != "") { |
| | | str.setInspectionItemClassEn(list1.get(23) + ""); |
| | | } else { |
| | | str.setInspectionItemClassEn(null); |
| | | } |
| | | |
| | | LambdaQueryWrapper<StructureItemParameter> wrapper = Wrappers.lambdaQuery(StructureItemParameter.class) |
| | | .eq(StructureItemParameter::getInspectionItem, str.getInspectionItem()) |
| | | .eq(StructureItemParameter::getSample, str.getSample()) |
| | | |
| | | .last("limit 1"); |
| | | // 夿æ¯å¦ææ£éªé¡¹ç±»å |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemClass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemClass, str.getInspectionItemClass()); |
| | | } |
| | | |
| | | // 夿æ¯å¦ææ£éªå项 |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemSubclass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemSubclass, str.getInspectionItemSubclass()); |
| | | } |
| | | StructureItemParameter db_str = structureItemParameterService.getOne(wrapper); |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | } |
| | | // æ¹æ³åç§° |
| | | if (list1.get(8) == null) { |
| | | str.setMethod(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(8).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setMethod(buffer.toString()); |
| | | } |
| | | // è¯éªå®¤ |
| | | if (list1.get(9) == null) { |
| | | str.setSonLaboratory(null); |
| | | } else { |
| | | str.setSonLaboratory(list1.get(9).toString()); |
| | | } |
| | | // 计éåä½ |
| | | if (list1.get(10) == null) { |
| | | str.setUnit(null); |
| | | } else { |
| | | str.setUnit(list1.get(10).toString()); |
| | | } |
| | | // è¦æ±å¼ |
| | | if (list1.get(11) == null) { |
| | | str.setAskTell(null); |
| | | } else { |
| | | str.setAskTell(list1.get(11).toString()); |
| | | } |
| | | // è¦æ±æè¿° |
| | | if (list1.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list1.get(12).toString()); |
| | | } |
| | | // åä»· |
| | | if (list1.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice(list1.get(13) + ""); |
| | | } |
| | | // å·¥æ¶ç³»æ° |
| | | if (list1.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(Double.valueOf(list1.get(14).toString())); |
| | | } |
| | | // å·¥æ¶åç» |
| | | if (list1.get(15) == null) { |
| | | str.setManHourGroup(null); |
| | | } else { |
| | | str.setManHourGroup(list1.get(15).toString()); |
| | | } |
| | | // é¢è®¡å®ææ¶é´ |
| | | if (list1.get(16) == null) { |
| | | str.setManDay(null); |
| | | } else { |
| | | str.setManDay(Integer.valueOf(list1.get(16).toString())); |
| | | } |
| | | // æ°æ®ç±»å |
| | | String jy; |
| | | if (list1.get(17).toString().equals("éééç±»å")) { |
| | | jy = "0"; |
| | | } else { |
| | | jy = "1"; |
| | | } |
| | | str.setInspectionItemType(jy); |
| | | // æ£éªé¡¹ç±»å |
| | | String validateValueType = list1.get(18).toString(); |
| | | if (ObjectUtils.isNotEmpty(validateValueType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ£éªå¼ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(validateValueType)).collect(Collectors.toList()); |
| | | str.setInspectionValueType(enums.get(0).getDictValue()); |
| | | } |
| | | int bsm; |
| | | //ç¹æ®æ è¯ |
| | | if (list1.get(19).toString().equals("å¦")) { |
| | | bsm = 0; |
| | | } else { |
| | | bsm = 1; |
| | | } |
| | | str.setBsm(bsm + ""); |
| | | // æ°ååå
¸ |
| | | if (list1.get(20) != null) { |
| | | str.setDic(list1.get(20) + ""); |
| | | } else { |
| | | str.setDic(null); |
| | | } |
| | | // åå§è®°å½æ¨¡æ¿ |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list1.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | str.setTemplateId(null); |
| | | } |
| | | try { |
| | | if (list1.get(24) != null) { |
| | | str.setLaboratory(list1.get(24) + ""); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | // æ¡ä»¶ |
| | | if (list1.get(25) == null) { |
| | | str.setRadiusList(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(25).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setRadiusList(buffer.toString()); |
| | | } |
| | | // æ¶è´¹æ å |
| | | if (list1.get(26) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | str.setRates(list1.get(26) + ""); |
| | | } |
| | | |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | // structureItemParameterService.removeNoSample(sample.get()); |
| | | // å¦ææ°æ®åºéé¢çæ°æ®åå¨é£ä¹å°±æ§è¡æ´æ°æ·è´æä½ |
| | | try { |
| | | structureItemParameterService.saveOrUpdateBatch(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("æå¡ç«¯æ¥é"); |
| | | } |
| | | structureItemParameterService.importEquipData(file); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Tag(name = "èµè´¨è¯´æ") |
| | | @AllArgsConstructor |
| | |
| | | |
| | | |
| | | @Operation(summary = "æ¥è¯¢èµè´¨æç»å表") |
| | | @PostMapping("/getCertificationDetail") |
| | | @GetMapping("/getCertificationDetail") |
| | | public Result getCertificationDetail(Page page,Certification certification) { |
| | | return Result.success(certificationService.getCertificationDetail(page, certification)); |
| | | } |
| | |
| | | return Result.success(certificationService.addCertificationDetail(certification)); |
| | | } |
| | | @Operation(summary = "å é¤èµè´¨æç»å表") |
| | | @PostMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail( String ids) { |
| | | @DeleteMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail(String ids) { |
| | | return Result.success(certificationService.delCertificationDetail(ids)); |
| | | } |
| | | } |
| | |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | @Operation(summary = "æ¥è¯¢å®éªå®¤ç®¡çå表") |
| | | @PostMapping("/selectItemParameter") |
| | | @GetMapping("/selectItemParameter") |
| | | public Result selectItemParameter(Page page ,Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.selectItemParameter(page, itemParameter)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å®éªå®¤åæ°") |
| | | @PostMapping("/delParameter") |
| | | @DeleteMapping("/delParameter") |
| | | public Result<?> delParameter(Integer id) { |
| | | return Result.success(laboratoryService.delParameter(id)); |
| | | } |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | private ProductPartService productPartService; |
| | | |
| | | @Operation(summary = "æ ¹æ®äº§åidæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByProductId") |
| | | @GetMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤äº§åé¶ä»¶") |
| | | @PostMapping("/deleteProductPart") |
| | | @DeleteMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | private ProductSupplierDensityService productSupplierDensityService; |
| | | |
| | | @Operation(summary = "æ ¹æ®äº§åidæ¥è¯¢åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/selectSupplierDensityByProductId") |
| | | @GetMapping("/selectSupplierDensityByProductId") |
| | | public Result selectSupplierDensityByProductId(Page page,ProductSupplierDensity supplierDensity) { |
| | | return Result.success(productSupplierDensityService.selectByProductId(page, supplierDensity)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/deleteProductSupplierDensity") |
| | | @DeleteMapping("/deleteProductSupplierDensity") |
| | | public Result deleteProductSupplierDensity(Integer id) { |
| | | productSupplierDensityService.removeById(id); |
| | | return Result.success(); |
| | |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | } |
| | | @Operation(summary = "æ¥è¯¢å°ç« å表") |
| | | @PostMapping("/selectSeal") |
| | | @GetMapping("/selectSeal") |
| | | public Result selectSeal(Page page,Seal seal) { |
| | | return Result.success(sealService.selectSeal(page,seal)); |
| | | } |
| | |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | @Operation(summary = "è·åæ åæ¹æ³å表") |
| | | @PostMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page,StandardMethod standardMethod) throws Exception { |
| | | @GetMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page,StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å 餿 åæ¹æ³") |
| | | @PostMapping("/delStandardMethod") |
| | | @DeleteMapping("/delStandardMethod") |
| | | public Result<?> delStandardMethod(Integer id) { |
| | | return Result.success(standardMethodService.delStandardMethod(id)); |
| | | } |
| | |
| | | return Result.success(standardMethodService.upStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @Operation(summary = "导å
¥æ åæç»") |
| | | @PostMapping("/importStandardDetails") |
| | | public Result<?> importStandardDetails(@RequestPart("file") MultipartFile file) throws IOException { |
| | | standardMethodService.inputExcel(file); |
| | | return Result.success(); |
| | | @Operation(summary = "è·åè¡ä¸é项") |
| | | @GetMapping("/selectIndustryOptions") |
| | | public Result selectIndustryOptions() { |
| | | return Result.success(standardMethodService.selectIndustryOptions()); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ åéä»¶") |
| | | @GetMapping("/selectAttachments") |
| | | public Result selectAttachments(Integer standardMethodId) { |
| | | return Result.success(standardMethodService.selectAttachments(standardMethodId)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¸ä¼ æ åéä»¶") |
| | | @PostMapping("/uploadAttachment") |
| | | public Result uploadAttachment(@RequestParam("standardMethodId") Integer standardMethodId, |
| | | @RequestParam("file") MultipartFile file) { |
| | | return Result.success(standardMethodService.uploadAttachment(standardMethodId, file)); |
| | | } |
| | | |
| | | @Operation(summary = "å 餿 åéä»¶") |
| | | @DeleteMapping("/deleteAttachment") |
| | | public Result deleteAttachment(Long id) { |
| | | return Result.success(standardMethodService.deleteAttachment(id)); |
| | | } |
| | | |
| | | } |
| | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @Operation(summary = "è·ååå§è®°å½æ¨¡æ¿å表") |
| | | @PostMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate) throws Exception { |
| | | @GetMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate){ |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å é¤åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/delStandardTemplate") |
| | | @DeleteMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | | return Result.success(standardTemplateService.delStandardTemplate(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè¿æ¨¡æ¿idè·åæ£éªé¡¹æ¨¡æ¿å
容") |
| | | @PostMapping("/getStandTempThingById") |
| | | @GetMapping("/getStandTempThingById") |
| | | public Result<?> getStandTempThingById(Integer id) { |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | |
| | | @Operation(summary = "ç¼è¾æ¨¡æ¿ç¼å¶") |
| | | @GetMapping("/getEditTemplatePreparation") |
| | | public Result<?> getEditTemplatePreparation(@RequestParam("id") Integer id) { |
| | | StandardTemplate byId = standardTemplateService.getById(id); |
| | | return Result.success("OK", byId.getThing()); |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | | |
| | | @Operation(summary = "å¤å¶åå§è®°å½æ¨¡æ¿") |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.dto.AddStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.CopyStandardProductListDto; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.InsSampleReceiveDto; |
| | | import com.ruoyi.basic.dto.ResetTreeDragDTO; |
| | | import com.ruoyi.basic.dto.StandardLibraryTreeNodeDto; |
| | | import com.ruoyi.basic.dto.UpdateStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingDto; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardMethodListService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListSupplierAskService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | |
| | | |
| | | @Operation(summary = "æ·»å æ åæ ") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @Operation(summary = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId) { |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | public Result addStandardTree(@RequestBody AddStandardTreeNodeDto dto) { |
| | | return Result.success(standardTreeService.addStandardTree(dto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @PostMapping("/selectsStandardMethodByFLSSM") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | if (tree == null || tree.trim().isEmpty()) { |
| | | return Result.fail("æ åæ åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | return Result.success(standardMethodService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ ååºä¸çå
容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(String str) { |
| | | public Result upStandardProductList(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ ååºåºé´") |
| | | @PostMapping("/updateSection") |
| | | public Result updateSection(String str) { |
| | | public Result updateSection(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @Operation(summary = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @Operation(summary = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree) { |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @Operation(summary = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | @GetMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page, String keyword) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page, keyword)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¹éç¼è¾æ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductByMethodId") |
| | | @Operation(summary = "æ¹éæ¥è¯¢æ£éªé¡¹ç®") |
| | | @GetMapping("/selectStandardProductByMethodId") |
| | | 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)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¹éç¼è¾æ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @PostMapping("/selectStandardProductEnumByMethodId") |
| | | @Operation(summary = "æ¹éæ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @GetMapping("/selectStandardProductEnumByMethodId") |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | |
| | | @Operation(summary = "è·åæ åæ ä¸æ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | return Result.success(standardMethodService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @Operation(summary = "è·åäº§åæ¶æ") |
| | |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @Operation(summary = "ä»
è·åå
纤çåå·") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @Operation(summary = "导å
¥æ ååº") |
| | | @PostMapping("/inExcelOfTree/{isEquipment}") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file, @PathVariable("isEquipment") Boolean isEquipment) { |
| | | if (!isEquipment) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | } else { |
| | | standardTreeService.importWorkstationExcel(file); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "éç½®æ ååºåä»·") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "éç½®æ ååºå·¥æ¶ç³»æ°") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "éç½®æ ååºè¦æ±æè¿°åè¦æ±å¼") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ ååºææ½") |
| | | @PostMapping("/resetTreeDrag") |
| | |
| | | |
| | | @Operation(summary = "æ åæ æåº") |
| | | @PostMapping("/updateTreeSort") |
| | | public Result updateTreeSort(@RequestBody List<FactoryDto> list) { |
| | | public Result updateTreeSort(@RequestBody List<StandardLibraryTreeNodeDto> list) { |
| | | return Result.success(standardTreeService.updateTreeSort(list)); |
| | | } |
| | | |
| | |
| | | |
| | | @Operation(summary = "æ ¹æ®äº§åidæ¥è¯¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/selectSupplierAsk") |
| | | public Result selectSupplierAsk(StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | public Result selectSupplierAsk(@RequestBody StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | return Result.success(standardProductListSupplierAskService.selectByProductId(supplierAsk)); |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/addProductSupplierAsk") |
| | | public Result addProductSupplierAsk(String str) { |
| | | public Result addProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | return Result.success(standardProductListSupplierAskService.addProductSupplierAsk(supplierAsk)); |
| | | } |
| | | |
| | | @Operation(summary = "æ´æ°åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/updateProductSupplierAsk") |
| | | public Result updateProductSupplierAsk(String str) { |
| | | public Result updateProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | standardProductListSupplierAskService.updateProductSupplierAsk(supplierAsk); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/deleteProductSupplierAsk") |
| | | @DeleteMapping("/deleteProductSupplierAsk") |
| | | public Result deleteProductSupplierAsk(Integer supplierAskId) { |
| | | standardProductListSupplierAskService.removeById(supplierAskId); |
| | | return Result.success(); |
| | |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ åæ ") |
| | | @PostMapping("/updateStandardTree") |
| | | public Result updateStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.updateStandardTree(standardTree)); |
| | | public Result updateStandardTree(@RequestBody UpdateStandardTreeNodeDto dto) { |
| | | return Result.success(standardTreeService.updateStandardTree(dto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ åç»å®çåå§è®°å½æ¨¡æ¿") |
| | | @GetMapping("/selectTemplateBindings") |
| | | public Result selectTemplateBindings(Integer standardTreeId) { |
| | | return Result.success(standardTreeService.selectTemplateBindings(standardTreeId)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿åæ åç»å®çåå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/saveTemplateBindings") |
| | | public Result saveTemplateBindings(@RequestBody StandardTreeTemplateBindingDto dto) { |
| | | return Result.success(standardTreeService.saveTemplateBindings(dto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ£éªé¡¹è¦æ±å¼å¤å¶å¯¹æ¯") |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | private StructureTestObjectPartService structureTestObjectPartService; |
| | | |
| | | @Operation(summary = "æ ¹æ®æ£éªå¯¹è±¡idæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByTestObjectId") |
| | | @GetMapping("/selectByTestObjectId") |
| | | public Result selectByTestObjectId(Page page,StructureTestObjectPart structureTestObjectPart){ |
| | | return Result.success(structureTestObjectPartService.selectByTestObjectId(page,structureTestObjectPart)); |
| | | } |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å 餿£éªå¯¹è±¡é¶ä»¶") |
| | | @PostMapping("/deleteTestObjectPart") |
| | | @DeleteMapping("/deleteTestObjectPart") |
| | | public Result deleteTestObjectPart(Integer id) { |
| | | structureTestObjectPartService.removeById(id); |
| | | return Result.success(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ°å¢æ åæ èç¹è¯·æ± |
| | | */ |
| | | @Data |
| | | public class AddStandardTreeNodeDto { |
| | | |
| | | /** |
| | | * ç¶èç¹è·¯å¾ï¼ä¸ºç©ºè¡¨ç¤ºæ°å¢è¡ä¸ï¼ä¸ºå个è¡ä¸å称表示å¨è¯¥è¡ä¸ä¸æ°å¢æ å |
| | | */ |
| | | private String parentTree; |
| | | |
| | | private String name; |
| | | } |
| | |
| | | * @Date 2024/8/28 |
| | | */ |
| | | @Data |
| | | public class IfsInventoryQuantityCheckDto implements Serializable { |
| | | public class IfsInventoryQuantityCheckDto implements Serializable { |
| | | |
| | | private Integer id; |
| | | |
| | |
| | | |
| | | @Schema(description = "æ£éªäºº") |
| | | private String userName; |
| | | |
| | | @Schema(description = "éå®è®¢ååç±»") |
| | | private String orderType; |
| | | } |
| | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "éå®è®¢ååç±»åç§°") |
| | | private String orderTypeName; |
| | | |
| | | // è¿å |
| | | @Schema(description = "è¿å订åid") |
| | | private Integer enterOrderId; |
| | |
| | | @Schema(description = "æå¨ä¸ä¼ æ¥åå°å") |
| | | private String enterUrlS; |
| | | |
| | | @Schema(description = "è¿åæ¥å审æ¹ç¶æ(1:æ¹åéè¿ï¼0ï¼æ¹åä¸éè¿)") |
| | | private Integer enterRatifyStatus; |
| | | |
| | | // å£åº¦ |
| | | @Schema(description = "å£åº¦è®¢åid") |
| | | private Integer quarterOrderId; |
| | |
| | | |
| | | @Schema(description = "æå¨ä¸ä¼ æ¥åå°å") |
| | | private String quarterUrlS; |
| | | |
| | | @Schema(description = "å£åº¦æ£éªæ¥å审æ¹ç¶æ(1:æ¹åéè¿ï¼0ï¼æ¹åä¸éè¿)") |
| | | private Integer quarterRatifyStatus; |
| | | |
| | | private Integer orderState; |
| | | |
| | |
| | | |
| | | @Schema(description = "å
æ£") |
| | | private Integer isExemption; |
| | | |
| | | @Schema(description = "åææid(导åºç¨)") |
| | | private String ids; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class InventoryDetailDTO { |
| | | // æ¥èª ifs_inventory_quantity |
| | | @Schema(description = "ifs_inventory_quantityID") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "é¶ä»¶æè¿°") |
| | | private String partDesc; |
| | | |
| | | @Schema(description = "SNå·") |
| | | private String lotBatchNo; |
| | | |
| | | @Schema(description = "é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | // æ¥èª ifs_part_props_record |
| | | |
| | | @Schema(description = "ç»ç¼é¢è²") |
| | | private String insulationColor; |
| | | |
| | | @Schema(description = "æ¤å¥é¢è²") |
| | | private String outerColor; |
| | | |
| | | @Schema(description = "è½½å
·ç¼å·") |
| | | private String drumNo; |
| | | |
| | | @Schema(description = "èµ·å§ç±³æ ") |
| | | private String startMeterMark; |
| | | |
| | | @Schema(description = "æªæ¢ç±³æ ") |
| | | private String endMeterMark; |
| | | |
| | | // æ¥èª ins_order |
| | | |
| | | @Schema(description = "å
¥åºæ¶é´") |
| | | private Date updateTime; |
| | | |
| | | @Schema(description = "æ£æµç»è®º") |
| | | private Integer insState; |
| | | |
| | | // é»è¾è®¡ç®åæ®µï¼æ£éªäºº (COALESCE åçç»æ) |
| | | |
| | | @Schema(description = "æ£æµäººå") |
| | | private String inspectorName; |
| | | } |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private String value; |
| | | |
| | | @Schema(description = "é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | // æ ·åè±æ |
| | | @Schema(description = "æ ·åè±æ") |
| | | private String sampleEn; |
| | | |
| | | @Schema(description = "产å") |
| | | private List<ModelDto> children; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ ååºåºå®ä¸¤çº§æ èç¹ï¼è¡ä¸ -> æ åï¼ |
| | | */ |
| | | @Data |
| | | public class StandardLibraryTreeNodeDto { |
| | | |
| | | private Integer id; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private String code; |
| | | |
| | | private String sampleEn; |
| | | |
| | | private Integer standardMethodId; |
| | | |
| | | private String standardCode; |
| | | |
| | | private String standardName; |
| | | |
| | | private List<StandardLibraryTreeNodeDto> children; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ ååºä¸¤çº§æ æ¥è¯¢çæå¹³è¡ç»æï¼è¡ä¸ + æ åï¼ |
| | | */ |
| | | @Data |
| | | public class StandardLibraryTreeRowDto { |
| | | |
| | | private Integer industryId; |
| | | |
| | | private String industryName; |
| | | |
| | | private Integer industrySort; |
| | | |
| | | private Integer standardId; |
| | | |
| | | private Integer standardMethodId; |
| | | |
| | | private String standardCode; |
| | | |
| | | private String standardName; |
| | | |
| | | private String standardNameEn; |
| | | |
| | | private String standardLabel; |
| | | |
| | | private Integer standardSort; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class StandardTreeTemplateBindingDto { |
| | | private Integer standardTreeId; |
| | | private List<TemplateBindingItemDto> templates; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class StandardTreeTemplateBindingVo { |
| | | @Schema(description = "模æ¿ID") |
| | | private Integer templateId; |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String name; |
| | | @Schema(description = "æ£éªé¡¹ç®") |
| | | private String number; |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | @Schema(description = "æåº") |
| | | private Integer sort; |
| | | @Schema(description = "设å¤IDéå") |
| | | private List<Integer> deviceIds = new ArrayList<>(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class TemplateBindingItemDto { |
| | | @Schema(description = "模æ¿ID") |
| | | private Integer templateId; |
| | | @Schema(description = "æåº") |
| | | private Integer sort; |
| | | @Schema(description = "设å¤IDéå") |
| | | private List<Integer> deviceIds = new ArrayList<>(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** åå§è®°å½æ¨¡æ¿ä¸æ è®°ä¸ºâæ£éªé¡¹âçä¸è¡ã */ |
| | | @Data |
| | | public class TemplateInspectionItemDto { |
| | | private Integer templateId; |
| | | private Integer templateSort; |
| | | private Integer templateRowIndex; |
| | | private String inspectionItem; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ åæ èç¹è¯·æ± |
| | | */ |
| | | @Data |
| | | public class UpdateStandardTreeNodeDto { |
| | | |
| | | /** |
| | | * ç¶èç¹è·¯å¾ï¼ä¸ºç©ºè¡¨ç¤ºä¿®æ¹è¡ä¸ï¼ä¸ºè¡ä¸å称表示修æ¹è¯¥è¡ä¸ä¸çæ å |
| | | */ |
| | | private String parentTree; |
| | | |
| | | private String oldLabel; |
| | | |
| | | private String name; |
| | | } |
| | |
| | | public interface CertificationMapper extends BaseMapper<Certification> { |
| | | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("ew") QueryWrapper<Certification> ew); |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("param") Certification certification); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | int selectReportCountById(@Param("ifsInventoryId") Integer ifsInventoryId); |
| | | int selectReportCountById(@Param("ifsInventoryId") Long ifsInventoryId); |
| | | |
| | | |
| | | /** |
| | |
| | | @Param("supplierName") String supplierName, |
| | | @Param("startOfNextQuarter") LocalDateTime startOfNextQuarter, |
| | | @Param("endOfQuarter") LocalDateTime endOfQuarter); |
| | | |
| | | List<IfsInventoryQuantityVO> selectSplitOrderList(@Param("partNo")String partNo, |
| | | @Param("lineNo")String lineNo, |
| | | @Param("releaseNo")String releaseNo, |
| | | @Param("receiptNo")Integer receiptNo, |
| | | @Param("orderNo")String orderNo); |
| | | } |
| | |
| | | |
| | | public interface SealMapper extends BaseMapper<Seal> { |
| | | IPage<Seal>selectSeal(Page page, @Param("ew") QueryWrapper<Seal> ew); |
| | | List<Laboratory> selectLaboratory (Integer labId); |
| | | List<Laboratory> selectLaboratory (@Param("labId") Integer labId); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethodAttachment; |
| | | |
| | | public interface StandardMethodAttachmentMapper extends BaseMapper<StandardMethodAttachment> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethodIndustry; |
| | | |
| | | public interface StandardMethodIndustryMapper extends BaseMapper<StandardMethodIndustry> { |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | IPage<StandardMethod> selectStandardMethodList(Page page, @Param("ew") QueryWrapper<StandardMethod> ew); |
| | | |
| | | StandardMethod selectStandMethodById(Integer id); |
| | | StandardMethod selectStandMethodById(@Param("id") Integer id); |
| | | |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodListsByNull(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists3(@Param("tree") String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodListsByIndustry(@Param("industry") String industry); |
| | | |
| | | List<StandardMethodList> selectListEnum(); |
| | | |
| | | Integer getStandardMethodId(@Param("code") String code); |
| | | |
| | | } |
| | | |
| | |
| | | @Param("endIndex") Integer endIndex, |
| | | @Param("methodId") Integer methodId, |
| | | @Param("tree") String tree); |
| | | |
| | | /** |
| | | * æ¹éæ·»å æ å |
| | | * @param productLists |
| | | */ |
| | | void saveBatchProductLists(@Param("productLists") List<StandardProductList> productLists); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | IPage<StandardTemplate> selectStandardTemplatePageList(Page page, @Param("ew") QueryWrapper<StandardTemplate> ew); |
| | | |
| | | StandardTemplate getStandTempIdByName(String name); |
| | | StandardTemplate getStandTempIdByName(@Param("name") String name); |
| | | |
| | | /** |
| | | * æ¥è¯¢å缩åçæ°æ® |
| | | * @param templateId |
| | | * @return |
| | | */ |
| | | String selectCompressThing(Integer templateId); |
| | | String selectCompressThing(@Param("templateId") Integer templateId); |
| | | |
| | | /** |
| | | * ç»å®è¯¥æ¨¡æ¿æ£éªé¡¹åæ°ç»è®¡ |
| | | * |
| | | * @param templateId |
| | | * @return |
| | | */ |
| | | int countBindTemplateItemParameter(@Param("templateId") Integer templateId); |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.*; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | * @createDate 2024-03-01 15:06:44 |
| | | * @Entity com.ruoyi.basic.pojo.StandardTree |
| | | */ |
| | | @Mapper |
| | | public interface StandardTreeMapper extends BaseMapper<StandardTree> { |
| | | |
| | | List<FactoryDto> selectStandardTreeList(); |
| | | List<StandardLibraryTreeRowDto> selectStandardLibraryTree(); |
| | | |
| | | List<StandardTree> selectStandardTreeList2(String sampleType); |
| | | |
| | | /** |
| | | * è¡ä¸æ¹åï¼çº§èæ´æ°æ ååºé
ç½®ä¸çè¡ä¸åç§°ï¼å¹¶é建两级è§èè·¯å¾ |
| | | */ |
| | | int updateProductListIndustry(@Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | /** |
| | | * æ åæ¹åï¼çº§èæ´æ°æ ååºé
ç½®ä¸çæ ååç§°ï¼å¹¶é建两级è§èè·¯å¾ |
| | | */ |
| | | int updateProductListStandard(@Param("industry") String industry, @Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | /** |
| | | * è¡ä¸æ¹åï¼çº§èæ´æ°æªå®æè®¢åçè¡ä¸åç§° |
| | | */ |
| | | int updateInsOrderIndustry(@Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | int updateInsSampleIndustry(@Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | int updateInsProductIndustry(@Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | /** |
| | | * æ åæ¹åï¼çº§èæ´æ°æªå®æè®¢åçæ ååç§° |
| | | */ |
| | | int updateInsOrderStandard(@Param("industry") String industry, @Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | int updateInsSampleStandard(@Param("industry") String industry, @Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | int updateInsProductStandard(@Param("industry") String industry, @Param("oldName") String oldName, @Param("newName") String newName); |
| | | |
| | | StandardProductList selectStandardProductById(Integer id); |
| | | |
| | | List<StandardProductList> getStandardProductListBySample(String sampleType); |
| | | |
| | | List<StandardMethodList> getStandardMethodListBySample(String sampleType); |
| | | List<StandardProductList> selectStandardProductListByTree(@Param("tree") String tree, @Param("sample") String sample, @Param("model") String model, @Param("trees") String trees, @Param("laboratory") String laboratory); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree(String tree, String sample, String model, String trees, String laboratory); |
| | | List<StandardProductList> selectStandardProductListByTree2(@Param("tree") String tree, @Param("sample") String sample, @Param("model") String model, @Param("trees") String trees, @Param("laboratory") String laboratory); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree2(String tree, String sample, String model, String trees, String laboratory); |
| | | /** |
| | | * æè¡ä¸æ¥è¯¢åºç¡æ£éªé¡¹ï¼çæä¸¤çº§æ åé
ç½®ï¼sample=æ åãmodel=NULLãtree=è§èè·¯å¾ï¼ |
| | | */ |
| | | List<StandardProductList> selectStandardProductListByIndustry(@Param("industry") String industry, @Param("standard") String standard, @Param("tree") String tree); |
| | | |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | List<SampleDto> getStandardTree3(String sampleType); |
| | | |
| | | |
| | | String getLaboratory(String str); |
| | | |
| | |
| | | |
| | | List<FactoryDto> selectStandardTreeListByPartNo(@Param("partNo") String partNo); |
| | | |
| | | IPage<IfsInventoryQuantity> selectIfsPage(IPage<IfsInventoryQuantity> page, |
| | | @Param("ew") QueryWrapper<IfsInventoryQuantity> ew); |
| | | IPage<IfsInventoryQuantityVO> selectIfsPage(IPage<IfsInventoryQuantity> page, |
| | | @Param("ew") QueryWrapper<IfsInventoryQuantity> ew); |
| | | |
| | | IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, |
| | | @Param("ew") QueryWrapper<IfsInventoryQuantityDto> ew); |
| | |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page<IfsInventoryQuantitySupplierDto> page, @Param("ew") QueryWrapper<IfsInventoryQuantitySupplierDto> ew, @Param("beginDeclareDate") String beginDeclareDate, @Param("endDeclareDate")String endDeclareDate); |
| | | |
| | | /** |
| | | * æ¹éæ¥è¯¢æ |
| | | * @param sampleTypeValues |
| | | * @return |
| | | */ |
| | | List<SampleDto> getStandardTree3Batch(@Param("sampleTypeValues") Set<String> sampleTypeValues); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ |
| | | * @param sampleType |
| | | * @return |
| | | */ |
| | | List<SampleDto> getStandardTree3(@Param("sampleType") String sampleType); |
| | | |
| | | /** |
| | | * æ ¹æ®åææidå表æ¥è¯¢åææä¿¡æ¯ |
| | | * @param ifsIds |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getIfsByIds(@Param("ifsIds") List<String> ifsIds); |
| | | |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateBinding; |
| | | |
| | | /** æ 忍¡æ¿ç»å® Mapperã */ |
| | | public interface StandardTreeTemplateBindingMapper extends BaseMapper<StandardTreeTemplateBinding> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateDevice; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** æ 忍¡æ¿é»è®¤è®¾å¤ Mapperã */ |
| | | public interface StandardTreeTemplateDeviceMapper extends BaseMapper<StandardTreeTemplateDevice> { |
| | | |
| | | List<Integer> selectExistingDeviceIds(@Param("deviceIds") List<Integer> deviceIds); |
| | | } |
| | |
| | | |
| | | List<TestItemDto> getItemTree(); |
| | | |
| | | int removeNoSample(@Param("sample") String sample); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿¡æ¯ |
| | | * @param managementNumberList |
| | | * @return |
| | | */ |
| | | List<Integer> selectDeviceIdsByNumber(@Param("managementNumberList") List<String> managementNumberList); |
| | | } |
| | | |
| | |
| | | |
| | | @Schema(description = "èµè´¨éä»¶å°å") |
| | | private String fileUrl; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
| | |
| | | @ExcelIgnoreUnannotated |
| | | public class IfsInventoryQuantity implements Serializable { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | |
| | | @Schema(description = "å") |
| | |
| | | |
| | | @Schema(description = "æ¥æ¶å·") |
| | | private Integer receiptNo; |
| | | |
| | | @Schema(description = "订åç±»å(01raw:åææï¼02wg:å¤è´æå)") |
| | | private String orderType; |
| | | |
| | | @Schema(description = "ç©æå±æ§ï¼ç¨äºåºåéãé导ä½çé¶ä»¶") |
| | | private String materialProp; |
| | | |
| | | @ExcelProperty(index = 3, value = "é¶ä»¶å·") |
| | | @Schema(description = "é¶ä»¶å·") |
| | |
| | | // æ¯å¦æ¯è¿æææ: 0å¦, 1:æ¯" |
| | | @Schema(description = "ç©æç±»å") |
| | | private Integer isExpire; |
| | | |
| | | @Schema(description = "æ¯å¦ä¸ºæå订å(1:æ¯ï¼0:å¦)") |
| | | private Integer isSplitOrder; |
| | | } |
| | |
| | | @Schema(description = "å°å") |
| | | private String address; |
| | | |
| | | @Schema(description = "è¡ä¸æåº") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(select = false,exist = false) |
| | | private String createUserName; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ åæ¹æ³ |
| | |
| | | @Schema(description = "æ£éªå¯¹è±¡") |
| | | private String structureTestObjectId; |
| | | |
| | | /** æ ååºä¸çº§è¡ä¸IDï¼ä»
æ¥å£äº¤äºï¼ä¸è½standard_methodè¡¨ï¼ */ |
| | | @TableField(exist = false) |
| | | private List<Integer> industryIds; |
| | | |
| | | /** å·²ç»å®è¡ä¸åç§°ï¼å表å±ç¤ºï¼ */ |
| | | @TableField(exist = false) |
| | | private String industryNames; |
| | | |
| | | /** éä»¶æ°éï¼å表å±ç¤ºï¼ */ |
| | | @TableField(exist = false) |
| | | private Integer attachmentCount; |
| | | |
| | | /** |
| | | * æ åç¼å· |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("standard_method_attachment") |
| | | public class StandardMethodAttachment { |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private Integer standardMethodId; |
| | | private String fileName; |
| | | private String fileUrl; |
| | | private Integer sort; |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("standard_method_industry") |
| | | public class StandardMethodIndustry { |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private Integer standardMethodId; |
| | | private Integer industryId; |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| | |
| | | * æ åæ ä¸çæ åå表 |
| | | * @TableName standard_method_list |
| | | */ |
| | | @TableName(value ="standard_method_list") |
| | | @Data |
| | | public class StandardMethodList implements Serializable { |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import tools.jackson.databind.annotation.JsonSerialize; |
| | | import tools.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | |
| | | @Schema(description = "åå·") |
| | | private String model; |
| | | |
| | | @Schema(description = "åå·") |
| | | @Schema(description = "模æ¿id") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "") |
| | |
| | | |
| | | private String tree; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import tools.jackson.databind.annotation.JsonSerialize; |
| | | import tools.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Schema(description = "模æ¿ç¼å·") |
| | | private String number; |
| | | |
| | | /** |
| | | * ä»·æ ¼(å
) |
| | | */ |
| | | @Schema(description = "ä»·æ ¼(å
)") |
| | | private BigDecimal price; |
| | | } |
| | |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String model; |
| | | /** |
| | | * æ åæåº |
| | | */ |
| | | @Schema(description = "æ åæåº") |
| | | private Integer sort; |
| | | |
| | | /** æ åç»´æ¤IDï¼è§èåäºçº§æ åä½¿ç¨ */ |
| | | private Integer standardMethodId; |
| | | /** |
| | | * |
| | | */ |
| | | @Schema(description = "") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** æ åï¼äºçº§èç¹ï¼ä¸åå§è®°å½æ¨¡æ¿çç»å®å
³ç³»ã */ |
| | | @Data |
| | | @TableName("standard_tree_template_binding") |
| | | public class StandardTreeTemplateBinding { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer standardTreeId; |
| | | |
| | | private Integer templateId; |
| | | |
| | | private Integer sort; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** æ åä¸åå§è®°å½æ¨¡æ¿ä¸é»è®¤è®¾å¤çç»å®å
³ç³»ã */ |
| | | @Data |
| | | @TableName("standard_tree_template_device") |
| | | public class StandardTreeTemplateDevice { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer standardTreeId; |
| | | |
| | | private Integer templateId; |
| | | |
| | | private Integer deviceId; |
| | | |
| | | private Integer sort; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| | |
| | | @Schema(description = "æ¶è´¹æ å(å
/次)") |
| | | private String rates; |
| | | |
| | | @Schema(description = "设å¤id") |
| | | private String deviceIds; |
| | | |
| | | @Schema(description = "æ½æ£ç±»å, 1:æåº¦, 2:å£åº¦, 3:年度") |
| | | private String spotCheckType; |
| | | |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.basic.pojo.StandardMethodAttachment; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | List<StandardMethod> selectStandardMethods(); |
| | | |
| | | int addStandardMethod(StandardMethod standardMethod); |
| | | Integer addStandardMethod(StandardMethod standardMethod); |
| | | |
| | | int delStandardMethod(Integer id); |
| | | |
| | | int upStandardMethod(StandardMethod standardMethod); |
| | | |
| | | void inputExcel(MultipartFile file) throws IOException; |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM(String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodEnum(); |
| | | |
| | | List<StandardMethodAttachment> selectAttachments(Integer standardMethodId); |
| | | |
| | | StandardMethodAttachment uploadAttachment(Integer standardMethodId, MultipartFile file); |
| | | |
| | | boolean deleteAttachment(Long id); |
| | | |
| | | List<Laboratory> selectIndustryOptions(); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.dto.CopyStandardProductListDto; |
| | |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | | |
| | | int delStandardProduct(JSONArray list); |
| | | |
| | | List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample); |
| | | |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page); |
| | | /** |
| | | * æ ¹æ®æ£éªæ ååæ åæ èç¹çææ£éªé¡¹ç®ï¼å¹¶åæ¥è¯¥èç¹ä¸å·²ä¿åç项ç®é
ç½®ã |
| | | * |
| | | * <p>è¯¥æ¹æ³ä¼å é¤ç®æ èç¹ï¼æå
¶åèç¹ï¼çæ§è®°å½åéæ°æ¹éä¿åï¼å æ¤å¹¶éåªè¯»æ¥è¯¢ã</p> |
| | | * |
| | | * @param id æ£éªæ å ID |
| | | * @param tree æ åæ è·¯å¾ï¼ä½¿ç¨ {@code " - "} åéå±çº§ |
| | | * @return {@code productList} 为çæåçæ£éªé¡¹ç®å表ï¼{@code total} 为å表æ°é |
| | | */ |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page, String keyword); |
| | | |
| | | IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items); |
| | | |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.AddStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.SampleTypeDto; |
| | | import com.ruoyi.basic.dto.StandardLibraryTreeNodeDto; |
| | | import com.ruoyi.basic.dto.UpdateStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingVo; |
| | | import com.ruoyi.basic.dto.TemplateInspectionItemDto; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | */ |
| | | public interface StandardTreeService extends IService<StandardTree> { |
| | | |
| | | List<FactoryDto> selectStandardTreeList(); |
| | | List<StandardLibraryTreeNodeDto> selectStandardTreeList(); |
| | | |
| | | |
| | | int addStandardTree(StandardTree standardTree); |
| | | int addStandardTree(AddStandardTreeNodeDto dto); |
| | | |
| | | int delStandardTree(String tree); |
| | | |
| | | int addStandardProduct(String ids, String tree); |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | int upStandardProducts(Map<String, Object> product); |
| | | |
| | | List<StandardTree> getStandTreeBySampleType(String laboratory, String sampleType); |
| | | |
| | | void inExcelOfTree(MultipartFile file); |
| | | |
| | | void resetTreeOfPrice(String tree, Integer standardId); |
| | | |
| | | void resetTreeOfHour(String tree, Integer standardId); |
| | | |
| | | void resetTreeOfAsk(String tree, Integer standardId); |
| | | |
| | | void importWorkstationExcel(MultipartFile file); |
| | | |
| | | /** |
| | | * æ åæ°æåº |
| | | * æ åæ æåº |
| | | * @param list |
| | | * @return |
| | | */ |
| | | boolean updateTreeSort(List<FactoryDto> list); |
| | | boolean updateTreeSort(List<StandardLibraryTreeNodeDto> list); |
| | | |
| | | int updateStandardTree(StandardTree standardTree); |
| | | int updateStandardTree(UpdateStandardTreeNodeDto dto); |
| | | |
| | | List<StandardTreeTemplateBindingVo> selectTemplateBindings(Integer standardTreeId); |
| | | |
| | | boolean saveTemplateBindings(StandardTreeTemplateBindingDto dto); |
| | | |
| | | List<TemplateInspectionItemDto> selectTemplateInspectionItems(Integer standardTreeId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | public interface StructureItemParameterService extends IService<StructureItemParameter> { |
| | | void removeNoSample(String sample); |
| | | |
| | | /** |
| | | * 导å
¥æ£éªé¡¹ç® |
| | | * @param file |
| | | */ |
| | | void importEquipData(MultipartFile file) throws IOException; |
| | | } |
| | |
| | | @AllArgsConstructor |
| | | public class CapacityScopeServiceImpl extends ServiceImpl<StructureItemParameterMapper, StructureItemParameter> implements CapacityScopeService { |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | |
| | | List<Product> products = productMapper.selectList(Wrappers.<Product>lambdaQuery() |
| | | .eq(Product::getObjectId, id)); |
| | | List<Integer> productIds = products.stream().map(Product::getId).collect(Collectors.toList()); |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .in(ProductPart::getProductId, productIds)); |
| | | if (CollectionUtils.isNotEmpty(productIds)) { |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .in(ProductPart::getProductId, productIds)); |
| | | |
| | | // å é¤äº§åç»´æ¤ |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |
| | | // å é¤äº§åç»´æ¤ |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |
| | | } |
| | | |
| | | return structureTestObjectMapper.deleteById(id); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | @Override |
| | | public IPage<Certification> getCertificationDetail(Page page, Certification certification) { |
| | | return certificationMapper.getCertificationDetail(page, QueryWrappers.queryWrappers(certification)); |
| | | return certificationMapper.getCertificationDetail(page, certification); |
| | | } |
| | | |
| | | //æ·»å èµè´¨æç»å表 |
| | |
| | | //å é¤èµè´¨æç»å表 |
| | | @Override |
| | | public int delCertificationDetail(String ids) { |
| | | List<Integer> list = JSON.parseArray(ids,Integer.class); |
| | | List<Integer> list = Arrays.stream(ids.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | return certificationMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectMapper; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.LaboratoryMapper; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.service.LaboratoryService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | @Autowired |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | @Override |
| | | public IPage<Laboratory> selectItemParameter(Page page, Laboratory itemParameter) { |
| | | return laboratoryMapper.selectItemParameter(page, QueryWrappers.queryWrappers(itemParameter)); |
| | |
| | | |
| | | @Override |
| | | public int delParameter(Integer id) { |
| | | // 夿æ¯å¦ç»å®å¯¹è±¡ |
| | | QueryWrapper<StructureTestObject> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("laboratory_id",id); |
| | | List<StructureTestObject> structureTestObjectList = structureTestObjectMapper.selectList(queryWrapper); |
| | | if(!CollectionUtils.isEmpty(structureTestObjectList)){ |
| | | throw new RuntimeException("å·²ç»å®å¯¹è±¡ï¼ç¦æ¢å é¤"); |
| | | } |
| | | return laboratoryMapper.deleteById(id); |
| | | } |
| | | |
| | |
| | | if (supplierDensity.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | // Long count = baseMapper.selectCount(Wrappers.<ProductSupplierDensity>lambdaQuery() |
| | | // .eq(ProductSupplierDensity::getProductId, supplierDensity.getProductId()) |
| | | // .eq(ProductSupplierDensity::getModel, supplierDensity) |
| | | // .eq(ProductSupplierDensity::getSupplierName, supplierDensity.getSupplierName())); |
| | | // if (count > 0){ |
| | | // throw new BaseException("该产åå·²ç»å®è¿è¯¥åå®¶"); |
| | | // } |
| | | |
| | | baseMapper.insert(supplierDensity); |
| | | } |
| | | |
| | |
| | | if (supplierDensity.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | // Long count = baseMapper.selectCount(Wrappers.<ProductSupplierDensity>lambdaQuery() |
| | | // .ne(ProductSupplierDensity::getId, supplierDensity.getId()) |
| | | // .eq(ProductSupplierDensity::getProductId, supplierDensity.getProductId()) |
| | | // .eq(ProductSupplierDensity::getModel, supplierDensity) |
| | | // .eq(ProductSupplierDensity::getSupplierName, supplierDensity.getSupplierName())); |
| | | // if (count > 0){ |
| | | // throw new BaseException("该产åå·²ç»å®è¿è¯¥åå®¶"); |
| | | // } |
| | | baseMapper.updateById(supplierDensity); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardMethodMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.mapper.StandardMethodIndustryMapper; |
| | | import com.ruoyi.basic.mapper.StandardMethodAttachmentMapper; |
| | | import com.ruoyi.basic.mapper.LaboratoryMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeTemplateBindingMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.pojo.StandardMethodIndustry; |
| | | import com.ruoyi.basic.pojo.StandardMethodAttachment; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateBinding; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.service.StandardMethodService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import lombok.AllArgsConstructor; |
| | | import com.ruoyi.basic.utils.StandardTreePath; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | |
| | | * @createDate 2024-03-03 19:21:41 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardMethodServiceImpl extends ServiceImpl<StandardMethodMapper, StandardMethod> |
| | | implements StandardMethodService { |
| | | |
| | | |
| | | private StandardMethodMapper standardMethodMapper; |
| | | |
| | | StandardProductListMapper standardProductListMapper; |
| | | StandardProductListService standardProductListService; |
| | | private StandardProductListMapper standardProductListMapper; |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | StructureItemParameterMapper structureItemParameterMapper; |
| | | StructureItemParameterService structureItemParameterService; |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | private StandardMethodIndustryMapper standardMethodIndustryMapper; |
| | | private StandardMethodAttachmentMapper standardMethodAttachmentMapper; |
| | | private LaboratoryMapper laboratoryMapper; |
| | | private StandardTreeMapper standardTreeMapper; |
| | | private StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | /** |
| | | * ä¸å¡ä¾èµç±æé 卿³¨å
¥ï¼æä»¶è·¯å¾ç± @Value ä»é
置读åï¼ä¸è½åä¸ Lombok çå
¨åæé å¨ï¼ |
| | | * å¦å Spring 伿 String 误认为éè¦æ³¨å
¥ç Beanã |
| | | */ |
| | | public StandardMethodServiceImpl(StandardMethodMapper standardMethodMapper, |
| | | StandardProductListMapper standardProductListMapper, |
| | | StandardProductListService standardProductListService, |
| | | StructureItemParameterMapper structureItemParameterMapper, |
| | | StructureItemParameterService structureItemParameterService, |
| | | StandardMethodIndustryMapper standardMethodIndustryMapper, |
| | | StandardMethodAttachmentMapper standardMethodAttachmentMapper, |
| | | LaboratoryMapper laboratoryMapper, |
| | | StandardTreeMapper standardTreeMapper, |
| | | StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper) { |
| | | this.standardMethodMapper = standardMethodMapper; |
| | | this.standardProductListMapper = standardProductListMapper; |
| | | this.standardProductListService = standardProductListService; |
| | | this.structureItemParameterMapper = structureItemParameterMapper; |
| | | this.structureItemParameterService = structureItemParameterService; |
| | | this.standardMethodIndustryMapper = standardMethodIndustryMapper; |
| | | this.standardMethodAttachmentMapper = standardMethodAttachmentMapper; |
| | | this.laboratoryMapper = laboratoryMapper; |
| | | this.standardTreeMapper = standardTreeMapper; |
| | | this.standardTreeTemplateBindingMapper = standardTreeTemplateBindingMapper; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod) { |
| | | return standardMethodMapper.selectStandardMethodList(page, QueryWrappers.queryWrappers(standardMethod)); |
| | | IPage<StandardMethod> result = standardMethodMapper.selectStandardMethodList(page, QueryWrappers.queryWrappers(standardMethod)); |
| | | for (StandardMethod method : result.getRecords()) { |
| | | method.setIndustryIds(selectIndustryIds(method.getId())); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int addStandardMethod(StandardMethod standardMethod) { |
| | | int insert = standardMethodMapper.insert(standardMethod); |
| | | return insert; |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Integer addStandardMethod(StandardMethod standardMethod) { |
| | | standardMethod.setStructureTestObjectId(null); |
| | | standardMethodMapper.insert(standardMethod); |
| | | syncIndustries(standardMethod, Collections.<Integer>emptySet()); |
| | | return standardMethod.getId(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delStandardMethod(Integer id) { |
| | | int i = standardMethodMapper.deleteById(id); |
| | | return i; |
| | | StandardMethod method = standardMethodMapper.selectById(id); |
| | | if (method == null) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | for (Integer industryId : selectIndustryIds(id)) { |
| | | removeIndustryTree(method, industryId); |
| | | } |
| | | standardMethodIndustryMapper.delete(Wrappers.<StandardMethodIndustry>lambdaQuery() |
| | | .eq(StandardMethodIndustry::getStandardMethodId, id)); |
| | | standardMethodAttachmentMapper.delete(Wrappers.<StandardMethodAttachment>lambdaQuery() |
| | | .eq(StandardMethodAttachment::getStandardMethodId, id)); |
| | | return standardMethodMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upStandardMethod(StandardMethod standardMethod) { |
| | | StandardMethod oldStandardMethod = standardMethodMapper.selectById(standardMethod.getId()); |
| | | if (oldStandardMethod == null) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | if (!oldStandardMethod.getCode().equals(standardMethod.getCode())) { |
| | | CompletableFuture.supplyAsync(() -> replaceMethod(oldStandardMethod.getCode(), standardMethod.getCode())); |
| | | } |
| | | int i = standardMethodMapper.updateById(standardMethod); |
| | | syncIndustries(standardMethod, new LinkedHashSet<>(selectIndustryIds(oldStandardMethod.getId()))); |
| | | return i; |
| | | } |
| | | |
| | | private List<Integer> selectIndustryIds(Integer methodId) { |
| | | List<StandardMethodIndustry> list = standardMethodIndustryMapper.selectList( |
| | | Wrappers.<StandardMethodIndustry>lambdaQuery() |
| | | .eq(StandardMethodIndustry::getStandardMethodId, methodId)); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (StandardMethodIndustry item : list) { |
| | | ids.add(item.getIndustryId()); |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | private void syncIndustries(StandardMethod method, Set<Integer> oldIds) { |
| | | Set<Integer> newIds = method.getIndustryIds() == null ? new LinkedHashSet<Integer>() |
| | | : new LinkedHashSet<>(method.getIndustryIds()); |
| | | for (Integer industryId : newIds) { |
| | | if (industryId == null || laboratoryMapper.selectById(industryId) == null) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | } |
| | | for (Integer oldId : oldIds) { |
| | | if (!newIds.contains(oldId)) { |
| | | removeIndustryTree(method, oldId); |
| | | standardMethodIndustryMapper.delete(Wrappers.<StandardMethodIndustry>lambdaQuery() |
| | | .eq(StandardMethodIndustry::getStandardMethodId, method.getId()) |
| | | .eq(StandardMethodIndustry::getIndustryId, oldId)); |
| | | } |
| | | } |
| | | for (Integer industryId : newIds) { |
| | | Laboratory lab = laboratoryMapper.selectById(industryId); |
| | | Long count = standardMethodIndustryMapper.selectCount(Wrappers.<StandardMethodIndustry>lambdaQuery() |
| | | .eq(StandardMethodIndustry::getStandardMethodId, method.getId()) |
| | | .eq(StandardMethodIndustry::getIndustryId, industryId)); |
| | | if (count == 0) { |
| | | StandardMethodIndustry relation = new StandardMethodIndustry(); |
| | | relation.setStandardMethodId(method.getId()); |
| | | relation.setIndustryId(industryId); |
| | | standardMethodIndustryMapper.insert(relation); |
| | | } |
| | | StandardTree tree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, lab.getLaboratoryName()) |
| | | .eq(StandardTree::getStandardMethodId, method.getId()) |
| | | .isNull(StandardTree::getSampleType).isNull(StandardTree::getModel)); |
| | | if (tree == null) { |
| | | tree = new StandardTree(); |
| | | tree.setLaboratory(lab.getLaboratoryName()); |
| | | tree.setSample(buildLabel(method)); |
| | | tree.setStandardMethodId(method.getId()); |
| | | tree.setSort(0); |
| | | standardTreeMapper.insert(tree); |
| | | } else if (!buildLabel(method).equals(tree.getSample())) { |
| | | StandardTree update = new StandardTree(); |
| | | update.setId(tree.getId()); |
| | | update.setSample(buildLabel(method)); |
| | | standardTreeMapper.updateById(update); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void removeIndustryTree(StandardMethod method, Integer industryId) { |
| | | Laboratory lab = laboratoryMapper.selectById(industryId); |
| | | if (lab == null) return; |
| | | StandardTree tree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, lab.getLaboratoryName()) |
| | | .eq(StandardTree::getStandardMethodId, method.getId()) |
| | | .isNull(StandardTree::getSampleType).isNull(StandardTree::getModel)); |
| | | if (tree != null) { |
| | | standardTreeTemplateBindingMapper.delete(Wrappers.<StandardTreeTemplateBinding>lambdaQuery() |
| | | .eq(StandardTreeTemplateBinding::getStandardTreeId, tree.getId())); |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getLaboratory, lab.getLaboratoryName()) |
| | | .eq(StandardProductList::getSample, tree.getSample()) |
| | | .isNull(StandardProductList::getSampleType).isNull(StandardProductList::getModel)); |
| | | standardTreeMapper.deleteById(tree.getId()); |
| | | } |
| | | } |
| | | |
| | | private String buildLabel(StandardMethod method) { |
| | | return method.getCode().trim(); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethodAttachment> selectAttachments(Integer standardMethodId) { |
| | | return standardMethodAttachmentMapper.selectList(Wrappers.<StandardMethodAttachment>lambdaQuery() |
| | | .eq(StandardMethodAttachment::getStandardMethodId, standardMethodId) |
| | | .orderByAsc(StandardMethodAttachment::getSort, StandardMethodAttachment::getId)); |
| | | } |
| | | |
| | | @Override |
| | | public StandardMethodAttachment uploadAttachment(Integer standardMethodId, MultipartFile file) { |
| | | if (standardMethodMapper.selectById(standardMethodId) == null) throw new BaseException("æ åä¸åå¨"); |
| | | if (file == null || file.isEmpty() || file.getSize() > 200L * 1024 * 1024) |
| | | throw new BaseException("éä»¶ä¸è½ä¸ºç©ºä¸ä¸è½è¶
è¿200MB"); |
| | | String originalName = file.getOriginalFilename(); |
| | | if (originalName == null || !originalName.matches("(?i).+\\.(jpg|jpeg|png|gif|doc|docx|xls|xlsx|ppt|pptx|pdf|zip|rar)$")) |
| | | throw new BaseException("䏿¯æçéä»¶æ ¼å¼"); |
| | | try { |
| | | boolean image = originalName.matches("(?i).+\\.(jpg|jpeg|png|gif)$"); |
| | | File directory = new File(image ? filePath : wordUrl); |
| | | if (!directory.exists()) directory.mkdirs(); |
| | | String fileUrl = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmssSSS")) + "-" + originalName; |
| | | file.transferTo(new File(directory, fileUrl)); |
| | | StandardMethodAttachment attachment = new StandardMethodAttachment(); |
| | | attachment.setStandardMethodId(standardMethodId); |
| | | attachment.setFileName(originalName); |
| | | attachment.setFileUrl(fileUrl); |
| | | attachment.setSort(selectAttachments(standardMethodId).size()); |
| | | standardMethodAttachmentMapper.insert(attachment); |
| | | return attachment; |
| | | } catch (IOException e) { |
| | | throw new BaseException("éä»¶ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteAttachment(Long id) { |
| | | return standardMethodAttachmentMapper.deleteById(id) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<Laboratory> selectIndustryOptions() { |
| | | return laboratoryMapper.selectList(Wrappers.<Laboratory>lambdaQuery() |
| | | .select(Laboratory::getId, Laboratory::getLaboratoryName, Laboratory::getSort) |
| | | .orderByAsc(Laboratory::getSort, Laboratory::getId)); |
| | | } |
| | | |
| | | //ç¼è¾methodåå
¨é¨æ¿æ¢ |
| | |
| | | return "æ¿æ¢å®æ¯!"; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void inputExcel(MultipartFile file) throws IOException { |
| | | // å卿£æµå¯¹è±¡List |
| | | List<Object> structureTestObjectIdList = new ArrayList<>(); |
| | | List<StandardMethod> result = new ArrayList<>(); |
| | | ExcelUtil.readBySax(file.getInputStream(), 0, (i, l, list) -> { |
| | | // å»é¤ç¬¬ä¸è¡è¡¨å¤´ |
| | | if (l == 0) { |
| | | return; |
| | | } |
| | | // åå¨å¯ä¸æ£æµå¯¹è±¡ |
| | | if (!structureTestObjectIdList.contains(list.get(2))) { |
| | | structureTestObjectIdList.add(list.get(2)); |
| | | } |
| | | StandardMethod standardMethod = formatData(list); |
| | | result.add(standardMethod); |
| | | }); |
| | | addStructureTest(structureTestObjectIdList, result); |
| | | } |
| | | |
| | | // æ ¼å¼åæ°æ® |
| | | public StandardMethod formatData(List<Object> list) { |
| | |
| | | return standardMethod; |
| | | } |
| | | |
| | | // æ°å¢æ°æ® |
| | | public void addStructureTest(List<Object> structureTestObjectIdList, List<StandardMethod> standardMethodList) { |
| | | List<StandardMethod> updateList = new ArrayList<>(); |
| | | List<Integer> deleteListId = new ArrayList<>(); |
| | | List<StandardMethod> addList = new ArrayList<>(); |
| | | if (!structureTestObjectIdList.isEmpty()) { |
| | | // 循ç¯exceléé¢çåç» |
| | | structureTestObjectIdList.forEach(j -> { |
| | | // 以excelä¸çç»åæ¥è¯¢æ°æ®åºä¸çåç» |
| | | List<StandardMethod> standardMethods = baseMapper.selectList(Wrappers.<StandardMethod>lambdaQuery() |
| | | .like(StandardMethod::getStructureTestObjectId, "\"" + j + "\"")); |
| | | // å°ç»æå¾ªç¯å¹é
|
| | | for (int i = 0; i < standardMethods.size(); i++) { |
| | | boolean isExistence = false; |
| | | for (int i1 = 0; i1 < standardMethodList.size(); i1++) { |
| | | // æ´æ° |
| | | if (standardMethods.get(i).getStructureTestObjectId().equals(standardMethodList.get(i1).getStructureTestObjectId()) |
| | | && standardMethods.get(i).getCode().equals(standardMethodList.get(i1).getCode()) |
| | | && standardMethods.get(i).getField().equals(standardMethodList.get(i1).getField())) { |
| | | // ç»excelæ°æ®èµå¼idåæ´æ° |
| | | standardMethodList.get(i1).setId(standardMethods.get(i).getId()); |
| | | // æ´æ° |
| | | updateList.add(standardMethodList.get(i1)); |
| | | isExistence = true; |
| | | break; |
| | | } |
| | | } |
| | | // å é¤ |
| | | if (!isExistence) { |
| | | deleteListId.add(standardMethods.get(i).getId()); |
| | | } |
| | | } |
| | | for (int i = 0; i < standardMethodList.size(); i++) { |
| | | if (standardMethodList.get(i).getStructureTestObjectId().contains("\"" + j + "\"")) { |
| | | boolean isExistence = false; |
| | | for (int i1 = 0; i1 < standardMethods.size(); i1++) { |
| | | if (standardMethods.get(i1).getStructureTestObjectId().equals(standardMethodList.get(i).getStructureTestObjectId()) |
| | | && standardMethods.get(i1).getCode().equals(standardMethodList.get(i).getCode()) |
| | | && standardMethods.get(i1).getField().equals(standardMethodList.get(i).getField())) { |
| | | isExistence = true; |
| | | break; |
| | | } |
| | | } |
| | | // æ°å¢ |
| | | if (!isExistence) { |
| | | addList.add(standardMethodList.get(i)); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) { |
| | | if (tree == null || tree.trim().isEmpty()) { |
| | | return Collections.emptyMap(); |
| | | } |
| | | if (!addList.isEmpty()) { |
| | | // æ°å¢ |
| | | baseMapper.insertBatchSomeColumn(addList); |
| | | StandardTreePath path = StandardTreePathParser.parse(tree); |
| | | String industry = path.getIndustry(); |
| | | List<StandardMethodList> standardMethodLists = new ArrayList<>(standardMethodMapper.selectStandardMethodListsByIndustry(industry)); |
| | | // æ ID å»éï¼ä¿æç¨³å®æåº |
| | | Map<Integer, StandardMethodList> byId = new LinkedHashMap<>(); |
| | | for (StandardMethodList m : standardMethodLists) { |
| | | byId.putIfAbsent(m.getId(), m); |
| | | } |
| | | |
| | | if (!deleteListId.isEmpty()) { |
| | | // å é¤ |
| | | baseMapper.deleteBatchIds(deleteListId); |
| | | } |
| | | |
| | | if (!updateList.isEmpty()) { |
| | | // æ´æ° |
| | | updateList.forEach(i -> { |
| | | baseMapper.updateById(i); |
| | | }); |
| | | } |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | map.put("standardMethodList", new ArrayList<>(byId.values())); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethodList> selectStandardMethodEnum() { |
| | | return standardMethodMapper.selectListEnum(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.*; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.basic.dto.CopyStandardProductListDto; |
| | | import com.ruoyi.basic.dto.InsSampleReceiveDto; |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | | import com.ruoyi.basic.dto.ResetTreeDragDTO; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListService2; |
| | | import com.ruoyi.basic.utils.StandardTreePath; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private StandardProductListSupplierAskMapper standardProductListSupplierAskMapper; |
| | |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardProduct(JSONArray list) { |
| | | return standardProductListMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample) { |
| | | // æ¯å¦æ²¡æäº§å |
| | | if (insSample == null || insSample.getStandardMethodListId() == null) { |
| | | throw new BaseException("æ£éªæ åä¸è½ä¸ºç©º"); |
| | | } |
| | | // æ°çæ°è两级æ ä¼å
æâè¡ä¸ + æ åâè§èè·¯å¾æ¥è¯¢ï¼æ æ³è§£ææ¶ä¿çåå²äºçº§é»è¾ã |
| | | boolean twoLevelOrder = false; |
| | | boolean isNoSample = false; |
| | | // String[] models = insSample.getModel().split("-(?=[^-]*$)");//æåæåä¸ä¸ªã-ã |
| | | String model = insSample.getModel(); |
| | | String modelNum = insSample.getModelNum(); |
| | | List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, model, insSample.getIsCableTag()); |
| | | if (list.size() == 0) { |
| | | List<StandardProductList> list = Collections.emptyList(); |
| | | if (StringUtils.isNotBlank(insSample.getFactory())) { |
| | | try { |
| | | StandardTreePath path = StandardTreePathParser.parse(insSample.getFactory()); |
| | | if (path.getStandard() != null) { |
| | | String canonicalTree = StandardTreePathParser.canonical(path.getIndustry(), path.getStandard()); |
| | | list = standardProductListMapper.selectDetail2( |
| | | insSample.getStandardMethodListId(), 1, canonicalTree, insSample.getIsCableTag()); |
| | | insSample.setLaboratory(path.getIndustry()); |
| | | insSample.setSampleType(null); |
| | | insSample.setSample(path.getStandard()); |
| | | insSample.setModel(null); |
| | | twoLevelOrder = true; |
| | | } |
| | | } catch (BaseException ignored) { |
| | | // åå²äºçº§è·¯å¾ç»§ç»èµ°åæå
¼å®¹æ¥è¯¢ã |
| | | } |
| | | } |
| | | if (!twoLevelOrder) { |
| | | list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, model, insSample.getIsCableTag()); |
| | | } |
| | | if (!twoLevelOrder && list.size() == 0) { |
| | | if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | String[] split1 = insSample.getFactory().split(" - "); |
| | | if (!isNoSample) { |
| | | if (!twoLevelOrder && !isNoSample) { |
| | | String[] split1 = insSample.getFactory().split(" - "); |
| | | //夿é¿åº¦ |
| | | if (split1.length > 4) { |
| | | if (ObjectUtils.isNotEmpty(split1[3])) { |
| | |
| | | } |
| | | } |
| | | } |
| | | final boolean currentTwoLevelOrder = twoLevelOrder; |
| | | list = list.stream().filter(a -> { |
| | | try { |
| | | if (a.getSection() != null && !Objects.equals(a.getSection(), "")) { |
| | | // 两级ä¸åä¸åè¾å
¥åå·ï¼ä¸è½å æ æ³è®¡ç®åå·åºé´è䏢弿´ä¸ªæ£éªé¡¹ã |
| | | if (currentTwoLevelOrder && StringUtils.isBlank(modelNum)) { |
| | | return true; |
| | | } |
| | | List<String> sections = JSON.parseArray(a.getSection(), String.class);// åºé´ |
| | | List<String> cores = JSON.parseArray(a.getCores(), String.class); // è¯æ° |
| | | List<String> conductorMaterials = JSON.parseArray(a.getConductorMaterial(), String.class); // å¯¼ä½æè´¨ |
| | |
| | | } |
| | | return true; |
| | | }).peek(standardProductList -> { |
| | | // todo: 夿æ¯å¦æ¯åæä¸å, éè¦åæé¢è²ç»å®å°è¯æ ·é¢è²çè¦æ±å¼ä¸ |
| | | //夿æ¯å¦æ¯åæä¸å, éè¦åæé¢è²ç»å®å°è¯æ ·é¢è²çè¦æ±å¼ä¸ |
| | | if (StringUtils.isNotBlank(insSample.getPartNo())) { |
| | | // 夿æ¯å¦æè¿ä¸ªåæ®µä¸æ¯ææ¬ç±»å |
| | | if (StringUtils.isNotBlank(standardProductList.getInspectionItem()) |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | String[] trees = tree.split(" - "); |
| | | try { |
| | | String tree1 = trees[2]; |
| | | } catch (Exception e) { |
| | | throw new BaseException("æä½å¤ªå¿«,ç³»ç»ä¼ åé误!!!!"); |
| | | public Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page, String keyword) { |
| | | if (id == null) { |
| | | throw new BaseException("æ£éªæ åä¸è½ä¸ºç©º"); |
| | | } |
| | | boolean isDrag = false; |
| | | List<StandardProductList> list = new ArrayList<>(); |
| | | if (trees.length == 3) { |
| | | List<StandardTree> treeList = new ArrayList<>(); |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory(trees[0]); |
| | | standardTree.setLaboratory(trees[1]); |
| | | standardTree.setSampleType(trees[2]); |
| | | List<ProductDto> pList = standardTreeMapper.selectPList(trees[2]); |
| | | if (pList.size() == 0 || pList.get(0) == null) { |
| | | List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2])); |
| | | if (treeList1.size() == 0) { |
| | | treeList.add(standardTree); |
| | | } else { |
| | | treeList.addAll(treeList1); |
| | | } |
| | | } else { |
| | | for (ProductDto p : pList) { |
| | | standardTree.setSample(p.getName()); |
| | | List<StandardTree> treeList1 = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, p.getName())); |
| | | if (treeList1.size() == 0) { |
| | | treeList.add(JSON.parseObject(JSON.toJSONString(standardTree), StandardTree.class)); |
| | | } else { |
| | | treeList.addAll(treeList1); |
| | | } |
| | | } |
| | | } |
| | | for (StandardTree standardTree2 : treeList) { |
| | | String tree2 = trees[0] + " - " + trees[1] + " - " + trees[2] + " - " + standardTree2.getSample() + " - " + standardTree2.getModel(); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1])); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + standardTree2.getSample() + "\"", standardTree2.getSample(), standardTree2.getModel(), tree2, trees[1])); |
| | | } |
| | | } else if (trees.length == 4) { |
| | | // å¤æç¬¬å屿¯å¦æåå· |
| | | Long count = standardProductListMapper.selectCount(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .isNull(StandardProductList::getModel) |
| | | .like(StandardProductList::getTree, tree)); |
| | | if (count == 0) { |
| | | isDrag = true; |
| | | } |
| | | |
| | | isDrag = true; |
| | | List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3])); |
| | | if (treeList.size() == 0) { |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory(trees[0]); |
| | | standardTree.setLaboratory(trees[1]); |
| | | standardTree.setSampleType(trees[2]); |
| | | standardTree.setSample(trees[3]); |
| | | treeList.add(standardTree); |
| | | } |
| | | for (StandardTree standardTree : treeList) { |
| | | String str = tree + " - " + standardTree.getModel(); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1])); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", standardTree.getSample(), standardTree.getModel(), str, trees[1])); |
| | | } |
| | | } else { |
| | | isDrag = true; |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1])); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree2("\"" + trees[2] + "\",\"" + trees[3] + "\"", trees[3].equals("null") ? null : trees[3], trees[4], tree, trees[1])); |
| | | StandardTreePath path = StandardTreePathParser.parse(tree); |
| | | if (path.getStandard() == null) { |
| | | throw new BaseException("è¯·éæ©æ åèç¹"); |
| | | } |
| | | for (StandardProductList productList : list) { |
| | | productList.setId(IdWorker.getId()); |
| | | } |
| | | List<StandardProductList> standardProductLists; |
| | | |
| | | if (isDrag) { |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .orderByAsc(StandardProductList::getSort)); |
| | | // 夿æ¯å¦ææ²¡æåºå·ç, 没æåºå·éç½® |
| | | boolean b = standardProductLists.stream().anyMatch(standardProductList -> standardProductList.getSort() == null); |
| | | } else { |
| | | standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | |
| | | for (StandardProductList sp : standardProductLists) { |
| | | for (StandardProductList pl : list) { |
| | | // 夿æ¡ä»¶æ¯å¦åªæä¸ä¸ª, æä¸ä¸ªçè¯é»è®¤ç¬¬ä¸ä¸ª |
| | | String radiusList = pl.getRadiusList(); |
| | | if (StringUtils.isNotBlank(radiusList) && !radiusList.equals("null") && !radiusList.equals("\"\"")) { |
| | | JSONArray jsonArray = JSON.parseArray(radiusList); |
| | | List<String> radius = jsonArray.toJavaList(String.class); |
| | | if (CollectionUtils.isNotEmpty(radius) && radius.size() == 1) { |
| | | pl.setRadius(radius.get(0)); |
| | | } |
| | | } |
| | | if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem()) |
| | | && 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 |
| | | && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) { |
| | | pl.setId(sp.getId()); |
| | | // æ·»å æåºå段 |
| | | pl.setSort(sp.getSort()); |
| | | if (sp.getState() != null && !sp.getState().equals("")) { |
| | | pl.setState(sp.getState()); |
| | | } else { |
| | | pl.setState(id == 0 ? 1 : 0); |
| | | } |
| | | if (sp.getMethodS() != null && !sp.getMethodS().equals("")) { |
| | | pl.setMethod(sp.getMethodS()); |
| | | } |
| | | if (sp.getRadius() != null && !sp.getRadius().equals("")) { |
| | | pl.setRadius(sp.getRadius()); |
| | | } |
| | | if (sp.getRates() != null && !sp.getRates().equals("")) { |
| | | pl.setRates(sp.getRates()); |
| | | } |
| | | if (sp.getAsk() != null && !sp.getAsk().equals("")) { |
| | | pl.setAsk(sp.getAsk()); |
| | | } |
| | | if (sp.getTell() != null && !sp.getTell().equals("")) { |
| | | pl.setTell(sp.getTell()); |
| | | } |
| | | if (sp.getPrice() != null && !sp.getPrice().equals("")) { |
| | | pl.setPrice(sp.getPrice()); |
| | | } |
| | | if (sp.getManHour() != null && !sp.getManHour().equals("")) { |
| | | pl.setManHour(sp.getManHour()); |
| | | } |
| | | if (sp.getSection() != null && !sp.getSection().equals("")) { |
| | | pl.setSection(sp.getSection()); |
| | | } |
| | | if (sp.getCores() != null && !sp.getCores().equals("")) { |
| | | pl.setCores(sp.getCores()); |
| | | } |
| | | if (sp.getConductorMaterial() != null && !sp.getConductorMaterial().equals("")) { |
| | | pl.setConductorMaterial(sp.getConductorMaterial()); |
| | | } |
| | | if (sp.getConductorType() != null && !sp.getConductorType().equals("")) { |
| | | pl.setConductorType(sp.getConductorType()); |
| | | } |
| | | if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) { |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | //å ä¸ºè¿æä¸ªäº§åå«èå¼ çº¿å¤¹ æ¥ç»éå
· ,è¿ä¸¤ä¸ªé¡¹ç®çæ°æ®å®å
¨ä¸æ ·,ç¹æ®å¤ç |
| | | if (sp.getTree() != null && !sp.getTree().equals("") && !pl.getTree().equals("ä¸å¤©ç§ææ£æµä¸å¿ - çµå产åå®éªå®¤ - éå
· - èå¼ çº¿å¤¹ - null")) { |
| | | pl.setTree(sp.getTree()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (page == 1) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | // CompletableFuture.supplyAsync(() -> { |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | String canonicalTree = StandardTreePathParser.canonical(path.getIndustry(), path.getStandard()); |
| | | List<StandardProductList> generated = standardTreeMapper.selectStandardProductListByIndustry( |
| | | path.getIndustry(), path.getStandard(), canonicalTree); |
| | | List<StandardProductList> saved = standardProductListMapper.selectList( |
| | | Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | .eq(StandardProductList::getTree, canonicalTree) |
| | | .orderByAsc(StandardProductList::getSort)); |
| | | |
| | | boolean success = false; |
| | | int retryCount = 0; |
| | | while (!success && retryCount < 100) { |
| | | try { |
| | | standardProductListService2.saveBatch(list.stream().map(a -> { |
| | | a.setFactory(trees[0]); |
| | | a.setLaboratory(trees[1]); |
| | | a.setSampleType(trees[2]); |
| | | a.setCreateUser(userId); |
| | | a.setUpdateUser(userId); |
| | | a.setStandardMethodListId(id); |
| | | return a; |
| | | }).collect(Collectors.toList())); |
| | | ; |
| | | success = true; |
| | | } catch (Exception e) { |
| | | // å¤çéå¤ ID çè®°å½ï¼éæ°çæ ID å¹¶ç»§ç»å°è¯æå
¥ |
| | | for (StandardProductList productList : list) { |
| | | productList.setId(IdWorker.getId()); |
| | | } |
| | | } |
| | | Map<Integer, StandardProductList> savedByParameterId = new HashMap<>(); |
| | | for (StandardProductList item : saved) { |
| | | if (item.getStructureItemParameterId() != null) { |
| | | savedByParameterId.put(item.getStructureItemParameterId(), item); |
| | | } |
| | | if (!success) { |
| | | throw new RuntimeException("æå
¥å¤±è´¥"); |
| | | } |
| | | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Collections.sort(list, (o1, o2) -> { |
| | | String field1 = o1.getManHourGroup(); |
| | | String field2 = o2.getManHourGroup(); |
| | | |
| | | boolean isEmpty1 = field1 == null || field1.isEmpty(); |
| | | boolean isEmpty2 = field2 == null || field2.isEmpty(); |
| | | |
| | | if (isEmpty1 && isEmpty2) { |
| | | return 0; |
| | | } else if (isEmpty1) { |
| | | return 1; |
| | | } else if (isEmpty2) { |
| | | return -1; |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | for (StandardProductList item : generated) { |
| | | applySingleRadiusDefault(item); |
| | | StandardProductList old = savedByParameterId.get(item.getStructureItemParameterId()); |
| | | if (old != null && sameInspectionItem(old, item)) { |
| | | mergeSavedConfiguration(old, item); |
| | | } else { |
| | | int num1 = extractNumber(field1); |
| | | int num2 = extractNumber(field2); |
| | | return Integer.compare(num1, num2); |
| | | item.setId(IdWorker.getId()); |
| | | item.setState(id == 0 ? 1 : 0); |
| | | } |
| | | item.setFactory(null); |
| | | item.setLaboratory(path.getIndustry()); |
| | | item.setSampleType(null); |
| | | item.setSample(path.getStandard()); |
| | | item.setModel(null); |
| | | item.setTree(canonicalTree); |
| | | item.setCreateUser(userId); |
| | | item.setUpdateUser(userId); |
| | | item.setStandardMethodListId(id); |
| | | } |
| | | |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, canonicalTree)); |
| | | if (CollectionUtils.isNotEmpty(generated)) { |
| | | baseMapper.saveBatchProductLists(generated); |
| | | } |
| | | |
| | | generated.sort((left, right) -> { |
| | | int leftSort = left.getSort() == null ? Integer.MAX_VALUE : left.getSort(); |
| | | int rightSort = right.getSort() == null ? Integer.MAX_VALUE : right.getSort(); |
| | | if (leftSort != rightSort) { |
| | | return Integer.compare(leftSort, rightSort); |
| | | } |
| | | return compareManHourGroup(left.getManHourGroup(), right.getManHourGroup()); |
| | | }); |
| | | // æç
§ç´¢å¼æåº |
| | | if (isDrag) { |
| | | list.sort((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())); |
| | | } |
| | | try { |
| | | map.put("productList", list.subList((page - 1) * 300, page * 300)); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | map.put("productList", list.subList((page - 1) * 300, list.size())); |
| | | } |
| | | map.put("total", list.size()); |
| | | |
| | | String search = keyword == null ? "" : keyword.trim().toLowerCase(Locale.ROOT); |
| | | List<StandardProductList> filtered = generated.stream() |
| | | .filter(item -> search.isEmpty() |
| | | || containsIgnoreCase(item.getInspectionItem(), search) |
| | | || containsIgnoreCase(item.getInspectionItemSubclass(), search)) |
| | | .collect(Collectors.toList()); |
| | | int total = filtered.size(); |
| | | int currentPage = page == null || page < 1 ? 1 : page; |
| | | int fromIndex = Math.min((currentPage - 1) * 100, total); |
| | | int toIndex = Math.min(fromIndex + 100, total); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("productList", new ArrayList<>(filtered.subList(fromIndex, toIndex))); |
| | | map.put("total", total); |
| | | return map; |
| | | } |
| | | |
| | | private int extractNumber(String s) { |
| | | // ä»åç¬¦ä¸²ä¸æåæ°åçé»è¾ï¼è¿éåè®¾åæ®µçæ ¼å¼æ¯ "text<number>" |
| | | String number = s; |
| | | if (!s.matches("\\d+")) { |
| | | number = s.replaceAll("\\D", ""); |
| | | private boolean sameInspectionItem(StandardProductList left, StandardProductList right) { |
| | | return Objects.equals(left.getInspectionItem(), right.getInspectionItem()) |
| | | && Objects.equals(defaultString(left.getInspectionItemSubclass()), defaultString(right.getInspectionItemSubclass())); |
| | | } |
| | | |
| | | private void applySingleRadiusDefault(StandardProductList item) { |
| | | String radiusList = item.getRadiusList(); |
| | | if (StringUtils.isBlank(radiusList) || "null".equals(radiusList) || "\"\"".equals(radiusList)) { |
| | | return; |
| | | } |
| | | return Integer.parseInt(number); |
| | | try { |
| | | List<String> values = JSON.parseArray(radiusList, String.class); |
| | | if (values != null && values.size() == 1) { |
| | | item.setRadius(values.get(0)); |
| | | } |
| | | } catch (Exception ignored) { |
| | | // åå²èæ°æ®ä¸å½±åæ£éªé¡¹å表çæã |
| | | } |
| | | } |
| | | |
| | | private void mergeSavedConfiguration(StandardProductList old, StandardProductList target) { |
| | | target.setId(old.getId()); |
| | | target.setSort(old.getSort()); |
| | | target.setState(old.getState() == null ? 0 : old.getState()); |
| | | if (StringUtils.isNotBlank(old.getMethodS())) { |
| | | target.setMethodS(old.getMethodS()); |
| | | target.setMethod(old.getMethodS()); |
| | | } |
| | | if (StringUtils.isNotBlank(old.getRadius())) target.setRadius(old.getRadius()); |
| | | if (StringUtils.isNotBlank(old.getRates())) target.setRates(old.getRates()); |
| | | if (StringUtils.isNotBlank(old.getAsk())) target.setAsk(old.getAsk()); |
| | | if (StringUtils.isNotBlank(old.getTell())) target.setTell(old.getTell()); |
| | | if (StringUtils.isNotBlank(old.getPrice())) target.setPrice(old.getPrice()); |
| | | if (StringUtils.isNotBlank(old.getManHour())) target.setManHour(old.getManHour()); |
| | | if (StringUtils.isNotBlank(old.getSection())) target.setSection(old.getSection()); |
| | | if (StringUtils.isNotBlank(old.getCores())) target.setCores(old.getCores()); |
| | | if (StringUtils.isNotBlank(old.getConductorMaterial())) target.setConductorMaterial(old.getConductorMaterial()); |
| | | if (StringUtils.isNotBlank(old.getConductorType())) target.setConductorType(old.getConductorType()); |
| | | if (old.getTemplateId() != null) target.setTemplateId(old.getTemplateId()); |
| | | } |
| | | |
| | | private int compareManHourGroup(String left, String right) { |
| | | boolean leftEmpty = StringUtils.isBlank(left); |
| | | boolean rightEmpty = StringUtils.isBlank(right); |
| | | if (leftEmpty && rightEmpty) return 0; |
| | | if (leftEmpty) return 1; |
| | | if (rightEmpty) return -1; |
| | | return Integer.compare(extractNumber(left), extractNumber(right)); |
| | | } |
| | | |
| | | private boolean containsIgnoreCase(String value, String search) { |
| | | return value != null && value.toLowerCase(Locale.ROOT).contains(search); |
| | | } |
| | | |
| | | private String defaultString(String value) { |
| | | return value == null ? "" : value; |
| | | } |
| | | |
| | | private int extractNumber(String s) { |
| | | String number = s == null ? "" : s.replaceAll("\\D", ""); |
| | | if (number.isEmpty()) { |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | try { |
| | | return Integer.parseInt(number); |
| | | } catch (NumberFormatException ignored) { |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void resetTreeDragBatch(List<StandardProductList> standardProductLists) { |
| | | standardProductListService2.updateBatchById(standardProductLists); |
| | | this.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardTemplateMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeTemplateBindingMapper; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateBinding; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.GZipUtil; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | private StandardTemplateMapper standardTemplateMapper; |
| | | |
| | | private StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper; |
| | | |
| | | |
| | | private final NumberGenerator<StandardTemplate> numberGenerator; |
| | | |
| | |
| | | StandardTemplate::getNumber); |
| | | standardTemplate.setNumber(giveCode); |
| | | } |
| | | if (standardTemplate.getPrice() == null) { |
| | | standardTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.insert(standardTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if(standardTemplate.getThing().equals("")){ |
| | | if (standardTemplate.getPrice() == null) { |
| | | standardTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.updateById(standardTemplate); |
| | |
| | | |
| | | @Override |
| | | public int delStandardTemplate(Integer id) { |
| | | // 夿æ¯å¦è¢«ç»å® |
| | | int count = standardTemplateMapper.countBindTemplateItemParameter(id); |
| | | if (count > 0) { |
| | | throw new RuntimeException("该模æ¿å·²ç»å®æ£éªé¡¹ç®åæ°ï¼ç¦æ¢å é¤"); |
| | | } |
| | | Long bindingCount = standardTreeTemplateBindingMapper.selectCount(Wrappers.<StandardTreeTemplateBinding>lambdaQuery() |
| | | .eq(StandardTreeTemplateBinding::getTemplateId, id)); |
| | | if (bindingCount > 0) { |
| | | throw new RuntimeException("该模æ¿å·²ç»å®æ ååºï¼ç¦æ¢å é¤"); |
| | | } |
| | | return standardTemplateMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardTemplate> getStandardTemplate() { |
| | | return standardTemplateMapper.selectList(Wrappers.<StandardTemplate>lambdaQuery().select(StandardTemplate::getId,StandardTemplate::getName)); |
| | | return standardTemplateMapper.selectList(Wrappers.<StandardTemplate>lambdaQuery() |
| | | .select(StandardTemplate::getId, StandardTemplate::getName, StandardTemplate::getNumber, StandardTemplate::getRemark)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getThing(); |
| | | return GZipUtil.uncompress(standardTemplate.getThing()); |
| | | } |
| | | // æ¥è¯¢å缩åçæ°æ® |
| | | // String thing = standardTemplateMapper.selectCompressThing(templateId); |
| | | // if (StringUtils.isNotBlank(thing)) { |
| | | // try { |
| | | // return DecompressMySQLData.decompress(java.util.Base64.getDecoder().decode(thing)); |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // } else { |
| | | // return null; |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | |
| | | // æ¥è¯¢æ§æ¨¡æ¿ |
| | | StandardTemplate standardTemplate = baseMapper.selectById(newTemplate.getId()); |
| | | newTemplate.setThing(standardTemplate.getThing()); |
| | | if (newTemplate.getPrice() == null) { |
| | | newTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | |
| | | if (StringUtils.isBlank(newTemplate.getNumber())) { |
| | | String giveCode = numberGenerator.generateNumberWithPrefix(5, |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.LaboratoryDto; |
| | | import com.ruoyi.basic.dto.AddStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.SampleTypeDto; |
| | | import com.ruoyi.basic.dto.StandardLibraryTreeNodeDto; |
| | | import com.ruoyi.basic.dto.StandardLibraryTreeRowDto; |
| | | import com.ruoyi.basic.dto.UpdateStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingVo; |
| | | import com.ruoyi.basic.dto.TemplateBindingItemDto; |
| | | import com.ruoyi.basic.dto.TemplateInspectionItemDto; |
| | | import com.ruoyi.basic.mapper.LaboratoryMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeTemplateBindingMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeTemplateDeviceMapper; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectMapper; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateBinding; |
| | | import com.ruoyi.basic.pojo.StandardTreeTemplateDevice; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.utils.StandardTreePath; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import com.ruoyi.basic.utils.StandardTemplateInspectionItemParser; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.Objects; |
| | | import java.util.HashSet; |
| | | import java.util.Comparator; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author Administrator |
| | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | private StandardTreeTemplateBindingMapper standardTreeTemplateBindingMapper; |
| | | |
| | | private StandardTreeTemplateDeviceMapper standardTreeTemplateDeviceMapper; |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | private StructureTestObjectService structureTestObjectService; |
| | | |
| | | |
| | | @Override |
| | | public List<FactoryDto> selectStandardTreeList() { |
| | | List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeList(); |
| | | for (FactoryDto factoryDto : factoryDtos) { |
| | | for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { |
| | | laboratoryDto.getChildren().sort((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())); |
| | | for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) { |
| | | // if (sampleTypeDto.getChildren().size() == 0) { |
| | | sampleTypeDto.getChildren().addAll(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); |
| | | // } |
| | | } |
| | | public List<StandardLibraryTreeNodeDto> selectStandardTreeList() { |
| | | List<StandardLibraryTreeRowDto> rows = standardTreeMapper.selectStandardLibraryTree(); |
| | | List<StandardLibraryTreeNodeDto> industries = new ArrayList<>(); |
| | | Map<Integer, StandardLibraryTreeNodeDto> industryMap = new LinkedHashMap<>(); |
| | | for (StandardLibraryTreeRowDto row : rows) { |
| | | StandardLibraryTreeNodeDto industry = industryMap.get(row.getIndustryId()); |
| | | if (industry == null) { |
| | | industry = new StandardLibraryTreeNodeDto(); |
| | | industry.setId(row.getIndustryId()); |
| | | industry.setLabel(row.getIndustryName()); |
| | | industry.setValue(row.getIndustryName()); |
| | | industry.setCode("[1]"); |
| | | industry.setChildren(new ArrayList<>()); |
| | | industryMap.put(row.getIndustryId(), industry); |
| | | industries.add(industry); |
| | | } |
| | | if (row.getStandardId() != null) { |
| | | StandardLibraryTreeNodeDto standard = new StandardLibraryTreeNodeDto(); |
| | | standard.setId(row.getStandardId()); |
| | | standard.setLabel(row.getStandardCode()); |
| | | standard.setValue(row.getStandardLabel()); |
| | | standard.setCode("[2]"); |
| | | standard.setSampleEn(row.getStandardNameEn()); |
| | | standard.setStandardMethodId(row.getStandardMethodId()); |
| | | standard.setStandardCode(row.getStandardCode()); |
| | | standard.setStandardName(row.getStandardName()); |
| | | standard.setChildren(null); |
| | | industry.getChildren().add(standard); |
| | | } |
| | | } |
| | | return factoryDtos; |
| | | return industries; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardTree(StandardTree standardTree) { |
| | | LambdaQueryWrapper<StandardTree> wrapper = Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getFactory, standardTree.getFactory()) |
| | | .eq(StandardTree::getLaboratory, standardTree.getLaboratory()) |
| | | .eq(StandardTree::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardTree::getSample, standardTree.getSample()) |
| | | .eq(StandardTree::getModel, standardTree.getModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample())) { |
| | | wrapper.eq(StandardTree::getSample, standardTree.getSample()); |
| | | public int addStandardTree(AddStandardTreeNodeDto dto) { |
| | | if (dto == null) { |
| | | throw new BaseException("æ åæ è·¯å¾æ ¼å¼é误"); |
| | | } |
| | | |
| | | StandardTree tree = standardTreeMapper.selectOne(wrapper); |
| | | if (tree != null) { |
| | | throw new BaseException("该åå·å·²åå¨"); |
| | | String name = StandardTreePathParser.normalizeNodeName(dto.getName()); |
| | | if (StringUtils.isBlank(dto.getParentTree())) { |
| | | // æ°å¢è¡ä¸èç¹ |
| | | Long count = laboratoryMapper.selectCount(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, name)); |
| | | if (count > 0) { |
| | | throw new BaseException("è¡ä¸åç§°å·²åå¨"); |
| | | } |
| | | Laboratory laboratory = new Laboratory(); |
| | | laboratory.setLaboratoryName(name); |
| | | laboratory.setSort(0); |
| | | return laboratoryMapper.insert(laboratory); |
| | | } |
| | | return standardTreeMapper.insert(standardTree); |
| | | throw new BaseException("äºçº§æ å请å¨âæ åç»´æ¤âä¸éè¿è¡ä¸ç»å®è¿è¡ç»´æ¤"); |
| | | /* |
| | | // å¨è¡ä¸ä¸æ°å¢æ åèç¹ |
| | | StandardTreePath path = StandardTreePathParser.parse(dto.getParentTree()); |
| | | if (path.getStandard() != null) { |
| | | throw new BaseException("æ åèç¹ä¸ä¸è½ç»§ç»æ°å¢"); |
| | | } |
| | | String industry = path.getIndustry(); |
| | | Long labCount = laboratoryMapper.selectCount(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, industry)); |
| | | if (labCount == 0) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | Long stdCount = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .eq(StandardTree::getSample, name) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (stdCount > 0) { |
| | | throw new BaseException("该è¡ä¸ä¸æ ååç§°å·²åå¨"); |
| | | } |
| | | StandardTree tree = new StandardTree(); |
| | | tree.setLaboratory(industry); |
| | | tree.setSample(name); |
| | | tree.setFactory(null); |
| | | tree.setSampleType(null); |
| | | tree.setModel(null); |
| | | tree.setSort(0); |
| | | return standardTreeMapper.insert(tree); |
| | | */ |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delStandardTree(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | switch (trees.length) { |
| | | case 5: |
| | | if (trees[3].equals("null")) { |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).isNull(StandardTree::getSample).eq(StandardTree::getModel, trees[4])); |
| | | } else { |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3]).eq(StandardTree::getModel, trees[4])); |
| | | } |
| | | break; |
| | | /*case 4: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3])); |
| | | break; |
| | | case 3: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2])); |
| | | break; |
| | | case 2: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0]).eq(StandardTree::getLaboratory, trees[1])); |
| | | break; |
| | | case 1: |
| | | standardTreeMapper.delete(Wrappers.<StandardTree>lambdaUpdate().eq(StandardTree::getFactory, trees[0])); |
| | | break;*/ |
| | | StandardTreePath path = StandardTreePathParser.parse(tree); |
| | | String industry = path.getIndustry(); |
| | | String standard = path.getStandard(); |
| | | if (standard != null) { |
| | | throw new BaseException("äºçº§æ å请å¨âæ åç»´æ¤âä¸éè¿è¡ä¸ç»å®è¿è¡ç»´æ¤"); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addStandardProduct(String ids, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | JSONArray jsonArray = JSON.parseArray(ids); |
| | | for (Object o : jsonArray) { |
| | | StandardProductList standardProductList = standardTreeMapper.selectStandardProductById(Integer.parseInt("" + o)); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | } catch (Exception e) { |
| | | if (standard == null) { |
| | | // å é¤è¡ä¸ï¼è¡ä¸ä¸ä»ææ åæ¶æç»å é¤ |
| | | Long count = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (count > 0) { |
| | | throw new BaseException("该è¡ä¸ä¸ä»ææ åï¼è¯·å
å 餿 å"); |
| | | } |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | } catch (Exception e) { |
| | | Laboratory laboratory = laboratoryMapper.selectOne(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, industry)); |
| | | if (laboratory == null) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | } catch (Exception e) { |
| | | Long objectCount = structureTestObjectMapper.selectCount(Wrappers.<StructureTestObject>lambdaQuery() |
| | | .eq(StructureTestObject::getLaboratoryId, laboratory.getId())); |
| | | if (objectCount > 0) { |
| | | throw new BaseException("该è¡ä¸å·²ç»å®æ£æµå¯¹è±¡ï¼ç¦æ¢å é¤"); |
| | | } |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | } catch (Exception e) { |
| | | int deleted = laboratoryMapper.delete(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, industry)); |
| | | if (deleted == 0) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | standardProductListMapper.insert(standardProductList); |
| | | return deleted; |
| | | } |
| | | // å 餿 ååå
¶æ ååºé
ç½®ï¼ä¸å¯è¾¾ï¼ä¿çåå²å®ç°è¯´æï¼ |
| | | StandardTree standardTree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .eq(StandardTree::getSample, standard) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (standardTree == null) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | standardTreeTemplateBindingMapper.delete(Wrappers.<StandardTreeTemplateBinding>lambdaQuery() |
| | | .eq(StandardTreeTemplateBinding::getStandardTreeId, standardTree.getId())); |
| | | standardTreeTemplateDeviceMapper.delete(Wrappers.<StandardTreeTemplateDevice>lambdaQuery() |
| | | .eq(StandardTreeTemplateDevice::getStandardTreeId, standardTree.getId())); |
| | | standardTreeMapper.deleteById(standardTree.getId()); |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getLaboratory, industry) |
| | | .eq(StandardProductList::getSample, standard) |
| | | .isNull(StandardProductList::getSampleType) |
| | | .isNull(StandardProductList::getModel)); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upStandardProducts(Map<String, Object> product) { |
| | | List<Integer> ids = JSON.parseArray(product.get("ids") + "", Integer.class); |
| | | List<Integer> ids = JSON.parseArray(product.get("ids") + ""); |
| | | StandardProductList productList = JSON.parseObject(JSON.toJSONString(product.get("standardProductList")), StandardProductList.class); |
| | | if (productList.getMethodS() != null) { |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids).like(StandardProductList::getMethod, productList.getMethodS())); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardTree> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, laboratory) |
| | | .eq(StandardTree::getSampleType, sampleType) |
| | | .select(StandardTree::getModel, StandardTree::getSample)); |
| | | } |
| | | |
| | | /** |
| | | * æ²³å£æ£æµä¸å¿å¯¼å
¥ |
| | | * @param file |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void inExcelOfTree(MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | List<StandardProductList> lists = new ArrayList<>(); |
| | | AtomicReference<String> laboratory = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, 0, (i, l, list) -> { |
| | | StandardProductList str = new StandardProductList(); |
| | | if (i == 0 && l == 1) { |
| | | laboratory.set(standardTreeMapper.getLaboratory(list.get(1) + "")); |
| | | if (laboratory.get() == null) { |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸åå¨ï¼" + list.get(1)); |
| | | } |
| | | } |
| | | if (i == 0 && l >= 1) { |
| | | Integer standardMethodId = standardMethodListService.getStandardMethodId(list.get(0) + ""); |
| | | if (standardMethodId == null) { |
| | | throw new BaseException("æ åç¼å·ä¸åå¨ï¼" + list.get(0)); |
| | | } |
| | | str.setStandardMethodListId(standardMethodId); |
| | | str.setSampleType(list.get(1) + ""); |
| | | if (list.get(2) != null) { |
| | | String sample = baseMapper.selSample(list.get(2) + ""); |
| | | if (sample == null) { |
| | | throw new BaseException("æ ·åä¸åå¨ï¼" + list.get(2)); |
| | | } |
| | | str.setSample(list.get(2) + ""); |
| | | } else { |
| | | str.setSample(null); |
| | | } |
| | | if (list.get(3) != null) { |
| | | str.setModel(list.get(3) + ""); |
| | | Long aLong = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getModel, str.getModel()) |
| | | .eq(StandardTree::getSampleType, list.get(1) + "")); |
| | | if (aLong == 0) { |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | standardTree.setLaboratory(laboratory.get()); |
| | | standardTree.setSampleType(str.getSampleType()); |
| | | standardTree.setSample(str.getSample()); |
| | | standardTree.setModel(str.getModel()); |
| | | standardTreeMapper.insert(standardTree); |
| | | } |
| | | } else { |
| | | str.setModel(null); |
| | | } |
| | | str.setInspectionItem(list.get(4) + ""); |
| | | if (list.get(6) == null) { |
| | | str.setInspectionItemSubclass(""); |
| | | } else { |
| | | str.setInspectionItemSubclass(list.get(6).toString()); |
| | | } |
| | | StandardProductList db_str; |
| | | try { |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(), str.getInspectionItem(), str.getSample(), str.getInspectionItemSubclass(), str.getModel(), str.getInspectionItemClass()); |
| | | } catch (Exception e) { |
| | | throw new BaseException("é夿¥è¯¢ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | str.setStructureItemParameterId(db_str.getStructureItemParameterId()); |
| | | } |
| | | if (list.get(8) != null) { |
| | | str.setMethodS(list.get(8) + ""); |
| | | } |
| | | public boolean updateTreeSort(List<StandardLibraryTreeNodeDto> list) { |
| | | List<StandardTree> trees = new ArrayList<>(); |
| | | int industrySort = 0; |
| | | for (StandardLibraryTreeNodeDto industry : list) { |
| | | Laboratory lab = new Laboratory(); |
| | | lab.setId(industry.getId()); |
| | | lab.setSort(industrySort); |
| | | laboratoryMapper.updateById(lab); |
| | | industrySort++; |
| | | |
| | | if (list.get(11) == null) { |
| | | str.setTell(null); |
| | | } else { |
| | | str.setTell(list.get(11).toString()); |
| | | } |
| | | |
| | | if (list.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list.get(12).toString()); |
| | | } |
| | | |
| | | if (list.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice((list.get(13).toString())); |
| | | } |
| | | |
| | | if (list.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(list.get(14).toString()); |
| | | } |
| | | |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | throw new BaseException("模æ¿ä¸åå¨ï¼" + list.get(21)); |
| | | } |
| | | str.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | str.setLaboratory(laboratory.get()); |
| | | str.setState(1); |
| | | 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(), str.getInspectionItemClass())); |
| | | } catch (Exception e) { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } |
| | | if (str.getStructureItemParameterId() == null) { |
| | | throw new BaseException("æ£éªé¡¹ç®ä¸åå¨ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | lists.forEach(a -> { |
| | | if (a.getId() != null) { |
| | | standardProductListMapper.updateById(a); |
| | | } else { |
| | | standardProductListMapper.insert(a); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void importWorkstationExcel(MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | List<StandardProductList> lists = new ArrayList<>(); |
| | | AtomicReference<String> laboratory = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, 0, (i, l, list) -> { |
| | | StandardProductList str = new StandardProductList(); |
| | | if (i == 0 && l == 1) { |
| | | laboratory.set(standardTreeMapper.getLaboratory(list.get(1) + "")); |
| | | if (laboratory.get() == null) { |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸åå¨ï¼" + list.get(1)); |
| | | } |
| | | } |
| | | if (i == 0 && l >= 1) { |
| | | Integer standardMethodId = standardMethodListService.getStandardMethodId(list.get(0) + ""); |
| | | if (standardMethodId == null) { |
| | | throw new BaseException("æ åç¼å·ä¸åå¨ï¼" + list.get(0)); |
| | | } |
| | | str.setStandardMethodListId(standardMethodId); |
| | | str.setSampleType(list.get(1) + ""); |
| | | if (list.get(2) != null) { |
| | | String sample = baseMapper.selSample(list.get(2) + ""); |
| | | if (sample == null) { |
| | | throw new BaseException("æ ·åä¸åå¨ï¼" + list.get(2)); |
| | | } |
| | | str.setSample(list.get(2) + ""); |
| | | } else { |
| | | str.setSample(null); |
| | | } |
| | | if (list.get(3) != null) { |
| | | str.setModel(list.get(3) + ""); |
| | | Long aLong = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getModel, str.getModel()) |
| | | .eq(StandardTree::getSampleType, list.get(1) + "")); |
| | | if (aLong == 0) { |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | standardTree.setLaboratory(laboratory.get()); |
| | | standardTree.setSampleType(str.getSampleType()); |
| | | standardTree.setSample(str.getSample()); |
| | | standardTree.setModel(str.getModel()); |
| | | standardTreeMapper.insert(standardTree); |
| | | } |
| | | } else { |
| | | str.setModel(null); |
| | | } |
| | | str.setInspectionItemClass(list.get(4).toString()); |
| | | str.setInspectionItemClassEn(list.get(5).toString()); |
| | | // å¼å§å 2 |
| | | str.setInspectionItem(list.get(6) + ""); |
| | | if (list.get(8) == null) { |
| | | str.setInspectionItemSubclass(""); |
| | | } else { |
| | | str.setInspectionItemSubclass(list.get(8).toString()); |
| | | } |
| | | StandardProductList db_str; |
| | | try { |
| | | db_str = standardProductListMapper.getOne(str.getStandardMethodListId(), str.getInspectionItem(), str.getSample(), str.getInspectionItemSubclass(), str.getModel(), str.getInspectionItemClass()); |
| | | } catch (Exception e) { |
| | | throw new BaseException("é夿¥è¯¢ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | str.setStructureItemParameterId(db_str.getStructureItemParameterId()); |
| | | } |
| | | if (list.get(10) != null) { |
| | | str.setMethodS(list.get(10) + ""); |
| | | } |
| | | if (list.get(13) == null) { |
| | | str.setTell(null); |
| | | } else { |
| | | str.setTell(list.get(13).toString()); |
| | | } |
| | | |
| | | if (list.get(14) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list.get(14).toString()); |
| | | } |
| | | |
| | | if (list.get(15) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice((list.get(15).toString())); |
| | | } |
| | | |
| | | if (list.get(16) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(list.get(16).toString()); |
| | | } |
| | | |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list.get(23))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | throw new BaseException("模æ¿ä¸åå¨ï¼" + list.get(23)); |
| | | } |
| | | str.setFactory("ä¸å¤©ç§ææ£æµä¸å¿"); |
| | | str.setLaboratory(laboratory.get()); |
| | | str.setState(1); |
| | | 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(), str.getInspectionItemClass())); |
| | | } catch (Exception e) { |
| | | str.setStructureItemParameterId(standardTreeMapper.getStructureItemParameterId("\"" + str.getSampleType() + "\",\"" + str.getSample() + "\"", str.getInspectionItem(), str.getInspectionItemSubclass(), str.getInspectionItemClass())); |
| | | } |
| | | if (str.getStructureItemParameterId() == null) { |
| | | throw new BaseException("æ£éªé¡¹ç®ä¸åå¨ï¼" + str.getInspectionItem() + " " + str.getInspectionItemSubclass()); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | lists.forEach(a -> { |
| | | if (a.getId() != null) { |
| | | standardProductListMapper.updateById(a); |
| | | } else { |
| | | standardProductListMapper.insert(a); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateTreeSort(List<FactoryDto> list) { |
| | | List<StructureTestObject> testObjects = new ArrayList<>(); |
| | | for (FactoryDto factoryDto : list) { |
| | | for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { |
| | | List<SampleTypeDto> children = laboratoryDto.getChildren(); |
| | | int sort = 0; |
| | | // 循ç¯ç¬¬ä¸å± |
| | | for (SampleTypeDto child : children) { |
| | | StructureTestObject structureTestObject = new StructureTestObject(); |
| | | structureTestObject.setSort(sort); |
| | | structureTestObject.setId(child.getSampleTypeId()); |
| | | testObjects.add(structureTestObject); |
| | | sort++; |
| | | List<StandardLibraryTreeNodeDto> children = industry.getChildren(); |
| | | if (children != null) { |
| | | int standardSort = 0; |
| | | for (StandardLibraryTreeNodeDto standard : children) { |
| | | StandardTree tree = new StandardTree(); |
| | | tree.setId(standard.getId()); |
| | | tree.setSort(standardSort); |
| | | trees.add(tree); |
| | | standardSort++; |
| | | } |
| | | } |
| | | } |
| | | structureTestObjectService.updateBatchById(testObjects); |
| | | |
| | | if (!trees.isEmpty()) { |
| | | this.updateBatchById(trees); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ åæ° |
| | | * @param standardTree |
| | | * @return |
| | | * ä¿®æ¹æ åæ èç¹å |
| | | */ |
| | | @Override |
| | | public int updateStandardTree(StandardTree standardTree) { |
| | | // ä¿®æ¹åç§°å¹é
çæ åæ ä¸çæ£éªé¡¹ç® |
| | | // æ¥è¯¢ææå¯¹è±¡+åç§°çæ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int updateStandardTree(UpdateStandardTreeNodeDto dto) { |
| | | if (dto == null) { |
| | | throw new BaseException("æ åæ è·¯å¾æ ¼å¼é误"); |
| | | } |
| | | String name = StandardTreePathParser.normalizeNodeName(dto.getName()); |
| | | String oldLabel = StandardTreePathParser.normalizeNodeName(dto.getOldLabel()); |
| | | if (StringUtils.isBlank(dto.getParentTree())) { |
| | | return updateIndustry(oldLabel, name); |
| | | } |
| | | throw new BaseException("äºçº§æ å请å¨âæ åç»´æ¤âä¸éè¿è¡ä¸ç»å®è¿è¡ç»´æ¤"); |
| | | } |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getSample, standardTree.getSample()) |
| | | .eq(StandardProductList::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardProductList::getModel, standardTree.getOldModel())); |
| | | if (CollectionUtils.isNotEmpty(standardProductLists)) { |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | // ä¿®æ¹æ ·ååç§° |
| | | standardProductList.setModel(standardTree.getModel()); |
| | | // ä¿®æ¹æ åç§° |
| | | // éè¦æªå第å级, é¿å
ä¸å级åç§°ä¸æ ·ä¿®æ¹é误 |
| | | String[] trees = standardProductList.getTree().split(" - "); |
| | | trees[4] = standardTree.getModel(); |
| | | List<String> list = CollUtil.newArrayList(trees); |
| | | String newName = CollUtil.join(list, " - "); |
| | | standardProductList.setTree(newName); |
| | | private int updateIndustry(String oldName, String newName) { |
| | | if (Objects.equals(oldName, newName)) { |
| | | return ensureIndustryExists(oldName); |
| | | } |
| | | Long count = laboratoryMapper.selectCount(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, newName)); |
| | | if (count > 0) { |
| | | throw new BaseException("è¡ä¸åç§°å·²åå¨"); |
| | | } |
| | | Laboratory old = laboratoryMapper.selectOne(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, oldName)); |
| | | if (old == null) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | Laboratory update = new Laboratory(); |
| | | update.setId(old.getId()); |
| | | update.setLaboratoryName(newName); |
| | | if (laboratoryMapper.updateById(update) == 0) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | // çº§èæ åæ è§èåè®°å½ |
| | | standardTreeMapper.update(null, Wrappers.<StandardTree>lambdaUpdate() |
| | | .eq(StandardTree::getLaboratory, oldName) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel) |
| | | .set(StandardTree::getLaboratory, newName)); |
| | | // çº§èæ ååºé
ç½® |
| | | standardTreeMapper.updateProductListIndustry(oldName, newName); |
| | | // 级èåºç¡æ£éªé¡¹ |
| | | structureItemParameterMapper.update(null, Wrappers.<StructureItemParameter>lambdaUpdate() |
| | | .eq(StructureItemParameter::getLaboratory, oldName) |
| | | .set(StructureItemParameter::getLaboratory, newName)); |
| | | // çº§èæªå®æè®¢å |
| | | standardTreeMapper.updateInsOrderIndustry(oldName, newName); |
| | | standardTreeMapper.updateInsSampleIndustry(oldName, newName); |
| | | standardTreeMapper.updateInsProductIndustry(oldName, newName); |
| | | return 1; |
| | | } |
| | | |
| | | private int updateStandard(String industry, String oldName, String newName) { |
| | | if (Objects.equals(oldName, newName)) { |
| | | return ensureStandardExists(industry, oldName); |
| | | } |
| | | Long count = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .eq(StandardTree::getSample, newName) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (count > 0) { |
| | | throw new BaseException("该è¡ä¸ä¸æ ååç§°å·²åå¨"); |
| | | } |
| | | StandardTree old = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .eq(StandardTree::getSample, oldName) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (old == null) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | StandardTree update = new StandardTree(); |
| | | update.setId(old.getId()); |
| | | update.setSample(newName); |
| | | if (standardTreeMapper.updateById(update) == 0) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | // çº§èæ ååºé
ç½® |
| | | standardTreeMapper.updateProductListStandard(industry, oldName, newName); |
| | | // çº§èæªå®æè®¢å |
| | | standardTreeMapper.updateInsOrderStandard(industry, oldName, newName); |
| | | standardTreeMapper.updateInsSampleStandard(industry, oldName, newName); |
| | | standardTreeMapper.updateInsProductStandard(industry, oldName, newName); |
| | | return 1; |
| | | } |
| | | |
| | | private int ensureIndustryExists(String industry) { |
| | | Long count = laboratoryMapper.selectCount(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, industry)); |
| | | if (count == 0) { |
| | | throw new BaseException("è¡ä¸ä¸åå¨"); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | private int ensureStandardExists(String industry, String standard) { |
| | | Long count = standardTreeMapper.selectCount(Wrappers.<StandardTree>lambdaQuery() |
| | | .eq(StandardTree::getLaboratory, industry) |
| | | .eq(StandardTree::getSample, standard) |
| | | .isNull(StandardTree::getSampleType) |
| | | .isNull(StandardTree::getModel)); |
| | | if (count == 0) { |
| | | throw new BaseException("æ åä¸åå¨"); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardTreeTemplateBindingVo> selectTemplateBindings(Integer standardTreeId) { |
| | | ensureTwoLevelStandard(standardTreeId); |
| | | List<StandardTreeTemplateBinding> bindings = standardTreeTemplateBindingMapper.selectList( |
| | | Wrappers.<StandardTreeTemplateBinding>lambdaQuery() |
| | | .eq(StandardTreeTemplateBinding::getStandardTreeId, standardTreeId) |
| | | .orderByAsc(StandardTreeTemplateBinding::getSort, StandardTreeTemplateBinding::getId)); |
| | | Map<Integer, List<Integer>> deviceIdsByTemplate = standardTreeTemplateDeviceMapper.selectList( |
| | | Wrappers.<StandardTreeTemplateDevice>lambdaQuery() |
| | | .eq(StandardTreeTemplateDevice::getStandardTreeId, standardTreeId) |
| | | .orderByAsc(StandardTreeTemplateDevice::getSort, |
| | | StandardTreeTemplateDevice::getId)) |
| | | .stream().collect(Collectors.groupingBy( |
| | | StandardTreeTemplateDevice::getTemplateId, |
| | | LinkedHashMap::new, |
| | | Collectors.mapping(StandardTreeTemplateDevice::getDeviceId, Collectors.toList()))); |
| | | List<StandardTreeTemplateBindingVo> result = new ArrayList<>(); |
| | | for (StandardTreeTemplateBinding binding : bindings) { |
| | | StandardTemplate template = standardTemplateService.getById(binding.getTemplateId()); |
| | | if (template == null) { |
| | | continue; |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | StandardTreeTemplateBindingVo vo = new StandardTreeTemplateBindingVo(); |
| | | vo.setTemplateId(template.getId()); |
| | | vo.setName(template.getName()); |
| | | vo.setNumber(template.getNumber()); |
| | | vo.setRemark(template.getRemark()); |
| | | vo.setSort(binding.getSort()); |
| | | vo.setDeviceIds(deviceIdsByTemplate.getOrDefault(template.getId(), new ArrayList<>())); |
| | | result.add(vo); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | // ä¿®æ¹æ åæ°æ£éªé¡¹ç® |
| | | LambdaUpdateWrapper<StandardTree> wrapper = Wrappers.<StandardTree>lambdaUpdate() |
| | | .eq(StandardTree::getFactory, standardTree.getFactory()) |
| | | .eq(StandardTree::getLaboratory, standardTree.getLaboratory()) |
| | | .eq(StandardTree::getSampleType, standardTree.getSampleType()) |
| | | .eq(StandardTree::getModel, standardTree.getOldModel()) |
| | | .set(StandardTree::getModel, standardTree.getModel()); |
| | | if (StringUtils.isNotBlank(standardTree.getSample())) { |
| | | wrapper.eq(StandardTree::getSample, standardTree.getSample()); |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean saveTemplateBindings(StandardTreeTemplateBindingDto dto) { |
| | | if (dto == null || dto.getStandardTreeId() == null) { |
| | | throw new BaseException("æ åä¸è½ä¸ºç©º"); |
| | | } |
| | | return standardTreeMapper.update(null, wrapper); |
| | | ensureTwoLevelStandard(dto.getStandardTreeId()); |
| | | List<TemplateBindingItemDto> templates = dto.getTemplates() == null ? new ArrayList<>() : dto.getTemplates(); |
| | | Set<Integer> templateIds = new HashSet<>(); |
| | | Set<Integer> allDeviceIds = new HashSet<>(); |
| | | List<StandardTreeTemplateBinding> bindings = new ArrayList<>(); |
| | | int index = 0; |
| | | for (TemplateBindingItemDto item : templates) { |
| | | if (item == null || item.getTemplateId() == null || !templateIds.add(item.getTemplateId())) { |
| | | throw new BaseException("åå§è®°å½æ¨¡æ¿ä¸è½éå¤ç»å®"); |
| | | } |
| | | StandardTemplate template = standardTemplateService.getById(item.getTemplateId()); |
| | | if (template == null) { |
| | | throw new BaseException("åå§è®°å½æ¨¡æ¿ä¸åå¨"); |
| | | } |
| | | StandardTreeTemplateBinding binding = new StandardTreeTemplateBinding(); |
| | | binding.setStandardTreeId(dto.getStandardTreeId()); |
| | | binding.setTemplateId(item.getTemplateId()); |
| | | binding.setSort(item.getSort() == null ? index : item.getSort()); |
| | | bindings.add(binding); |
| | | if (item.getDeviceIds() != null) { |
| | | allDeviceIds.addAll(item.getDeviceIds().stream() |
| | | .filter(Objects::nonNull).collect(Collectors.toSet())); |
| | | } |
| | | index++; |
| | | } |
| | | if (!allDeviceIds.isEmpty()) { |
| | | List<Integer> requestedDeviceIds = new ArrayList<>(allDeviceIds); |
| | | if (standardTreeTemplateDeviceMapper.selectExistingDeviceIds(requestedDeviceIds).size() |
| | | != requestedDeviceIds.size()) { |
| | | throw new BaseException("æé设å¤ä¸åå¨ï¼è¯·å·æ°è®¾å¤å表åéè¯"); |
| | | } |
| | | } |
| | | standardTreeTemplateDeviceMapper.delete(Wrappers.<StandardTreeTemplateDevice>lambdaQuery() |
| | | .eq(StandardTreeTemplateDevice::getStandardTreeId, dto.getStandardTreeId())); |
| | | standardTreeTemplateBindingMapper.delete(Wrappers.<StandardTreeTemplateBinding>lambdaQuery() |
| | | .eq(StandardTreeTemplateBinding::getStandardTreeId, dto.getStandardTreeId())); |
| | | for (int bindingIndex = 0; bindingIndex < bindings.size(); bindingIndex++) { |
| | | StandardTreeTemplateBinding binding = bindings.get(bindingIndex); |
| | | standardTreeTemplateBindingMapper.insert(binding); |
| | | TemplateBindingItemDto item = templates.get(bindingIndex); |
| | | List<Integer> deviceIds = item.getDeviceIds() == null ? new ArrayList<>() |
| | | : item.getDeviceIds().stream().filter(Objects::nonNull).distinct() |
| | | .collect(Collectors.toList()); |
| | | for (int deviceIndex = 0; deviceIndex < deviceIds.size(); deviceIndex++) { |
| | | StandardTreeTemplateDevice relation = new StandardTreeTemplateDevice(); |
| | | relation.setStandardTreeId(dto.getStandardTreeId()); |
| | | relation.setTemplateId(item.getTemplateId()); |
| | | relation.setDeviceId(deviceIds.get(deviceIndex)); |
| | | relation.setSort(deviceIndex); |
| | | standardTreeTemplateDeviceMapper.insert(relation); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate().like(StandardProductList::getTree, tree).eq(StandardProductList::getStandardMethodListId, standardId).set(StandardProductList::getPrice, null)); |
| | | public List<TemplateInspectionItemDto> selectTemplateInspectionItems(Integer standardTreeId) { |
| | | List<StandardTreeTemplateBindingVo> bindings = selectTemplateBindings(standardTreeId); |
| | | List<TemplateInspectionItemDto> result = new ArrayList<>(); |
| | | for (StandardTreeTemplateBindingVo binding : bindings) { |
| | | List<TemplateInspectionItemDto> items = StandardTemplateInspectionItemParser.parse(binding.getTemplateId(), |
| | | binding.getSort(), standardTemplateService.getStandTempThingById(binding.getTemplateId())); |
| | | result.addAll(items); |
| | | } |
| | | result.sort(Comparator.comparing(TemplateInspectionItemDto::getTemplateSort) |
| | | .thenComparing(TemplateInspectionItemDto::getTemplateRowIndex)); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | 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)); |
| | | private StandardTree ensureTwoLevelStandard(Integer standardTreeId) { |
| | | StandardTree standardTree = this.getById(standardTreeId); |
| | | if (standardTree == null || StringUtils.isBlank(standardTree.getSample()) |
| | | || standardTree.getSampleType() != null || standardTree.getModel() != null) { |
| | | throw new BaseException("è¯·éæ©æ ååºäºçº§æ å"); |
| | | } |
| | | return standardTree; |
| | | } |
| | | |
| | | @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::getCores, null) |
| | | .set(StandardProductList::getConductorMaterial, null) |
| | | .set(StandardProductList::getConductorType, null) |
| | | .set(StandardProductList::getPrice, null) |
| | | .set(StandardProductList::getManHour, null)); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | |
| | | @Resource |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | @Resource |
| | | private ISysDictTypeService dictTypeService; |
| | | @Resource |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | /** |
| | | * |
| | | * @param file |
| | | */ |
| | | @Override |
| | | public void removeNoSample(String sample) { |
| | | structureItemParameterMapper.removeNoSample("\""+sample+"\""); |
| | | public void importEquipData(MultipartFile file) throws IOException { |
| | | InputStream inputStream = file.getInputStream(); |
| | | List<StructureItemParameter> lists = new ArrayList<>(); |
| | | AtomicReference<String> sample = new AtomicReference<>(); |
| | | ExcelUtil.readBySax(inputStream, -1, (i, l, list1) -> { |
| | | if (l == 1) { |
| | | sample.set(list1.get(1) + ""); |
| | | } |
| | | if (l >= 1) { |
| | | StructureItemParameter str = new StructureItemParameter(); |
| | | // æµè¯å¯¹è±¡ |
| | | if (list1.get(1) == null) { |
| | | str.setSample(null); |
| | | } else { |
| | | String brand = (String) list1.get(1); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append("["); |
| | | // 产å |
| | | if (ObjectUtil.isNotEmpty(list1.get(2))) { |
| | | String production = (String) list1.get(2); |
| | | if (!production.contains("ï¼")) { |
| | | builder.append(String.format("[\"%s\",\"%s\"]", brand, production)); |
| | | } else { |
| | | Arrays.stream(production.split("ï¼")).forEach(item -> { |
| | | builder.append(String.format("[\"%s\",\"%s\"],", brand, item)); |
| | | }); |
| | | builder.deleteCharAt(builder.length() - 1); |
| | | } |
| | | } else { |
| | | builder.append("["); |
| | | builder.append(String.format("\"%s\"", brand)); |
| | | builder.append("]"); |
| | | } |
| | | builder.append("]"); |
| | | str.setSample(builder.toString()); |
| | | } |
| | | // æ£éªé¡¹ |
| | | str.setInspectionItem(list1.get(4).toString().trim()); |
| | | // æ£éªé¡¹è±æ |
| | | if (list1.get(5) != null) { |
| | | str.setInspectionItemEn(list1.get(5).toString()); |
| | | } |
| | | // æ£éªå项 |
| | | if (list1.get(6) == null) { |
| | | str.setInspectionItemSubclass(null); |
| | | } else { |
| | | str.setInspectionItemSubclass(list1.get(6).toString().trim()); |
| | | } |
| | | // æ£éªåé¡¹è±æ |
| | | if (list1.get(7) == null) { |
| | | str.setInspectionItemSubclassEn(null); |
| | | } else { |
| | | str.setInspectionItemSubclassEn(String.valueOf(list1.get(7).toString())); |
| | | } |
| | | // æ£éªé¡¹åç±» |
| | | if (list1.get(22) != null && list1.get(22) != "") { |
| | | str.setInspectionItemClass(list1.get(22).toString().trim()); |
| | | } else { |
| | | str.setInspectionItemClass(null); |
| | | } |
| | | // æ£éªé¡¹åç±»è±æ |
| | | if (list1.get(23) != null && list1.get(23) != "") { |
| | | str.setInspectionItemClassEn(list1.get(23) + ""); |
| | | } else { |
| | | str.setInspectionItemClassEn(null); |
| | | } |
| | | |
| | | LambdaQueryWrapper<StructureItemParameter> wrapper = Wrappers.lambdaQuery(StructureItemParameter.class) |
| | | .eq(StructureItemParameter::getInspectionItem, str.getInspectionItem()) |
| | | .eq(StructureItemParameter::getSample, str.getSample()) |
| | | |
| | | .last("limit 1"); |
| | | // 夿æ¯å¦ææ£éªé¡¹ç±»å |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemClass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemClass, str.getInspectionItemClass()); |
| | | } |
| | | |
| | | // 夿æ¯å¦ææ£éªå项 |
| | | if (ObjectUtils.isNotEmpty(str.getInspectionItemSubclass())) { |
| | | wrapper.eq(StructureItemParameter::getInspectionItemSubclass, str.getInspectionItemSubclass()); |
| | | } |
| | | StructureItemParameter db_str = this.getOne(wrapper); |
| | | if (ObjectUtils.isNotEmpty(db_str)) { |
| | | str.setId(db_str.getId()); |
| | | } |
| | | // æ¹æ³åç§° |
| | | if (list1.get(8) == null) { |
| | | str.setMethod(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(8).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setMethod(buffer.toString()); |
| | | } |
| | | // è¯éªå®¤ |
| | | if (list1.get(9) == null) { |
| | | str.setSonLaboratory(null); |
| | | } else { |
| | | str.setSonLaboratory(list1.get(9).toString()); |
| | | } |
| | | // 计éåä½ |
| | | if (list1.get(10) == null) { |
| | | str.setUnit(null); |
| | | } else { |
| | | str.setUnit(list1.get(10).toString()); |
| | | } |
| | | // è¦æ±å¼ |
| | | if (list1.get(11) == null) { |
| | | str.setAskTell(null); |
| | | } else { |
| | | str.setAskTell(list1.get(11).toString()); |
| | | } |
| | | // è¦æ±æè¿° |
| | | if (list1.get(12) == null) { |
| | | str.setAsk(null); |
| | | } else { |
| | | str.setAsk(list1.get(12).toString()); |
| | | } |
| | | // åä»· |
| | | if (list1.get(13) == null) { |
| | | str.setPrice(null); |
| | | } else { |
| | | str.setPrice(list1.get(13) + ""); |
| | | } |
| | | // å·¥æ¶ç³»æ° |
| | | if (list1.get(14) == null) { |
| | | str.setManHour(null); |
| | | } else { |
| | | str.setManHour(Double.valueOf(list1.get(14).toString())); |
| | | } |
| | | // å·¥æ¶åç» |
| | | if (list1.get(15) == null) { |
| | | str.setManHourGroup(null); |
| | | } else { |
| | | str.setManHourGroup(list1.get(15).toString()); |
| | | } |
| | | // é¢è®¡å®ææ¶é´ |
| | | if (list1.get(16) == null) { |
| | | str.setManDay(null); |
| | | } else { |
| | | str.setManDay(Integer.valueOf(list1.get(16).toString())); |
| | | } |
| | | // æ°æ®ç±»å |
| | | String jy; |
| | | if (list1.get(17).toString().equals("éééç±»å")) { |
| | | jy = "0"; |
| | | } else { |
| | | jy = "1"; |
| | | // ç»å®è®¾å¤ |
| | | if (list1.get(28) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | // æ¥è¯¢è®¾å¤ä¿¡æ¯ |
| | | List<String> managementNumberList = StrUtil.split(list1.get(28).toString(), 'ï¼'); |
| | | if (CollectionUtils.isNotEmpty(managementNumberList)) { |
| | | List<Integer> deviceIds = structureItemParameterMapper.selectDeviceIdsByNumber(managementNumberList); |
| | | if (CollectionUtils.isNotEmpty(deviceIds)) { |
| | | str.setDeviceIds(CollUtil.join(deviceIds, ",")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | str.setInspectionItemType(jy); |
| | | // æ£éªé¡¹ç±»å |
| | | String validateValueType = list1.get(18).toString(); |
| | | if (ObjectUtils.isNotEmpty(validateValueType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ£éªå¼ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(validateValueType)).collect(Collectors.toList()); |
| | | str.setInspectionValueType(enums.get(0).getDictValue()); |
| | | } |
| | | int bsm; |
| | | //ç¹æ®æ è¯ |
| | | if (list1.get(19).toString().equals("å¦")) { |
| | | bsm = 0; |
| | | } else { |
| | | bsm = 1; |
| | | } |
| | | str.setBsm(bsm + ""); |
| | | // æ°ååå
¸ |
| | | if (list1.get(20) != null) { |
| | | str.setDic(list1.get(20) + ""); |
| | | } else { |
| | | str.setDic(null); |
| | | } |
| | | // åå§è®°å½æ¨¡æ¿ |
| | | StandardTemplate standTempIdByName = standardTemplateService.getStandTempIdByName(String.valueOf(list1.get(21))); |
| | | if (standTempIdByName != null) { |
| | | str.setTemplateId(standTempIdByName.getId()); |
| | | } else { |
| | | str.setTemplateId(null); |
| | | } |
| | | try { |
| | | if (list1.get(24) != null) { |
| | | str.setLaboratory(list1.get(24) + ""); |
| | | } |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | // æ¡ä»¶ |
| | | if (list1.get(25) == null) { |
| | | str.setRadiusList(null); |
| | | } else { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | String input = list1.get(25).toString(); |
| | | buffer.append("["); |
| | | String[] values = input.split("ï¼"); |
| | | for (String value : values) { |
| | | buffer.append("\"").append(value.trim()).append("\","); |
| | | } |
| | | buffer.deleteCharAt(buffer.length() - 1); |
| | | buffer.append("]"); |
| | | str.setRadiusList(buffer.toString()); |
| | | } |
| | | //æ¶è´¹æ å |
| | | if (list1.get(26) == null) { |
| | | str.setRates(null); |
| | | } else { |
| | | str.setRates(list1.get(26) + ""); |
| | | } |
| | | // æ½æ ·ç±»å |
| | | if (list1.get(27) != null){ |
| | | String spotCheckType = list1.get(27).toString(); |
| | | if (ObjectUtils.isNotEmpty(spotCheckType)) { |
| | | List<SysDictData> enums = dictTypeService.selectDictDataByName("æ½æ£ç±»å") |
| | | .stream().filter(sysDictData -> sysDictData.getDictLabel().equals(spotCheckType)).collect(Collectors.toList()); |
| | | str.setSpotCheckType(enums.get(0).getDictValue()); |
| | | } |
| | | }else { |
| | | str.setSpotCheckType(null); |
| | | } |
| | | lists.add(str); |
| | | } |
| | | }); |
| | | try { |
| | | this.saveOrUpdateBatch(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("æå¡ç«¯æ¥é"); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.basic.dto.TemplateInspectionItemDto; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** è§£æ Luckysheet åå§è®°å½æ¨¡æ¿ä¸çâæ£éªé¡¹âæ è®°ã */ |
| | | public final class StandardTemplateInspectionItemParser { |
| | | private static final String INSPECTION_ITEM_MARK = "æ£éªé¡¹"; |
| | | |
| | | private StandardTemplateInspectionItemParser() { |
| | | } |
| | | |
| | | public static List<TemplateInspectionItemDto> parse(Integer templateId, Integer templateSort, String thing) { |
| | | if (!StringUtils.hasText(thing)) { |
| | | throw new BaseException("åå§è®°å½æ¨¡æ¿å
容ä¸è½ä¸ºç©º"); |
| | | } |
| | | JSONArray sheets; |
| | | try { |
| | | JSONObject root = JSON.parseObject(thing); |
| | | sheets = root == null ? null : root.getJSONArray("data"); |
| | | if (sheets == null) { |
| | | sheets = JSON.parseArray(thing); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new BaseException("åå§è®°å½æ¨¡æ¿æ ¼å¼é误"); |
| | | } |
| | | List<TemplateInspectionItemDto> result = new ArrayList<>(); |
| | | Set<Integer> rows = new HashSet<>(); |
| | | if (sheets == null) { |
| | | throw new BaseException("åå§è®°å½æ¨¡æ¿æ ¼å¼é误"); |
| | | } |
| | | for (Object sheetObject : sheets) { |
| | | JSONObject sheet = (JSONObject) sheetObject; |
| | | JSONArray cells = sheet.getJSONArray("celldata"); |
| | | if (cells == null) { |
| | | continue; |
| | | } |
| | | for (Object cellObject : cells) { |
| | | JSONObject cell = (JSONObject) cellObject; |
| | | JSONObject value = cell.getJSONObject("v"); |
| | | if (value == null || !isInspectionItem(value)) { |
| | | continue; |
| | | } |
| | | Integer row = cell.getInteger("r"); |
| | | String item = getCellText(value); |
| | | if (row == null || !StringUtils.hasText(item)) { |
| | | throw new BaseException("âæ£éªé¡¹âæ è®°æå¨åå
æ ¼å¿
须填忣éªé¡¹åç§°"); |
| | | } |
| | | if (!rows.add(row)) { |
| | | throw new BaseException("å䏿¨¡æ¿è¡åªè½é
ç½®ä¸ä¸ªâæ£éªé¡¹âæ è®°"); |
| | | } |
| | | TemplateInspectionItemDto dto = new TemplateInspectionItemDto(); |
| | | dto.setTemplateId(templateId); |
| | | dto.setTemplateSort(templateSort); |
| | | dto.setTemplateRowIndex(row); |
| | | dto.setInspectionItem(item.trim()); |
| | | result.add(dto); |
| | | } |
| | | } |
| | | result.sort(Comparator.comparing(TemplateInspectionItemDto::getTemplateRowIndex)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 读å Luckysheet åå
æ ¼ææ¬ï¼å
¼å®¹æ®éææ¬å inlineStr 坿æ¬ã |
| | | */ |
| | | private static String getCellText(JSONObject value) { |
| | | String text = value.getString("v"); |
| | | if (StringUtils.hasText(text)) { |
| | | return text; |
| | | } |
| | | text = value.getString("m"); |
| | | if (StringUtils.hasText(text)) { |
| | | return text; |
| | | } |
| | | |
| | | JSONObject cellType = value.getJSONObject("ct"); |
| | | JSONArray segments = cellType == null ? null : cellType.getJSONArray("s"); |
| | | if (segments == null || segments.isEmpty()) { |
| | | return text; |
| | | } |
| | | StringBuilder richText = new StringBuilder(); |
| | | for (Object segmentObject : segments) { |
| | | if (segmentObject instanceof JSONObject) { |
| | | String segmentText = ((JSONObject) segmentObject).getString("v"); |
| | | if (segmentText != null) { |
| | | richText.append(segmentText); |
| | | } |
| | | } |
| | | } |
| | | return richText.toString(); |
| | | } |
| | | |
| | | private static boolean isInspectionItem(JSONObject value) { |
| | | JSONObject ps = value.getJSONObject("ps"); |
| | | return ps != null && INSPECTION_ITEM_MARK.equals(ps.getString("value")); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.utils; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * æ åæ è·¯å¾è§£æç»æ |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class StandardTreePath { |
| | | |
| | | private String industry; |
| | | |
| | | private String standard; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.utils; |
| | | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * æ åæ åºå®ä¸¤çº§è·¯å¾è§£æå·¥å
·ã |
| | | * |
| | | * å
¼å®¹åç«¯ä¼ éç两ç§å¶åè·¯å¾ï¼ |
| | | * æ ååºä¾§ï¼è¡ä¸ - null - æ å |
| | | * ä¸åä¾§ï¼è¡ä¸ - - æ å |
| | | * ç»ä¸è§£æä¸º industry = 第ä¸ä¸ªæææ®µï¼standard = æåä¸ä¸ªæææ®µã |
| | | */ |
| | | public final class StandardTreePathParser { |
| | | |
| | | private static final String SEPARATOR = " - "; |
| | | |
| | | private static final String NULL_MARKER = "null"; |
| | | |
| | | private StandardTreePathParser() { |
| | | } |
| | | |
| | | /** |
| | | * è§£æè·¯å¾ä¸ºè¡ä¸ + æ åãæ åå¯è½ä¸º nullï¼è¡¨ç¤ºä»
è¡ä¸èç¹ï¼ã |
| | | */ |
| | | public static StandardTreePath parse(String tree) { |
| | | if (tree == null || tree.trim().isEmpty()) { |
| | | throw new BaseException("æ åæ è·¯å¾æ ¼å¼é误"); |
| | | } |
| | | String[] parts = tree.split(Pattern.quote(SEPARATOR), -1); |
| | | for (int i = 0; i < parts.length; i++) { |
| | | parts[i] = parts[i].trim(); |
| | | } |
| | | if (parts.length == 1) { |
| | | validateSegment(parts[0]); |
| | | return new StandardTreePath(parts[0], null); |
| | | } |
| | | if (parts.length == 2) { |
| | | validateSegment(parts[0]); |
| | | validateSegment(parts[1]); |
| | | return new StandardTreePath(parts[0], parts[1]); |
| | | } |
| | | if (parts.length == 3 && (parts[1].isEmpty() || NULL_MARKER.equals(parts[1]))) { |
| | | validateSegment(parts[0]); |
| | | validateSegment(parts[2]); |
| | | return new StandardTreePath(parts[0], parts[2]); |
| | | } |
| | | throw new BaseException("æ åæ è·¯å¾æ ¼å¼é误"); |
| | | } |
| | | |
| | | /** |
| | | * çæè§èè·¯å¾ï¼è¡ä¸ - null - æ å |
| | | */ |
| | | public static String canonical(String industry, String standard) { |
| | | String normalizedIndustry = trim(industry); |
| | | String normalizedStandard = trim(standard); |
| | | validateSegment(normalizedIndustry); |
| | | validateSegment(normalizedStandard); |
| | | return normalizedIndustry + SEPARATOR + NULL_MARKER + SEPARATOR + normalizedStandard; |
| | | } |
| | | |
| | | private static String trim(String value) { |
| | | return value == null ? "" : value.trim(); |
| | | } |
| | | |
| | | public static String normalizeNodeName(String value) { |
| | | String normalized = trim(value); |
| | | validateSegment(normalized); |
| | | return normalized; |
| | | } |
| | | |
| | | private static void validateSegment(String value) { |
| | | if (value == null || value.isEmpty() || NULL_MARKER.equals(value) || value.contains(SEPARATOR)) { |
| | | throw new BaseException("æ åæ è·¯å¾æ ¼å¼é误"); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.vo; |
| | | |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * åæææ¥æ£vo |
| | | */ |
| | | @Data |
| | | public class IfsInventoryQuantityVO extends IfsInventoryQuantity { |
| | | |
| | | /** |
| | | * æ£éªåid |
| | | */ |
| | | @Schema(description = "æ£éªåid") |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * æ£éªç»æï¼0ï¼ä¸åæ ¼ï¼1ï¼åæ ¼ï¼ |
| | | */ |
| | | @Schema(description = "æ£éªç»æï¼0ï¼ä¸åæ ¼ï¼1ï¼åæ ¼ï¼") |
| | | private Integer insResult; |
| | | |
| | | /** |
| | | * åæ¥ç¶æï¼0ï¼æªåæ¥ï¼1ï¼å·²åæ¥ï¼ |
| | | */ |
| | | @Schema(description = "åæ¥ç¶æï¼0ï¼æªåæ¥ï¼1ï¼å·²åæ¥ï¼") |
| | | private Integer syncStatus; |
| | | |
| | | /** |
| | | * æ¹æ¬¡å·æ¯å¦é夿¥æ£ |
| | | */ |
| | | @Schema(description = "æ¹æ¬¡å·æ¯å¦é夿¥æ£") |
| | | private Boolean lotBatchNoHasRepeat; |
| | | |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.basic.mapper.CertificationMapper"> |
| | | <select id="getCertificationDetail" resultType="com.ruoyi.basic.pojo.Certification"> |
| | | select b.* |
| | | from ( select a.`name`, a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time FROM |
| | | (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date, |
| | | MAX(date_of_issuance) AS latest_issuance_date, |
| | | c.`code`,c.organization,c.explanation |
| | | FROM |
| | | certification c |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | GROUP BY |
| | | name) a left join certification c on a.id=c.id |
| | | ) b |
| | | SELECT * FROM certification |
| | | <where> |
| | | create_time IN ( |
| | | SELECT MAX( create_time ) FROM certification WHERE create_time IS NOT NULL GROUP BY NAME ) |
| | | <if test="param.name != null and param.name != ''"> |
| | | AND name like concat('%',#{param.name},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | and iiq.supplier_name = #{supplierName} |
| | | and iiq.receiver_date between #{startOfNextQuarter} and #{endOfQuarter} |
| | | </select> |
| | | <select id="selectSplitOrderList" resultType="com.ruoyi.basic.vo.IfsInventoryQuantityVO"> |
| | | select |
| | | iiq.*, |
| | | io.id AS ins_order_id, |
| | | io.ins_result, |
| | | isor.sync_status |
| | | from ifs_inventory_quantity iiq |
| | | join ifs_split_order_record isor |
| | | on iiq.update_batch_no = isor.lot_batch_no |
| | | and iiq.order_no=isor.order_no |
| | | and iiq.line_no=isor.line_no |
| | | and iiq.release_no=isor.release_no |
| | | and iiq.receipt_no=isor.receipt_no |
| | | and iiq.part_no=isor.part_no |
| | | left join ins_order io on iiq.id=io.ifs_inventory_id |
| | | where iiq.order_no=#{orderNo} |
| | | and iiq.part_no=#{partNo} |
| | | and iiq.line_no=#{lineNo} |
| | | and iiq.release_no=#{releaseNo} |
| | | and iiq.receipt_no=#{receiptNo} |
| | | and iiq.is_split_order=1 |
| | | and (iiq.is_finish != 1 or isor.sync_status != 1) |
| | | and (io.id is null or io.is_exemption != 1) |
| | | </select> |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.SealMapper"> |
| | | <select id="selectSeal" resultType="com.ruoyi.basic.pojo.Seal"> |
| | | select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time |
| | | from seal s LEFT JOIN laboratory l on s.lab_id=l.id |
| | | select * from (select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time |
| | | from seal s LEFT JOIN laboratory l on s.lab_id=l.id) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | sm.qualification_id, |
| | | COALESCE((SELECT GROUP_CONCAT(l.laboratory_name ORDER BY COALESCE(l.sort, 0), l.id SEPARATOR 'ã') |
| | | FROM standard_method_industry smi JOIN laboratory l ON l.id = smi.industry_id |
| | | WHERE smi.standard_method_id = sm.id), '') industry_names, |
| | | (SELECT COUNT(*) FROM standard_method_attachment sma WHERE sma.standard_method_id = sm.id) attachment_count |
| | | from standard_method sm |
| | | left join user u1 on sm.create_user = u1.id |
| | | left join user u2 on sm.update_user = u2.id |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where sm.code != 'ææ¯è¦æ±' |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where sm.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%[', #{tree}, ']%') |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists3" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%', #{tree}, '%') |
| | | </select> |
| | | <select id="selectStandardMethodListsByIndustry" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select sm.id, sm.code, sm.name, sm.remark |
| | | from standard_method sm |
| | | inner join standard_method_industry smi on smi.standard_method_id = sm.id |
| | | inner join laboratory l on l.id = smi.industry_id |
| | | where sm.is_use = 1 |
| | | and sm.is_product = 1 |
| | | and l.laboratory_name = #{industry} |
| | | order by sm.id |
| | | </select> |
| | | <select id="selectListEnum" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id,code,name from standard_method |
| | | where is_product = 1 |
| | | and is_use = 1 |
| | | </select> |
| | | <select id="selectStandardMethodListsByNull" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and ( |
| | | structure_test_object_id is null |
| | | OR structure_test_object_id = '' |
| | | OR structure_test_object_id = '[]' |
| | | ) |
| | | </select> |
| | | <select id="getStandardMethodId" resultType="java.lang.Integer"> |
| | | select id from standard_method where code = #{code} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- æ¹éæ·»å æ£æµæ å --> |
| | | <insert id="saveBatchProductLists"> |
| | | INSERT INTO standard_product_list (id, inspection_item, inspection_item_en, inspection_item_subclass, inspection_item_subclass_en, factory, laboratory, sample_type, sample, model, son_laboratory, unit, price, man_hour, man_hour_group, inspection_item_type, inspection_value_type, checkout_number, section, cores, method, method_s, man_day, bsm, ask, tell, standard_method_list_id, template_id, state, dic, tree, structure_item_parameter_id, inspection_item_class, inspection_item_class_en, radius, radius_list, rates, sort, conductor_material, conductor_type) |
| | | VALUES |
| | | <foreach item="item" collection="productLists" open="(" separator="),(" close=")"> |
| | | #{item.id}, #{item.inspectionItem}, #{item.inspectionItemEn}, #{item.inspectionItemSubclass}, #{item.inspectionItemSubclassEn}, #{item.factory}, #{item.laboratory}, #{item.sampleType}, #{item.sample}, #{item.model}, #{item.sonLaboratory}, #{item.unit}, #{item.price}, #{item.manHour}, #{item.manHourGroup}, #{item.inspectionItemType}, #{item.inspectionValueType}, #{item.checkoutNumber}, #{item.section}, #{item.cores}, #{item.method}, #{item.methodS}, #{item.manDay}, #{item.bsm}, #{item.ask}, #{item.tell}, #{item.standardMethodListId}, #{item.templateId}, #{item.state}, #{item.dic}, #{item.tree}, #{item.structureItemParameterId}, |
| | | #{item.inspectionItemClass}, #{item.inspectionItemClassEn}, #{item.radius}, #{item.radiusList}, #{item.rates}, #{item.sort}, #{item.conductorMaterial}, #{item.conductorType} |
| | | </foreach> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateSection"> |
| | | UPDATE standard_product_list |
| | | SET price=#{productList.price}, |
| | |
| | | |
| | | <select id="selectStandardTemplatePageList" resultType="com.ruoyi.basic.pojo.StandardTemplate"> |
| | | select * from ( |
| | | select st.id, st.name,st.number, st.remark, u2.name create_user_name, u3.name update_user_name, st.create_time, st.update_time |
| | | select st.id, st.name,st.number, st.price, st.remark, u2.name create_user_name, u3.name update_user_name, st.create_time, st.update_time |
| | | from standard_template st |
| | | left join user u2 on u2.id = st.create_user |
| | | left join user u3 on u3.id = st.update_user |
| | |
| | | WHERE id = #{templateId} |
| | | </select> |
| | | |
| | | <select id="countBindTemplateItemParameter"> |
| | | SELECT COUNT(*) FROM structure_item_parameter WHERE template_id = #{templateId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="sort" column="sort" jdbcType="INTEGER"/> |
| | | <result property="standardMethodId" column="standard_method_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | |
| | | rates |
| | | </sql> |
| | | |
| | | <select id="selectStandardTreeList" resultMap="FactoryDto"> |
| | | select 'ä¸å¤©ç§ææ£æµä¸å¿' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample, |
| | | st.model, |
| | | sto.code, |
| | | sto.id sample_type_id, |
| | | sto.sort, |
| | | sto.specimen_name_en sample_type_en, |
| | | p.name_en sample_en |
| | | from laboratory l |
| | | left join structure_test_object sto on sto.laboratory_id = l.id |
| | | left join product p on p.object_id = sto.id |
| | | left join standard_tree st on st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL(st.id), st.id |
| | | <select id="selectStandardLibraryTree" resultType="com.ruoyi.basic.dto.StandardLibraryTreeRowDto"> |
| | | SELECT l.id AS industry_id, |
| | | l.laboratory_name AS industry_name, |
| | | l.sort AS industry_sort, |
| | | st.id AS standard_id, |
| | | sm.id AS standard_method_id, |
| | | sm.code AS standard_code, |
| | | sm.name AS standard_name, |
| | | sm.name_en AS standard_name_en, |
| | | CONCAT(sm.code, ' - ', sm.name) AS standard_label, |
| | | st.sort AS standard_sort |
| | | FROM laboratory l |
| | | LEFT JOIN standard_tree st |
| | | ON st.laboratory = l.laboratory_name |
| | | AND st.sample_type IS NULL |
| | | AND st.model IS NULL |
| | | AND st.standard_method_id IS NOT NULL |
| | | AND EXISTS (SELECT 1 FROM standard_method sm0 |
| | | WHERE sm0.id = st.standard_method_id |
| | | AND sm0.is_product = 1 AND sm0.is_use = 1) |
| | | LEFT JOIN standard_method sm ON sm.id = st.standard_method_id |
| | | ORDER BY COALESCE(l.sort, 0), l.id, |
| | | COALESCE(st.sort, 0), st.id |
| | | </select> |
| | | |
| | | <update id="updateProductListIndustry"> |
| | | UPDATE standard_product_list |
| | | SET laboratory = #{newName}, |
| | | tree = CASE WHEN sample_type IS NULL AND model IS NULL AND sample IS NOT NULL |
| | | THEN CONCAT(#{newName}, ' - null - ', sample) |
| | | ELSE tree END |
| | | WHERE laboratory = #{oldName} |
| | | </update> |
| | | |
| | | <update id="updateProductListStandard"> |
| | | UPDATE standard_product_list |
| | | SET sample = #{newName}, |
| | | tree = CONCAT(#{industry}, ' - null - ', #{newName}) |
| | | WHERE laboratory = #{industry} |
| | | AND sample = #{oldName} |
| | | AND sample_type IS NULL |
| | | AND model IS NULL |
| | | </update> |
| | | |
| | | <update id="updateInsOrderIndustry"> |
| | | UPDATE ins_order |
| | | SET laboratory = #{newName} |
| | | WHERE laboratory = #{oldName} |
| | | AND (state IS NULL OR state NOT IN (3, -1)) |
| | | AND (ins_state IS NULL OR ins_state != 5) |
| | | </update> |
| | | |
| | | <update id="updateInsSampleIndustry"> |
| | | UPDATE ins_sample s |
| | | JOIN ins_order o ON o.id = s.ins_order_id |
| | | SET s.laboratory = #{newName} |
| | | WHERE s.laboratory = #{oldName} |
| | | AND (o.state IS NULL OR o.state NOT IN (3, -1)) |
| | | AND (o.ins_state IS NULL OR o.ins_state != 5) |
| | | </update> |
| | | |
| | | <update id="updateInsProductIndustry"> |
| | | UPDATE ins_product p |
| | | JOIN ins_sample s ON s.id = p.ins_sample_id |
| | | JOIN ins_order o ON o.id = s.ins_order_id |
| | | SET p.laboratory = #{newName} |
| | | WHERE p.laboratory = #{oldName} |
| | | AND (o.state IS NULL OR o.state NOT IN (3, -1)) |
| | | AND (o.ins_state IS NULL OR o.ins_state != 5) |
| | | </update> |
| | | |
| | | <update id="updateInsOrderStandard"> |
| | | UPDATE ins_order |
| | | SET sample = #{newName} |
| | | WHERE laboratory = #{industry} |
| | | AND sample = #{oldName} |
| | | AND (state IS NULL OR state NOT IN (3, -1)) |
| | | AND (ins_state IS NULL OR ins_state != 5) |
| | | </update> |
| | | |
| | | <update id="updateInsSampleStandard"> |
| | | UPDATE ins_sample s |
| | | JOIN ins_order o ON o.id = s.ins_order_id |
| | | SET s.sample = #{newName} |
| | | WHERE s.laboratory = #{industry} |
| | | AND s.sample = #{oldName} |
| | | AND (o.state IS NULL OR o.state NOT IN (3, -1)) |
| | | AND (o.ins_state IS NULL OR o.ins_state != 5) |
| | | </update> |
| | | |
| | | <update id="updateInsProductStandard"> |
| | | UPDATE ins_product p |
| | | JOIN ins_sample s ON s.id = p.ins_sample_id |
| | | JOIN ins_order o ON o.id = s.ins_order_id |
| | | SET p.sample = #{newName} |
| | | WHERE p.laboratory = #{industry} |
| | | AND p.sample = #{oldName} |
| | | AND (o.state IS NULL OR o.state NOT IN (3, -1)) |
| | | AND (o.ins_state IS NULL OR o.ins_state != 5) |
| | | </update> |
| | | |
| | | <select id="selectStandardProductById" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select inspection_item, |
| | |
| | | or sp.sample = '' |
| | | or sp.sample = '[]' |
| | | </select> |
| | | <select id="getStandardMethodListBySample" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select sm.code,sm.name,sm.remark from standard_method sm |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | <if test="sampleType != null"> |
| | | and sto.specimen_name = #{sampleType} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectStandardTreeList2" resultType="com.ruoyi.basic.pojo.StandardTree"> |
| | | select 'ä¸å¤©ç§ææ£æµä¸å¿' factory, |
| | | select '' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample |
| | |
| | | order by inspection_item_class, inspection_item, id asc |
| | | </select> |
| | | |
| | | <select id="selectStandardProductListByIndustry" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | method, |
| | | son_laboratory, |
| | | unit, |
| | | ask_tell as tell, |
| | | ask, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | man_day, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | bsm, |
| | | template_id, |
| | | laboratory, |
| | | checkout_number, |
| | | section, |
| | | dic, |
| | | 0 as state, |
| | | null as model, |
| | | #{standard} as sample, |
| | | #{tree} as tree, |
| | | id as structure_item_parameter_id, |
| | | radius_list, |
| | | rates |
| | | from structure_item_parameter |
| | | where (laboratory is null |
| | | or laboratory = '' |
| | | or laboratory = #{industry}) |
| | | order by inspection_item_class, inspection_item, id asc |
| | | </select> |
| | | |
| | | <select id="getStandardTree2" resultMap="SampleTypeDto"> |
| | | select sto.specimen_name sample_type, |
| | | p.name sample, |
| | |
| | | left join product p on p.object_id = sto.id |
| | | left join standard_tree st on st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | |
| | | <select id="getLaboratory" resultType="java.lang.String"> |
| | |
| | | where name = #{name} |
| | | </select> |
| | | <select id="selectStandardTreeListByPartNo" resultMap="FactoryDto"> |
| | | select 'ä¸å¤©ç§ææ£æµä¸å¿' factory, |
| | | select '' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample, |
| | |
| | | ir1.id enter_report_id, |
| | | ir1.url enter_url, |
| | | ir1.url_s enter_url_s, |
| | | ir1.is_ratify enter_ratify_status, |
| | | io2.id quarter_order_id, |
| | | ir2.id quarter_report_id, |
| | | ir2.url quarter_url, |
| | | ir2.url_s quarter_url_s, |
| | | ir2.is_ratify quarter_ratify_status, |
| | | group_concat(distinct isa.sample_code, ' ') sample_code, |
| | | group_concat(distinct isa.sample, ' ') sample_name, |
| | | group_concat(distinct isa.model, ' ') sample_model, |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | |
| | | <select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity"> |
| | | <select id="selectIfsPage" resultType="com.ruoyi.basic.vo.IfsInventoryQuantityVO"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | ORDER BY declare_date DESC |
| | | </select> |
| | | <select id="selectIfsInventoryQuantity" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | |
| | | select * from (<include refid="getIfsOrder"/> |
| | | <where> |
| | | <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''"> |
| | | send_time between #{beginDeclareDate} and #{endDeclareDate} |
| | | declare_date between #{beginDeclareDate} and #{endDeclareDate} |
| | | </if> |
| | | </where> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | select * from (<include refid="getIfsOrder"/> |
| | | <where> |
| | | <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''"> |
| | | send_time between #{beginDeclareDate} and #{endDeclareDate} |
| | | declare_date between #{beginDeclareDate} and #{endDeclareDate} |
| | | </if> |
| | | </where> |
| | | ) a |
| | |
| | | <where> |
| | | and (quarter_order_id is not null) |
| | | <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''"> |
| | | and send_time between #{beginDeclareDate} and #{endDeclareDate} |
| | | and declare_date between #{beginDeclareDate} and #{endDeclareDate} |
| | | </if> |
| | | </where> |
| | | ) a |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3Batch" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample is null |
| | | <if test="sampleTypeValues != null and sampleTypeValues.size() > 0"> |
| | | and sample_type in |
| | | <foreach item="item" collection="sampleTypeValues" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®åææidå表æ¥è¯¢åææä¿¡æ¯ --> |
| | | <select id="getIfsByIds" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | <include refid="getIfsOrder"/> |
| | | where id in |
| | | <foreach item="id" collection="ifsIds" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.basic.mapper.StandardTreeTemplateDeviceMapper"> |
| | | <select id="selectExistingDeviceIds" resultType="java.lang.Integer"> |
| | | select id from device where id in |
| | | <foreach collection='deviceIds' item='deviceId' open='(' separator=',' close=')'> |
| | | #{deviceId} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.StructureItemParameterMapper"> |
| | | <delete id="removeNoSample"> |
| | | delete |
| | | from structure_item_parameter |
| | | where sample like concat('%', #{sample}, '%') |
| | | </delete> |
| | | |
| | | <select id="selectItemParameterList" resultType="com.ruoyi.basic.pojo.StructureItemParameter"> |
| | | select * from (select A.id, |
| | | inspection_item, |
| | |
| | | inspection_item_class_en, |
| | | code, |
| | | radius_list, |
| | | rates |
| | | rates, |
| | | device_ids, |
| | | spot_check_type |
| | | from (select *, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | |
| | | from structure_test_object sto |
| | | left join product p on p.object_id = sto.id |
| | | </select> |
| | | <select id="selectDeviceIdsByNumber" resultType="java.lang.Integer"> |
| | | select id from device |
| | | where management_number in |
| | | <foreach item="item" collection="managementNumberList" open="(" separator="),(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <resultMap id="itemDto" type="com.ruoyi.basic.dto.TestItemDto"> |
| | | <result column="sId" property="id"/> |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <artifactId>ruoyi-system</artifactId> |
| | | </dependency> |
| | | |
| | | <!--ä¸å¡æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>basic-server</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>performance-server</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- MyBatis-Plus --> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-spring-boot4-starter</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- Excel å·¥å
· --> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>easyexcel</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- hutool å·¥å
·ç±» --> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- fastjson v1 API å
¼å®¹å
--> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- poi-tlï¼Word æ¥è¡¨æ¨¡æ¿å¡«å
--> |
| | | <dependency> |
| | | <groupId>com.deepoove</groupId> |
| | | <artifactId>poi-tl</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- word 转 pdf --> |
| | | <dependency> |
| | | <groupId>com.aspose</groupId> |
| | | <artifactId>aspose-words</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.itextpdf</groupId> |
| | | <artifactId>itextpdf</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- MockMultipartFileï¼XWPFDocument å
è£
æ MultipartFile æ¶ä½¿ç¨ --> |
| | | <dependency> |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-test</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- lombok --> |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.DataAnalysisDto; |
| | | import com.ruoyi.inspect.service.DataAnalysisService; |
| | | import com.ruoyi.inspect.vo.DeviationAnalyzeVo; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/16 |
| | | */ |
| | | @RequestMapping("/dataAnalysis") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Tag(name = "æ°æ®åæ") |
| | | public class DataAnalysisController { |
| | | |
| | | private DataAnalysisService dataAnalysisService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åæææ±ç¶ç»è®¡ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åæææ±ç¶ç»è®¡") |
| | | @GetMapping("/getRawPassRateByBarChart") |
| | | public Result getRawPassRateByBarChart(DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawPassRateByBarChart(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åæææ±ç¶ç»è®¡ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææåæ ¼çé¥¼ç¶æ") |
| | | @GetMapping("/getRawPassRateByCake") |
| | | public Result getRawPassRateByCake(DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawPassRateByCake(dataAnalysisDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææé¡¹") |
| | | @GetMapping("/getRawItemNames") |
| | | public Result getRawItemNames(DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawItemNames(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææé¡¹æ£åæ") |
| | | @PostMapping("/getRawProductAnalysis") |
| | | public Result getRawProductAnalysis(@RequestBody DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawProductAnalysis(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæå表 |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææé¡¹æ£åæå表") |
| | | @PostMapping("/getRawProductAnalysisAllList") |
| | | public Result<List<IfsInventoryQuantitySupplierDto>> getRawProductAnalysisAllList(@RequestBody DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawProductAnalysisAllList(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæå表 |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææé¡¹æ£åæåæ ¼ç") |
| | | @PostMapping("/getRawProductAnalysisRawPass") |
| | | public Result getRawProductAnalysisRawPass(@RequestBody DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawProductAnalysisRawPass(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£ååå®¶æ°æ®å¯¹æ¯ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢åææé¡¹æ£ååå®¶æ°æ®å¯¹æ¯") |
| | | @PostMapping("/getRawSupplierCompare") |
| | | public Result<DeviationAnalyzeVo> getRawSupplierCompare(@RequestBody DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawSupplierCompare(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¬æä¸ä¸ä¸ªæåæ ¼çå¯¹æ¯ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢æ¬æä¸ä¸ä¸ªæåæ ¼ç对æ¯") |
| | | @GetMapping("/getRawUpMonth") |
| | | public Result getRawUpMonth(DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getRawUpMonth(dataAnalysisDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹ç±»åé¥¼å¾ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢æ£éªé¡¹ç±»å饼å¾") |
| | | @GetMapping("/getOrderTypeCookie") |
| | | public Result getOrderTypeCookie(DataAnalysisDto dataAnalysisDto) { |
| | | return Result.success(dataAnalysisService.getOrderTypeCookie(dataAnalysisDto)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.IfsStockQueryDTO; |
| | | import com.ruoyi.inspect.dto.SpotCheckQuarterDto; |
| | | import com.ruoyi.inspect.dto.SpotCheckYearDto; |
| | | import com.ruoyi.inspect.service.FinishProductSpotCheckService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/9/29 |
| | | */ |
| | | @RequestMapping("/finishProductSpotCheck") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Tag(name = "æåæ½æ ·") |
| | | public class FinishProductSpotCheckController { |
| | | |
| | | private FinishProductSpotCheckService finishProductSpotCheckService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ifsåºåæ°é |
| | | * |
| | | * @param ifsStockQueryDTO |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢ifsæååºå") |
| | | @PostMapping("/getIfsStock") |
| | | public Result getIfsStock(@RequestBody IfsStockQueryDTO ifsStockQueryDTO) { |
| | | return finishProductSpotCheckService.getIfsStockReport(ifsStockQueryDTO); |
| | | } |
| | | |
| | | /******************************************************** å£åº¦æ½æ · ********************************************************/ |
| | | |
| | | /** |
| | | * æ°å¢å£åº¦æ½æ£ |
| | | * |
| | | * @param spotCheckQuarterDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ°å¢å£åº¦æ½æ£") |
| | | @PostMapping("/addQuarter") |
| | | public Result addQuarter(@RequestBody SpotCheckQuarterDto spotCheckQuarterDto) { |
| | | return Result.success(finishProductSpotCheckService.addQuarter(spotCheckQuarterDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å£åº¦æ½æ ·è¯¦æ
|
| | | * |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢å£åº¦æ½æ ·è¯¦æ
") |
| | | @GetMapping("/getQuarter") |
| | | public Result getQuarter(Integer quarterId) { |
| | | return Result.success(finishProductSpotCheckService.getQuarter(quarterId)); |
| | | } |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·å表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "å£åº¦æ½æ ·å表") |
| | | @GetMapping("/getQuarterPage") |
| | | public Result getQuarterPage(Page page, SpotCheckQuarterDto spotCheckQuarter) throws Exception { |
| | | return Result.success(finishProductSpotCheckService.getQuarterPage(page, spotCheckQuarter)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å£åº¦æ½æ£ |
| | | * |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "å é¤å£åº¦æ£éª") |
| | | @DeleteMapping("/deleteQuarter") |
| | | public Result deleteQuarter(Integer quarterId) { |
| | | return Result.success(finishProductSpotCheckService.deleteQuarter(quarterId)); |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯") |
| | | @GetMapping("/getQuarterOnOrder") |
| | | public Result getQuarterOnOrder() { |
| | | return Result.success(finishProductSpotCheckService.getQuarterOnOrder()); |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹å£åº¦æ£éª") |
| | | @PostMapping("/updateQuarterOnOrder") |
| | | public Result updateQuarterOnOrder(@RequestBody SpotCheckQuarterDto spotCheckQuarterDto) { |
| | | return Result.success(finishProductSpotCheckService.updateQuarterOnOrder(spotCheckQuarterDto)); |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æäº¤æç»å£åº¦æ¥å") |
| | | @GetMapping("/finalReportQuarter") |
| | | public void finalReportQuarter(Integer quarterId, HttpServletResponse response) { |
| | | finishProductSpotCheckService.finalReportQuarter(quarterId, response); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /******************************************************** å¹´åº¦æ½æ · ********************************************************/ |
| | | |
| | | /** |
| | | * æ°å¢å¹´åº¦æ½æ · |
| | | * |
| | | * @param spotCheckYearDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ°å¢å¹´åº¦æ½æ ·") |
| | | @PostMapping("/addSpotCheckYear") |
| | | public Result addSpotCheckYear(@RequestBody SpotCheckYearDto spotCheckYearDto) { |
| | | return Result.success(finishProductSpotCheckService.addSpotCheckYear(spotCheckYearDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å£åº¦æ½æ ·è¯¦æ
|
| | | * |
| | | * @param yearId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢å¹´åº¦æ½æ ·è¯¦æ
") |
| | | @GetMapping("/getSpotCheckYear") |
| | | public Result getSpotCheckYear(Integer yearId) { |
| | | return Result.success(finishProductSpotCheckService.getSpotCheckYear(yearId)); |
| | | } |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·å表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "å¹´åº¦æ½æ ·å表å表") |
| | | @GetMapping("/getSpotCheckYearPage") |
| | | public Result getSpotCheckYearPage(Page page, SpotCheckYearDto spotCheckYear) throws Exception { |
| | | return Result.success(finishProductSpotCheckService.getSpotCheckYearPage(page, spotCheckYear)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å¹´åº¦æ½æ · |
| | | * |
| | | * @param yearId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "å é¤å¹´åº¦æ½æ ·") |
| | | @DeleteMapping("/deleteSpotCheckYear") |
| | | public Result deleteSpotCheckYear(Integer yearId) { |
| | | return Result.success(finishProductSpotCheckService.deleteSpotCheckYear(yearId)); |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹å¹´åº¦æ£éª") |
| | | @PostMapping("/updateSpotCheckYear") |
| | | public Result updateSpotCheckYear(@RequestBody SpotCheckYearDto spotCheckYearDto) { |
| | | return Result.success(finishProductSpotCheckService.updateSpotCheckYear(spotCheckYearDto)); |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "çææç»å¹´åº¦æ¥å") |
| | | @GetMapping("/finalReportSpotCheckYear") |
| | | public Result finalReportSpotCheckYear(Integer yearId, HttpServletResponse response) { |
| | | return Result.success(finishProductSpotCheckService.finalReportSpotCheckYear(yearId, response)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.service.IfsOrderInspectionService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * ifséå®è®¢åæ¥æ£controller |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/ifsOrderInspection") |
| | | public class IfsOrderInspectionController { |
| | | |
| | | @Autowired |
| | | private IfsOrderInspectionService ifsOrderInspectionService; |
| | | |
| | | @Operation(summary = "éå®è®¢åæ¥æ£æ¥è¯¢å
¨é¨") |
| | | @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')") |
| | | @GetMapping("/getIfsByAll") |
| | | public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(ifsOrderInspectionService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "éå®è®¢åæ¥æ£æ¥çå·²å®æä¿¡æ¯") |
| | | @GetMapping("/getIfsByFinish") |
| | | public Result getIfsByFinish(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | ifsInventoryQuantityDto.setIsFinish(1); |
| | | return Result.success(ifsOrderInspectionService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.service.IfsPartPropsRecordService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * ifsé¶ä»¶å±æ§controller |
| | | */ |
| | | @Tag(name = "ifsé¶ä»¶å±æ§") |
| | | @RestController |
| | | @RequestMapping("/ifsPartProps") |
| | | public class IfsPartPropsRecordController { |
| | | |
| | | @Autowired |
| | | private IfsPartPropsRecordService ifsPartPropsRecordService; |
| | | |
| | | @Operation(summary = "æ°å¢æä¿åé¶ä»¶å±æ§") |
| | | @PostMapping("/saveOrUpdateProps") |
| | | public Result saveOrUpdateProps(@RequestBody IfsPartPropsRecordDTO ifsPartPropsRecord){ |
| | | return Result.success(ifsPartPropsRecordService.saveOrUpdateProps(ifsPartPropsRecord)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢ifs订åçé¶ä»¶å±æ§è®°å½") |
| | | @GetMapping("/getOneByIfsId/{ifsId}") |
| | | public Result getOneByIfsId(@PathVariable("ifsId") Long ifsId){ |
| | | return Result.success(ifsPartPropsRecordService.getOneByIfsId(ifsId)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¯éç¥ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-04-23 02:14:30 |
| | | */ |
| | | @Tag(name = "æ¶æ¯éç¥") |
| | | @RestController |
| | | @RequestMapping("/informationNotification") |
| | | public class InformationNotificationController { |
| | | |
| | | @Autowired |
| | | private InformationNotificationService informationNotificationService; |
| | | |
| | | @Operation(summary = "æ¶æ¯éç¥-æ»å¨å页æ¥è¯¢") |
| | | @GetMapping("page") |
| | | public Result<?> getPage(Long size, Long current, String messageType) { |
| | | return Result.success(informationNotificationService.getPage(new Page<>(current, size), messageType)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¶æ¯éç¥-æ»å¨æ¥è¯¢") |
| | | @GetMapping("msgRoll") |
| | | public Result<?> msgRoll(Page page) { |
| | | return Result.success(informationNotificationService.msgRoll(page)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¶æ¯éç¥-ç¹å»è¯¦æ
触åä¿®æ¹ç¶æä¸ºå·²è¯»") |
| | | @PostMapping("triggerModificationStatusToRead") |
| | | public Result<?> triggerModificationStatusToRead(@RequestBody Map<String, Integer> params) { |
| | | Integer id = params.get("id"); |
| | | informationNotificationService.triggerModificationStatusToRead(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¶æ¯éç¥-æ è®°ææä¿¡æ¯ä¸ºå·²è¯»/å 餿æå·²è¯»æ¶æ¯") |
| | | @PostMapping("informationReadOrDelete/{isMarkAllInformationRead}") |
| | | public Result<?> markAllInformationReadOrDeleteAllReadMessages(@PathVariable("isMarkAllInformationRead") Boolean isMarkAllInformationRead) { |
| | | informationNotificationService.markAllInformationReadOrDeleteAllReadMessages(isMarkAllInformationRead); |
| | | return Result.success(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.InventoryDetailDTO; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsOrderTemplateService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import com.ruoyi.inspect.service.InsSampleService; |
| | | import com.ruoyi.inspect.vo.InsOrderPrintingVo; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/insOrder") |
| | | @Tag(name = "æ£éªå模å") |
| | | public class InsOrderController { |
| | | |
| | | private InsOrderService insOrderService; |
| | | |
| | | private InsSampleService insSampleService; |
| | | |
| | | private InsProductService insProductService; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private InsOrderTemplateService insOrderTemplateService; |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @Operation(summary = "æ¥è¯¢å使£éªå") |
| | | @GetMapping("/selectInsOrderParameter") |
| | | public Result selectInsOrderParameter(Page page, SampleOrderDto sampleOrderDto) { |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | @Operation(summary = "å¤è´ä¸åæåæ ç¾æå°") |
| | | @PostMapping("/labelOutsideOrderPrinting") |
| | | public Result<List<InventoryDetailDTO>> labelOutsideOrderPrinting(@RequestBody Map<String, Object> param) { |
| | | List<Integer> ids = (List<Integer>) param.get("ids"); |
| | | return Result.success(insOrderService.labelOutsideOrderPrinting(ids)); |
| | | } |
| | | |
| | | //ç¨äºæ£éªä¸ååºå«æ¥çææè®¢åååªæ¥çåä¸ä¸ªå§æåä½ç订å |
| | | @Operation(summary = "æ¥è¯¢æææ£éªå") |
| | | @GetMapping("/selectAllInsOrderParameter") |
| | | public Result selectAllInsOrderParameter() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ£éªåé
") |
| | | @PostMapping("/upInsOrder") |
| | | public Result<?> upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId,String sonLaboratory) { |
| | | return Result.fail("è¯·å¨æ ·åæ¥æ¶é¡µé¢éæ©ä¸»æ£éªäººåæäº¤æ£éª"); |
| | | } |
| | | |
| | | @Operation(summary = "æ·»å æ£éªä¸åæ°æ®") |
| | | @PreAuthorize("@ss.hasPermi('add:insOrder')") |
| | | @PostMapping("/addInsOrder") |
| | | public Result<?> addInsOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | if (insPlaceOrderDto.getStandardTreeId() != null) { |
| | | return Result.success(insOrderService.addNewJuInsOrder(insPlaceOrderDto)); |
| | | } |
| | | return Result.success(insOrderService.addInsOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getInsOrder())); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢è®¢åæé¿é¢è®¡æ¶é´") |
| | | @GetMapping("/selectOrderManDay") |
| | | public Result<?> selectOrderManDay(Integer id) { |
| | | int day = insProductService.selectOrderManDay(id); |
| | | return Result.success(LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ£éªä¸åå
容详æ
") |
| | | @GetMapping("/getInsOrder") |
| | | public Result<?> getInsOrder(Integer orderId) { |
| | | return Result.success(insOrderService.getInsOrder(orderId)); |
| | | } |
| | | |
| | | @Operation(summary = "å®¡æ ¸æ£éªåè¿è¡ç¶æä¿®æ¹") |
| | | @PostMapping("/upInsOrderOfState") |
| | | public Result<?> upInsOrderOfState(@RequestBody InsOrder insOrder) { |
| | | return Result.success(insOrderService.upInsOrderOfState(insOrder)); |
| | | } |
| | | |
| | | @Operation(summary = "æ·»å æ£éªå模æ¿") |
| | | @PostMapping("/addInsOrderTemplate") |
| | | public Result<?> addInsOrderTemplate(@RequestBody InsOrderTemplate insOrderTemplate) { |
| | | return Result.success(insOrderTemplateService.addInsOrderTemplate(insOrderTemplate)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ£éªå模æ¿") |
| | | @GetMapping("/selectInsOrderTemplate") |
| | | public Result<?> selectInsOrderTemplate(String company) { |
| | | return Result.success(insOrderTemplateService.selectInsOrderTemplate(company)); |
| | | } |
| | | |
| | | @Operation(summary = "éè¿æ£éªå模æ¿idè·åæ£éªå模æ¿å
容") |
| | | @GetMapping("/selectInsOrderTemplateById") |
| | | public Result<?> selectInsOrderTemplateById(Integer id) { |
| | | return Result.success(insOrderTemplateService.selectInsOrderTemplateById(id)); |
| | | } |
| | | |
| | | @Operation(summary = "å 餿£éªå模æ¿") |
| | | @DeleteMapping("/delInsOrderTemplate") |
| | | public Result<?> delInsOrderTemplate(Integer id) { |
| | | return Result.success(insOrderTemplateService.delInsOrderTemplate(id)); |
| | | } |
| | | |
| | | @Operation(summary = "éè¿æ£éªåæ¥è¯¢æ£éªæ°æ®ï¼æ°æ®æ¥çï¼") |
| | | @GetMapping("/selectSampleAndProductByOrderId") |
| | | public Result<?> selectSampleAndProductByOrderId(Page page, SampleProductDto2 sampleProductDto){ |
| | | return Result.success(insOrderService.selectSampleAndProductByOrderId(page, sampleProductDto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ¤é") |
| | | @PostMapping("/updateStatus") |
| | | public Result<?> updateStatus(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | insOrderService.updateStatus(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | //å¾
æ£çæ¤éçæ¥è¯¢å¾
æ£é¡¹ç® |
| | | @GetMapping("/selectNoProducts") |
| | | public Result<?> selectNoProducts(Page page, InsProduct insProduct,Integer orderId ,String ids){ |
| | | return Result.success(insProductService.selectNoProducts(page, insProduct,orderId,ids)); |
| | | } |
| | | |
| | | //æ¤éå®¡æ ¸ï¼æ¥è¯¢æ¤éçæ£æµé¡¹ |
| | | @GetMapping("/getRevocationInsProductList") |
| | | public Result<?> getRevocationInsProductList(@RequestParam("orderId") Integer orderId){ |
| | | return Result.success(insProductService.getRevocationInsProductList(orderId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å¾
æ£çæ¤é") |
| | | @PostMapping("/updateInspected") |
| | | public Result<?> updateInspected(@RequestBody Map<String, Object> param){ |
| | | Integer orderId = (Integer) param.get("orderId"); |
| | | String ids = (String) param.get("ids"); |
| | | Integer typeSource = (Integer) param.get("typeSource"); |
| | | if(Objects.nonNull(typeSource) && typeSource == 1){ |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | ifsInventoryQuantityMapper.update(null,new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getState,0) |
| | | .eq(IfsInventoryQuantity::getId,ifsInventoryId)); |
| | | insOrderService.update(null,new LambdaUpdateWrapper<InsOrder>().set(InsOrder::getState,-1).eq(InsOrder::getId,orderId)); // æ¤é |
| | | } |
| | | insProductService.updateInspected(orderId,ids); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "å®¡æ ¸å¾
æ£æ¤é") |
| | | @PostMapping("/checkUpdate") |
| | | public Result<?> checkUpdate(@RequestBody Map<String, Object> param){ |
| | | Integer orderId = (Integer) param.get("orderId"); |
| | | Integer state = (Integer) param.get("state"); |
| | | insProductService.checkUpdate(orderId,state); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "è·åifs订å") |
| | | @GetMapping("/getIfsOrder") |
| | | public Result<?> getIfsOrder() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("LOCATION_NO","1302"); |
| | | map.put("STATE_DB","To be Inspected"); |
| | | insOrderService.getIfsOrder(map,false); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¿®æ¹è®¢ååå·") |
| | | @PostMapping("/updateEntrustCode") |
| | | public Result<?> updateEntrustCode(@RequestBody InsOrder insOrder) { |
| | | insOrderService.updateEntrustCode(insOrder); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢ä¸åæ ¼å¤æµä¿¡æ¯") |
| | | @GetMapping("/getRetestResult") |
| | | public Result<?> getRetestResult(Integer insProductId) { |
| | | return Result.success(insOrderService.getRetestResult(insProductId)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹å§æç¼å·") |
| | | @PostMapping("/updateOrderEntrustCode") |
| | | public Result<?> updateOrderEntrustCode(@RequestBody InsOrder insOrder) { |
| | | insOrderService.updateOrderEntrustCode(insOrder); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ£éªä¸åå
容") |
| | | @PostMapping("/updateInsOrder") |
| | | public Result<?> updateInsOrder(@RequestBody InsOrderUpdateDto insOrderUpdateDto) { |
| | | return Result.success(insOrderService.updateInsOrder(insOrderUpdateDto)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤éå订å") |
| | | @DeleteMapping("/delInsOrder") |
| | | public Result<?> delInsOrder(Integer insOrderId) { |
| | | // æ¥è¯¢è®¢å |
| | | InsOrder order = insOrderService.getById(insOrderId); |
| | | if (!(order.getState().equals(2) || order.getState().equals(3))) { |
| | | throw new ErrorException("åªæéå订åæè½å é¤"); |
| | | } |
| | | |
| | | return Result.success(insOrderService.removeById(insOrderId)); |
| | | } |
| | | |
| | | @Operation(summary = "æåæ ç¾æå°") |
| | | @PostMapping("/labelOrderPrinting") |
| | | public Result<List<InsOrderPrintingVo>> labelOrderPrinting(@RequestBody Map<String, Object> param) { |
| | | List<Integer> ids = (List<Integer>) param.get("ids"); |
| | | return Result.success(insOrderService.labelOrderPrinting(ids)); |
| | | } |
| | | |
| | | @Operation(summary = "æ ¹æ®è®¢åidæ¥è¯¢æ ·å") |
| | | @GetMapping("/getSampleByOrderId") |
| | | public Result<List<InsSample>> getSampleByOrderId(Integer insOrderId) { |
| | | return Result.success(insSampleService.getSampleByOrderId(insOrderId)); |
| | | } |
| | | |
| | | @Operation(summary = "æ ¹æ®æ ·åidæ¥è¯¢æ£éªé¡¹æ ") |
| | | @GetMapping("/getProductTreeBySampleId") |
| | | public Result<List<StandardProductList>> getProductTreeBySampleId(Integer insSampleId) { |
| | | return Result.success(insOrderService.getProductTreeBySampleId(insSampleId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ·»å éæ¼çæ£éªé¡¹") |
| | | @PostMapping("/addOmitOrderProduct") |
| | | public Result addOmitOrderProduct(@RequestBody OmitOrderProductDto omitOrderProductDto) { |
| | | return Result.success(insOrderService.addOmitOrderProduct(omitOrderProductDto)); |
| | | } |
| | | |
| | | @Operation(summary = "æåæ£éªåå
¨é¨ä¿¡æ¯å¯¼åº") |
| | | @GetMapping("/rawAllInsOrderExport") |
| | | public void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response){ |
| | | insOrderService.rawAllInsOrderExport(sampleOrderDto,response); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ ·ååå·") |
| | | @PostMapping("/updateSampleModel") |
| | | public Result<?> updateSampleModel(@RequestBody List<InsSample> insSampleList) { |
| | | for (InsSample insSample : insSampleList) { |
| | | insOrderService.updateSampleModel(insSample); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢å½åæ¶é´æ¯å¦æ²¡æè¯¥æ£æµé¡¹çæ½æ ·è®¡å") |
| | | @PostMapping("/judgeNotSpotCheckOrder") |
| | | public Result<?> judgeNotSpotCheckOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return insOrderService.judgeNotSpotCheckOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getInsOrder()); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanDTO; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanProductDto; |
| | | import com.ruoyi.inspect.dto.InsProductBindingDto; |
| | | import com.ruoyi.inspect.dto.SaveInsContextDto; |
| | | import com.ruoyi.inspect.dto.SaveOrderDevicesDto; |
| | | import com.ruoyi.inspect.dto.SaveTemplateContextDto; |
| | | import com.ruoyi.inspect.dto.VerifyPlanDto; |
| | | import com.ruoyi.inspect.dto.WriteInspectionConditionDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerify; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.service.InsOrderFileService; |
| | | import com.ruoyi.inspect.service.InsOrderPlanService; |
| | | import com.ruoyi.inspect.service.InsOrderRatesService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import com.ruoyi.performance.dto.AuxiliaryOutputWorkingHoursTemporaryDto; |
| | | import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHoursTemporary; |
| | | import com.ruoyi.performance.service.AuxiliaryOutputWorkingHoursTemporaryService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-æ§å¶å± |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/insOrderPlan") |
| | | @Tag(name = "æ£éªä»»å¡") |
| | | @AllArgsConstructor |
| | | public class InsOrderPlanController { |
| | | |
| | | private InsOrderPlanService insOrderPlanService; |
| | | private InsOrderFileService insOrderFileService; |
| | | private InsProductService insProductService; |
| | | private AuxiliaryOutputWorkingHoursTemporaryService auxiliaryOutputWorkingHoursTemporaryService; |
| | | |
| | | |
| | | @Operation(summary = "è·åæ£éªä»»å¡å表") |
| | | @GetMapping("/selectInsOrderPlanList") |
| | | public Result selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO){ |
| | | return Result.success(insOrderPlanService.selectInsOrderPlanList(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @Operation(summary = "æ£éªå详æ
-ä»»å¡åæ¢") |
| | | @GetMapping("/inspectionOrderDetailsTaskSwitching") |
| | | public Result inspectionOrderDetailsTaskSwitching(Page page, InsOrderPlanDTO insOrderPlanDTO) throws Exception { |
| | | return Result.success(insOrderPlanService.inspectionOrderDetailsTaskSwitching(page, insOrderPlanDTO)); |
| | | } |
| | | |
| | | @Operation(summary = "认é¢ä»»å¡è®¡å") |
| | | @PostMapping("/claimInsOrderPlan") |
| | | public Result claimInsOrderPlan(@RequestBody InsOrderPlanDTO data) { |
| | | return Result.success(insOrderPlanService.claimInsOrderPlan(data)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ£éªæä½") |
| | | @GetMapping("/doInsOrder") |
| | | public Result<?> doInsOrder(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.doInsOrder(id, laboratory)); |
| | | } |
| | | |
| | | @Operation(summary = "è·åæ£éªé¡¹ç®å模æ¿å
容") |
| | | @GetMapping("/getInsProduct") |
| | | public Result<?> getInsProduct(InsOrderPlanProductDto insOrderPlanProductDto) { |
| | | return Result.success(insOrderPlanService.getInsProduct(insOrderPlanProductDto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä»»å¡äº¤æ¥") |
| | | @PostMapping("/upPlanUser") |
| | | public Result<?> upPlanUser(Integer userId, Integer orderId, String sonLaboratory) { |
| | | return Result.success(insOrderPlanService.upPlanUser(userId, orderId, sonLaboratory)); |
| | | } |
| | | |
| | | @Operation(summary = "å¤æäº¤æ¥çè¯éªå®¤") |
| | | @GetMapping("/upPlanUser2") |
| | | public Result<?> upPlanUser2(Integer orderId) { |
| | | return Result.success(insOrderPlanService.upPlanUser2(orderId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "夿 ¸æ£éªä»»å¡") |
| | | @PostMapping("/verifyPlan") |
| | | public Result<?> verifyPlan(@RequestBody VerifyPlanDto verifyPlanDto) { |
| | | return Result.success(insOrderPlanService.rawMaterialVerifyPlan(verifyPlanDto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ ¡éªæ£éªä»»å¡æäº¤") |
| | | @PostMapping("/checkSubmitPlan") |
| | | public Result<?> checkSubmitPlan(Integer orderId, String laboratory) { |
| | | return Result.success(insOrderPlanService.checkSubmitPlan(orderId, laboratory)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ£éªä»»å¡æäº¤") |
| | | @PostMapping("/submitPlan") |
| | | public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, Boolean registerInsResults) { |
| | | int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode, registerInsResults); |
| | | return num == 1 ? Result.success() : Result.fail("æäº¤å¤±è´¥ï¼é¨å项ç®è¿æªè¿è¡æ£éª"); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿åæ£éªå
容") |
| | | @PostMapping("/saveInsContext") |
| | | public Result<?> saveInsContext(@RequestBody SaveInsContextDto saveInsContextDto) { |
| | | insOrderPlanService.saveInsContext(saveInsContextDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "ææ¨¡æ¿åæ ä¿åæ°èåå§è®°å½") |
| | | @PostMapping("/saveTemplateContext") |
| | | public Result<?> saveTemplateContext(@RequestBody SaveTemplateContextDto saveTemplateContextDto) { |
| | | insOrderPlanService.saveTemplateContext(saveTemplateContextDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ£éªåéæ©ç设å¤") |
| | | @GetMapping("/orderDevices") |
| | | public Result<?> getOrderDevices(Integer orderId) { |
| | | return Result.success(insOrderPlanService.getOrderDeviceIds(orderId)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿åæ£éªåéæ©ç设å¤") |
| | | @PutMapping("/orderDevices") |
| | | public Result<?> saveOrderDevices(@RequestBody SaveOrderDevicesDto saveOrderDevicesDto) { |
| | | insOrderPlanService.saveOrderDevices(saveOrderDevicesDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥çæ£éªåä¸çéä»¶å表") |
| | | @GetMapping("/getFileList") |
| | | public Result<?> getFileList(Page page, InsOrderFile insOrderFile) throws Exception { |
| | | return Result.success(insOrderPlanService.getFileList(page, insOrderFile)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¸ä¼ éä»¶") |
| | | @PreAuthorize("@ss.hasPermi('upload:order:file')") |
| | | @PostMapping("/uploadFile") |
| | | public Result<?> taskUploadFile(Integer orderId, MultipartFile file) { |
| | | return Result.success(insOrderPlanService.uploadFile(orderId, file)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å é¤éä»¶") |
| | | @PreAuthorize("@ss.hasPermi('del:order:file')") |
| | | @DeleteMapping("/delfile") |
| | | public Result<?> delfile(Integer id) { |
| | | return Result.success(insOrderFileService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¸è½½éä»¶") |
| | | @GetMapping("/downFile") |
| | | public Result<?> downFile(Integer id) { |
| | | InsOrderFile insOrderFile = insOrderFileService.getById(id); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("type", insOrderFile.getType()); |
| | | map.put("fileUrl", insOrderFile.getFileUrl()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @Operation(summary = "填忏©åº¦ä¸æ¹¿åº¦") |
| | | @PostMapping("/write") |
| | | public Result<?> write(@RequestBody WriteInspectionConditionDto dto) { |
| | | return Result.success(insProductService.write(dto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "çµç¼é
ç½®,æ¥çé
ç½®æ è¯") |
| | | @GetMapping("/getCableTag") |
| | | public Result<?> getCableTag(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.getCableTag(id, laboratory)); |
| | | } |
| | | |
| | | @Operation(summary = "åææ,æ¥çé
ç½®æ è¯") |
| | | @GetMapping("/getRawMaterialTag") |
| | | public Result<?> getRawMaterialTag(Integer id, String laboratory) { |
| | | return Result.success(insOrderPlanService.getRawMaterialTag(id, laboratory)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥çé夿 è¯") |
| | | @GetMapping("/getRepetitionTag") |
| | | public Result<?> getRepetitionTag(Integer id, String laboratory, String cableTag) { |
| | | return Result.success(insOrderPlanService.getRepetitionTag(id, laboratory, cableTag)); |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢ä¸åæ ¼å¤æµä¿¡æ¯") |
| | | @PostMapping("/addUnqualifiedRetest") |
| | | public Result<?> addDisqualificationRetest(@RequestBody List<InsProduct> insProductsList) { |
| | | return Result.success(insOrderPlanService.addDisqualificationRetest(insProductsList)); |
| | | } |
| | | |
| | | @Operation(summary = "è·åä¸åæ ¼å¤æµæ°æ®") |
| | | @GetMapping("/getInsProductUnqualifiedRetest") |
| | | public Result<?> getInsProductUnqualifiedRetest(InsOrderPlanProductDto insOrderPlanProductDto) { |
| | | return Result.success(insOrderPlanService.getInsProductUnqualifiedRetest(insOrderPlanProductDto)); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @return |
| | | */ |
| | | @Operation(summary = "ä¿å ä¸åæ ¼å¤æµæ£éªå
容") |
| | | @PostMapping("/saveUnqualifiedContext") |
| | | public Result<?> saveUnqualifiedContext(@RequestBody SaveInsContextDto saveInsContextDto) { |
| | | Map<String, Object> param2 = JSON.parseObject(saveInsContextDto.getParam(), Map.class); |
| | | insOrderPlanService.saveUnqualifiedContext(param2, saveInsContextDto.getCurrentTable(), saveInsContextDto.getSampleId(), saveInsContextDto.getOrderId(), saveInsContextDto.getSonLaboratory()); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢åææè¿è´§éªè¯") |
| | | @GetMapping("/getFactoryVerify") |
| | | public Result<?> getFactoryVerify(Integer insOrderId) { |
| | | return Result.success(insOrderPlanService.getFactoryVerify(insOrderId)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "ä¿ååææè¿è´§éªè¯") |
| | | @PostMapping("/addFactoryVerify") |
| | | public Result<?> addFactoryVerify(@RequestBody InsOrderFactoryVerify factoryVerify) { |
| | | return Result.success(insOrderPlanService.addFactoryVerify(factoryVerify)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¿®æ¹æ£éªé¡¹å
容") |
| | | @PreAuthorize("@ss.hasPermi('update:product:onPlan')") |
| | | @PostMapping("/updateProductOnPlan") |
| | | public Result<?> updateProductOnPlan(@RequestBody InsProduct insProduct) { |
| | | insProductService.updateById(insProduct); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ ¹æ®æ£éªé¡¹idæ¥è¯¢æ£éªé¡¹æ ä¿¡æ¯") |
| | | @GetMapping("/getProductTreeByProductId") |
| | | public Result<List<InsProduct>> getProductTreeByProductId(Integer productId) { |
| | | return Result.success(insProductService.getProductTreeByProductId(productId)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "ç¹æ®æ£éªé¡¹ç»å®") |
| | | @PostMapping("/bindingProductTreeByProductId") |
| | | public Result<?> bindingProductTreeByProductId(@RequestBody InsProductBindingDto insProductBindingDto) { |
| | | return Result.success(insProductService.bindingProductTreeByProductId(insProductBindingDto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ç¹æ®æ£éªé¡¹ç»å®æ¥è¯¢") |
| | | @GetMapping("/getBindingProductByProductId") |
| | | public Result<List<InsProduct>> getBindingProductByProductId(Integer productId) { |
| | | return Result.success(insProductService.list(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getBindingProductId, productId) |
| | | .orderByAsc(InsProduct::getSort))); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "å é¤ç¹æ®æ£éªé¡¹ç»å®ä¿¡æ¯") |
| | | @DeleteMapping("/delProductTreeByProductId") |
| | | public Result<?> delProductTreeByProductId(Integer productId) { |
| | | return Result.success(insProductService.removeBindingProductTree(productId)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åæ¥è¯¢å·¥æ¶è¯¦æ
|
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ ¹æ®è®¢åæ¥è¯¢å·¥æ¶è¯¦æ
") |
| | | @PreAuthorize("@ss.hasPermi('get:working:hours:byOrder')") |
| | | @GetMapping("/getWorkingHoursByOrderId") |
| | | public Result<IPage<AuxiliaryOutputWorkingHoursTemporaryDto>> getWorkingHoursByOrderId(Page page, AuxiliaryOutputWorkingHoursTemporaryDto workingHoursTemporary) { |
| | | return Result.success(auxiliaryOutputWorkingHoursTemporaryService.getWorkingHoursByOrderId(page, workingHoursTemporary)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å·¥æ¶è¯¦æ
|
| | | * @return |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹å·¥æ¶è¯¦æ
") |
| | | @PreAuthorize("@ss.hasPermi('update:order:workingHours')") |
| | | @PostMapping("/updateWorkingHours") |
| | | public Result updateWorkingHours(@RequestBody AuxiliaryOutputWorkingHoursTemporary workingHoursTemporary) { |
| | | return Result.success(auxiliaryOutputWorkingHoursTemporaryService.updateById(workingHoursTemporary)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.service.InsOrderRatesService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | |
| | | |
| | | /** |
| | | * 订åè´¹ç¨è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | @Tag(name = "订åè´¹ç¨ä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/insOrderRates") |
| | | public class InsOrderRatesController { |
| | | |
| | | @Resource |
| | | private InsOrderRatesService insOrderRatesService; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åå表 |
| | | * @param page |
| | | * @param sampleOrderDto |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢è®¢åå表") |
| | | @GetMapping("/selectRatesPage") |
| | | public Result selectInsOrderRates(Page page, SampleOrderDto sampleOrderDto) { |
| | | return Result.success(insOrderRatesService.selectInsOrderRates(page, sampleOrderDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åå表 |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢è®¢åè´¹ç¨è¯¦æ
") |
| | | @GetMapping("/selectRatesDetail") |
| | | public Result selectRatesDetail(Page page, Integer insOrderId) { |
| | | return Result.success(insOrderRatesService.selectTemplateRatesDetail(page, insOrderId)); |
| | | } |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.InsProductDeviationWarningDto; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail; |
| | | import com.ruoyi.inspect.service.InsProductDeviationWarningDetailService; |
| | | import com.ruoyi.inspect.service.InsProductDeviationWarningService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:02 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/insProductDeviationWarning") |
| | | @AllArgsConstructor |
| | | @Tag(name = "æ£éªé¡¹åå·®é¢è¦") |
| | | public class InsProductDeviationWarningController { |
| | | |
| | | |
| | | private InsProductDeviationWarningService insProductDeviationWarningService; |
| | | private InsProductDeviationWarningDetailService insProductDeviationWarningDetailService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢è¦å表 |
| | | * @param page |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢é¢è¦å表") |
| | | @GetMapping("/selectDeviationWarningPage") |
| | | public Result<IPage<InsProductDeviationWarningDto>> selectDeviationWarningPage(Page page, InsProductDeviationWarningDto deviationWarningDto) { |
| | | return Result.success(insProductDeviationWarningService.selectDeviationWarningPage(page, deviationWarningDto)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢è¦è¯¦æ
|
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "æ¥è¯¢é¢è¦è¯¦æ
") |
| | | @GetMapping("/selectDeviationWarning") |
| | | public Result<List<InsProductDeviationWarningDetail>> selectDeviationWarning(Integer deviationWarningId){ |
| | | return Result.success(insProductDeviationWarningDetailService.list(Wrappers.<InsProductDeviationWarningDetail>lambdaQuery() |
| | | .eq(InsProductDeviationWarningDetail::getDeviationWarningId, deviationWarningId))); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.annotation.PersonalScope; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.service.InsOrderPlanService; |
| | | import com.ruoyi.inspect.service.InsReportService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Scanner; |
| | | |
| | | @RestController |
| | | @RequestMapping("/insReport") |
| | | @Tag(name = "æ£éªæ¥å") |
| | | public class InsReportController { |
| | | |
| | | @Resource |
| | | private InsReportService insReportService; |
| | | |
| | | @Resource |
| | | private InsOrderPlanService insOrderPlanService; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ£éªæ¥åæ°æ®") |
| | | @GetMapping("/pageInsReport") |
| | | @PreAuthorize("@ss.hasPermi('business:reportPreparation')") |
| | | @PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser") |
| | | public Result pageInsReport(Page page, ReportPageDto reportPageDto){ |
| | | return Result.success(insReportService.pageInsReport(page, reportPageDto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åä¸ä¼ ") |
| | | @PostMapping("/inReport") |
| | | public Result inReport(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | | try { |
| | | String path = wordUrl; |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | return Result.success(insReportService.inReport("/word/" + pathName, id)); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åè¿å") |
| | | @PostMapping("/upReportUrl") |
| | | public Result upReportUrl(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åå¨çº¿ç¼å¶") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æäº¤") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | Integer userId = (Integer) param.get("userId"); |
| | | return Result.success(insReportService.writeReport(id, userId, null)); |
| | | } |
| | | |
| | | /** |
| | | * @param userId éè¦çæ¹å人 |
| | | * @return |
| | | */ |
| | | |
| | | @Operation(summary = "å®¡æ ¸") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | Integer isExamine = (Integer) param.get("isExamine"); |
| | | String examineTell = (String) param.get("examineTell"); |
| | | Integer userId = (Integer) param.get("userId"); |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell, userId)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¹å") |
| | | @PostMapping("/ratifyReport") |
| | | public Result ratifyReport(@RequestBody Map<String, Object> param) { |
| | | Integer id = (Integer) param.get("id"); |
| | | Integer isRatify = (Integer) param.get("isRatify"); |
| | | String ratifyTell = (String) param.get("ratifyTell"); |
| | | return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); |
| | | } |
| | | |
| | | @Anonymous |
| | | @RequestMapping("/onlyOffice/save") |
| | | public void saveFile(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) { |
| | | PrintWriter writer = null; |
| | | try { |
| | | writer = response.getWriter(); |
| | | // è·åä¼ è¾çjsonæ°æ® |
| | | Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A"); |
| | | String body = scanner.hasNext() ? scanner.next() : ""; |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | |
| | | if (jsonObject.containsKey("url")) { |
| | | String jsonArray = jsonObject.get("lastsave").toString(); // æ´æ°æ¶é´ |
| | | String fileUrl = jsonObject.get("url").toString(); // æ´æ°æä»¶url |
| | | HttpUtil.downloadFile(fileUrl, FileUtil.file(wordUrl + "/" + fileName)); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | writer.write("{\"error\":-1}"); |
| | | return; |
| | | } |
| | | /* |
| | | * status = 1ï¼æä»¬ç»onlyOfficeçæå¡è¿å{"error":"0"}çä¿¡æ¯ã |
| | | * è¿æ ·onlyOfficeä¼è®¤ä¸ºåè°æ¥å£æ¯æ²¡é®é¢çï¼è¿æ ·å°±å¯ä»¥å¨çº¿ç¼è¾ææ¡£äºï¼å¦åçè¯ä¼å¼¹åºçªå£è¯´æ |
| | | */ |
| | | if (Objects.nonNull(writer)) { |
| | | writer.write("{\"error\":0}"); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åæ¹éä¸è½½") |
| | | @GetMapping("/downAll") |
| | | public Result downAll(String ids) { |
| | | return Result.success(insReportService.downAll(ids)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åä¸è½½ï¼reportTypeï¼0æ£æµæ¥åï¼1æ£éªæ¥åï¼") |
| | | @GetMapping("/download") |
| | | @PreAuthorize("@ss.hasPermi('business:reportPreparation')") |
| | | @PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser") |
| | | public void download(Integer id, Integer reportType, ReportPageDto reportPageDto, HttpServletResponse response) { |
| | | insReportService.download(id, reportType, reportPageDto.getCreateOrderUser(), response); |
| | | } |
| | | |
| | | @Operation(summary = "éæ°çææ¥å") |
| | | @PostMapping("/regenerate") |
| | | // @PreAuthorize("@ss.hasPermi('business:reportPreparation')") |
| | | @PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser") |
| | | public Result regenerate(@RequestBody ReportPageDto reportPageDto) { |
| | | insOrderPlanService.regenerateReport(reportPageDto.getId(), reportPageDto.getCreateOrderUser()); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥åæ¹éä¸ä¼ ") |
| | | @PostMapping("/upAll") |
| | | public Result upAll(MultipartFile file) throws IOException { |
| | | return Result.success(insReportService.upAll(file)); |
| | | } |
| | | |
| | | /** |
| | | * éåå°æ£éªä»»å¡ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Operation(summary = "éåå°æ£éªä»»å¡") |
| | | @PostMapping("/sendBackTask") |
| | | public Result sendBackTask(@RequestBody Map<String, Object> param){ |
| | | Integer id = (Integer) param.get("id"); |
| | | return Result.success(insReportService.sendBackTask(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥åå¯¼åº |
| | | * @param dto |
| | | * @param response |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "æ¥å导åº") |
| | | @GetMapping("/reportAllExport") |
| | | @PreAuthorize("@ss.hasPermi('business:reportPreparation')") |
| | | @PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser") |
| | | public void reportAllExport(ReportPageDto dto, HttpServletResponse response) throws Exception { |
| | | insReportService.reportAllExport(dto,response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.SampleReceiptActionDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptQueryDto; |
| | | import com.ruoyi.inspect.service.InsSampleReceiptService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | @RestController |
| | | @RequestMapping("/insSampleReceipt") |
| | | @Tag(name = "æ ·åæ¥æ¶") |
| | | @AllArgsConstructor |
| | | public class InsSampleReceiptController { |
| | | private final InsSampleReceiptService insSampleReceiptService; |
| | | |
| | | @Operation(summary = "æ ·åæ¥æ¶å页") |
| | | @GetMapping("/page") |
| | | public Result page(Page<?> page, SampleReceiptQueryDto query) { |
| | | return Result.success(insSampleReceiptService.page(page, query)); |
| | | } |
| | | |
| | | @Operation(summary = "æ ·åæ¥æ¶è¯¦æ
") |
| | | @GetMapping("/{id}") |
| | | public Result detail(@PathVariable Integer id) { |
| | | return Result.success(insSampleReceiptService.detail(id)); |
| | | } |
| | | |
| | | @Operation(summary = "æäº¤æ£éª") |
| | | @PostMapping("/submit") |
| | | public Result submit(@RequestBody SampleReceiptActionDto dto) { |
| | | insSampleReceiptService.submit(dto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "ææ¶æ ·å") |
| | | @PostMapping("/reject") |
| | | public Result reject(@RequestBody SampleReceiptActionDto dto) { |
| | | insSampleReceiptService.reject(dto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "æ ·åæ¥æ¶å¯¼åº") |
| | | @GetMapping("/export") |
| | | public void export(SampleReceiptQueryDto query, HttpServletResponse response) { |
| | | insSampleReceiptService.export(query, response); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.UnqualifiedHandlerDto; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; |
| | | import com.ruoyi.inspect.service.InsUnqualifiedHandlerFileService; |
| | | import com.ruoyi.inspect.service.InsUnqualifiedHandlerService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | @RestController |
| | | @Tag(name = "ä¸åæ ¼å¤ç管ç") |
| | | @RequestMapping("/unqualifiedHandler") |
| | | @AllArgsConstructor |
| | | @Slf4j |
| | | public class InsUnqualifiedHandlerController { |
| | | |
| | | private final InsUnqualifiedHandlerService unqualifiedHandlerService; |
| | | private final InsUnqualifiedHandlerFileService unqualifiedHandlerFileService; |
| | | @Operation(summary = "æ¥è¯¢") |
| | | @GetMapping("/page") |
| | | public Result pageByUnqualified(Page page, UnqualifiedHandlerDto unqualifiedHandlerDto){ |
| | | return Result.success(unqualifiedHandlerService.pageList(page, unqualifiedHandlerDto)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "éä»¶ä¸ä¼ ") |
| | | @PostMapping("/uploadFileByUnqualified") |
| | | public Result<?> uploadFileByUnqualified(Long handlerId, MultipartFile file) { |
| | | return Result.success(unqualifiedHandlerFileService.uploadFile(handlerId, file)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ°å¢ä¸åæ ¼å¤ç") |
| | | @PostMapping("/addUnqualifiedHandler") |
| | | public Result addUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto){ |
| | | return Result.success(unqualifiedHandlerService.addUnqualifiedHandler(unqualifiedHandlerDto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ç¼è¾ä¸åæ ¼å¤ç") |
| | | @PostMapping("/updateUnqualifiedHandler") |
| | | public Result updateUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto){ |
| | | return Result.success(unqualifiedHandlerService.updateUnqualifiedHandler(unqualifiedHandlerDto)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "æ¥çä¸åæ ¼å¤ççé¢") |
| | | @GetMapping("/getUnqualifiedHandler") |
| | | public Result getUnqualifiedHandler(Integer id){ |
| | | return Result.success(unqualifiedHandlerService.getUnqualifiedHandler(id)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å é¤ä¸åæ ¼å¤ç") |
| | | @DeleteMapping("/deleteUnqualifiedHandler") |
| | | public Result deleteUnqualifiedHandler(Integer id) { |
| | | return Result.success(unqualifiedHandlerService.deleteUnqualifiedHandler(id)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¸è½½éä»¶") |
| | | @GetMapping("/downFile") |
| | | public Result<?> oaDownFile(Integer id) { |
| | | InsUnqualifiedHandlerFile insUnqualifiedHandlerFile = unqualifiedHandlerFileService.getById(id); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("type", insUnqualifiedHandlerFile.getType()); |
| | | map.put("fileUrl", insUnqualifiedHandlerFile.getFileUrl()); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.annotation.PersonalScope; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.service.OutsourcingFinishProductInspectionService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * å¤è´æåæ£éªcontroller |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/outsourcingFinishProduct") |
| | | public class OutsourcingFinishProductInspectionController { |
| | | |
| | | @Autowired |
| | | private OutsourcingFinishProductInspectionService outsourcingFinishProductInspectionService; |
| | | |
| | | @Operation(summary = "ä»åºæ¥æ£æ¥è¯¢") |
| | | @GetMapping("/getWarehouseSubmit") |
| | | public Result getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) { |
| | | return Result.success(outsourcingFinishProductInspectionService.getWarehouseSubmit(page, ifsInventoryQuantity)); |
| | | } |
| | | |
| | | @Operation(summary = "å¤è´æåæ£éªæ¥è¯¢æ£éªä¸") |
| | | @GetMapping("/getIfsByStateOne") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantityDto.class, paramName = "createUser") |
| | | public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto){ |
| | | return Result.success(outsourcingFinishProductInspectionService.getIfsByStateOne(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "å¤è´æåæ£éªæ¥è¯¢å·²æ£éª") |
| | | @GetMapping("/getIfsByOver") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser") |
| | | public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(outsourcingFinishProductInspectionService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "åæææ¥æ£æ¥è¯¢å
¨é¨") |
| | | @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')") |
| | | @GetMapping("/getIfsByAll") |
| | | public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(outsourcingFinishProductInspectionService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.annotation.PersonalScope; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.InsPlaceOrderDto; |
| | | import com.ruoyi.inspect.dto.OrderSplitDTO; |
| | | import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderTemplateService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/7/31 |
| | | */ |
| | | @RequestMapping("/rawMaterialOrder") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Tag(name = "åææä¸å") |
| | | public class RawMaterialOrderController { |
| | | |
| | | private InsOrderService insOrderService; |
| | | private RawMaterialOrderService rawMaterialOrderService; |
| | | private RawMaterialOrderTemplateService rawMaterialOrderTemplateService; |
| | | |
| | | @Operation(summary = "æ´å
·é¶ä»¶å·è·åæ åæ ") |
| | | @GetMapping("/selectStandardTreeListByPartNo") |
| | | public Result selectStandardTreeListByPartNo(String partNo) { |
| | | return rawMaterialOrderService.selectStandardTreeListByPartNo(partNo); |
| | | } |
| | | |
| | | @Operation(summary = "åæææ£éªæ¥è¯¢ä»£ä¸å") |
| | | @GetMapping("/getPurchaseOrder") |
| | | public Result getPurchaseOrder(Page page, IfsInventoryQuantityCheckDto ifsInventoryQuantity){ |
| | | return Result.success(rawMaterialOrderService.selectIfsInventoryQuantity(page, ifsInventoryQuantity)); |
| | | } |
| | | |
| | | @Operation(summary = "åæææ£éªæ¥è¯¢æ£éªä¸") |
| | | @GetMapping("/getIfsByStateOne") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantityDto.class, paramName = "createUser") |
| | | public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByStateOne(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "åæææ£éªæ¥è¯¢å·²æ£éª") |
| | | @GetMapping("/getIfsByOver") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser") |
| | | public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ·»å åæææ£éªå模æ¿") |
| | | @PostMapping("/addRawMaterOrderTemplate") |
| | | public Result<?> addRawMaterOrderTemplate(@RequestBody RawMaterialOrderTemplate rawMaterialOrderTemplate) { |
| | | return Result.success(rawMaterialOrderTemplateService.addRawMaterOrderTemplate(rawMaterialOrderTemplate)); |
| | | } |
| | | @Operation(summary = "æ¥è¯¢åæææ£éªå模æ¿å表") |
| | | @GetMapping("/selectRawMaterOrderTemplate") |
| | | public Result<?> selectRawMaterOrderTemplate(String partNo) { |
| | | return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplate(partNo)); |
| | | } |
| | | |
| | | @Operation(summary = "éè¿åæææ£éªå模æ¿idè·åæ£éªå模æ¿å
容") |
| | | @GetMapping("/selectRawMaterOrderTemplateById") |
| | | public Result<?> selectRawMaterOrderTemplateById(Integer id) { |
| | | return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤åæææ£éªå模æ¿") |
| | | @DeleteMapping("/delRawMaterOrderTemplate") |
| | | public Result<?> delRawMaterOrderTemplate(Integer id) { |
| | | return Result.success(rawMaterialOrderTemplateService.delRawMaterOrderTemplate(id)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥æ£æ¹é |
| | | * @param param åææid |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥æ£æ¹é") |
| | | @PostMapping("/inspectionReport") |
| | | public Result<?> inspectionReport(@RequestBody Map<String, Object> param) { |
| | | List<Long> ids = (List<Long>) param.get("ids"); |
| | | String orderType = Objects.nonNull(param.get("orderType"))?param.get("orderType").toString():""; |
| | | String materialProp = Objects.nonNull(param.get("materialProp"))?param.get("materialProp").toString():""; |
| | | if(!OrderType.validateValue(orderType)){ |
| | | throw new ErrorException("æ¹éæ¥æ£å¤±è´¥,éæ³çéå®è®¢ååç±»æä¸¾"); |
| | | } |
| | | return Result.success(rawMaterialOrderService.inspectionReport(ids,orderType,materialProp)); |
| | | } |
| | | |
| | | /** |
| | | * åæ¶æ¥æ£ |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¤éæ¥æ£") |
| | | @PostMapping("/revokeInspectionReport") |
| | | public Result<?> revokeInspectionReport(@RequestBody Map<String, Object> param) { |
| | | Long id = Long.parseLong(param.get("id").toString()); |
| | | return Result.success(rawMaterialOrderService.revokeInspectionReport(id)); |
| | | } |
| | | |
| | | /** |
| | | * æå°æ ç¾æ¥è¯¢ |
| | | * @param param åææid |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æå°æ ç¾æ¥è¯¢") |
| | | @PostMapping("/printLabel") |
| | | public Result<?> printLabel(@RequestBody Map<String, Object> param) { |
| | | List<Integer> ids = (List<Integer>) param.get("ids"); |
| | | return Result.success(rawMaterialOrderService.printLabel(ids)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥æ£ |
| | | * @param ifsInventoryQuantity åææ |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ¥æ£") |
| | | @PostMapping("/inspectionReportOne") |
| | | public Result<?> inspectionReportOne(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) { |
| | | return Result.success(rawMaterialOrderService.inspectionReportOne(ifsInventoryQuantity)); |
| | | } |
| | | |
| | | /** |
| | | * è·åé产ä¸é¾æ£æµæ°æ® |
| | | * @param id åææid |
| | | * @return |
| | | */ |
| | | @Operation(summary = "è·åé产ä¸é¾æ£æµæ°æ®") |
| | | @GetMapping("/getIndustryChain") |
| | | public Result<?> getIndustryChain(Integer id) { |
| | | return Result.success(rawMaterialOrderService.getIndustryChain(id)); |
| | | } |
| | | |
| | | /** |
| | | * åæææ¤é |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "åæææ¤éä¸å") |
| | | @GetMapping("/repealRawOrder") |
| | | public Result<?> repealRawOrder(@RequestBody Map<String, Object> param){ |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "åææä¸åå
æ£") |
| | | @PostMapping("/addExemptionOrder") |
| | | public Result<?> addExemptionOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(rawMaterialOrderService.addExemptionOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getInsOrder())); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä»åºæ¥æ£æ¥è¯¢") |
| | | @GetMapping("/getWarehouseSubmit") |
| | | public Result getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) { |
| | | return Result.success(rawMaterialOrderService.getWarehouseSubmit(page, ifsInventoryQuantity)); |
| | | } |
| | | |
| | | /** |
| | | * åæ¶æ¥æ£ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Operation(summary = "å é¤åæææ¥æ£ä¿¡æ¯") |
| | | @DeleteMapping("/delIfsInventory") |
| | | public Result<?> delIfsInventory(Integer id) { |
| | | return Result.success(rawMaterialOrderService.delIfsInventory(id)); |
| | | } |
| | | |
| | | /** |
| | | * åææä¸åæ¾è¡ |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "åææä¸åæ¾è¡å
æ£") |
| | | @PostMapping("/rawOrderRelease") |
| | | public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){ |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | String partDetail = (String) param.get("partDetail"); |
| | | return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail)); |
| | | } |
| | | |
| | | /** |
| | | * åææä¸åéç¥å
æ£æè
夿¬¡æ£éª |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | @Operation(summary = "åææä¸åéç¥å
æ£æè
夿¬¡æ£éª") |
| | | @GetMapping("/notificationRawOrder") |
| | | public Result<?> notificationRawOrder(Long ifsInventoryId){ |
| | | return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "åæææ¥æ£æ¥è¯¢å
¨é¨") |
| | | @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')") |
| | | @GetMapping("/getIfsByAll") |
| | | public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue()); |
| | | return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ°å¢åæææ¥æ£ä¿¡æ¯") |
| | | @PostMapping("/addIfsInventoryQuantity") |
| | | public Result addIfsInventoryQuantity(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) { |
| | | rawMaterialOrderService.addIfsInventoryQuantity(ifsInventoryQuantity); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @Operation(summary = "åææä¸åæ¥çå·²å®æä¿¡æ¯") |
| | | @GetMapping("/getIfsByFinish") |
| | | public Result getIfsByFinish(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) throws Exception { |
| | | ifsInventoryQuantityDto.setIsFinish(1); |
| | | ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue()); |
| | | return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | @Operation(summary = "微信åéæä»¶æµè¯") |
| | | @GetMapping("/wxSend") |
| | | public Result wxSend(String user, String content, String filePath) throws Exception { |
| | | WxCpUtils.inform(user, content, new File(filePath)); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Operation(summary = "éåä¸ä¸å") |
| | | @PostMapping("/addRawCopperOrder") |
| | | public Result<?> addRawCopperOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(insOrderService.addRawCopperOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getCopperInsOrder())); |
| | | } |
| | | |
| | | @Operation(summary = "éåä¸ä¸åå
æ£") |
| | | @PostMapping("/addRawCopperOrderExemptionOrder") |
| | | public Result<?> addRawCopperOrderExemptionOrder(@RequestBody InsPlaceOrderDto insPlaceOrderDto) { |
| | | return Result.success(rawMaterialOrderService.addRawCopperOrderExemptionOrder(insPlaceOrderDto.getSampleList(), insPlaceOrderDto.getCopperInsOrder())); |
| | | } |
| | | |
| | | /** |
| | | * è®©æ¥æ¾è¡ |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "è®©æ¥æ¾è¡") |
| | | @PostMapping("/concessionRelease") |
| | | public Result<?> concessionRelease(@RequestBody Map<String, Object> param){ |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId)); |
| | | } |
| | | |
| | | /** |
| | | * åææè¿åæ¤éä¸å |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "åææè¿åæ¤éä¸å") |
| | | @PostMapping("/repealEnterRawOrder") |
| | | public Result<?> repealEnterRawOrder(@RequestBody Map<String, Object> param){ |
| | | Integer enterOrderId = (Integer) param.get("enterOrderId"); |
| | | return Result.success(rawMaterialOrderService.repealEnterRawOrder(enterOrderId)); |
| | | } |
| | | |
| | | /** |
| | | * åææå£åº¦æ¤éä¸å |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "åææå£åº¦æ¤éä¸å") |
| | | @PostMapping("/repealQuarterRawOrder") |
| | | public Result<?> repealQuarterRawOrder(@RequestBody Map<String, Object> param){ |
| | | Integer quarterOrderId = (Integer) param.get("quarterOrderId"); |
| | | return Result.success(rawMaterialOrderService.repealQuarterRawOrder(quarterOrderId)); |
| | | } |
| | | |
| | | @Operation(summary = "å
¨é¨ä¿¡æ¯å¯¼åº") |
| | | @GetMapping("/rawAllExport") |
| | | public void rawAllExport(IfsInventoryQuantitySupplierDto dto, HttpServletResponse response) throws Exception { |
| | | rawMaterialOrderService.rawAllExport(dto,response); |
| | | } |
| | | |
| | | @Operation(summary = "åæææ£éªæ¥è¯¢å£åº¦æ£éª") |
| | | @GetMapping("/getIfsByQuarter") |
| | | @PreAuthorize("@ss.hasPermi('business:order')") |
| | | @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser") |
| | | public Result getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){ |
| | | return Result.success(rawMaterialOrderService.getIfsByQuarter(page, ifsInventoryQuantityDto)); |
| | | } |
| | | |
| | | /** |
| | | * æåå
¥åº |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æåå
¥åº") |
| | | @PostMapping("/advancedGodown") |
| | | public Result<?> advancedGodown(@RequestBody Map<String, Object> param){ |
| | | Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString()); |
| | | return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId)); |
| | | } |
| | | |
| | | /** |
| | | * ä¸è½½è®¢åæå导å
¥æ¨¡æ¿ |
| | | */ |
| | | @Operation(summary = "ä¸è½½è®¢åæå导å
¥æ¨¡æ¿") |
| | | @GetMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response){ |
| | | rawMaterialOrderService.downloadTemplate(response); |
| | | } |
| | | |
| | | /** |
| | | * ä¸è½½è®¢åæå导å
¥æ¨¡æ¿ |
| | | */ |
| | | @Operation(summary = "导å
¥è®¢åæåæ°æ®") |
| | | @PostMapping("/importSplitOrderData") |
| | | public Result importSplitOrderData(@RequestParam(value = "file") MultipartFile file, @RequestParam("ifsId") Long ifsId, HttpServletRequest request){ |
| | | return rawMaterialOrderService.importSplitOrderData(file,ifsId,request); |
| | | } |
| | | |
| | | /** |
| | | * 确认æå订å |
| | | */ |
| | | @Operation(summary = "确认æå订å") |
| | | @PostMapping("/confirmSplitOrder") |
| | | public Result confirmSplitOrder(@RequestBody OrderSplitDTO orderSplitDTO){ |
| | | return Result.success(rawMaterialOrderService.confirmSplitOrder(orderSplitDTO)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ifsIdæ¥è¯¢ä¸åæ°é |
| | | */ |
| | | @Operation(summary = "æ ¹æ®ifsIdæ¥è¯¢ä¸åæ°é") |
| | | @GetMapping("/getOrderCountByIfsId/{ifsId}") |
| | | public Result getOrderCountByIfsId(@PathVariable("ifsId") Long ifsId){ |
| | | return Result.success(rawMaterialOrderService.getOrderCountByIfsId(ifsId)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.service.ReportService; |
| | | import com.ruoyi.performance.dto.AuxiliaryOriginalHoursLookDto; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/report") |
| | | @Tag(name = "æ¥è¡¨æ¨¡å") |
| | | public class ReportController { |
| | | |
| | | private ReportService reportService; |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ¥åä»»å¡å¾") |
| | | @GetMapping("/calendarWorkByWeek") |
| | | public Result calendarWorkByWeek(){ |
| | | return Result.success(reportService.calendarWorkByWeek()); |
| | | } |
| | | |
| | | @Operation(summary = "å½åç¨æ·å·¥æ¶ç»è®¡") |
| | | @GetMapping("/currentUserWorkHourCount") |
| | | public Result currentUserWorkHourCount(AuxiliaryOriginalHoursLookDto dto){ |
| | | return Result.success(reportService.currentUserWorkHourCount(dto)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | import com.ruoyi.inspect.service.WarehouseService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RequestMapping("/warehouse") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Tag(name = "æ ·å管ç") |
| | | public class WarehouseController { |
| | | |
| | | private WarehouseService warehouseService; |
| | | |
| | | @Operation(summary = "æ·»å ä»åº") |
| | | @PostMapping("/addWarehouse") |
| | | public Result addWarehouse(@RequestBody Warehouse warehouse) { |
| | | return Result.success(warehouseService.addWarehouse(warehouse)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ¥è¯¢ä»åº") |
| | | @GetMapping("/selectWarehouse") |
| | | public Result selectWarehouse() { |
| | | return Result.success(warehouseService.selectWarehouse()); |
| | | } |
| | | |
| | | @PostMapping("/addShelf") |
| | | @Operation(summary = "æ·»å è´§æ¶") |
| | | public Result addShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.addShelf(warehouseShelf)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å é¤ä»åº") |
| | | @DeleteMapping("/delWarehouse") |
| | | public Result delWarehouse(Integer id) { |
| | | return Result.success(warehouseService.delWarehouse(id)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¿®æ¹ä»åº") |
| | | @PostMapping("/upWarehouse") |
| | | public Result upWarehouse(@RequestBody Warehouse warehouse) { |
| | | return Result.success(warehouseService.upWarehouse(warehouse)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å é¤è´§æ¶") |
| | | @DeleteMapping("/delShelf") |
| | | public Result delShelf(Integer id) { |
| | | return Result.success(warehouseService.delShelf(id)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "ä¿®æ¹è´§æ¶") |
| | | @PostMapping("/upShelf") |
| | | public Result upShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.upShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢è´§æ¶ä¸çåæ¾ä¿¡æ¯") |
| | | @GetMapping("/getWarehouse") |
| | | public Result getWarehouse(Integer shelfId) { |
| | | return Result.success(warehouseService.getWarehouse(shelfId)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "æ ·åå
¥åº") |
| | | @PostMapping("/inWarehouse") |
| | | public Result inWarehouse(@RequestBody Map<String, String> param) { |
| | | String trees = param.get("trees"); |
| | | String sampleCode = param.get("sampleCode"); |
| | | return Result.success(warehouseService.inWarehouse(trees, sampleCode)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/outWarehouse") |
| | | @Operation(summary = "æ ·ååºåº") |
| | | public Result outWarehouse(@RequestBody Map<String, String> param) { |
| | | String sampleCode = param.get("sampleCode"); |
| | | return Result.success(warehouseService.outWarehouse(sampleCode)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¥è¯¢æ ·å详ç»è®°å½") |
| | | @GetMapping("/getSampleRecord") |
| | | public Result getSampleRecord(Integer id) { |
| | | return Result.success(warehouseService.getSampleRecord(id)); |
| | | } |
| | | |
| | | @Operation(summary = "éè¿æ ·åç¼å·è¿è¡æ£ç´¢") |
| | | @GetMapping("/searchSampleId") |
| | | public Result searchSampleId(String sampleCode) { |
| | | return Result.success(warehouseService.searchSampleId(sampleCode)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * éåä¸ä¸åä¿¡æ¯ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/9/13 |
| | | */ |
| | | @Data |
| | | public class CopperInsOrderDto extends InsOrder { |
| | | |
| | | @Schema(description = "å°è´§æ°é") |
| | | private BigDecimal qtyArrived; |
| | | |
| | | @Schema(description = "åä½") |
| | | private String buyUnitMeas; |
| | | |
| | | @Schema(description = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "æ¹å·") |
| | | private String updateBatchNo; |
| | | |
| | | @Schema(description = "æ¥æ¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime declareDate; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class CostStatisticsDto{ |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","æ¥æ"}) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","æ£éªç¼å·"}) |
| | | private String entrustCode; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","æ ·ååç§°"}) |
| | | private String sample; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","è§æ ¼åå·"}) |
| | | private String model; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","æ ·åæ°é"}) |
| | | private Integer num; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","æ»ä»·"}) |
| | | private BigDecimal price; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","è¯éªé¡¹ç®"}) |
| | | private String inspectionItem; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","å§æåä½"}) |
| | | private String company; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","å§æäºº"}) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","ç产åä½"}) |
| | | private String production; |
| | | |
| | | @ExcelProperty(value ={"æ ·åç»è®°è¡¨","å·¥ç¨åç§°"}) |
| | | private String engineering; |
| | | |
| | | @ExcelIgnore |
| | | private Integer createUser; |
| | | |
| | | @ExcelIgnore |
| | | private Integer insSampleId; |
| | | |
| | | @ExcelIgnore |
| | | private Double cost;//å·¥æ¶ |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ExcelIgnore |
| | | private String dates; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/16 |
| | | */ |
| | | @Data |
| | | public class DataAnalysisDto { |
| | | |
| | | @Schema(description = "æ¶é´ç±»å, 1:æ¬å¨, 2:æ¬æ, 3:æ¬å¹´") |
| | | private String dateType; |
| | | |
| | | @Schema(description = "æ£æµç±»å, 1:è¿åæ£éª, 2:å£åº¦æ£éª") |
| | | private String orderType; |
| | | |
| | | @Schema(description = "å¼å§æ¶é´") |
| | | private String beginDate; |
| | | |
| | | @Schema(description = "ç»ææ¶é´") |
| | | private String endDate; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @Schema(description = "åå·") |
| | | private String modelName; |
| | | |
| | | @Schema(description = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "åç»ç±»å, 0: é»è®¤æç
§æ ·ååºå 1: åä¸åå®¶, åä¸åå·, ä¸åæ¹æ¬¡, 2 : åä¸åå·, ä¸ååå®¶") |
| | | private String groupType; |
| | | |
| | | @Schema(description = "éæ©çæ£éªé¡¹åç§°") |
| | | private List<String> itemNames; |
| | | |
| | | @Schema(description = "订åid") |
| | | private List<Integer> orderIds; |
| | | |
| | | @Schema(description = "åå®¶æ°æ®") |
| | | private List<String> supplierDataList; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/8/12 |
| | | */ |
| | | @Data |
| | | public class EnterFactoryReport { |
| | | |
| | | @Schema(description = "ææåç§°") |
| | | private String sample; |
| | | |
| | | @Schema(description = "å°è´§æ°é") |
| | | private String qtyArrived; |
| | | |
| | | @Schema(description = "æ½æ£æ°é") |
| | | private String quantity; |
| | | |
| | | @Schema(description = "è§æ ¼åå·") |
| | | private String partDesc; |
| | | |
| | | @Schema(description = "ææåå®¶") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | @Schema(description = "æ£æµç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * 夿¤é¢è² |
| | | */ |
| | | @Schema(description = "夿¤é¢è²") |
| | | private String outerColor; |
| | | |
| | | /** |
| | | * æ£éªå |
| | | */ |
| | | @Schema(description = "æ£éªå") |
| | | private String inspector; |
| | | |
| | | /** |
| | | * æ£éªæ¥æ |
| | | */ |
| | | @Schema(description = "æ£éªæ¥æ") |
| | | private String inspectDate; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.WarehouseHistory; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class HistoryDto extends WarehouseHistory { |
| | | |
| | | private String createUserName; |
| | | |
| | | private String warehouseCode; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class IfsPartPropsRecordDTO extends IfsPartPropsRecord { |
| | | |
| | | private String partNo; |
| | | |
| | | private String lotBatchNo; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class IfsStockQueryDTO { |
| | | private String partNo; |
| | | private String partDescription; // é¶ä»¶æè¿° |
| | | private String partDesc; |
| | | private String locNo; // åºä½å· |
| | | private String locDesc; // åºä½æè¿° |
| | | private String lotBatchNo; // æ¹å· |
| | | private String wdrNo; // WDRç¼å· |
| | | private String warehouse; // ä»åº |
| | | private String quantityFlag; // æ°éæ è¯(ç°ææ°é) |
| | | private String locationGroup; // åºä½ç» |
| | | private String locationGroupDesc; // åºä½ç»æè¿° |
| | | private String reelNumber; // è½½å
·ç¼å· |
| | | private String startMeter; // èµ·å§ç±³æ |
| | | private String endMeter; // æªæ¢ç±³æ |
| | | private String outerColor; // 夿¤é¢è² |
| | | private String insulationColor; // ç»ç¼é¢è² |
| | | private String otcOrderNo; // ç©æå±æ§éé¢çOTC订åå· |
| | | private String mpsNo; // ç产计åå· |
| | | private String letteringInfo; // å°åä¿¡æ¯ |
| | | private String sStockQuantity; // åºåæ°é2 |
| | | private String availableStockQuantity; // å¯ç¨åºåæ°é |
| | | private String sAvailableStockQuantity; // åºç¨åºåæ°é2 |
| | | private String sunit; // åä½2 |
| | | private String stockSource; // æ¥æº |
| | | private String inspInstorageTime; // æ£æµå
¥åºæ¥æ |
| | | private String testRemark; // æ£æµå¤æ³¨ |
| | | private String grossWeight; // æ¯é |
| | | private String netWeight; // åé |
| | | private String packingManner; // å
è£
æ¹å¼ |
| | | private String cylinderNumber; //æåä¸ªæ° |
| | | private String systemNo; //ç³»ç»å· |
| | | private String remark; //夿³¨ |
| | | private String customerName; //客æ·åç§° |
| | | private String reserveQuantity; //é¢çæ°é |
| | | private String lengthRequirement; // å¤æè¦æ± |
| | | private String inSource;//å
¥åºæ¥æº |
| | | private String splitQuality;//åå²é¢çæ°é |
| | | |
| | | //æ¥å£ getIfsStockReport ç¨å°çåæ®µ |
| | | private String attr23;//å
¥åºæ¥æº |
| | | private String attr6;//otc订åå· |
| | | private String attr21;//客æ·åç§° |
| | | private String attr4;//夿¤é¢è² |
| | | private String attr5;//ç»ç¼é¢è² |
| | | private String attr8;//å°åä¿¡æ¯ |
| | | private String lot_batch_no;//æ¹æ¬¡å· |
| | | private String location_no;//åºä½å· |
| | | private String attr17;//å
è£
æ¹å¼ |
| | | private String attr1;//è½½å
·ç¼å· |
| | | |
| | | //æ¥å£queryColReservedInfoStd ç¨å°çä¸¤ä¸ªåæ®µ |
| | | private String cotcOrderNo; // 表éé¢çOTC订åå· |
| | | private String cotcLineNo; // 表éé¢çOTCè¡å· |
| | | |
| | | private Boolean isAll;//æ¯å¦æ¥è¯¢å
¨é¨åºå |
| | | |
| | | private Long page; |
| | | private Long limit; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsOrderDeviceRecord; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/22 |
| | | */ |
| | | @Data |
| | | public class InsOrderDeviceRecordDto extends InsOrderDeviceRecord { |
| | | |
| | | @Schema(description = "设å¤ç¼å·") |
| | | private String managementNumber; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class InsOrderPlanDTO extends IfsInventoryQuantity implements Serializable { |
| | | |
| | | @Schema(description = "æ£éªä»»å¡ä¸»é®id") |
| | | private Long insSampleId; |
| | | |
| | | @Schema(description = "ç¨æ·id") |
| | | private Long userId; |
| | | |
| | | @Schema(description = "ç¶æ(æ£éªå¤ç)") |
| | | private Integer state; |
| | | |
| | | @Schema(description = "åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "æ£éªç¶æ") |
| | | private String insState; |
| | | |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "æ£éªç±»å") |
| | | private Integer typeSource; |
| | | |
| | | @Schema(description = "æ¯å¦å¤æ ¸") |
| | | private Integer isCheck; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡æ£éªé¡¹æ¥è¯¢æ¡ä»¶ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/11/29 |
| | | */ |
| | | @Data |
| | | public class InsOrderPlanProductDto { |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "ç±»å") |
| | | private Integer type; |
| | | |
| | | @Schema(description = "è¯éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @Schema(description = "çµç¼é
ç½®æ è¯") |
| | | private String cableTag; |
| | | |
| | | @Schema(description = "åæææ¹æ¬¡æ è¯") |
| | | private String rawMaterialTag; |
| | | |
| | | @Schema(description = "æåä¸åé夿 è¯") |
| | | private String repetitionTag; |
| | | |
| | | @Schema(description = "ä¸åæ ¼å¤æµé夿¬¡æ°") |
| | | private String retestTag; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/29 |
| | | */ |
| | | @Data |
| | | public class InsOrderUpdateDto { |
| | | |
| | | @Schema(description = "订åä¿®æ¹å¯¹è±¡") |
| | | private InsOrder insOrder; |
| | | |
| | | @Schema(description = "æ£æµæ ·å对象") |
| | | private List<SampleProductDto> sampleProduct; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸å对象 |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2025/2/19 |
| | | */ |
| | | @Data |
| | | public class InsPlaceOrderDto{ |
| | | |
| | | @Schema(description = "æ ·å") |
| | | private List<SampleProductDto> sampleList; |
| | | |
| | | @Schema(description = "订åä¿¡æ¯") |
| | | private InsOrder insOrder; |
| | | |
| | | @Schema(description = "æ ååºäºçº§æ åIDï¼æ°èåæ ·åä¸åï¼") |
| | | private Integer standardTreeId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·ï¼æ°èåæ ·åä¸åï¼") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "ä¸åæ¶ä¿ççåå§è®°å½æ¨¡æ¿") |
| | | private List<OrderTemplateSelectionDto> templateList; |
| | | |
| | | @Schema(description = "éåä¸è®¢å") |
| | | private CopperInsOrderDto copperInsOrder; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ£æµé¡¹åæç»ææ°æ® |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2025/3/26 |
| | | */ |
| | | @Data |
| | | public class InsProductAnalysisDto { |
| | | |
| | | @Schema(description = "æ£æµé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ£æµç»æ") |
| | | @TableField("`last_value`") |
| | | private String lastValue; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/29 |
| | | */ |
| | | @Data |
| | | public class InsProductBindingDto { |
| | | @Schema(description = "éè¦ç»å®çid") |
| | | private Integer insProductId; |
| | | |
| | | |
| | | @Schema(description = "éè¦ç»å®çæ£éªé¡¹") |
| | | private List<InsProduct> insProductBindingList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarning; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2025/3/28 |
| | | */ |
| | | @Data |
| | | public class InsProductDeviationWarningDto extends InsProductDeviationWarning { |
| | | |
| | | @Schema(description = "æ ·å") |
| | | private String sampleName; |
| | | |
| | | @Schema(description = "åå·") |
| | | private String sampleModel; |
| | | |
| | | @Schema(description = "æ£éªé¡¹") |
| | | private String inspectionItemName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2025/4/18 |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class InsReportExport { |
| | | |
| | | @ExcelProperty(value = "æ¥åç¼å·") |
| | | @Schema(description = "å§æç¼å·") |
| | | private String code; |
| | | |
| | | @ExcelProperty(value = "æ¥åç±»å") |
| | | @Schema(description = "æ¥åç±»å") |
| | | private String reportTypeName; |
| | | |
| | | @ExcelProperty(value = "ä¸åç±»å") |
| | | @Schema(description = "ä¸åç±»å") |
| | | private String typeSource; |
| | | |
| | | @ExcelProperty(value = "æ£éªç±»å") |
| | | @Schema(description = "æ£éªç±»å") |
| | | private String orderType; |
| | | |
| | | @ExcelProperty(value = "å建æ¶é´") |
| | | @Schema(description = "å建æ¶é´") |
| | | private String createTime; |
| | | |
| | | @ExcelProperty(value = "æäº¤äºº") |
| | | @Schema(description = "æäº¤äºº") |
| | | private String writeUserName; |
| | | |
| | | @ExcelProperty(value = "æäº¤æ¶é´") |
| | | @Schema(description = "æäº¤æ¶é´") |
| | | private String writeTime; |
| | | |
| | | @ExcelProperty(value = "æäº¤ç¶æ") |
| | | @Schema(description = "æäº¤ç¶æ") |
| | | private String state; |
| | | |
| | | @ExcelProperty(value = "å®¡æ ¸äºº") |
| | | @Schema(description = "å®¡æ ¸äºº") |
| | | private String examineUser; |
| | | |
| | | @ExcelProperty(value = "å®¡æ ¸æ¶é´") |
| | | @Schema(description = "å®¡æ ¸æ¶é´") |
| | | private String examineTime; |
| | | |
| | | @ExcelProperty(value = "å®¡æ ¸ç¶æ") |
| | | @Schema(description = "å®¡æ ¸ç¶æ") |
| | | private String isExamine; |
| | | |
| | | @ExcelProperty(value = "å®¡æ ¸å¤æ³¨") |
| | | @Schema(description = "å®¡æ ¸å¤æ³¨") |
| | | private String examineTell; |
| | | |
| | | @ExcelProperty(value = "æ¹å人") |
| | | @Schema(description = "æ¹å人") |
| | | private String ratifyUser; |
| | | |
| | | @ExcelProperty(value = "æ¹åæ¶é´") |
| | | @Schema(description = "æ¹åæ¶é´") |
| | | private String ratifyTime; |
| | | |
| | | @ExcelProperty(value = "æ¹åç¶æ") |
| | | @Schema(description = "æ¹åç¶æ") |
| | | private String isRatify; |
| | | |
| | | @ExcelProperty(value = "æ¹å夿³¨") |
| | | @Schema(description = "æ¹å夿³¨") |
| | | private String ratifyTell; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InsulatingDto { |
| | | |
| | | // æ¹æ³id |
| | | private Integer standardMethodListId; |
| | | |
| | | // è¯æ° |
| | | private List<String> num; |
| | | |
| | | // æ£éªé¡¹ |
| | | private List<InsProduct> insProduct; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/12 |
| | | */ |
| | | @Data |
| | | public class OmitOrderProductDto { |
| | | @Schema(description = "éè¦æ·»å çæ ·åId") |
| | | private Integer insSampleId; |
| | | |
| | | |
| | | @Schema(description = "éè¦ç»å®çæ£éªé¡¹") |
| | | private List<InsProduct> insProductBindingList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.excel.OrderSplitExcelData; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 订åæådto |
| | | */ |
| | | @Data |
| | | public class OrderSplitDTO implements Serializable { |
| | | |
| | | /** |
| | | * ifs订å主é®id |
| | | */ |
| | | @Schema(description = "ifs订å主é®id") |
| | | private Long ifsId; |
| | | |
| | | /** |
| | | *æå详æ
å表 |
| | | */ |
| | | @Schema(description = "æå详æ
å表") |
| | | private List<OrderSplitExcelData> splitDetailList; |
| | | |
| | | /** |
| | | *æ¯å¦åæ¥å°MES |
| | | */ |
| | | @Schema(description = "æ¯å¦åæ¥å°MES") |
| | | private Boolean pushToMes; |
| | | |
| | | @Schema(description = "ç©æå±æ§ï¼ç¨äºåºåéãé导ä½çææ") |
| | | private String materialProp; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** ä¸åæ¶ä¿ççåå§è®°å½æ¨¡æ¿ã */ |
| | | @Data |
| | | public class OrderTemplateSelectionDto { |
| | | |
| | | @Schema(description = "模æ¿ID") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "模æ¿å±ç¤ºåçæé¡ºåº") |
| | | private Integer sort; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProcurementSuppliesListEDto { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @Schema(description = "ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | |
| | | @Schema(description = "èæç±»å") |
| | | @ExcelProperty("ç±»å«") |
| | | private String consumablesType; |
| | | |
| | | @Schema(description = "è´§å·") |
| | | @ExcelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @Schema(description = "èæåç§°") |
| | | @ExcelProperty("åç§°") |
| | | private String consumablesName; |
| | | |
| | | @Schema(description = "è§æ ¼") |
| | | @ExcelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @Schema(description = "计éåä½") |
| | | @ExcelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | |
| | | |
| | | |
| | | @Schema(description = "åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer lowerLimit; |
| | | |
| | | |
| | | |
| | | @Schema(description = "夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | @Schema(description = "å½ååºåæ°é") |
| | | @ExcelProperty("å½ååºå") |
| | | private Integer currentAmount; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductResultDto2 extends InsProduct { |
| | | |
| | | @Schema(description = "æ£éªè®¾å¤") |
| | | private String equipValue; |
| | | |
| | | @Schema(description = "æ£éªäºº") |
| | | private String updateUserName; |
| | | |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.basic.dto.ModelDto; |
| | | import com.ruoyi.basic.dto.SampleDto; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/7/31 |
| | | */ |
| | | @Data |
| | | public class RawMaterialStandardTreeDto { |
| | | |
| | | @Schema(description = "æ åç§°") |
| | | private String treeName; |
| | | |
| | | @Schema(description = "æ åç§°") |
| | | private String code; |
| | | |
| | | @Schema(description = "æ åç§°") |
| | | private String label; |
| | | |
| | | @Schema(description = "æ åç§°") |
| | | private String value; |
| | | |
| | | @Schema(description = "产å") |
| | | private List<SampleDto> children1; |
| | | |
| | | @Schema(description = "åå·") |
| | | private List<ModelDto> children2; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class ReportPageDto extends InsReport implements Serializable { |
| | | |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "æäº¤äºº") |
| | | private String writeUserName; |
| | | |
| | | @Schema(description = "æ¹å人") |
| | | private String ratifyUser; |
| | | |
| | | @Schema(description = "å®¡æ ¸äºº") |
| | | private String examineUser; |
| | | |
| | | @Schema(description = "ä¸åç±»å«") |
| | | private Integer typeSource; |
| | | |
| | | @Schema(description = "ç©æå±æ§") |
| | | private String materialProp; |
| | | |
| | | @Schema(description = "æ£éªç±»å«") |
| | | private String orderType; |
| | | |
| | | @Schema(description = "åææid") |
| | | private Integer ifsInventoryId; |
| | | |
| | | @Schema(description = "æ¯å¦å¤æ ¸éè¿") |
| | | private String queryStatus; |
| | | |
| | | @Schema(description = "æ¯å¦æ¯éæ, 0å¦, 1æ¯") |
| | | private Integer isCopper; |
| | | |
| | | @Schema(description = "å®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "åªçèªå·±æ è¯") |
| | | private Integer createOrderUser; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @version 1.0.0 |
| | | * @create 2024/3/14 18:46 |
| | | **/ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class SampleOrderDto extends InsOrder { |
| | | |
| | | @Schema(description = "æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | | @ExcelProperty(index = 2, value = "æ ·ååç§°") |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @ExcelProperty(index = 3, value = "æ ·ååå·") |
| | | @Schema(description = "æ ·ååå·") |
| | | private String sampleModel; |
| | | |
| | | @Schema(description = "ææ´¾æ£éªäººid") |
| | | private String assign; |
| | | |
| | | @ExcelProperty(index = 4, value = "æ ·åæ°é") |
| | | @Schema(description = "æ ·åæ°é") |
| | | private Integer sampleNum; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ExcelProperty(index = 8, value = "æ£éªè¿åº¦%") |
| | | @Schema(description = "æ£éªè¿åº¦%") |
| | | private String insProgress; |
| | | |
| | | @Schema(description = "æ¥åid") |
| | | private String reportId; |
| | | |
| | | @Schema(description = "ç³»ç»çææ¥åå°å") |
| | | @TableField("`url`") |
| | | private String url; |
| | | |
| | | @Schema(description = "æå¨ä¸ä¼ æ¥åå°å") |
| | | private String urlS; |
| | | |
| | | @Schema(description = "ä¸å人å§å") |
| | | private String name; |
| | | |
| | | @ExcelProperty(index = 5, value = "æ£éªäºº") |
| | | @Schema(description = "æ£éªäºº") |
| | | private String testingName; |
| | | |
| | | /** |
| | | * (æ¥å导åº)ç´§æ¥ç¨åº¦ ï¼0æ®é 1ä¼å
2ç´§æ¥ï¼ |
| | | */ |
| | | @ExcelProperty(index = 6, value = "ç´§æ¥ç¨åº¦") |
| | | @Schema(description = "ç´§æ¥ç¨åº¦ ï¼0æ®é 1ä¼å
2ç´§æ¥ï¼") |
| | | private String typeString; |
| | | |
| | | /** |
| | | * (æ¥å导åº)æ£éªç»æ |
| | | */ |
| | | @ExcelProperty(index = 10, value = "æ£éªç»æ") |
| | | @Schema(description = "æ£éªç»æ") |
| | | private String insResultString; |
| | | |
| | | /** |
| | | * (æ¥å导åº)ä¸åæ ¼é¡¹ç® |
| | | */ |
| | | @Schema(description = "ä¸åæ ¼é¡¹") |
| | | @ExcelProperty(index = 13, value = "ä¸åæ ¼é¡¹") |
| | | private String unqualifiedItem; |
| | | |
| | | /** |
| | | * (æ¥å导åº)ä¸åæ¶é´ |
| | | */ |
| | | @ExcelProperty(index = 11, value = "ä¸åæ¶é´") |
| | | @Schema(description = "ä¸åæ¶é´") |
| | | private String createTimeString; |
| | | |
| | | @Schema(description = "åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "æ ·ååç§°ï¼åææåæ ·ååæ®µï¼æå忥åå±ç¤ºå段ï¼") |
| | | private String sampleStr; |
| | | |
| | | |
| | | @Schema(description = "æ»ä»·") |
| | | private String totalPrice; |
| | | |
| | | @Schema(description = "订åid(导åºç¨)") |
| | | private String ids; |
| | | |
| | | @Schema(description = "ææ¶åå ") |
| | | private String sampleRejectRemark; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleProductDto extends InsSample { |
| | | |
| | | @Schema(description = "æ£éªé¡¹ç®") |
| | | private List<InsProduct> insProduct; |
| | | |
| | | @Schema(description = "åæ ·åé
ç½®") |
| | | private List<SampleProductDto> childSampleList; |
| | | |
| | | @Schema(description = "çµç¼é
置对象") |
| | | private InsulatingDto insulating; |
| | | |
| | | @Schema(description = "è¾
å©çº¿è¯é
ç½®") |
| | | private InsulatingDto auxiliaryWireCore; |
| | | |
| | | @Schema(description = "æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | import java.util.TreeMap; |
| | | |
| | | @Data |
| | | public class SampleProductDto2 implements Serializable { |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»è±æ") |
| | | private String inspectionItemClassEN; |
| | | |
| | | @Schema(description = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @Schema(description = "æ£éªé¡¹è±æ") |
| | | private String inspectionItemEn; |
| | | |
| | | @Schema(description = "æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @Schema(description = "æ£éªåé¡¹è±æ") |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | @Schema(description = "åä½") |
| | | private String unit; |
| | | |
| | | @Schema(description = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @Schema(description = "æ ·åç¶æ") |
| | | private Integer insState; |
| | | |
| | | @Schema(description = "å®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | @Schema(description = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | @Schema(description = "è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @Schema(description = "è¯éªè¦æ±") |
| | | private String tell; |
| | | |
| | | @Schema(description = "æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | @Schema(description = "ç»æå¤å®") |
| | | private Integer insResult; |
| | | |
| | | @Schema(description = "æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @Schema(description = "æ£éªæ¥æ") |
| | | private String checkTime; |
| | | |
| | | @Schema(description = "设å¤å¼") |
| | | private String equipValue; |
| | | |
| | | @Schema(description = "åºå·") |
| | | private String index; |
| | | @Schema(description = "æ ·ååç§°(æ´ä½)") |
| | | private String inspectionName; |
| | | |
| | | @Schema(description = "æ¡ä»¶") |
| | | private String radius; |
| | | |
| | | @Schema(description = "æ£éªç»æå表") |
| | | private List<String> lastValueList; |
| | | |
| | | @Schema(description = "æ£éªç»æå表") |
| | | private List<Integer> insResultList; |
| | | |
| | | @Schema(description = "æç»ç»æ") |
| | | private String finalResult; |
| | | |
| | | @Schema(description = "åææid") |
| | | private Integer ifsInventoryId; |
| | | |
| | | @Schema(description = "æ£éªåç±»å") |
| | | private String orderType; |
| | | |
| | | @Schema(description = "æ£éªåç±»å") |
| | | private Integer quantity; |
| | | |
| | | @Schema(description = "æ£éªåç±»å") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "çµç¼æ è¯") |
| | | private String cableTag; |
| | | |
| | | @Schema(description = "å¯ä¸ç»æå¼") |
| | | private LinkedHashSet<String> tellSet; |
| | | |
| | | @Schema(description = "çµç¼æ è¯å
容éå") |
| | | private TreeMap<String, String> cableTagValueMap; |
| | | |
| | | @Schema(description = "çµç¼æ è¯ç»æéå") |
| | | private TreeMap<String, Integer> cableTagResultMap; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | import java.util.TreeMap; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/30 |
| | | */ |
| | | @Data |
| | | public class SampleProductExportDto { |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer id; |
| | | |
| | | @Schema(description = "产åid") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | private String inspectionItemClassEN; |
| | | |
| | | @Schema(description = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | private String inspectionItemEn; |
| | | |
| | | @Schema(description = "æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | @Schema(description = "åä½") |
| | | private String unit; |
| | | |
| | | @Schema(description = "æ ·ååå·") |
| | | private String model; |
| | | |
| | | @Schema(description = "æ ·åç¶æ") |
| | | private Integer insState; |
| | | |
| | | @Schema(description = "å®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | @Schema(description = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | @Schema(description = "è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @Schema(description = "è¯éªè¦æ±") |
| | | private String tell; |
| | | |
| | | @Schema(description = "æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | @Schema(description = "ç»æå¤å®") |
| | | private Integer insResult; |
| | | |
| | | @Schema(description = "æ£éªäºº") |
| | | private String checkName; |
| | | |
| | | @Schema(description = "æ£éªæ¥æ") |
| | | private String checkTime; |
| | | |
| | | @Schema(description = "åºå·") |
| | | private String index; |
| | | |
| | | @Schema(description = "åç§°") |
| | | private String inspectionName; |
| | | |
| | | //æ¡ä»¶ |
| | | private String radius; |
| | | |
| | | // æ£éªç»æå表 |
| | | private List<String> lastValueList; |
| | | |
| | | // æ£éªç»æå表 |
| | | private List<Integer> insResultList; |
| | | |
| | | //æç»ç»æ |
| | | private String finalResult; |
| | | |
| | | //åææid |
| | | private Integer ifsInventoryId; |
| | | |
| | | //æ£éªåç±»å |
| | | private String orderType; |
| | | |
| | | //æ£éªåç±»å |
| | | private Integer quantity; |
| | | |
| | | //æ£éªåç±»å |
| | | private Integer sort; |
| | | |
| | | //çµç¼æ è¯ |
| | | private String cableTag; |
| | | |
| | | // å¯ä¸ç»æå¼ |
| | | private LinkedHashSet<String> tellSet; |
| | | |
| | | // çµç¼æ è¯å
容éå |
| | | private TreeMap<String, String> cableTagValueMap; |
| | | |
| | | // çµç¼æ è¯ç»æéå |
| | | private TreeMap<String, Integer> cableTagResultMap; |
| | | |
| | | // æ£éªé¡¹åæ¡ä»¶åå¹¶å
³è |
| | | public String getInspectionItemRadius() { |
| | | if (StringUtils.isBlank(radius)) { |
| | | return inspectionItem; |
| | | } |
| | | return inspectionItem + radius; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/17 |
| | | */ |
| | | @Data |
| | | public class SampleProductRawAnalysisDto { |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç§°") |
| | | private String inspectionItem; |
| | | |
| | | @Schema(description = "æ£éªç»æ") |
| | | private String lastValue; |
| | | |
| | | @Schema(description = "åæ ¼å¤æ, 1:åæ ¼, 0:ä¸åæ ¼, 3:ä¸å¤å®") |
| | | private Integer insResult; |
| | | |
| | | @Schema(description = "æ¹æ¬¡å·") |
| | | private String updateBatchNo; |
| | | |
| | | @Schema(description = "åå®¶åç§°") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SampleReceiptActionDto { |
| | | |
| | | @Schema(description = "æ ·åæ¥æ¶è®°å½ID") |
| | | private Integer receiptId; |
| | | |
| | | @Schema(description = "主æ£éªäººID") |
| | | private Integer mainInspectorId; |
| | | |
| | | @Schema(description = "æ¥æ¶å¤æ³¨ï¼ææ¶æ¶ä¸ºææ¶å¤æ³¨") |
| | | private String remark; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class SampleReceiptPageDto { |
| | | |
| | | @Schema(description = "æ ·åæ¥æ¶è®°å½ID") |
| | | private Integer receiptId; |
| | | @Schema(description = "å§æåID") |
| | | private Integer orderId; |
| | | @Schema(description = "æ ·åID") |
| | | private Integer sampleId; |
| | | @Schema(description = "æ ·åæ¥æ¶ç¶æ 0å¾
æ¥æ¶ 1å·²æäº¤æ£éª 2å·²ææ¶ 3已忶") |
| | | private Integer status; |
| | | @ExcelProperty(value = "æ ·ååç§°", index = 0) |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sampleName; |
| | | @ExcelProperty(value = "æ ·åç¼å·", index = 1) |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | @ExcelProperty(value = "æ£æµé¡¹ç®", index = 2) |
| | | @Schema(description = "æ£æµé¡¹ç®") |
| | | private String inspectionItem; |
| | | @ExcelProperty(value = "å§æç¼å·", index = 3) |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | @ExcelProperty(value = "æ¹æ³æ å", index = 4) |
| | | @Schema(description = "æ¹æ³æ å") |
| | | private String methodStandard; |
| | | @Schema(description = "主æ£éªäººID") |
| | | private Integer mainInspectorId; |
| | | @ExcelProperty(value = "主æ£äººç¾å", index = 5) |
| | | @Schema(description = "主æ£éªäººå§å") |
| | | private String mainInspectorName; |
| | | @ExcelProperty(value = "夿³¨", index = 6) |
| | | @Schema(description = "æ¥æ¶å¤æ³¨") |
| | | private String remark; |
| | | @ExcelProperty(value = "ææ¶å¤æ³¨", index = 7) |
| | | @Schema(description = "ææ¶å¤æ³¨") |
| | | private String rejectRemark; |
| | | @Schema(description = "æ¥æ¶å¤çæ¶é´") |
| | | private LocalDateTime receiveTime; |
| | | @Schema(description = "æ¥æ¶å¤ç人") |
| | | private String receiveUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SampleReceiptQueryDto { |
| | | |
| | | @Schema(description = "æ ·åæ¥æ¶ç¶æ 0å¾
æ¥æ¶ 1å·²æäº¤æ£éª 2å·²ææ¶ 3已忶") |
| | | private Integer status; |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sampleName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ä¿å模æ¿ä¼ å |
| | | */ |
| | | @Data |
| | | public class SaveInsContextDto { |
| | | |
| | | @Schema(description = "模æ¿å
容") |
| | | private String param; |
| | | |
| | | @Schema(description = "å½å模æ¿id") |
| | | private Integer currentTable; |
| | | |
| | | @Schema(description = "å½åæ ·åid") |
| | | private Integer sampleId; |
| | | |
| | | @Schema(description = "å½å订åid") |
| | | private Integer orderId; |
| | | |
| | | @Schema(description = "åè¯éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "æ¯å¦æ²¡ææ£éªå¼") |
| | | private Integer isNoTestValue; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** æ£éªåæ¦åµä¸ç设å¤éæ©ã */ |
| | | @Data |
| | | public class SaveOrderDevicesDto { |
| | | private Integer orderId; |
| | | private List<Integer> deviceIds; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** æ°èåå§è®°å½æ¨¡æ¿æåæ ä¿åã */ |
| | | @Data |
| | | public class SaveTemplateContextDto { |
| | | private Integer orderId; |
| | | private Integer sampleId; |
| | | private Integer templateId; |
| | | private Map<String, Object> values; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarter; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarterItem; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/10 |
| | | */ |
| | | @Data |
| | | public class SpotCheckQuarterDto extends SpotCheckQuarter { |
| | | |
| | | @Schema(description = "å£åº¦æ½æ£è¯¦æ
") |
| | | private List<SpotCheckQuarterItem> quarterItems; |
| | | |
| | | @Schema(description = "å建人") |
| | | private String createUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.SpotCheckYear; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYearItem; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/10 |
| | | */ |
| | | @Data |
| | | public class SpotCheckYearDto extends SpotCheckYear { |
| | | |
| | | @Schema(description = "å¹´åº¦æ½æ ·è¯¦æ
") |
| | | private List<SpotCheckYearItem> yearItems; |
| | | |
| | | @Schema(description = "å建人") |
| | | private String createUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class TemplateRateDto { |
| | | @Schema(description = "æ£éªé¡¹ç®") |
| | | private String number; |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String name; |
| | | @Schema(description = "ä»·æ ¼(å
)") |
| | | private BigDecimal price; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandler; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UnqualifiedHandlerDto extends InsUnqualifiedHandler implements Serializable { |
| | | |
| | | @Schema(description = "å") |
| | | private String contract; |
| | | |
| | | @Schema(description = "订åå·") |
| | | private String orderNo; |
| | | |
| | | @Schema(description = "è¡å·") |
| | | private String lineNo; |
| | | |
| | | @Schema(description = "ä¸è¾¾å·") |
| | | private String releaseNo; |
| | | |
| | | @Schema(description = "æ¥æ¶å·") |
| | | private Integer receiptNo; |
| | | |
| | | @Schema(description = "é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @Schema(description = "é¶ä»¶æè¿°") |
| | | private String partDesc; |
| | | |
| | | @Schema(description = "ç¶ææè¿°") |
| | | private String status; |
| | | |
| | | @Schema(description = "ç¶æ") |
| | | private String statusDB; |
| | | |
| | | @Schema(description = "æµè¾¾çéè´æ°é") |
| | | private BigDecimal qtyArrived; |
| | | |
| | | @Schema(description = "å·²æ£éªçè´ä¹°æ°é") |
| | | private BigDecimal qtyInspected; |
| | | |
| | | @Schema(description = "è¦æ£éªçéè´æ°é") |
| | | private BigDecimal qtyToInspect; |
| | | |
| | | @Schema(description = "ä¾åºåç¼å·") |
| | | private String supplierId; |
| | | |
| | | @Schema(description = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "æµè¾¾çåºåæ°é") |
| | | private BigDecimal invQtyInStore; |
| | | |
| | | @Schema(description = "æµè¾¾çéè´æ°é") |
| | | private BigDecimal purQtyInStore; |
| | | |
| | | @Schema(description = "é
ç½®æ è¯") |
| | | private String configurationId; |
| | | |
| | | @Schema(description = "æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | @Schema(description = "wdrå·") |
| | | private String waivDevRejNo; |
| | | |
| | | @Schema(description = "æ´»å¨åºå") |
| | | private String activitySeq; |
| | | |
| | | @Schema(description = "åºåå·") |
| | | private String serialNo; |
| | | |
| | | @Schema(description = "åºä½å·") |
| | | private String locationNo; |
| | | |
| | | @Schema(description = "çæ¬å·") |
| | | private String engChgLevel; |
| | | |
| | | @Schema(description = "æ¥æ¶äºº") |
| | | private String receiver; |
| | | |
| | | @Schema(description = "æ¥æ¶äººå§å") |
| | | private String receiverName; |
| | | |
| | | @Schema(description = "éè´å") |
| | | private String buyerCode; |
| | | |
| | | @Schema(description = "éè´åå§å") |
| | | private String buyerName; |
| | | |
| | | @Schema(description = "å®é
å°è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime arriveDate; |
| | | |
| | | @Schema(description = "å®é
äº¤è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime deliveryDate; |
| | | |
| | | @Schema(description = "çäº§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime productDate; |
| | | |
| | | @Schema(description = "å¤±ææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime invalidDate; |
| | | |
| | | |
| | | @Schema(description = "å®¡æ¹æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime approvedDate; |
| | | |
| | | @Schema(description = "éè´ç³è¯·å建人") |
| | | private String reqCeater; |
| | | |
| | | @Schema(description = "éè´ç³è¯·å建人å§å") |
| | | private String reqCeaterName; |
| | | |
| | | @Schema(description = "éè´è®¢åè¡å¤æ³¨") |
| | | private String lineRemarks; |
| | | |
| | | @Schema(description = "éè´åä½") |
| | | private String buyUnitMeas; |
| | | |
| | | |
| | | private Integer isSource; |
| | | |
| | | private Integer number; |
| | | |
| | | private Integer state; |
| | | |
| | | @Schema(description = "æ¥æ¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime receiverDate; |
| | | |
| | | |
| | | @Schema(description = "éä»¶å表") |
| | | private List<InsUnqualifiedHandlerFile> unqualifiedHandlerFiles; |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** æ£éªå¤æ ¸æäº¤åæ°ã */ |
| | | @Data |
| | | public class VerifyPlanDto { |
| | | private Integer orderId; |
| | | private String laboratory; |
| | | /** 1 éè¿ï¼0 éåã */ |
| | | private Integer type; |
| | | private String tell; |
| | | private Integer userId; |
| | | /** æ°èæ£éªåæ´ä½ç»è®ºï¼1 åæ ¼ï¼0 ä¸åæ ¼ã */ |
| | | private Integer insResult; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseCellAndSampleDto extends WarehouseCell { |
| | | |
| | | private List<InsSample> samples; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WarehouseDto extends Warehouse { |
| | | |
| | | List<WarehouseShelf> warehouseShelfList; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | /** ä¿å订åçº§å¤æ³¨ææ¨¡æ¿çº§æ£éªæ¡ä»¶ã */ |
| | | @Data |
| | | public class WriteInspectionConditionDto { |
| | | |
| | | private Integer id; |
| | | private Integer templateId; |
| | | private String remark; |
| | | private String temperature; |
| | | private String humidity; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate detectionTime; |
| | | |
| | | private String detectionPlace; |
| | | private List<Integer> deviceIds; |
| | | private Integer insResult; |
| | | |
| | | @JsonIgnore |
| | | private boolean temperaturePresent; |
| | | @JsonIgnore |
| | | private boolean humidityPresent; |
| | | @JsonIgnore |
| | | private boolean detectionTimePresent; |
| | | @JsonIgnore |
| | | private boolean detectionPlacePresent; |
| | | @JsonIgnore |
| | | private boolean deviceIdsPresent; |
| | | @JsonIgnore |
| | | private boolean insResultPresent; |
| | | |
| | | public void setTemperature(String temperature) { |
| | | this.temperature = temperature; |
| | | this.temperaturePresent = true; |
| | | } |
| | | |
| | | public void setHumidity(String humidity) { |
| | | this.humidity = humidity; |
| | | this.humidityPresent = true; |
| | | } |
| | | |
| | | public void setDetectionTime(LocalDate detectionTime) { |
| | | this.detectionTime = detectionTime; |
| | | this.detectionTimePresent = true; |
| | | } |
| | | |
| | | public void setDetectionPlace(String detectionPlace) { |
| | | this.detectionPlace = detectionPlace; |
| | | this.detectionPlacePresent = true; |
| | | } |
| | | |
| | | public void setDeviceIds(List<Integer> deviceIds) { |
| | | this.deviceIds = deviceIds; |
| | | this.deviceIdsPresent = true; |
| | | } |
| | | |
| | | public void setInsResult(Integer insResult) { |
| | | this.insResult = insResult; |
| | | this.insResultPresent = true; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.event; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ°èç´ç»æ¨¡æ¿ä¸åæåäºä»¶ã |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | public class NewJuOrderPlacedEvent { |
| | | |
| | | private Integer insOrderId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * åæææ¥æ£ï¼è®¢åæå导å
¥æ¨¡æ¿å¯¹è±¡ |
| | | */ |
| | | @Data |
| | | public class OrderSplitExcelData implements Serializable { |
| | | |
| | | /** |
| | | * é¶ä»¶ç¼å· |
| | | */ |
| | | @ExcelProperty(index = 0,value = "é¶ä»¶ç¼å·") |
| | | @Schema(description = "é¶ä»¶ç¼å·") |
| | | private String partNo; |
| | | |
| | | /** |
| | | * ç³»ç»ç¼å· |
| | | */ |
| | | @ExcelProperty(index = 1,value = "ç³»ç»ç¼å·") |
| | | @Schema(description = "ç³»ç»ç¼å· ") |
| | | private String systemNo; |
| | | |
| | | /** |
| | | * è§æ ¼ |
| | | */ |
| | | @ExcelProperty(index = 2,value = "è§æ ¼") |
| | | @Schema(description = "è§æ ¼") |
| | | private String spec; |
| | | |
| | | /** |
| | | * é¶ä»¶æ¹å· |
| | | */ |
| | | @ExcelProperty(index = 3,value = "é¶ä»¶æ¹å·") |
| | | @Schema(description = "é¶ä»¶æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | /** |
| | | * åºåæ°é1 |
| | | */ |
| | | @ExcelProperty(index = 4,value = "åºåæ°é1") |
| | | @Schema(description = "åºåæ°é1ï¼ç¨äºå¯¹æ¥mesåç计ç®ï¼") |
| | | private BigDecimal length; |
| | | |
| | | /** |
| | | * åºåæ°é2 |
| | | */ |
| | | @ExcelProperty(index = 5,value = "åºåæ°é2") |
| | | @Schema(description = "åºåæ°é2ï¼ifs对äºçåºåæ°éï¼") |
| | | private BigDecimal qtyStock; |
| | | |
| | | /** |
| | | * ç»ç¼é¢è² |
| | | */ |
| | | @ExcelProperty(index = 6,value = "ç»ç¼é¢è²") |
| | | @Schema(description = "ç»ç¼é¢è²") |
| | | private String insulationColor; |
| | | |
| | | /** |
| | | * 夿¤é¢è² |
| | | */ |
| | | @ExcelProperty(index = 7,value = "夿¤é¢è²") |
| | | @Schema(description = "夿¤é¢è²") |
| | | private String outerColor; |
| | | |
| | | /** |
| | | * å°åä¿¡æ¯ |
| | | */ |
| | | @ExcelProperty(index = 8,value = "å°åä¿¡æ¯") |
| | | @Schema(description = "å°åä¿¡æ¯") |
| | | private String letteringInfo; |
| | | |
| | | /** |
| | | * çå· |
| | | */ |
| | | @ExcelProperty(index = 9,value = "çå·") |
| | | @Schema(description = "çå·") |
| | | private String drumNo; |
| | | |
| | | /** |
| | | * åºä½ç¼å· |
| | | */ |
| | | @ExcelProperty(index = 10,value = "åºä½ç¼å·") |
| | | @Schema(description = "åºä½ç¼å·") |
| | | private String locationNo; |
| | | |
| | | /** |
| | | * åºä½æ¥æº |
| | | */ |
| | | @ExcelProperty(index = 11,value = "åºä½æ¥æº") |
| | | @Schema(description = "åºä½æ¥æº") |
| | | private String stockSource; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ExcelProperty(index = 12,value = "夿³¨") |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import lombok.Getter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | @Slf4j |
| | | public class OrderSplitExcelListener extends AnalysisEventListener<Map<Integer,Object>> { |
| | | |
| | | //è¡¨å¤´æ¨¡æ¿ |
| | | private static final String HEAD_TEMPLATE = "[é¶ä»¶ç¼å·, ç³»ç»ç¼å·, è§æ ¼, é¶ä»¶æ¹å·, åºåæ°é1, åºåæ°é2, ç»ç¼é¢è², 夿¤é¢è², å°åä¿¡æ¯, çå·, åºä½ç¼å·, åºä½æ¥æº, 夿³¨]"; |
| | | |
| | | AtomicInteger index = new AtomicInteger(0);//符åè¡¨æ ¼æ¨¡æ¿çè¡æ° |
| | | |
| | | @Getter |
| | | List<OrderSplitExcelData> dataList = new ArrayList<>();//导å
¥çæ°æ®å表 |
| | | |
| | | IfsInventoryQuantity ifsInventoryQuantity;//å¯¹åºæ¥æ£ifsä¿¡æ¯ |
| | | |
| | | public String errorMsg = ""; |
| | | |
| | | public OrderSplitExcelListener(IfsInventoryQuantity ifsInventoryQuantity) { |
| | | this.ifsInventoryQuantity = ifsInventoryQuantity; |
| | | } |
| | | |
| | | AtomicReference<String> prePartLotBatchNo = new AtomicReference<>("");//ä¸ä¸æ¡æ°æ®çé¶ä»¶æ¹å· |
| | | |
| | | AtomicReference<BigDecimal> storeQty2Sum = new AtomicReference<>(BigDecimal.ZERO);//导å
¥æ°æ®åºåæ°é2çæ»å |
| | | |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | String temp = headMap.values().toString(); |
| | | if(StringUtils.equals(HEAD_TEMPLATE,temp)){ |
| | | index.getAndIncrement(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer,Object> mapData, AnalysisContext analysisContext) { |
| | | Integer currentRowNum = analysisContext.getCurrentRowNum(); |
| | | OrderSplitExcelData data = transformExcelData(mapData, currentRowNum); |
| | | if(Objects.nonNull(data)){ |
| | | dataList.add(data); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | if(index.get()==0){ |
| | | throw new RuntimeException("æä»¶å
å®¹æ ¼å¼ä¸æ¨¡æ¿ä¸ç¬¦"); |
| | | } |
| | | if(storeQty2Sum.get().compareTo(ifsInventoryQuantity.getPurQtyInStore())>0){ |
| | | throw new RuntimeException("åºåæ°é2ä¸è½å¤§äºæ¥æ£é¶ä»¶çæµè¾¾éè´æ°é"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ ¡éªæ°æ® |
| | | * @param mapData |
| | | * @param rowNumber |
| | | */ |
| | | private void validateRowData(Map<Integer,Object> mapData,Integer rowNumber){ |
| | | String rowStr = "</br>第"+(rowNumber+1)+"è¡:"; |
| | | List<String> errorMsgList = new ArrayList<>(); |
| | | //é¶ä»¶ç¼å· |
| | | if(Objects.isNull(mapData.get(0))){ |
| | | errorMsgList.add("é¶ä»¶ç¼å·ä¸è½ä¸ºç©º"); |
| | | }else if(!StringUtils.equals(mapData.get(0).toString(),ifsInventoryQuantity.getPartNo())){ |
| | | errorMsgList.add("é¶ä»¶ç¼å·ä¸æ¥æ£é¶ä»¶ä¸ä¸è´"); |
| | | } |
| | | //é¶ä»¶æ¹å· |
| | | if(Objects.isNull(mapData.get(3))){ |
| | | errorMsgList.add("é¶ä»¶æ¹å·ä¸è½ä¸ºç©º"); |
| | | }else if(StringUtils.equals(mapData.get(3).toString(),ifsInventoryQuantity.getLotBatchNo())){ |
| | | errorMsgList.add("é¶ä»¶æ¹å·ä¸æ¥æ£é¶ä»¶æ¹å·ç¸å"); |
| | | }else if(StringUtils.equals(prePartLotBatchNo.get(),mapData.get(3).toString())){ |
| | | errorMsgList.add("é¶ä»¶æ¹å·åå¨éå¤"); |
| | | } |
| | | prePartLotBatchNo.getAndSet(mapData.get(3).toString()); |
| | | //åºåæ°é2 |
| | | if(Objects.isNull(mapData.get(5))){ |
| | | errorMsgList.add("åºåæ°é2ä¸è½ä¸ºç©º"); |
| | | }else{ |
| | | BigDecimal storeQty2 = BigDecimal.ZERO; |
| | | try{ |
| | | storeQty2 = new BigDecimal(mapData.get(5).toString()); |
| | | }catch (Exception e){ |
| | | errorMsgList.add("åºåæ°é2æ ¼å¼å¼å¸¸"); |
| | | } |
| | | if(storeQty2.compareTo(ifsInventoryQuantity.getPurQtyInStore())>0){ |
| | | errorMsgList.add("åºåæ°é2ä¸è½å¤§äºæ¥æ£é¶ä»¶çæµè¾¾éè´æ°é"); |
| | | } |
| | | BigDecimal oldSum = storeQty2Sum.get(); |
| | | storeQty2Sum.getAndSet(oldSum.add(storeQty2)); |
| | | } |
| | | //åºä½ç¼å· |
| | | if(Objects.isNull(mapData.get(10))){ |
| | | errorMsgList.add("åºä½ç¼å·ä¸è½ä¸ºç©º"); |
| | | }else if(!StringUtils.equals(mapData.get(10).toString(),ifsInventoryQuantity.getLocationNo())){ |
| | | errorMsgList.add("åºä½ç¼å·ä¸æ¥æ£é¶ä»¶çåºä½ç¼å·ä¸ä¸è´"); |
| | | } |
| | | if(!errorMsgList.isEmpty()){ |
| | | String errorStr = String.join(";",errorMsgList); |
| | | errorMsg+= rowStr + errorStr ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 转æ¢excel导å
¥è¡æ°æ® |
| | | * @param mapData |
| | | * @return |
| | | */ |
| | | private OrderSplitExcelData transformExcelData(Map<Integer,Object> mapData,Integer rowNumber){ |
| | | validateRowData(mapData,rowNumber); |
| | | if(StringUtils.isBlank(errorMsg)){ |
| | | OrderSplitExcelData data = new OrderSplitExcelData(); |
| | | data.setPartNo(mapData.get(0).toString()); |
| | | data.setSystemNo(Objects.isNull(mapData.get(1))?"":mapData.get(1).toString()); |
| | | data.setSpec(Objects.isNull(mapData.get(2))?"":mapData.get(2).toString()); |
| | | data.setLotBatchNo(Objects.isNull(mapData.get(3))?"":mapData.get(3).toString()); |
| | | data.setLength(new BigDecimal(mapData.get(4).toString())); |
| | | data.setQtyStock(new BigDecimal(mapData.get(5).toString())); |
| | | data.setInsulationColor(Objects.isNull(mapData.get(6))?"":mapData.get(6).toString()); |
| | | data.setOuterColor(Objects.isNull(mapData.get(7))?"":mapData.get(7).toString()); |
| | | data.setLetteringInfo(Objects.isNull(mapData.get(8))?"":mapData.get(8).toString()); |
| | | data.setDrumNo(Objects.isNull(mapData.get(9))?"":mapData.get(9).toString()); |
| | | data.setLocationNo(Objects.isNull(mapData.get(10))?"":mapData.get(10).toString()); |
| | | data.setStockSource(Objects.isNull(mapData.get(11))?"":mapData.get(11).toString()); |
| | | data.setRemark(Objects.isNull(mapData.get(12))?"":mapData.get(12).toString()); |
| | | return data; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.inspect.dto.DataAnalysisDto; |
| | | import com.ruoyi.inspect.vo.RawMaterialSupplierVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ°æ®åæ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/10/16 |
| | | */ |
| | | @Mapper |
| | | public interface DataAnalysisMapper { |
| | | |
| | | /** |
| | | * è·åæ¬å¨çåææä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawPassRateByBarChartByWeek(@Param("dto") DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * è·åæ¬æçåææä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawPassRateByBarChartByDay(@Param("dto") DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * è·åæ¬å¹´çåææä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawPassRateByBarChartByYear(@Param("dto") DataAnalysisDto dataAnalysisDtor); |
| | | |
| | | /** |
| | | * æ¥ç忿饼ç¶å¾ |
| | | * @return |
| | | */ |
| | | Map<String, Object> getRawPassRateByCake(@Param("dto") DataAnalysisDto dataAnalysisDto); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£æµé¡¹éå |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getRawProductAnalysisAllSample(@Param("dto") DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getRawProductAnalysisList(@Param("dto") DataAnalysisDto dataAnalysisDto); |
| | | |
| | | |
| | | List<RawMaterialSupplierVo> getItemValueByOrderIds(@Param("insOrderIds") List<Integer> insOrderIds, @Param("itemName") String itemName); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¬æä¸ä¸æåæ ¼çå¯¹æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawUpMonth(); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹ç±»åé¥¼å¾ |
| | | * @return |
| | | */ |
| | | Map<String, Object> getOrderTypeCookie(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_part_props_record(ifs订åé¶ä»¶å±æ§è®°å½è¡¨)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-10-23 15:00:34 |
| | | * @Entity com.ruoyi.inspect.pojo.IfsPartPropsRecord |
| | | */ |
| | | @Mapper |
| | | public interface IfsPartPropsRecordMapper extends BaseMapper<IfsPartPropsRecord> { |
| | | |
| | | Long selectCountByPartNoAndLotBatchNo(@Param("partNo") String partNo, @Param("lotBatchNo") String lotBatchNo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_split_order_record(ifsåææè®¢åæåè®°å½è¡¨)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-10-29 16:39:41 |
| | | * @Entity com.ruoyi.inspect.pojo.IfsSplitOrderRecord |
| | | */ |
| | | @Mapper |
| | | public interface IfsSplitOrderRecordMapper extends BaseMapper<IfsSplitOrderRecord> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.InsOrderDeviceRecordDto; |
| | | import com.ruoyi.inspect.pojo.InsOrderDeviceRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨(DeviceRecord)$desc |
| | | * |
| | | * @author makejava |
| | | * @since 2024-12-21 11:11:01 |
| | | */ |
| | | public interface InsOrderDeviceRecordMapper extends BaseMapper<InsOrderDeviceRecord> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä½¿ç¨è®°å½ |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | List<InsOrderDeviceRecordDto> selectDeviceNumber(@Param("insOrderId") Integer insOrderId); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¼å·æ¥è¯¢è®¾å¤id |
| | | * @param deviceNumbers |
| | | * @return |
| | | */ |
| | | List<Integer> selectDeviceIdsByNumbers(@Param("deviceNumbers") Set<String> deviceNumbers); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerifyItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯æ£éªé¡¹ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderFactoryVerifyItemMapper extends BaseMapper<InsOrderFactoryVerifyItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerify; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderFactoryVerifyMapper extends BaseMapper<InsOrderFactoryVerify> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | public interface InsOrderFileMapper extends BaseMapper<InsOrderFile> { |
| | | |
| | | IPage<InsOrderFile> getFileList(@Param("page") Page page, @Param("ew") QueryWrapper<InsOrderFile> ew, @Param("insOrderId") Integer insOrderId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.InventoryDetailDTO; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.dto.SampleProductDto2; |
| | | import com.ruoyi.inspect.dto.SampleProductExportDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.vo.IfsOrderVO; |
| | | import com.ruoyi.inspect.vo.InsOrderPrintingVo; |
| | | import com.ruoyi.inspect.vo.SampleDefectsFatherVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-12 16:17:55 |
| | | * @Entity com.yuanchu.mom.pojo.InsOrder |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderMapper extends BaseMapper<InsOrder> { |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | IPage<SampleOrderDto> selectInsOrderPage(@Param("page") IPage<InsOrder> page, @Param("ew") QueryWrapper<SampleOrderDto> ew, @Param("laboratory") String laboratory, @Param("isOrderAll") String isOrderAll, @Param("receiptSubmitted") String receiptSubmitted); |
| | | |
| | | |
| | | String getLaboratoryCode(@Param("name") String name); |
| | | |
| | | IPage<SampleProductDto2> selectSampleAndProductByOrderId(@Param("page") IPage<SampleProductDto2> page, @Param("ew") QueryWrapper<SampleProductDto2> ew, @Param("id") Integer id); |
| | | |
| | | List<Map<String, String>> selectDeviceListByIds(@Param("deviceIds") Set<Integer> deviceIds); |
| | | |
| | | List<SampleDefectsFatherVo> selectSampleDefects(Page page, @Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber); |
| | | |
| | | String getStandardMethodCode(@Param("id") Integer id); |
| | | |
| | | String getStandardMethodReportText(@Param("id") Integer id); |
| | | |
| | | String getStandardMethodReportTextByCode(@Param("code") String code); |
| | | |
| | | int updateStatus(@Param("id") Integer id); |
| | | |
| | | String selLaboratoryCode(@Param("laboratory") String laboratory); |
| | | |
| | | List<Map<Integer, Object>> selectReportModelByOrderId(@Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | String seldepLimsId(@Param("depLimsId") Integer depLimsId); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªç»æ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<SampleProductExportDto> selectSampleBySampleId(@Param("ids") List<Integer> ids); |
| | | |
| | | /** |
| | | * è·åæ¹éæ£éªçæ»æ° |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int selectSampleMax(@Param("id") Integer id); |
| | | |
| | | /** |
| | | * è·å线è¯é¢è² |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<String> selectSampleCableTag(@Param("id") Integer id); |
| | | |
| | | /** |
| | | * |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | int selectSampleItemS(@Param("orderId") Integer orderId); |
| | | |
| | | /** |
| | | * åªæ¥è¯¢é»è®¤ç¬¬ä¸ä¸ªç产å |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<SampleProductExportDto> selectSampleBySampleIdOne(@Param("id") Integer id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥åå¾ |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> selectCalendarWorkByWeek(@Param("day") Integer day); |
| | | |
| | | /** |
| | | * |
| | | * @param partNo |
| | | * @return |
| | | */ |
| | | StructureTestObject selectProductByPartNo(@Param("partNo") String partNo); |
| | | |
| | | /** |
| | | * |
| | | * @param partNo |
| | | * @return |
| | | */ |
| | | StructureTestObject selectByPartNo(@Param("partNo") String partNo); |
| | | |
| | | /** |
| | | * æåæ ç¾æå° |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<InsOrderPrintingVo> labelOrderPrinting(@Param("ids") List<Integer> ids); |
| | | |
| | | /** |
| | | * å¤è´äº§åæ ç¾æå° |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<InventoryDetailDTO> labelOutsideOrderPrinting(@Param("ids") List<Integer> ids); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¼åºä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | List<SampleOrderDto> rawAllInsOrderExport(@Param("ew") QueryWrapper<SampleOrderDto> ew, @Param("laboratory") String laboratory, @Param("isOrderAll") String isOrderAll); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åæ¥è¯¢è¯éªå®¤ |
| | | * |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | String selectLaboratoryByOrderId(@Param("insOrderId") Integer insOrderId); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åä¿¡æ¯ |
| | | * |
| | | * @param insSampleId |
| | | * @return |
| | | */ |
| | | InsOrder selectFirstSubmit(@Param("insSampleId") Integer insSampleId); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢è®¢å导åºä¿¡æ¯ |
| | | * |
| | | * @param orderIds |
| | | * @return |
| | | */ |
| | | List<SampleOrderDto> getInsOrderExportByIds(@Param("orderIds") List<String> orderIds); |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åæ¶é´æ¯å¦æè¯¥æ£æµé¡¹çæ½æ ·è®¡å订å |
| | | * |
| | | * @param itmeId æ ·åId |
| | | * @param startTime å¼å§æ¶é´ |
| | | * @param endTime ç»ææ¶é´ |
| | | * @return |
| | | */ |
| | | Integer selectNotSpotCheckOrder(@Param("itmeId") Integer itmeId, @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | |
| | | IfsOrderVO selectOrderInfoById(@Param("id") Integer id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.dto.TemplateRateDto; |
| | | import com.ruoyi.inspect.pojo.InsOrderRates; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 订åè´¹ç¨è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | public interface InsOrderRatesMapper extends BaseMapper<InsOrderRates> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åè´¹ç¨å表 |
| | | * @return |
| | | */ |
| | | IPage<SampleOrderDto> selectInsOrderRates(Page page, @Param("ew") QueryWrapper<SampleOrderDto> ew); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åè´¹ç¨è¯¦æ
ï¼æ¨¡æ¿ä»·æ ¼ï¼ |
| | | * @return |
| | | */ |
| | | IPage<TemplateRateDto> selectTemplateRatesDetail(Page page, @Param("insOrderId") Integer insOrderId); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderStandardTemplate; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è®¢åæ åæ¨¡æ¿å¤å¶ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-05 |
| | | */ |
| | | @Mapper |
| | | public interface InsOrderStandardTemplateMapper extends BaseMapper<InsOrderStandardTemplate> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | |
| | | /** |
| | | * @author admin |
| | | * @description é对表ãins_order_stateãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-01 11:44:50 |
| | | * @Entity com.yuanchu.mom.pojo.InsOrderState |
| | | */ |
| | | public interface InsOrderStateMapper extends BaseMapper<InsOrderState> { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplateDevice; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface InsOrderTemplateDeviceMapper extends BaseMapper<InsOrderTemplateDevice> { |
| | | |
| | | List<Integer> selectExistingDeviceIds(@Param("deviceIds") List<Integer> deviceIds); |
| | | |
| | | List<Integer> selectDeviceIdsByOrderId(@Param("orderId") Integer orderId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-18 14:14:54 |
| | | * @Entity com.yuanchu.mom.pojo.InsOrderTemplate |
| | | */ |
| | | public interface InsOrderTemplateMapper extends BaseMapper<InsOrderTemplate> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:58 |
| | | */ |
| | | public interface InsProductDeviationWarningDetailMapper extends BaseMapper<InsProductDeviationWarningDetail> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsProductDeviationWarningDto; |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarning; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:02 |
| | | */ |
| | | public interface InsProductDeviationWarningMapper extends BaseMapper<InsProductDeviationWarning> { |
| | | |
| | | /** |
| | | * æ¥çé¢è¦å表 |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<InsProductDeviationWarningDto> selectDeviationWarningPage(@Param("page") Page page, @Param("ew") QueryWrapper<InsProductDeviationWarningDto> ew); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsProductAnalysisDto; |
| | | import com.ruoyi.inspect.dto.ProductResultDto2; |
| | | import com.ruoyi.inspect.dto.SampleProductRawAnalysisDto; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product(æ£éªé¡¹ç®)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-08 09:45:03 |
| | | * @Entity com.yuanchu.mom.pojo.InsProduct |
| | | */ |
| | | @Mapper |
| | | public interface InsProductMapper extends BaseMapper<InsProduct> { |
| | | |
| | | int selectOrderManDay(@Param("orderId") Integer orderId); |
| | | |
| | | Map<String, String> selectUserById(@Param("userId") Integer userId); |
| | | |
| | | List<ProductResultDto2> getProductAndResult(@Param("sampleId") Integer sampleId); |
| | | |
| | | int updateInspected(@Param("id") Integer id); |
| | | |
| | | List<InsProduct> selectFiberInsProduct(@Param("ids") List<Integer> ids, @Param("laboratory") String laboratory); |
| | | |
| | | IPage<InsProduct> selectNoProducts(@Param("page") Page page, @Param("orderId") Integer orderId, @Param("noIds") List<Integer> noIds); |
| | | |
| | | int selectInsProductCountByOrderId(@Param("orderId") Integer orderId); |
| | | |
| | | /** |
| | | * æ ¹æ®æ ·åidæ¥è¯¢æ£éªé¡¹ç® |
| | | * @param sampleIds |
| | | * @return |
| | | */ |
| | | List<SampleProductRawAnalysisDto> selectListBySampleIds(@Param("sampleIds") List<Integer> sampleIds); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçæ£éªé¡¹ |
| | | * @param sampleIds |
| | | * @return |
| | | */ |
| | | List<String> selectItemNameBySampleIds(@Param("sampleIds") List<Integer> sampleIds); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢ä¸åæ ¼é¡¹ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | List<String> selectUnqualifiedList(@Param("orderId") Integer orderId); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¤ææ¯å¦æä¸å¤å®é¡¹ç®,åå
¨é½æ¯å¤å®é¡¹ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | int selectNoJudge(@Param("orderId") Integer orderId); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åæ¥è¯¢äº§åä¿¡æ¯ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | List<InsProduct> selectProductByOrderId(Integer orderId); |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸åå·, åä¸åå®¶, å䏿£æµé¡¹çæ£æµæ°æ® |
| | | * @param insProduct |
| | | * @param supplierName |
| | | * @return |
| | | */ |
| | | List<InsProductDeviationWarningDetail> selectAnalysis(@Param("insProduct") InsProduct insProduct, @Param("supplierName") String supplierName); |
| | | |
| | | List<InsProduct> getRevocationInsProductList(@Param("ids") List<Integer> ids); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product_result(æ£éªé¡¹ç®çç»æ)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-28 10:29:37 |
| | | * @Entity com.yuanchu.mom.pojo.InsProductResult |
| | | */ |
| | | public interface InsProductResultMapper extends BaseMapper<InsProductResult> { |
| | | |
| | | List<InsProductResult> selDetail(@Param("ips") List<Integer> ips); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢æ£éªç»æ |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | List<InsProductResult> selectResultByOrderId(@Param("orderId") Integer orderId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsProductUser; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãins_product_user(æ£éªé¡¹ç®çäººåæ£éªè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-17 13:42:44 |
| | | * @Entity com.yuanchu.mom.pojo.InsProductUser |
| | | */ |
| | | public interface InsProductUserMapper extends BaseMapper<InsProductUser> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.inspect.dto.InsReportExport; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-17 22:10:02 |
| | | * @Entity com.yuanchu.mom.pojo.InsReport |
| | | */ |
| | | public interface InsReportMapper extends BaseMapper<InsReport> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªä»»å¡ |
| | | * @param userId å½åç»å½äººid |
| | | * @param queryStatus ç¶æ |
| | | * @param createOrderUser æ¯å¦æ¯åªææ¥çèªå·±çæé |
| | | * @return |
| | | */ |
| | | IPage<ReportPageDto> pageInsReport(IPage<ReportPageDto> page, |
| | | @Param("ew") QueryWrapper<ReportPageDto> ew, |
| | | @Param("laboratory") String laboratory, |
| | | @Param("userId") Integer userId, |
| | | @Param("queryStatus") String queryStatus, |
| | | @Param("createOrderUser") Integer createOrderUser); |
| | | |
| | | String getLaboratoryByName(@Param("name") String name, @Param("type") String type); |
| | | |
| | | /** ææ¥åç¼å¶å表ç¸åçæ°æ®èå´æ¥è¯¢å¯ä¸è½½çæ¥åã */ |
| | | InsReport selectDownloadableReport(@Param("id") Integer id, |
| | | @Param("createOrderUser") Integer createOrderUser); |
| | | |
| | | /** |
| | | * æ¥åæ¥è¡¨å¯¼åº |
| | | * @return |
| | | */ |
| | | List<InsReportExport> reportAllExport(@Param("ew") QueryWrapper<ReportPageDto> ew, |
| | | @Param("userId") Integer userId, |
| | | @Param("queryStatus") String queryStatus, |
| | | @Param("createOrderUser") Integer createOrderUser); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanDTO; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanVO; |
| | | import com.ruoyi.inspect.vo.SampleVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample(æ£éªæ ·å)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-14 17:14:57 |
| | | * @Entity com.yuanchu.mom.pojo.InsSample |
| | | */ |
| | | public interface InsSampleMapper extends BaseMapper<InsSample> { |
| | | |
| | | IPage<InsOrderPlanVO> findInsSampleAndOrder(Page page, |
| | | @Param("ew") QueryWrapper<InsOrderPlanDTO> ew, |
| | | @Param("userName") String userName , |
| | | @Param("userId") Integer userId, |
| | | @Param("sonLaboratory") String sonLaboratory, |
| | | @Param("laboratory") String laboratory, |
| | | @Param("isCheck") Integer isCheck); |
| | | |
| | | 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(@Param("id") Integer id); |
| | | |
| | | List<SampleProductDto> selectSampleProductListByOrderId2(@Param("id") Integer id); |
| | | |
| | | Map<String,Object> selectInsOrder(@Param("id") Integer id); |
| | | |
| | | List<SampleProductDto> getInsOrderAndSample(@Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | String getSampleEn(@Param("sample") String sample); |
| | | |
| | | /** |
| | | * å¯è½æ²¡æäº§åç´æ¥å°±æ¯å¯¹è±¡ |
| | | * @param sample |
| | | * @return |
| | | */ |
| | | String getSampleEnByObject(@Param("sample") String sample); |
| | | |
| | | /** |
| | | * æ ·å |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<InsProduct> getInsProduct1(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("cableTag") String cableTag, @Param("repetitionTag") String repetitionTag); |
| | | |
| | | |
| | | /** |
| | | * åææ |
| | | * @param id |
| | | * @param laboratory |
| | | * @param rawMaterialTag |
| | | * @return |
| | | */ |
| | | List<InsProduct> getInsProduct6(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("rawMaterialTag") String rawMaterialTag); |
| | | |
| | | SampleVo getDetailById(@Param("sampleId") Integer sampleId); |
| | | |
| | | String selMethodById(@Param("sampleId") Integer sampleId); |
| | | |
| | | /** |
| | | * çµç¼é
ç½®æ¥çé
ç½®æ è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getCableTag(@Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | /** |
| | | * åæææ¥çé
ç½®æ è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawMaterialTag(@Param("id") Integer id, @Param("laboratory") String laboratory); |
| | | |
| | | /** |
| | | * æ¥çé夿 è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRepetitionTag(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("cableTag") String cableTag); |
| | | |
| | | |
| | | List<SampleProductDto> selectExemptionByOrderId(@Param("id") Integer id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åå®¶å¯åº¦(æåå·) |
| | | * @param sample |
| | | * @param production |
| | | * @return |
| | | */ |
| | | String selectSupplierDensityModel(@Param("sample") String sample, @Param("production") String production, @Param("model") String model); |
| | | |
| | | /** |
| | | * æ¥è¯¢åå®¶å¯åº¦(没åå·) |
| | | * @param sample |
| | | * @param production |
| | | * @return |
| | | */ |
| | | String selectSupplierDensity(@Param("sample") String sample, @Param("production") String production); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹æ£éªç»æ |
| | | * @param itemIds |
| | | * @return |
| | | */ |
| | | List<InsProduct> selectProductResult(@Param("itemIds") List<Integer> itemIds); |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢æ ·å |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | List<InsSample> getSampleByOrderId(Integer insOrderId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.SampleReceiptPageDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptQueryDto; |
| | | import com.ruoyi.inspect.pojo.InsSampleReceipt; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface InsSampleReceiptMapper extends BaseMapper<InsSampleReceipt> { |
| | | |
| | | IPage<SampleReceiptPageDto> selectPage(Page<?> page, @Param("query") SampleReceiptQueryDto query); |
| | | |
| | | SampleReceiptPageDto selectDetail(@Param("id") Integer id); |
| | | |
| | | InsSampleReceipt selectForUpdate(@Param("id") Integer id); |
| | | |
| | | int insertIgnore(@Param("orderId") Integer orderId, @Param("sampleId") Integer sampleId); |
| | | |
| | | List<SampleReceiptPageDto> selectExportList(@Param("query") SampleReceiptQueryDto query); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsSampleUser; |
| | | import com.ruoyi.inspect.vo.InsSampleUserVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample_user(æ ·åè´è´£äººè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-14 17:12:02 |
| | | * @Entity com.yuanchu.mom.pojo.InsSampleUser |
| | | */ |
| | | public interface InsSampleUserMapper extends BaseMapper<InsSampleUser> { |
| | | |
| | | InsSampleUserVO selectUserNameByOrderId(@Param("orderId") Integer orderId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_unqualified_handler_file(ä¸åæ ¼å¤çéä»¶è®°å½è¡¨)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-07-31 13:38:38 |
| | | * @Entity com.yuanchu.mom.pojo.InsUnqualifiedHandlerFile |
| | | */ |
| | | @Mapper |
| | | public interface InsUnqualifiedHandlerFileMapper extends BaseMapper<InsUnqualifiedHandlerFile> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.inspect.dto.UnqualifiedHandlerDto; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandler; |
| | | import com.ruoyi.inspect.vo.UnqualifiedHandlerVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_unqualified_handler(ä¸åæ ¼å¤ç表)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-07-31 13:38:14 |
| | | * @Entity com.yuanchu.mom.pojo.InsUnqualifiedHandler |
| | | */ |
| | | @Mapper |
| | | public interface InsUnqualifiedHandlerMapper extends BaseMapper<InsUnqualifiedHandler> { |
| | | |
| | | IPage<UnqualifiedHandlerVO> selectPageList(IPage<UnqualifiedHandlerVO> page, @Param("ew")QueryWrapper<UnqualifiedHandlerDto> ew); |
| | | |
| | | UnqualifiedHandlerVO findById(@Param("id") Long id); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸åæ ¼æ£éªé¡¹ç®å¤æµ |
| | | * @author é· |
| | | * @since 2024-09-03 |
| | | */ |
| | | @Mapper |
| | | public interface InsUnqualifiedRetestProductMapper extends BaseMapper<InsUnqualifiedRetestProduct> { |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸åæ ¼å
容 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<InsUnqualifiedRetestProduct> selectRetestProduct(@Param("ids") List<Integer> ids); |
| | | |
| | | // æ ·å |
| | | List<InsProduct> getInsProductUnqualifiedRetest1(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("cableTag") String cableTag, @Param("repetitionTag") String repetitionTag, @Param("retestTag") String retestTag); |
| | | |
| | | |
| | | // åææä¸å |
| | | List<InsProduct> getInsProductUnqualifiedRetest6(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("rawMaterialTag") String rawMaterialTag , @Param("retestTag") String retestTag); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedRetestResult; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å¤æµæ£éªé¡¹ç®çç»æ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-03 |
| | | */ |
| | | @Mapper |
| | | public interface InsUnqualifiedRetestResultMapper extends BaseMapper<InsUnqualifiedRetestResult> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * åææä¸åæ¨¡æ¿ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-05 |
| | | */ |
| | | @Mapper |
| | | public interface RawMaterialOrderTemplateMapper extends BaseMapper<RawMaterialOrderTemplate> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarterItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface SpotCheckQuarterItemMapper extends BaseMapper<SpotCheckQuarterItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.SpotCheckQuarterDto; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarter; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-09 |
| | | */ |
| | | @Mapper |
| | | public interface SpotCheckQuarterMapper extends BaseMapper<SpotCheckQuarter> { |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·å页æ¥è¯¢ |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<SpotCheckQuarterDto> getQuarterPage(Page page, @Param("ew") QueryWrapper<SpotCheckQuarterDto> ew); |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getQuarterOnOrder(); |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYearItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-10 |
| | | */ |
| | | @Mapper |
| | | public interface SpotCheckYearItemMapper extends BaseMapper<SpotCheckYearItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.SpotCheckYearDto; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYear; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-10 |
| | | */ |
| | | @Mapper |
| | | public interface SpotCheckYearMapper extends BaseMapper<SpotCheckYear> { |
| | | |
| | | /** |
| | | * æ¥è¯¢å¹´åº¦æ½æ ·å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<SpotCheckYearDto> getSpotCheckYearPage(Page page, @Param("ew") QueryWrapper<SpotCheckYearDto> ew); |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.WarehouseCellAndSampleDto; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_cell(è´§æ¶åå
æ ¼)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.yuanchu.mom.pojo.WarehouseCell |
| | | */ |
| | | public interface WarehouseCellMapper extends BaseMapper<WarehouseCell> { |
| | | |
| | | List<WarehouseCellAndSampleDto> getWarehouse(Integer shelfId); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.HistoryDto; |
| | | import com.ruoyi.inspect.pojo.WarehouseHistory; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_history(åºå
¥åºè®°å½)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.yuanchu.mom.pojo.WarehouseHistory |
| | | */ |
| | | public interface WarehouseHistoryMapper extends BaseMapper<WarehouseHistory> { |
| | | |
| | | String getUserNameById(Integer userId); |
| | | |
| | | List<HistoryDto> getHistoryListBySampleId(Integer sampleId); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.dto.WarehouseDto; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.yuanchu.mom.pojo.Warehouse |
| | | */ |
| | | public interface WarehouseMapper extends BaseMapper<Warehouse> { |
| | | |
| | | List<WarehouseDto> selectWarehouseList(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse_shelf(è´§æ¶)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-06 12:12:12 |
| | | * @Entity com.yuanchu.mom.pojo.WarehouseShelf |
| | | */ |
| | | public interface WarehouseShelfMapper extends BaseMapper<WarehouseShelf> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ifs订åé¶ä»¶å±æ§è®°å½è¡¨ |
| | | * @TableName ifs_part_props_record |
| | | */ |
| | | @TableName(value ="ifs_part_props_record") |
| | | @Data |
| | | public class IfsPartPropsRecord implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * ifs订åid |
| | | */ |
| | | private Long ifsInventoryId; |
| | | |
| | | /** |
| | | * è½½å
·ç¼å· |
| | | */ |
| | | private String drumNo; |
| | | |
| | | /** |
| | | * èµ·å§ç±³æ |
| | | */ |
| | | private BigDecimal startMeterMark; |
| | | |
| | | /** |
| | | * æªæ¢ç±³æ |
| | | */ |
| | | private BigDecimal endMeterMark; |
| | | |
| | | /** |
| | | * ç»ç¼é¢è² |
| | | */ |
| | | private String insulationColor; |
| | | |
| | | /** |
| | | * 夿¤é¢è² |
| | | */ |
| | | private String outerColor; |
| | | |
| | | /** |
| | | * å°åä¿¡æ¯ |
| | | */ |
| | | private String letteringInfo; |
| | | |
| | | /** |
| | | * ifsé¶ä»¶å±æ§æ´æ°æ è¯ |
| | | */ |
| | | private Boolean partPropsFlag; |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * ifsåææè®¢åæåè®°å½è¡¨ |
| | | * @TableName ifs_split_order_record |
| | | */ |
| | | @TableName(value ="ifs_split_order_record") |
| | | @Data |
| | | public class IfsSplitOrderRecord implements Serializable { |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final int DIGIT = 6;//ç³»ç»ç¼å·çæä½æ° |
| | | |
| | | public static final String PREFIX ="WG";//ç³»ç»ç¼å·çæåç¼ |
| | | |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @Schema(description = "主é®id") |
| | | @TableId |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®è®¢åå· |
| | | */ |
| | | @Schema(description = "éå®è®¢åå·") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * è¡å· |
| | | */ |
| | | @Schema(description = "è¡å·") |
| | | private String lineNo; |
| | | |
| | | /** |
| | | * ä¸è¾¾å· |
| | | */ |
| | | @Schema(description = "ä¸è¾¾å·") |
| | | private String releaseNo; |
| | | |
| | | /** |
| | | * æ¥æ¶å· |
| | | */ |
| | | @Schema(description = "æ¥æ¶å·") |
| | | private Integer receiptNo; |
| | | |
| | | /** |
| | | * é¶ä»¶å· |
| | | */ |
| | | @Schema(description = "é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | /** |
| | | * ç³»ç»ç¼å· |
| | | */ |
| | | @Schema(description = "ç³»ç»ç¼å·") |
| | | private String systemNo; |
| | | |
| | | /** |
| | | * è§æ ¼ |
| | | */ |
| | | @Schema(description = "è§æ ¼") |
| | | private String spec; |
| | | |
| | | /** |
| | | * é¶ä»¶æ¹å· |
| | | */ |
| | | @Schema(description = "é¶ä»¶æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | /** |
| | | * åºåæ°é1ï¼ç¨äºå¯¹æ¥mesåç计ç®ï¼ |
| | | */ |
| | | @Schema(description = "åºåæ°é1ï¼ç¨äºå¯¹æ¥mesåç计ç®ï¼") |
| | | private BigDecimal length; |
| | | |
| | | /** |
| | | * åºåæ°é2ï¼ifs对äºçåºåæ°éï¼ |
| | | */ |
| | | @Schema(description = "åºåæ°é2ï¼ifs对äºçåºåæ°éï¼") |
| | | private BigDecimal qtyStock; |
| | | |
| | | /** |
| | | * ç»ç¼é¢è² |
| | | */ |
| | | @Schema(description = "ç»ç¼é¢è²") |
| | | private String insulationColor; |
| | | |
| | | /** |
| | | * 夿¤é¢è² |
| | | */ |
| | | @Schema(description = "夿¤é¢è²") |
| | | private String outerColor; |
| | | |
| | | /** |
| | | * å°åä¿¡æ¯ |
| | | */ |
| | | @Schema(description = "å°åä¿¡æ¯") |
| | | private String letteringInfo; |
| | | |
| | | /** |
| | | * çå· |
| | | */ |
| | | @Schema(description = "çå·") |
| | | private String drumNo; |
| | | |
| | | /** |
| | | * åºä½å· |
| | | */ |
| | | @Schema(description = "åºä½å·") |
| | | private String locationNo; |
| | | |
| | | /** |
| | | * åºä½æ¥æº |
| | | */ |
| | | @Schema(description = "åºä½æ¥æº") |
| | | private String stockSource; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * åæ¥ç¶æï¼0ï¼æªåæ¥ï¼1ï¼å·²åæ¥ï¼ |
| | | */ |
| | | @Schema(description = "åæ¥ç¶æï¼0ï¼æªåæ¥ï¼1ï¼å·²åæ¥ï¼") |
| | | private Integer syncStatus; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªä¸å |
| | | * @TableName ins_order |
| | | */ |
| | | @Data |
| | | @TableName("ins_order") |
| | | @ExcelIgnoreUnannotated |
| | | public class InsOrder implements Serializable { |
| | | |
| | | |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ExcelProperty(index = 0, value = "å§æç¼å·") |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "å¤é¨å§æç¼å·") |
| | | private String outEntrustCode; |
| | | |
| | | @Schema(description = "æ£éªç±»å«") |
| | | private String orderType; |
| | | |
| | | @Schema(description = "ä¸å客æ·") |
| | | private String custom; |
| | | |
| | | @ExcelProperty(index = 1, value = "å§æåä½") |
| | | @Schema(description = "å§æåä½") |
| | | private String company; |
| | | |
| | | @Schema(description = "èç³»æ¹å¼") |
| | | private String phone; |
| | | |
| | | @Schema(description = "å·¥åå") |
| | | private String code; |
| | | |
| | | @Schema(description = "ç´§æ¥ç¨åº¦ ï¼0æ®é 1ä¼å
2ç´§æ¥ï¼") |
| | | private Integer type; |
| | | |
| | | @ExcelProperty(index = 9, value = "çº¦å®æ¶é´%") |
| | | @Schema(description = "çº¦å®æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate appointed; |
| | | |
| | | @Schema(description = "æ£éªç»æ, 0 ä¸åæ ¼, 1åæ ¼") |
| | | private Integer insResult; |
| | | |
| | | @Schema(description = "æ ·åå¤çæ¹å¼") |
| | | private Integer processing; |
| | | |
| | | @Schema(description = "æ¯å¦çæ ·") |
| | | private Integer isLeave; |
| | | |
| | | @Schema(description = "ç¶æ:-1:åæææ¤å 0:å¾
å®¡æ ¸ 1:æ ·åæ¥æ¶/æ£éªå¤ç 2:éå 3:æ¤é 4:å·²æ£éª 5:ä½åº") |
| | | private Integer state; |
| | | |
| | | @ExcelProperty(index = 7, value = "夿³¨") |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "夿³¨è±æ") |
| | | private String remarkEn; |
| | | |
| | | @Schema(description = "OTC订åå·") |
| | | private String otcCode; |
| | | |
| | | @Schema(description = "ä¸å人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¸åæ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "ä¸åæ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | |
| | | @Schema(description = "") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "ä¸å人id") |
| | | private Integer userId; |
| | | |
| | | @Schema(description = "æ¯å¦æé
奿 ·å") |
| | | private Integer mating; |
| | | |
| | | @Schema(description = "æ£éªç¶æ(0ï¼å¾
æ£éª 1:æ£éªä¸ 2:å·²æ£éª 3ï¼å¾
夿 ¸ 4ï¼å¤æ ¸æªéè¿ 5ï¼å¤æ ¸éè¿)") |
| | | private Integer insState; |
| | | |
| | | @Schema(description = "æ£éªå·¥å") |
| | | private String factory; |
| | | |
| | | @Schema(description = "å®éªå®¤åç§°") |
| | | private String laboratory; |
| | | |
| | | @Schema(description = "æ ·åç±»å") |
| | | private String sampleType; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @Schema(description = "æ£éªæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime insTime; |
| | | |
| | | @Schema(description = "éåçç±") |
| | | private String tell; |
| | | |
| | | @Schema(description = "æ¥ååéæ¹å¼ 1: èªå, 0:å
¶ä»") |
| | | private Integer send; |
| | | |
| | | @Schema(description = "æ¥æ ·æ¹å¼") |
| | | private String formType; |
| | | |
| | | @Schema(description = "å®¡æ ¸æ¶é´") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @Schema(description = "å·¥ç¨åç§°") |
| | | private String engineering; |
| | | |
| | | @Schema(description = "å·¥ç¨åç§°è±æ") |
| | | private String engineeringEn; |
| | | |
| | | @Schema(description = "ç产åä½") |
| | | private String production; |
| | | |
| | | @Schema(description = "ç产åä½è±æ") |
| | | private String productionEn; |
| | | |
| | | @Schema(description = "客æ·åä½id") |
| | | private Long companyId; |
| | | |
| | | @Schema(description = "å§æäººid") |
| | | private Integer prepareUserId; |
| | | |
| | | @ExcelProperty(index = 12, value = "å§æäºº") |
| | | @Schema(description = "å§æäºº") |
| | | private String prepareUser; |
| | | |
| | | @Schema(description = "å§æäººè±æ") |
| | | private String prepareUserEn; |
| | | |
| | | @Schema(description = "å§æäººå·¥å·") |
| | | private String prepareCode; |
| | | |
| | | @Schema(description = "æ¯å¦å®¡æ ¸æ¤é") |
| | | private Integer isRevocation; |
| | | |
| | | @Schema(description = "å®¡æ ¸æ¤éç项ç®id") |
| | | private String revocationInsProductIds; |
| | | |
| | | @Schema(description = "æ¯å¦ä¸ºåææ 1 æ¯ 0 å¦") |
| | | private Integer typeSource; |
| | | |
| | | @Schema(description = "åææid") |
| | | private Long ifsInventoryId; |
| | | |
| | | @Schema(description = "æ½æ¥æ°é") |
| | | private String testQuantity; |
| | | |
| | | @Schema(description = "é¶ä»¶æè¿°") |
| | | private String partDetail; |
| | | |
| | | @Schema(description = "æ¯å¦æ¯å
æ£, 0å¦ 1æ¯") |
| | | private Integer isExemption; |
| | | |
| | | @Schema(description = "温度") |
| | | private String temperature; |
| | | |
| | | @Schema(description = "湿度") |
| | | private String humidity; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "å½åå¡«åç¯å¢æ¡ä»¶ç模æ¿ID") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "æ ·åç¶æ") |
| | | private String sampleStatus; |
| | | |
| | | @Schema(description = "éæ ·æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate sampleDate; |
| | | |
| | | @Schema(description = "çäº§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate productionDate; |
| | | |
| | | @Schema(description = "ç产æ¹å·") |
| | | private String productionBatch; |
| | | |
| | | @Schema(description = "å£åº¦æ½æ ·é¡¹ç®id") |
| | | private Integer quarterItemId; |
| | | |
| | | @Schema(description = "æ ·ååç§°(æ¥åå±ç¤ºå段)") |
| | | private String sampleView; |
| | | |
| | | @Schema(description = "æ ·ååç§°å¼æ(æ¥åå±ç¤ºå段)") |
| | | private String sampleViewEn; |
| | | |
| | | @Schema(description = "æ¯å¦æ¯ç¬¬ä¸æ¬¡æäº¤0å¦1æ¯") |
| | | private Integer isFirstSubmit; |
| | | |
| | | @Schema(description = "ç¬¬ä¸æ¬¡æäº¤æ¶é´") |
| | | private LocalDateTime firstSubmitDate; |
| | | |
| | | @Schema(description = "馿¬¡ä¿åæ£éªæ¨¡æ¿å¼æ¶é´") |
| | | private LocalDateTime firstInspectDate; |
| | | |
| | | @Schema(description = "åå
å
容 0æ 1æ") |
| | | private Integer subcontractType; |
| | | |
| | | @Schema(description = "åå
åä½ä¿¡æ¯") |
| | | private String subcontractCompany; |
| | | |
| | | @Schema(description = "æ ·åå¤ç½® 1å§ææ¹åå 2æ£æµæ¹å¤ç½®") |
| | | private Integer sampleDisposal; |
| | | |
| | | @Schema(description = "å¯¹ç»æè¯ä»· 0å¦ 1æ¯") |
| | | private Integer resultEvaluation; |
| | | |
| | | @Schema(description = "æ¥åäº¤ä»æ¹å¼ 1èªå 2å¿«é 3çµåä¼ é") |
| | | private Integer reportDelivery; |
| | | |
| | | @Schema(description = "æ¥åå¯éå°å") |
| | | private String reportAddress; |
| | | |
| | | @Schema(description = "æ¶ä»¶äººåçµè¯") |
| | | private String reportReceiver; |
| | | |
| | | @Schema(description = "æ ·æºå(é¤äºå
¶ä»æåå¤è¿ä¸ªå段å¿
é,ç¨äºä¼ä¸å¾®ä¿¡æ¨é)") |
| | | @TableField(exist = false) |
| | | private Integer issueUser; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨(DeviceRecord)$desc |
| | | * |
| | | * @author makejava |
| | | * @since 2024-12-21 11:11:01 |
| | | */ |
| | | @Data |
| | | @TableName("device_record") |
| | | public class InsOrderDeviceRecord { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "温度") |
| | | private String temperature; |
| | | |
| | | @Schema(description = "湿度") |
| | | private String humidity; |
| | | |
| | | @Schema(description = "使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private Integer useBefore; |
| | | |
| | | @Schema(description = "使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private Integer useAfter; |
| | | |
| | | @Schema(description = "å¼å¸¸æ
åµ") |
| | | private String abnormal; |
| | | |
| | | @Schema(description = "使ç¨äººid") |
| | | private Integer usePersonId; |
| | | |
| | | @Schema(description = "使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "使ç¨å¼å§æ¥æ") |
| | | private LocalDateTime useStartDate; |
| | | |
| | | @Schema(description = "使ç¨ç»ææ¥æ") |
| | | private LocalDateTime useEndDate; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | @Data |
| | | @TableName("ins_order_factory_verify") |
| | | public class InsOrderFactoryVerify { |
| | | |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer factoryVerifyId; |
| | | |
| | | @Schema(description = "å¤é®: ins_order表 id") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "ææåå®¶") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "å°è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime declareDate; |
| | | |
| | | @Schema(description = "æ ·ååç§°") |
| | | private String sample; |
| | | |
| | | @Schema(description = "è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | @Schema(description = "æææ¹å·") |
| | | private String updateBatchNo; |
| | | |
| | | @Schema(description = "éªè¯æä»¶ç¼å·") |
| | | private String verifyFileCode; |
| | | |
| | | @Schema(description = "1ææåç§°") |
| | | private String basicName; |
| | | |
| | | @Schema(description = "2è§æ ¼åå·") |
| | | private String basicModel; |
| | | |
| | | @Schema(description = "3æææ¹å·") |
| | | private String basicBatchNo; |
| | | |
| | | @Schema(description = "4æ§è¡æ å") |
| | | private String basicStandard; |
| | | |
| | | @Schema(description = "5çäº§æ¥æ") |
| | | private String basicDate; |
| | | |
| | | @Schema(description = "6ä¾è´§æ°é") |
| | | private String basicNumber; |
| | | |
| | | @Schema(description = "7ææé¢è²") |
| | | private String basicColor; |
| | | |
| | | @Schema(description = "8å
¶ä»(åç§°)") |
| | | private String basicOtherValue; |
| | | |
| | | @Schema(description = "8å
¶ä»") |
| | | private String basicOther; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @Schema(description = "éªè¯é¡¹ç®éå") |
| | | private List<InsOrderFactoryVerifyItem> factoryVerifyItemList; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯æ£éªé¡¹ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | @Data |
| | | @TableName("ins_order_factory_verify_item") |
| | | public class InsOrderFactoryVerifyItem { |
| | | |
| | | |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer factoryVerifyItemId; |
| | | |
| | | @Schema(description = "å¤é®: è¿åéªè¯è¡¨ id") |
| | | private Integer factoryVerifyId; |
| | | |
| | | @Schema(description = "éªè¯é¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @Schema(description = "éªè¯ç»æ") |
| | | private String result; |
| | | |
| | | @Schema(description = "æåº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_order_file") |
| | | @Schema(description = "æ£éªåä¸çéä»¶å表") |
| | | public class InsOrderFile implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "å
³è æ£éªåå¤é®id") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "ç±»å") |
| | | private Integer type; |
| | | |
| | | @Schema(description = "éä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @Schema(description = "éä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¸ä¼ 人") |
| | | @TableField(exist = false, select = false) |
| | | private String name; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description = "ä¸ä¼ æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 订åè´¹ç¨è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | @Data |
| | | @TableName("ins_order_rates") |
| | | public class InsOrderRates { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @Schema(description = "æ£æµé¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @Schema(description = "çµç¼æ è¯") |
| | | private String cableTag; |
| | | |
| | | @Schema(description = "æ åä»·æ ¼") |
| | | private String rates; |
| | | |
| | | @Schema(description = "åç»") |
| | | private String manHourGroup; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è®¢åæ åæ¨¡æ¿å¤å¶ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-05 |
| | | */ |
| | | @Data |
| | | @TableName(value = "ins_order_standard_template") |
| | | public class InsOrderStandardTemplate { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "模æ¿id") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String name; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "模æ¿ç»æ") |
| | | private String thing; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description = "å建人") |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @Schema(description = "ä¿®æ¹äºº") |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @Schema(description = "å建æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "模æ¿ç¼å·") |
| | | private String number; |
| | | |
| | | @Schema(description = "模æ¿å±ç¤ºåçæé¡ºåº") |
| | | private Integer sort; |
| | | |
| | | @Schema(description = "åå§è®°å½å·²å¡«ååå
æ ¼ï¼æåæ ä¿å") |
| | | private String recordValues; |
| | | |
| | | @Schema(description = "è¯¥æ¨¡æ¿æ£éªæ¶ç温度") |
| | | private String temperature; |
| | | |
| | | @Schema(description = "è¯¥æ¨¡æ¿æ£éªæ¶ç湿度") |
| | | private String humidity; |
| | | |
| | | @Schema(description = "æ£æµæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate detectionTime; |
| | | |
| | | @Schema(description = "æ£æµå°ç¹") |
| | | private String detectionPlace; |
| | | |
| | | @Schema(description = "æ¨¡æ¿æ£éªç»è®ºï¼0ä¸åæ ¼ï¼1åæ ¼") |
| | | private Integer insResult; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ins_order_state |
| | | */ |
| | | @TableName(value ="ins_order_state") |
| | | @Data |
| | | public class InsOrderState implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_order表id |
| | | */ |
| | | @TableField(value = "ins_order_id") |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @TableField(value = "laboratory") |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ£éªç¶æ(0ï¼å¾
æ£éª1:æ£éªä¸ 2:å·²æ£éª3ï¼å¾
夿 ¸4ï¼å¤æ ¸æªéè¿ 5ï¼å¤æ ¸éè¿) |
| | | */ |
| | | @TableField(value = "ins_state") |
| | | private Integer insState; |
| | | |
| | | @Schema(description = "æ£éªæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime insTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "夿 ¸äºº") |
| | | private Integer verifyUser; |
| | | |
| | | @Schema(description = "夿 ¸çç±") |
| | | private String verifyTell; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ins_order_template |
| | | */ |
| | | @TableName(value ="ins_order_template") |
| | | @Data |
| | | public class InsOrderTemplate implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 模æ¿å
容 |
| | | */ |
| | | @Schema(description = "模æ¿å
容") |
| | | private String thing; |
| | | |
| | | @Schema(description = "ç»å®çæ ååºäºçº§æ åID") |
| | | private Integer standardTreeId; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | /** è®¢åæ¨¡æ¿ä¸æ£éªè®¾å¤å
³ç³»ã */ |
| | | @Data |
| | | @TableName("ins_order_template_device") |
| | | public class InsOrderTemplateDevice { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "订åID") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "模æ¿ID") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "设å¤ID") |
| | | private Integer deviceId; |
| | | |
| | | @Schema(description = "å±ç¤ºé¡ºåº") |
| | | private Integer sort; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç® |
| | | * |
| | | * @TableName ins_product |
| | | */ |
| | | @TableName(value = "ins_product") |
| | | @Data |
| | | public class InsProduct implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "项ç®åæ°id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @Schema(description = "æ£éªé¡¹è±æ") |
| | | private String inspectionItemEn; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @Schema(description = "æ£éªé¡¹åç±»è±æ") |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | @Schema(description = "å·¥å") |
| | | private String factory; |
| | | |
| | | @Schema(description = "å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @Schema(description = "æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @Schema(description = "æ ·å") |
| | | private String sample; |
| | | |
| | | @Schema(description = "åå·") |
| | | private String model; |
| | | |
| | | @Schema(description = "æ¹æ³") |
| | | private String methodS; |
| | | |
| | | @Schema(description = "åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @Schema(description = "计éåä½") |
| | | private String unit; |
| | | |
| | | @Schema(description = "åä»·(å
)") |
| | | private BigDecimal price; |
| | | |
| | | @Schema(description = "å·¥æ¶(H)") |
| | | private BigDecimal manHour; |
| | | |
| | | @Schema(description = "å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | @Schema(description = "æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | @Schema(description = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | @Schema(description = "设å¤ç»") |
| | | private String deviceGroup; |
| | | |
| | | @Schema(description = "æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | | @Schema(description = "åºé´") |
| | | private String section; |
| | | |
| | | @Schema(description = "åå¼ç±»å") |
| | | private String valueType; |
| | | |
| | | @Schema(description = "æ¹æ³") |
| | | private String method; |
| | | |
| | | @Schema(description = "é¢è®¡æ¶é´(h)") |
| | | private Integer manDay; |
| | | |
| | | @Schema(description = "ç¹æ®æ è¯") |
| | | private String bsm; |
| | | |
| | | @Schema(description = "è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @Schema(description = "è¦æ±æè¿°") |
| | | private String tell; |
| | | |
| | | @Schema(description = "æç»å¼") |
| | | @TableField("`last_value`") |
| | | private String lastValue; |
| | | |
| | | @Schema(description = "åæ ¼ç¶æ: 1ï¼åæ ¼ 0ï¼ä¸åæ ¼, 3ä¸å¤å®") |
| | | private Integer insResult; |
| | | |
| | | |
| | | @Schema(description = "1ï¼ææ 0ï¼æ æ") |
| | | private Integer state; |
| | | |
| | | @Schema(description = "å¤é®ï¼ins_sample表id") |
| | | private Integer insSampleId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "å¤é®ï¼standard_template表id") |
| | | private Integer templateId; |
| | | |
| | | @Schema(description = "åå§è®°å½æ¨¡æ¿ä¸çæ£éªé¡¹è¡å·") |
| | | private Integer templateRowIndex; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "模æ¿å
容") |
| | | private List<JSONObject> template; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "模æ¿å
容é¢è²") |
| | | private Map<String, Object> style; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "æ£éªç»æå¯¹è±¡") |
| | | private InsProductResult insProductResult; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String templateName; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "è®¢åæ¨¡æ¿é¡µç¾é¡ºåº") |
| | | private Integer templateSort; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "è®¢åæ¨¡æ¿å·²å¡«ååå
æ ¼ï¼æåæ ä¿å") |
| | | private String recordValues; |
| | | |
| | | @Schema(description = "åå
¸ç±»å") |
| | | private String dic; |
| | | |
| | | //温度 |
| | | private String temperature; |
| | | //湿度 |
| | | private String humidity; |
| | | |
| | | private Integer insFiberId; |
| | | |
| | | private Integer insFibersId; |
| | | |
| | | private Integer insBushId; |
| | | |
| | | @Schema(description = "æ åæ¹æ³id") |
| | | private Integer standardMethodListId; |
| | | |
| | | //è¿åç20度常温ç计ç®å¼(温度循ç¯) |
| | | @TableField(exist = false ,select = false) |
| | | private String complue; |
| | | |
| | | @Schema(description = "æ¡ä»¶") |
| | | private String radius; |
| | | |
| | | @Schema(description = "æ¶è´¹æ å(å
/次)") |
| | | private String rates; |
| | | |
| | | @Schema(description = "çµç¼é
ç½®æ è¯") |
| | | private String cableTag; |
| | | |
| | | @Schema(description = "åææé
ç½®æ è¯") |
| | | private String rawMaterialTag; |
| | | |
| | | @Schema(description = "é夿 è¯(ä¸ä¸ªæ£éªé¡¹å¯è½ä¼åå¨å¤æ¬¡)") |
| | | private String repetitionTag; |
| | | |
| | | @Schema(description = "æåº") |
| | | private Integer sort; |
| | | |
| | | // ç»å®å¼ä¸åå å±ç¤º, åªåå è®¡ç® |
| | | @Schema(description = "æ¯å¦æ¯ç»å®å¼, 0å¦, 1æ¯") |
| | | private Integer isBinding; |
| | | |
| | | @Schema(description = "èªå
³è(ç»å®id)") |
| | | private Integer bindingProductId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨ |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:02 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_product_deviation_warning") |
| | | @Schema(description = "æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨") |
| | | public class InsProductDeviationWarning implements Serializable { |
| | | |
| | | @TableId(value = "deviation_warning_id", type = IdType.AUTO) |
| | | private Integer deviationWarningId; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "订åç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "ä¾åºå") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "åå·®å¼") |
| | | private String deviationValue; |
| | | |
| | | @Schema(description = "æ£æµæ¶é´") |
| | | private LocalDateTime detectionTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:58 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("ins_product_deviation_warning_detail") |
| | | @Schema(description = "æ£éªé¡¹åå·®é¢è¦è¯¦æ
表") |
| | | public class InsProductDeviationWarningDetail implements Serializable { |
| | | |
| | | @TableId(value = "deviation_warning_detail_id", type = IdType.AUTO) |
| | | private Integer deviationWarningDetailId; |
| | | |
| | | @Schema(description = "主表id") |
| | | private Integer deviationWarningId; |
| | | |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @Schema(description = "æ ·åid") |
| | | private Integer insSampleId; |
| | | |
| | | @Schema(description = "æ£éªé¡¹id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "订åç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @Schema(description = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @Schema(description = "ä¾åºå") |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "æ£æµå¼") |
| | | private String testValue; |
| | | |
| | | @Schema(description = "æ£æµæ¶é´") |
| | | private LocalDateTime detectionTime; |
| | | |
| | | @Schema(description = "æ¯å¦æ¯é®é¢æ°æ® 0: å¦, 1: æ¯(å¹³åå¼è·å)") |
| | | private Integer isIssue; |
| | | |
| | | @Schema(description = "æ¯å¦æ¯é®é¢æ°æ® 0: å¦, 1: æ¯ï¼è¦æ±å¼è·åï¼") |
| | | private Integer isIssueAsked; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®çç»æ |
| | | * @TableName ins_product_result |
| | | */ |
| | | @TableName(value ="ins_product_result") |
| | | @Data |
| | | public class InsProductResult implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "å¤é®ï¼æ£éªé¡¹ç®id") |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "æ£éªå¼") |
| | | private String insValue; |
| | | |
| | | @Schema(description = "计ç®å¼") |
| | | private String comValue; |
| | | |
| | | @Schema(description = "设å¤å¼") |
| | | private String equipValue; |
| | | |
| | | @Schema(description = "设å¤åç§°") |
| | | private String equipName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®çäººåæ£éªè®°å½ |
| | | * @TableName ins_product_user |
| | | */ |
| | | @TableName(value ="ins_product_user") |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class InsProductUser implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_product表id |
| | | */ |
| | | private Integer insProductId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªæ¥å |
| | | * @TableName ins_report |
| | | */ |
| | | @TableName(value ="ins_report") |
| | | @Data |
| | | public class InsReport implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @Schema(description = "æ¥åç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ£éªåid |
| | | */ |
| | | @Schema(description = "æ£éªåid") |
| | | private Integer insOrderId; |
| | | |
| | | /** 0ï¼æ£æµæ¥åï¼ä»
æ£æµæ°æ®ï¼ï¼1ï¼æ£éªæ¥åï¼å«å¤å®ç»æï¼ */ |
| | | @Schema(description = "æ¥åç±»åï¼0ï¼æ£æµæ¥åï¼1ï¼æ£éªæ¥å") |
| | | private Integer reportType; |
| | | |
| | | /** |
| | | * ç³»ç»çææ¥åå°å |
| | | */ |
| | | @Schema(description = "ç³»ç»çææ¥åå°å") |
| | | private String url; |
| | | |
| | | /** |
| | | * ç³»ç»çæçæ£éªæ¥åå°åï¼ä¸ url 对åºçæ£æµæ¥åå
±ç¨å䏿¡å®¡æ¹è®°å½ã |
| | | */ |
| | | @Schema(description = "æ£éªæ¥åå°å") |
| | | private String inspectionUrl; |
| | | |
| | | /** |
| | | * æå¨ä¸ä¼ æ¥åå°å |
| | | */ |
| | | @Schema(description = "æå¨ä¸ä¼ æ¥åå°å") |
| | | private String urlS; |
| | | |
| | | /** |
| | | * ä¸´æ¶æ¥åå°å |
| | | */ |
| | | @Schema(description = "ä¸´æ¶æ¥åå°å") |
| | | private String tempUrlPdf; |
| | | |
| | | /** |
| | | * 1ï¼æ¹å 0ï¼ä¸æ¹å |
| | | */ |
| | | @Schema(description = "æ¹åç¶æ") |
| | | private Integer isRatify; |
| | | |
| | | @Schema(description = "æ¹å夿³¨") |
| | | private String ratifyTell; |
| | | |
| | | /** |
| | | * 1ï¼å®¡æ ¸éè¿ 0ï¼å®¡æ ¸ä¸éè¿ |
| | | */ |
| | | @Schema(description = "å®¡æ ¸ç¶æ") |
| | | private Integer isExamine; |
| | | |
| | | @Schema(description = "å®¡æ ¸å¤æ³¨") |
| | | private String examineTell; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æäº¤äººï¼ |
| | | */ |
| | | @Schema(description = "æäº¤äººç¨æ·id") |
| | | private Integer writeUserId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼æ¹åäººï¼ |
| | | */ |
| | | @Schema(description = "æ¹åäººç¨æ·id") |
| | | private Integer ratifyUserId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·idï¼å®¡æ ¸äººï¼ |
| | | */ |
| | | @Schema(description = "å®¡æ ¸äººç¨æ·id") |
| | | private Integer examineUserId; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 1ï¼å·²æäº¤ 0ï¼å¾
æäº¤ |
| | | */ |
| | | @Schema(description = "æäº¤ç¶æ") |
| | | private Integer state; |
| | | |
| | | @Schema(description = "æäº¤æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @Schema(description = "å®¡æ ¸æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime examineTime; |
| | | |
| | | @Schema(description = "æ¹åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | |
| | | @Schema(description = "æ¯å¦æ¯éè¿çæ¥å, 0:æªéè¿, 1:éè¿") |
| | | private Integer isPass; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªæ ·å |
| | | * @TableName ins_sample |
| | | */ |
| | | @TableName(value ="ins_sample") |
| | | @Data |
| | | public class InsSample implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 1ï¼åæ ¼ 0ï¼ä¸åæ ¼ |
| | | */ |
| | | private Integer insResult; |
| | | |
| | | /** |
| | | * å¤é®ï¼ins_order表id |
| | | */ |
| | | private Integer insOrderId; |
| | | |
| | | /** |
| | | * é
奿 ·ååå· |
| | | */ |
| | | private String joinModel; |
| | | |
| | | /** |
| | | * é
奿 ·ååç§° |
| | | */ |
| | | private String joinName; |
| | | |
| | | /** |
| | | * é
奿 ·åæ°é |
| | | */ |
| | | private Integer joinNum; |
| | | |
| | | /** |
| | | * æ ·åç¼ç |
| | | */ |
| | | private String sampleCode; |
| | | |
| | | /** |
| | | * æ£éªå·¥å |
| | | */ |
| | | private String factory; |
| | | |
| | | /** |
| | | * å®éªå®¤åç§° |
| | | */ |
| | | private String laboratory; |
| | | |
| | | /** |
| | | * æ ·åç±»å |
| | | */ |
| | | private String sampleType; |
| | | |
| | | /** |
| | | * æ ·ååç§° |
| | | */ |
| | | private String sample; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | private String model; |
| | | |
| | | /** |
| | | * æ£éªç¶æ(0ï¼å¾
æ£éª1:æ£éªä¸ 2:å·²æ£éª3ï¼å¾
夿 ¸4ï¼å¤æ ¸æªéè¿5ï¼å¤æ ¸éè¿) |
| | | */ |
| | | private Integer insState; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | private Integer standardMethodListId; |
| | | |
| | | @Schema(description = "æ ·ååä½") |
| | | private String unit; |
| | | |
| | | private Integer cellId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | private Integer parentId; |
| | | |
| | | @Schema(description = "æ°é") |
| | | private Integer quantity; |
| | | |
| | | @Schema(description = "ç¹æ®æ åæ¹æ³") |
| | | private String specialStandardMethod; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Integer num=1; |
| | | |
| | | @Schema(description = "æ åæ¹æ³åç§°") |
| | | @TableField(select = false,exist = false) |
| | | private String standardMethodName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("ins_sample_receipt") |
| | | public class InsSampleReceipt { |
| | | |
| | | @Schema(description = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | @Schema(description = "å§æåID") |
| | | private Integer insOrderId; |
| | | @Schema(description = "æ ·åID") |
| | | private Integer insSampleId; |
| | | @Schema(description = "æ ·åæ¥æ¶ç¶æ 0å¾
æ¥æ¶ 1å·²æäº¤æ£éª 2å·²ææ¶ 3已忶") |
| | | private Integer status; |
| | | @Schema(description = "主æ£éªäººID") |
| | | private Integer mainInspectorId; |
| | | @Schema(description = "æ¥æ¶å¤ç人ID") |
| | | private Integer receiveUserId; |
| | | @Schema(description = "æ¥æ¶å¤çæ¶é´") |
| | | private LocalDateTime receiveTime; |
| | | @Schema(description = "æäº¤æ£éªæ¶é´") |
| | | private LocalDateTime submitTime; |
| | | @Schema(description = "ææ¶å¤æ³¨") |
| | | private String rejectRemark; |
| | | @Schema(description = "å建人") |
| | | private Integer createUser; |
| | | @Schema(description = "å建æ¶é´") |
| | | private LocalDateTime createTime; |
| | | @Schema(description = "æ´æ°äºº") |
| | | private Integer updateUser; |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ ·åè´è´£äººè®°å½ |
| | | * @TableName ins_sample_user |
| | | */ |
| | | @TableName(value ="ins_sample_user") |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class InsSampleUser implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ¯è®¢åinsOrder表id (????) |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | /** |
| | | * å¤é®ï¼ç¨æ·id è´è´£äºº |
| | | */ |
| | | private Integer userId; |
| | | |
| | | /** |
| | | * 1ï¼ç¡®è®¤ 0ï¼æªç¡®è®¤ |
| | | */ |
| | | //1æ¯å¤æ ¸äºº 0æ¯æ£éªäºº |
| | | private Integer state; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * åè¯éªå®¤ |
| | | * @param insSampleId |
| | | * @param userId |
| | | * @param state |
| | | */ |
| | | private String sonLaboratory; |
| | | |
| | | public InsSampleUser(Integer insSampleId, Integer userId, Integer state,String sonLaboratory) { |
| | | this.insSampleId = insSampleId; |
| | | this.userId = userId; |
| | | this.state = state; |
| | | this.sonLaboratory = sonLaboratory; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å¤ç表 |
| | | * @TableName ins_unqualified_handler |
| | | */ |
| | | @TableName(value ="ins_unqualified_handler") |
| | | @Data |
| | | public class InsUnqualifiedHandler implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @Schema(description = "主é®id") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * ç¼å· |
| | | */ |
| | | @Schema(description = "ç¼å·") |
| | | private String no; |
| | | |
| | | /** |
| | | * æ é¢ |
| | | */ |
| | | @Schema(description = "æ é¢") |
| | | private String headline; |
| | | |
| | | /** |
| | | * ç©æåç§° |
| | | */ |
| | | @Schema(description = "ç©æåç§°") |
| | | private String materialName; |
| | | |
| | | /** |
| | | * çäº§æ¹æ¬¡ |
| | | */ |
| | | @Schema(description = "çäº§æ¹æ¬¡") |
| | | private String productionBatch; |
| | | |
| | | /** |
| | | * å°è´§æ°é |
| | | */ |
| | | @Schema(description = "å°è´§æ°é") |
| | | private String cargoQuantity; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Schema(description = "è§æ ¼åå·") |
| | | private String specsModels; |
| | | |
| | | /** |
| | | * æ¥æ£æ¥æ |
| | | */ |
| | | @Schema(description = "æ¥æ£æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate inspectTime; |
| | | |
| | | /** |
| | | * åé¦äºº |
| | | */ |
| | | @Schema(description = "åé¦äºº") |
| | | private String feedbackUser; |
| | | |
| | | /** |
| | | * å馿¥æ |
| | | */ |
| | | @Schema(description = "å馿¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate feedbackTime; |
| | | |
| | | /** |
| | | * åç±» |
| | | */ |
| | | @Schema(description = "") |
| | | private String classification; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å½å± |
| | | */ |
| | | @Schema(description = "ä¸åæ ¼å½å±") |
| | | private String offGradeAscription; |
| | | |
| | | /** |
| | | * ä¸åæ ¼æè¿° |
| | | */ |
| | | @Schema(description = "ä¸åæ ¼æè¿°") |
| | | private String unqualifiedDesc; |
| | | |
| | | /** |
| | | * åæææ£éªid |
| | | */ |
| | | @Schema(description = "åæææ£éªid") |
| | | private Integer inventoryQuantityId; |
| | | |
| | | /** |
| | | * åæææ£éªid |
| | | */ |
| | | @Schema(description = "订åid") |
| | | private Integer insOrderId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å¤çéä»¶è®°å½è¡¨ |
| | | * @TableName ins_unqualified_handler_file |
| | | */ |
| | | @TableName(value ="ins_unqualified_handler_file") |
| | | @Data |
| | | public class InsUnqualifiedHandlerFile implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @Schema(description = "主é®id") |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å¤çid |
| | | */ |
| | | @Schema(description = "ä¸åæ ¼å¤çid") |
| | | private Long unqualifiedId; |
| | | |
| | | /** |
| | | * æä»¶ç±»å(1:å¾ç 2:æä»¶) |
| | | */ |
| | | @Schema(description = "æä»¶ç±»å(1:å¾ç 2:æä»¶)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ è·¯å¾ |
| | | */ |
| | | @Schema(description = "æä»¶ä¸ä¼ è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | /** |
| | | * æä»¶åç§° |
| | | */ |
| | | @Schema(description = "æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @Schema(description = "å建人") |
| | | @TableField(fill= FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @Schema(description = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill= FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @Schema(description = "æ´æ°äºº") |
| | | @TableField(fill= FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill= FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ä¸åæ ¼æ£éªé¡¹ç®å¤æµ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-03 |
| | | */ |
| | | @TableName(value = "ins_unqualified_retest_product") |
| | | @Data |
| | | public class InsUnqualifiedRetestProduct implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | //å¤é®ï¼ins_product表id |
| | | private Integer insProductId; |
| | | |
| | | @Schema(description = "项ç®åæ°id") |
| | | private Integer structureItemParameterId; |
| | | //æ£éªé¡¹ |
| | | private String inspectionItem; |
| | | //æ£éªé¡¹åç±» |
| | | private String inspectionItemSubclass; |
| | | //å·¥å |
| | | private String factory; |
| | | //å®éªå®¤ |
| | | private String laboratory; |
| | | //æ ·ååç±» |
| | | private String sampleType; |
| | | //æ ·å |
| | | private String sample; |
| | | //åå· |
| | | private String model; |
| | | //åå®éªå®¤ |
| | | private String sonLaboratory; |
| | | //计éåä½ |
| | | private String unit; |
| | | //åä»·(å
) |
| | | private Double price; |
| | | //å·¥æ¶(H) |
| | | private Double manHour; |
| | | //å·¥æ¶åç» |
| | | private String manHourGroup; |
| | | //æ£éªé¡¹ç±»å |
| | | private String inspectionItemType; |
| | | //æ£éªå¼ç±»å |
| | | private String inspectionValueType; |
| | | //设å¤ç» |
| | | private String deviceGroup; |
| | | //æ£éªæ¬¡æ° |
| | | private Integer checkoutNumber; |
| | | //åºé´ |
| | | private String section; |
| | | //åå¼ç±»å |
| | | private String valueType; |
| | | //æ¹æ³ |
| | | private String method; |
| | | //é¢è®¡æ¶é´(天) |
| | | private Integer manDay; |
| | | //ç¹æ®æ è¯ |
| | | private String bsm; |
| | | //è¦æ±å¼ |
| | | private String ask; |
| | | //è¦æ±æè¿° |
| | | private String tell; |
| | | //æç»å¼ |
| | | @TableField("`last_value`") |
| | | private String lastValue; |
| | | //1ï¼åæ ¼ 0ï¼ä¸åæ ¼ 3: ä¸å¤å® |
| | | private Integer insResult; |
| | | //1ï¼ææ 0ï¼æ æ |
| | | private Integer state; |
| | | //å¤é®ï¼ins_sample表id |
| | | private Integer insSampleId; |
| | | |
| | | // å建人 |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | //å建æ¶é´ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | // ä¿®æ¹äºº |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | // ä¿®æ¹æ¶é´ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | //å¤é®ï¼standard_template表id |
| | | private Integer templateId; |
| | | //åå
¸ç±»å |
| | | private String dic; |
| | | //æ¹æ³ |
| | | private String methodS; |
| | | //å¤é® |
| | | private Integer insFiberId; |
| | | //å¤é® |
| | | private Integer insFibersId; |
| | | //æ£éªé¡¹EN |
| | | private String inspectionItemEn; |
| | | //æ£éªé¡¹å°ç±»EN |
| | | private String inspectionItemSubclassEn; |
| | | //æ£éªé¡¹åç±» |
| | | private String inspectionItemClass; |
| | | //æ£éªé¡¹åç±»EN |
| | | private String inspectionItemClassEn; |
| | | //å¤é®ï¼æ åæ¹æ³id |
| | | private Integer standardMethodListId; |
| | | //温度 |
| | | private String temperature; |
| | | //湿度 |
| | | private String humidity; |
| | | //å¤é®(ç®ååªææ¾å¥ç®¡é¡¹ç®ä½¿ç¨) |
| | | private Integer insBushId; |
| | | //èå´ |
| | | private String radius; |
| | | //çµç¼æ è¯ |
| | | private String cableTag; |
| | | // é夿 è¯ |
| | | private String repetitionTag; |
| | | //åæææ¹éæ è¯ |
| | | private String rawMaterialTag; |
| | | //夿µæ¬¡æ°æ è¯ |
| | | private String retestTag; |
| | | //æåº |
| | | private Integer sort; |
| | | // ç»å®å¼ä¸åå å±ç¤º, åªåå è®¡ç® |
| | | @Schema(description = "æ¯å¦æ¯ç»å®å¼, 0å¦, 1æ¯") |
| | | private Integer isBinding; |
| | | |
| | | @Schema(description = "èªå
³è(ç»å®id)") |
| | | private Integer bindingProductId; |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ä¸åæ ¼å¤æµæ£éªé¡¹ç®çç»æ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-03 |
| | | */ |
| | | @TableName(value = "ins_unqualified_retest_result") |
| | | @Data |
| | | public class InsUnqualifiedRetestResult implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | //å¤é®ï¼ä¸åæ ¼æ£éªé¡¹ç®id |
| | | private Integer retestProductId; |
| | | //æ£éªå¼ |
| | | private String insValue; |
| | | //计ç®å¼ |
| | | private String comValue; |
| | | //设å¤ç¼ç |
| | | private String equipValue; |
| | | //设å¤åç§° |
| | | private String equipName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * åææä¸åæ¨¡æ¿ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-05 |
| | | */ |
| | | @TableName(value = "raw_material_order_template") |
| | | @Data |
| | | public class RawMaterialOrderTemplate { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @Schema(description = "模æ¿åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @Schema(description = "é¶ä»¶ç¼å·") |
| | | private String partNo; |
| | | |
| | | /** |
| | | * 模æ¿å
容 |
| | | */ |
| | | @Schema(description = "模æ¿å
容") |
| | | private String thing; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-09 |
| | | */ |
| | | @TableName(value = "spot_check_quarter") |
| | | @Data |
| | | public class SpotCheckQuarter implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer quarterId; |
| | | |
| | | @Schema(description = "ç¼å·") |
| | | private String quarterNo; |
| | | |
| | | @Schema(description = "æ¥åçæå°å") |
| | | private String fileUrl; |
| | | |
| | | @Schema(description = "å£åº¦å®æç¶æ") |
| | | private Integer quarterStatus; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "ç¼å¶äºº") |
| | | private Integer writeUser; |
| | | |
| | | @Schema(description = "ä¼ç¾äºº") |
| | | private String countersignUser; |
| | | |
| | | @Schema(description = "å®¡æ ¸äºº") |
| | | private Integer examineUser; |
| | | |
| | | @Schema(description = "æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-10-09 |
| | | */ |
| | | @TableName(value ="spot_check_quarter_item") |
| | | @Data |
| | | public class SpotCheckQuarterItem { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer quarterItemId; |
| | | |
| | | @Schema(description = "主表id") |
| | | private Integer quarterId; |
| | | |
| | | @Schema(description = "产åç±»å") |
| | | private String productType; |
| | | |
| | | @Schema(description = "产ååå·") |
| | | private String productModel; |
| | | |
| | | @Schema(description = "责任人") |
| | | private String dutyUser; |
| | | |
| | | @Schema(description = "æ½æ ·æ°é") |
| | | private String spotCheckNumber; |
| | | |
| | | @Schema(description = "æ½æ ·æ¶é´") |
| | | private String spotCheckTime; |
| | | |
| | | @Schema(description = "è¯æ ·ç»è®º") |
| | | private String result; |
| | | |
| | | @Schema(description = "åæ ·äººå") |
| | | private String samplingUser; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | private String itemRemark; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·è®¡å |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-10 |
| | | */ |
| | | @TableName(value ="spot_check_year") |
| | | @Data |
| | | public class SpotCheckYear implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer yearId; |
| | | |
| | | @Schema(description = "åç§°") |
| | | private String yearHead; |
| | | |
| | | @Schema(description = "æ¥åçæå°å") |
| | | private String fileUrl; |
| | | |
| | | @Schema(description = "è¡¨æ ¼å
夿³¨") |
| | | private String tableRemark; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | |
| | | @Schema(description = "ç¼å¶äºº") |
| | | private Integer writeUser; |
| | | |
| | | @Schema(description = "ä¼ç¾äºº") |
| | | private String countersignUser; |
| | | |
| | | @Schema(description = "æ¹å人") |
| | | private Integer examineUser; |
| | | |
| | | @Schema(description = "æ¹å人") |
| | | private Integer ratifyUser; |
| | | |
| | | @Schema(description = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-10 |
| | | */ |
| | | @TableName(value = "spot_check_year_item") |
| | | @Data |
| | | public class SpotCheckYearItem { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer yearItemId; |
| | | //主表id |
| | | @Schema(description = "主表id") |
| | | private Integer yearId; |
| | | |
| | | @Schema(description = "ç±»å«") |
| | | private String yearType; |
| | | |
| | | @Schema(description = "䏿") |
| | | private String january; |
| | | |
| | | @Schema(description = "äºæ") |
| | | private String february; |
| | | |
| | | @Schema(description = "䏿") |
| | | private String march; |
| | | |
| | | @Schema(description = "åæ") |
| | | private String april; |
| | | |
| | | @Schema(description = "äºæ") |
| | | private String may; |
| | | |
| | | @Schema(description = "å
æ") |
| | | private String june; |
| | | |
| | | @Schema(description = "䏿") |
| | | private String july; |
| | | |
| | | @Schema(description = "å
«æ") |
| | | private String august; |
| | | |
| | | @Schema(description = "乿") |
| | | private String september; |
| | | |
| | | @Schema(description = "åæ") |
| | | private String october; |
| | | |
| | | @Schema(description = "å䏿") |
| | | private String november; |
| | | |
| | | @Schema(description = "åäºæ") |
| | | private String december; |
| | | |
| | | @Schema(description = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @Schema(description = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * ä»åº |
| | | * @TableName warehouse |
| | | */ |
| | | @TableName(value ="warehouse") |
| | | @Data |
| | | public class Warehouse implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * ä»åºåç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è´§æ¶åå
æ ¼ |
| | | * @TableName warehouse_cell |
| | | */ |
| | | @TableName(value ="warehouse_cell") |
| | | @Data |
| | | public class WarehouseCell implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * è¡ |
| | | */ |
| | | @TableField("`row`") |
| | | private Integer row; |
| | | |
| | | /** |
| | | * å |
| | | */ |
| | | @TableField("`col`") |
| | | private Integer col; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * æ¯å¦ææ 1ï¼ææ 0ï¼æ æ |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 夿£ï¼è´§æ¶id |
| | | */ |
| | | private Integer shelfId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * åºå
¥åºè®°å½ |
| | | * @TableName warehouse_history |
| | | */ |
| | | @TableName(value ="warehouse_history") |
| | | @Data |
| | | public class WarehouseHistory implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private String warehouseCode; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ ·åid |
| | | */ |
| | | private Integer insSampleId; |
| | | |
| | | /** |
| | | * ç¶æï¼1ï¼å
¥åº 2ï¼åºåº |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼åå
æ ¼id |
| | | */ |
| | | private Integer cellId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è´§æ¶ |
| | | * @TableName warehouse_shelf |
| | | */ |
| | | @TableName(value ="warehouse_shelf") |
| | | @Data |
| | | public class WarehouseShelf implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * è´§æ¶åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * è¡ |
| | | */ |
| | | @TableField("`row`") |
| | | private Integer row; |
| | | |
| | | /** |
| | | * å |
| | | */ |
| | | @TableField("`col`") |
| | | private Integer col; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼ä»åºid |
| | | */ |
| | | private Integer warehouseId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.inspect.dto.DataAnalysisDto; |
| | | import com.ruoyi.inspect.vo.DeviationAnalyzeVo; |
| | | import com.ruoyi.inspect.vo.RawProductAnalysisVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ°æ®åæ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/10/16 |
| | | */ |
| | | public interface DataAnalysisService { |
| | | |
| | | /** |
| | | * æ¥è¯¢åæææ±ç¶ç»è®¡ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawPassRateByBarChart(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢åææåæ ¼ç饼ç¶å¾ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | Map<String, Object> getRawPassRateByCake(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹åç§° |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | List<String> getRawItemNames(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | RawProductAnalysisVo getRawProductAnalysis(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£æµé¡¹åæå表 |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getRawProductAnalysisAllList(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæåæ ¼ç |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | RawProductAnalysisVo getRawProductAnalysisRawPass(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£ååå®¶æ°æ®å¯¹æ¯ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | DeviationAnalyzeVo getRawSupplierCompare(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¬æä¸ä¸æåæ ¼çå¯¹æ¯ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawUpMonth(DataAnalysisDto dataAnalysisDto); |
| | | |
| | | Map<String, Object> getOrderTypeCookie(DataAnalysisDto dataAnalysisDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.IfsStockQueryDTO; |
| | | import com.ruoyi.inspect.dto.SpotCheckQuarterDto; |
| | | import com.ruoyi.inspect.dto.SpotCheckYearDto; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æåæ½æ · |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/9/29 |
| | | */ |
| | | public interface FinishProductSpotCheckService { |
| | | |
| | | /** |
| | | * æ¥è¯¢ifsæååºå |
| | | * |
| | | * @return |
| | | */ |
| | | Result getIfsStockReport(IfsStockQueryDTO ifsStockQueryDTO); |
| | | |
| | | |
| | | /******************************************************* å£åº¦æ½æ · *******************************************************/ |
| | | |
| | | /** |
| | | * æ°å¢å£åº¦æ½æ£ |
| | | * @param spotCheckQuarterDto |
| | | * @return |
| | | */ |
| | | boolean addQuarter(SpotCheckQuarterDto spotCheckQuarterDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢å£åº¦æ½æ ·è¯¦æ
|
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | SpotCheckQuarterDto getQuarter(Integer quarterId); |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·å页æ¥è¯¢ |
| | | * @param page |
| | | * @param spotCheckQuarter |
| | | * @return |
| | | */ |
| | | IPage<SpotCheckQuarterDto> getQuarterPage(Page page, SpotCheckQuarterDto spotCheckQuarter); |
| | | |
| | | /** |
| | | * å é¤å£åº¦æ½æ · |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | boolean deleteQuarter(Integer quarterId); |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getQuarterOnOrder(); |
| | | |
| | | /** |
| | | * ä¿®æ¹å£åº¦æ£éª |
| | | * @param spotCheckQuarterDto |
| | | * @return |
| | | */ |
| | | boolean updateQuarterOnOrder(SpotCheckQuarterDto spotCheckQuarterDto); |
| | | |
| | | /** |
| | | * çææç»æ¥å |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | boolean finalReportQuarter(Integer quarterId, HttpServletResponse response); |
| | | |
| | | |
| | | /******************************************************* å¹´åº¦æ½æ · *******************************************************/ |
| | | |
| | | /** |
| | | * æ°å¢å¹´åº¦æ½æ · |
| | | * @param spotCheckYearDto |
| | | * @return |
| | | */ |
| | | boolean addSpotCheckYear(SpotCheckYearDto spotCheckYearDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¹´åº¦æ½æ ·è¯¦æ
|
| | | * @param yearId |
| | | * @return |
| | | */ |
| | | SpotCheckYearDto getSpotCheckYear(Integer yearId); |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·å表 |
| | | * @param page |
| | | * @param spotCheckYear |
| | | * @return |
| | | */ |
| | | IPage<SpotCheckYearDto> getSpotCheckYearPage(Page page, SpotCheckYearDto spotCheckYear); |
| | | |
| | | /** |
| | | * å é¤å¹´åº¦æ½æ · |
| | | * @param yearId |
| | | * @return |
| | | */ |
| | | boolean deleteSpotCheckYear(Integer yearId); |
| | | |
| | | /** |
| | | * ä¿®æ¹å¹´åº¦æ£éª |
| | | * @param spotCheckYearDto |
| | | * @return |
| | | */ |
| | | boolean updateSpotCheckYear(SpotCheckYearDto spotCheckYearDto); |
| | | |
| | | /** |
| | | * çææç»å¹´åº¦æ¥å |
| | | * @param yearId |
| | | * @return |
| | | */ |
| | | boolean finalReportSpotCheckYear(Integer yearId, HttpServletResponse response); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public interface IfsOrderInspectionService { |
| | | |
| | | /** |
| | | * æ¥è¯¢å·²æ£éª |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto); |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_part_props_record(ifs订åé¶ä»¶å±æ§è®°å½è¡¨)ãçæ°æ®åºæä½Service |
| | | * @createDate 2025-10-23 15:00:34 |
| | | */ |
| | | public interface IfsPartPropsRecordService extends IService<IfsPartPropsRecord> { |
| | | |
| | | boolean saveOrUpdateProps(IfsPartPropsRecordDTO ifsPartPropsRecord); |
| | | |
| | | IfsPartPropsRecord getOneByIfsId(Long ifsId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_split_order_record(ifsåææè®¢åæåè®°å½è¡¨)ãçæ°æ®åºæä½Service |
| | | * @createDate 2025-10-29 16:39:41 |
| | | */ |
| | | public interface IfsSplitOrderRecordService extends IService<IfsSplitOrderRecord> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderDeviceRecord; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/22 |
| | | */ |
| | | public interface InsOrderDeviceRecordService extends IService<InsOrderDeviceRecord> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerifyItem; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯æ£éªé¡¹ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | public interface InsOrderFactoryVerifyItemService extends IService<InsOrderFactoryVerifyItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | public interface InsOrderFileService extends IService<InsOrderFile> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanDTO; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanProductDto; |
| | | import com.ruoyi.inspect.dto.SaveInsContextDto; |
| | | import com.ruoyi.inspect.dto.SaveOrderDevicesDto; |
| | | import com.ruoyi.inspect.dto.SaveTemplateContextDto; |
| | | import com.ruoyi.inspect.dto.VerifyPlanDto; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerify; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanVO; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-ä¸å¡å± |
| | | */ |
| | | public interface InsOrderPlanService { |
| | | IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO); |
| | | |
| | | IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, InsOrderPlanDTO insOrderPlanDTO); |
| | | |
| | | boolean claimInsOrderPlan(InsOrderPlanDTO entity); |
| | | |
| | | void saveInsContext(SaveInsContextDto saveInsContextDto); |
| | | |
| | | void saveTemplateContext(SaveTemplateContextDto saveTemplateContextDto); |
| | | |
| | | List<Integer> getOrderDeviceIds(Integer orderId); |
| | | |
| | | void saveOrderDevices(SaveOrderDevicesDto saveOrderDevicesDto); |
| | | |
| | | Map<String, Object> doInsOrder(Integer id, String laboratory); |
| | | |
| | | int upPlanUser(Integer userId, Integer orderId,String sonLaboratory); |
| | | |
| | | int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, Boolean registerInsResults); |
| | | |
| | | List<InsProduct> getInsProduct(InsOrderPlanProductDto insOrderPlanProductDto); |
| | | |
| | | Map<String,Object> checkSubmitPlan(Integer orderId, String laboratory); |
| | | |
| | | IPage<InsOrderFile> getFileList(Page page, InsOrderFile insOrderFile); |
| | | |
| | | int uploadFile(Integer orderId, MultipartFile file); |
| | | |
| | | |
| | | List<String> upPlanUser2(Integer orderId); |
| | | |
| | | int rawMaterialVerifyPlan(Integer orderId, String laboratory, Integer type, String tell, Integer userId); |
| | | |
| | | int rawMaterialVerifyPlan(VerifyPlanDto verifyPlanDto); |
| | | |
| | | /** |
| | | * æå½åæ£éªæ°æ®éæ°çæå°æªæ¹åçç³»ç»æ¥åã |
| | | */ |
| | | void regenerateReport(Integer reportId, Integer createOrderUser); |
| | | |
| | | /** |
| | | * çµç¼é
ç½®. æ¥çæ è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getCableTag(Integer id, String laboratory); |
| | | |
| | | /** |
| | | * åæææ¥çæ è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRawMaterialTag(Integer id, String laboratory); |
| | | |
| | | /** |
| | | * æ¥çé夿 è¯ |
| | | * @param id |
| | | * @param laboratory |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRepetitionTag(Integer id, String laboratory, String cableTag); |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ä¸åæ ¼å¤æµå
å®¹ç» |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | boolean addDisqualificationRetest(List<InsProduct> insProductsList); |
| | | |
| | | /** |
| | | * è·åä¸åæ ¼å¤æµæ°æ® |
| | | * @return |
| | | */ |
| | | List<InsProduct> getInsProductUnqualifiedRetest(InsOrderPlanProductDto insOrderPlanProductDto); |
| | | |
| | | /** |
| | | * ä¿åä¸åæ ¼å¤æµæ£éªå
容 |
| | | */ |
| | | void saveUnqualifiedContext(Map<String, Object> insContext,Integer currentTable,Integer currentSampleId,Integer orderId,String sonLaboratory); |
| | | |
| | | /** |
| | | * æ¥è¯¢åææè¿è´§éªè¯ |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | InsOrderFactoryVerify getFactoryVerify(Integer insOrderId); |
| | | |
| | | /** |
| | | * ä¿ååææè¿è´§éªè¯ |
| | | * @param factoryVerify |
| | | * @return |
| | | */ |
| | | boolean addFactoryVerify(InsOrderFactoryVerify factoryVerify); |
| | | |
| | | |
| | | /** |
| | | * çæpdä¸´æ¶ |
| | | * @param path |
| | | * @return |
| | | */ |
| | | String wordToPdfTemp(String path); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.dto.TemplateRateDto; |
| | | import com.ruoyi.inspect.pojo.InsOrderRates; |
| | | |
| | | /** |
| | | * 订åè´¹ç¨è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | public interface InsOrderRatesService extends IService<InsOrderRates> { |
| | | |
| | | /** |
| | | * |
| | | * @param page |
| | | * @param sampleOrderDto |
| | | * @return |
| | | */ |
| | | IPage<SampleOrderDto> selectInsOrderRates(Page page, SampleOrderDto sampleOrderDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åè´¹ç¨è¯¦æ
ï¼æ¨¡æ¿ä»·æ ¼ï¼ |
| | | * @param page |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | IPage<TemplateRateDto> selectTemplateRatesDetail(Page page, Integer insOrderId); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.dto.InventoryDetailDTO; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.vo.InsOrderPrintingVo; |
| | | |
| | | import jakarta.servlet.ServletException; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | public interface InsOrderService extends IService<InsOrder> { |
| | | |
| | | //è·åå使£éªä¸åæ°æ® |
| | | IPage<SampleOrderDto> 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); |
| | | |
| | | int addNewJuInsOrder(InsPlaceOrderDto insPlaceOrderDto); |
| | | |
| | | Map<String, Object> getInsOrder(Integer id); |
| | | |
| | | int upInsOrderOfState(InsOrder insOrder); |
| | | |
| | | Map<String, Object> getInsOrderAndSample(Integer id, String laboratory); |
| | | |
| | | IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto); |
| | | |
| | | |
| | | int updateStatus(Integer id); |
| | | |
| | | |
| | | // è·åifsåºåä¿¡æ¯ |
| | | void getIfsOrder(Map<String,Object> objectMap,Boolean isSplitOrder); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¢ååå· |
| | | * @param insOrder |
| | | */ |
| | | void updateEntrustCode(InsOrder insOrder); |
| | | |
| | | List<InsUnqualifiedRetestProduct> getRetestResult(Integer insProductId); |
| | | |
| | | |
| | | |
| | | void updateIfsInventoryQuantity(Long id); |
| | | |
| | | /** |
| | | * éæä¸å |
| | | * @param list |
| | | * @param copperInsOrder |
| | | * @return |
| | | */ |
| | | int addRawCopperOrder(List<SampleProductDto> list, CopperInsOrderDto copperInsOrder); |
| | | |
| | | /** |
| | | * ä¿®æ¹å§æç¼å· |
| | | * @param insOrder |
| | | */ |
| | | void updateOrderEntrustCode(InsOrder insOrder); |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£éªä¸åå
容 |
| | | * @param insOrderUpdateDto |
| | | * @return |
| | | */ |
| | | Boolean updateInsOrder(InsOrderUpdateDto insOrderUpdateDto); |
| | | |
| | | /** |
| | | * æåæ ç¾æå° |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<InsOrderPrintingVo> labelOrderPrinting(List<Integer> ids); |
| | | |
| | | /** |
| | | * å¤è´äº§åæ ç¾æå° |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<InventoryDetailDTO> labelOutsideOrderPrinting(List<Integer> ids); |
| | | |
| | | /** |
| | | * æ ¹æ®æ ·åidæ¥è¯¢æ£éªé¡¹æ |
| | | * @param insSampleId |
| | | * @return |
| | | */ |
| | | List<StandardProductList> getProductTreeBySampleId(Integer insSampleId); |
| | | |
| | | /** |
| | | * æ·»å éæ¼çæ£éªé¡¹ |
| | | * @param omitOrderProductDto |
| | | * @return |
| | | */ |
| | | boolean addOmitOrderProduct(OmitOrderProductDto omitOrderProductDto); |
| | | |
| | | /** |
| | | * æåæ£éªåå¯¼åº |
| | | * @param sampleOrderDto |
| | | * @param response |
| | | */ |
| | | void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ ·ååå· |
| | | * @param insSample |
| | | */ |
| | | void updateSampleModel(InsSample insSample); |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åæ¶é´æ¯å¦æ²¡æè¯¥æ£æµé¡¹çæ½æ ·è®¡å |
| | | * @param sampleList |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | Result judgeNotSpotCheckOrder(List<SampleProductDto> sampleList, InsOrder insOrder); |
| | | |
| | | /** |
| | | * ç§»åºæä½ |
| | | * @param one |
| | | * @return |
| | | */ |
| | | String moveRawMaterial(IfsInventoryQuantity one); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderStandardTemplate; |
| | | |
| | | /** |
| | | * è®¢åæ åæ¨¡æ¿å¤å¶ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-05 |
| | | */ |
| | | public interface InsOrderStandardTemplateService extends IService<InsOrderStandardTemplate> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡ç¶æ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | public interface InsOrderStateService extends IService<InsOrderState> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import com.ruoyi.inspect.vo.InsOrderTemplateDetailVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-18 14:14:54 |
| | | */ |
| | | public interface InsOrderTemplateService extends IService<InsOrderTemplate> { |
| | | |
| | | int addInsOrderTemplate(InsOrderTemplate insOrderTemplate); |
| | | |
| | | List<InsOrderTemplate> selectInsOrderTemplate(String company); |
| | | |
| | | InsOrderTemplateDetailVo selectInsOrderTemplateById(Integer id); |
| | | |
| | | int delInsOrderTemplate(Integer id); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:58 |
| | | */ |
| | | public interface InsProductDeviationWarningDetailService extends IService<InsProductDeviationWarningDetail> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsProductDeviationWarningDto; |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarning; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:02 |
| | | */ |
| | | public interface InsProductDeviationWarningService extends IService<InsProductDeviationWarning> { |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢è¦å表 |
| | | * @param page |
| | | * @param deviationWarningDto |
| | | * @return |
| | | */ |
| | | IPage<InsProductDeviationWarningDto> selectDeviationWarningPage(Page page, InsProductDeviationWarningDto deviationWarningDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.InsProductBindingDto; |
| | | import com.ruoyi.inspect.dto.WriteInspectionConditionDto; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_product(æ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 23:57:39 |
| | | */ |
| | | public interface InsProductService extends IService<InsProduct> { |
| | | |
| | | int selectOrderManDay(Integer orderId); |
| | | |
| | | int updateInspected(Integer id,String ids); |
| | | |
| | | boolean write(WriteInspectionConditionDto dto); |
| | | |
| | | IPage<InsProduct> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids); |
| | | |
| | | void checkUpdate(Integer orderId,Integer state); |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ£éªé¡¹idæ¥è¯¢æ£éªé¡¹æ ä¿¡æ¯ |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | List<InsProduct> getProductTreeByProductId(Integer productId); |
| | | |
| | | |
| | | /** |
| | | * ç¹æ®æ£éªé¡¹ç»å® |
| | | * @param insProductBindingDto |
| | | * @return |
| | | */ |
| | | boolean bindingProductTreeByProductId(InsProductBindingDto insProductBindingDto); |
| | | |
| | | /** |
| | | * å é¤ç¹æ®æ£éªé¡¹ç»å®ä¿¡æ¯ |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | boolean removeBindingProductTree(Integer productId); |
| | | |
| | | List<InsProduct> getRevocationInsProductList(Integer orderId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | public interface InsReportService extends IService<InsReport> { |
| | | |
| | | Map<String,Object> pageInsReport(Page page, ReportPageDto reportPageDto); |
| | | |
| | | void wordToPdf(String path,String sealUrl, boolean isRawMater); |
| | | |
| | | int inReport(String url, Integer id); |
| | | |
| | | int upReportUrl(Integer id); |
| | | |
| | | //æäº¤ |
| | | int writeReport(Integer id, Integer userId, Integer submitUserId); |
| | | |
| | | //å®¡æ ¸ |
| | | int examineReport(Integer id, Integer isExamine, String examineTell, Integer userId); |
| | | |
| | | //æ¹å |
| | | int ratifyReport(Integer id, Integer isRatify, String ratifyTell); |
| | | |
| | | int wordInsertUrl(Map<String, Object> map, String url); |
| | | |
| | | String downAll(String ids); |
| | | |
| | | /** |
| | | * å份æ¥å Word ä¸è½½ï¼reportTypeï¼0æ£æµæ¥åï¼1æ£éªæ¥åï¼createOrderUser ç¨äºå¤ç¨æ¥åç¼å¶çæ°æ®èå´ã |
| | | */ |
| | | void download(Integer id, Integer reportType, Integer createOrderUser, HttpServletResponse response); |
| | | |
| | | int upAll(MultipartFile file) throws IOException; |
| | | |
| | | /** |
| | | * |
| | | * @param insOrder æ£éªåä¿¡æ¯ |
| | | * @param registerInsResults æ¯å¦ç»è®°æ£éªç»æ |
| | | * @param hasExemption æ¯å¦å
æ£ |
| | | */ |
| | | void isRawMaterial(InsOrder insOrder,Boolean registerInsResults,Boolean hasExemption); |
| | | |
| | | Long getUnqualifiedCount(InsOrder insOrder); |
| | | |
| | | /** |
| | | * éåå°æ£éªä»»å¡ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean sendBackTask(Integer id); |
| | | |
| | | /** |
| | | * æ¥åå¯¼åº |
| | | * @param dto |
| | | * @param response |
| | | */ |
| | | void reportAllExport(ReportPageDto dto, HttpServletResponse response) throws UnsupportedEncodingException; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.SampleReceiptActionDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptPageDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptQueryDto; |
| | | import com.ruoyi.inspect.pojo.InsSampleReceipt; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | public interface InsSampleReceiptService extends IService<InsSampleReceipt> { |
| | | |
| | | IPage<SampleReceiptPageDto> page(Page<?> page, SampleReceiptQueryDto query); |
| | | |
| | | SampleReceiptPageDto detail(Integer id); |
| | | |
| | | void submit(SampleReceiptActionDto dto); |
| | | |
| | | void reject(SampleReceiptActionDto dto); |
| | | |
| | | void export(SampleReceiptQueryDto query, HttpServletResponse response); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample(æ£éªæ ·å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-14 17:14:57 |
| | | */ |
| | | public interface InsSampleService extends IService<InsSample> { |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢æ ·å |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | List<InsSample> getSampleByOrderId(Integer insOrderId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_unqualified_handler_file(ä¸åæ ¼å¤çéä»¶è®°å½è¡¨)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-07-31 13:38:38 |
| | | */ |
| | | public interface InsUnqualifiedHandlerFileService extends IService<InsUnqualifiedHandlerFile> { |
| | | |
| | | InsUnqualifiedHandlerFile uploadFile(Long handlerId, MultipartFile file); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.UnqualifiedHandlerDto; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandler; |
| | | import com.ruoyi.inspect.vo.UnqualifiedHandlerVO; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_unqualified_handler(ä¸åæ ¼å¤ç表)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-07-31 13:38:14 |
| | | */ |
| | | public interface InsUnqualifiedHandlerService extends IService<InsUnqualifiedHandler> { |
| | | |
| | | IPage<UnqualifiedHandlerVO> pageList(Page page, UnqualifiedHandlerDto unqualifiedHandlerDto); |
| | | |
| | | boolean addUnqualifiedHandler(UnqualifiedHandlerDto unqualifiedHandlerDto); |
| | | |
| | | boolean updateUnqualifiedHandler(UnqualifiedHandlerDto unqualifiedHandlerDto); |
| | | |
| | | UnqualifiedHandlerDto getUnqualifiedHandler(Integer id); |
| | | |
| | | boolean deleteUnqualifiedHandler(Integer id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct; |
| | | |
| | | /** |
| | | * ä¸åæ ¼æ£éªé¡¹ç®å¤æµ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-03 |
| | | */ |
| | | public interface InsUnqualifiedRetestProductService extends IService<InsUnqualifiedRetestProduct> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public interface OutsourcingFinishProductInspectionService { |
| | | |
| | | /** |
| | | * æ¥æ£æ¥è¯¢ |
| | | * @param page |
| | | * @param ifsInventoryQuantity |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantityVO> getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·²æ£éª |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªå¼ |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.inspect.dto.CopperInsOrderDto; |
| | | import com.ruoyi.inspect.dto.OrderSplitDTO; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/7/31 |
| | | */ |
| | | public interface RawMaterialOrderService { |
| | | |
| | | Result selectStandardTreeListByPartNo(String partNo); |
| | | |
| | | /** |
| | | * æ¥æ£æ¥è¯¢ |
| | | * @param page |
| | | * @param ifsInventoryQuantity |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantityVO> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªå¼ |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto); |
| | | |
| | | int inspectionReport(List<Long> ids,String orderType,String materialProp); |
| | | |
| | | int revokeInspectionReport(Long id); |
| | | |
| | | List<IfsInventoryQuantityDto> printLabel(List<Integer> ids); |
| | | |
| | | int inspectionReportOne(IfsInventoryQuantity ifsInventoryQuantity); |
| | | |
| | | String getIndustryChain(Integer id); |
| | | |
| | | /** |
| | | * åæææ¤éä¸å |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | boolean repealRawOrder(Long ifsInventoryId); |
| | | |
| | | /** |
| | | * æ·»å å
æ£è®¢å |
| | | * @param list |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | int addExemptionOrder(List<SampleProductDto> list, InsOrder insOrder); |
| | | |
| | | IPage<IfsInventoryQuantityCheckDto> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·²æ£éª |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto); |
| | | |
| | | int delIfsInventory(Integer id); |
| | | |
| | | /** |
| | | * åæææ¾è¡å
æ£ |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | boolean rawOrderRelease(Long ifsInventoryId, String partDetail); |
| | | |
| | | /** |
| | | * åææä¸åéç¥å
æ£æè
夿¬¡æ£éª |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | int notificationRawOrder(Long ifsInventoryId); |
| | | |
| | | /** |
| | | * æå¨æ·»å åæä¿¡æ¯ |
| | | * @param ifsInventoryQuantity |
| | | */ |
| | | void addIfsInventoryQuantity(IfsInventoryQuantity ifsInventoryQuantity); |
| | | |
| | | |
| | | /** |
| | | * éåä¸ä¸åå
æ£ |
| | | * @param list |
| | | * @param copperInsOrder |
| | | */ |
| | | int addRawCopperOrderExemptionOrder(List<SampleProductDto> list, CopperInsOrderDto copperInsOrder); |
| | | |
| | | /** |
| | | * 让æ¥uæ¾è¡ |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | boolean concessionRelease(Long ifsInventoryId); |
| | | |
| | | /** |
| | | * åææè¿åæ¤éä¸å |
| | | * @param enterOrderId |
| | | * @return |
| | | */ |
| | | boolean repealEnterRawOrder(Integer enterOrderId); |
| | | |
| | | /** |
| | | * åææå£åº¦æ¤éä¸å |
| | | * @param quarterOrderId |
| | | * @return |
| | | */ |
| | | boolean repealQuarterRawOrder(Integer quarterOrderId); |
| | | |
| | | /** |
| | | * åæææ¥æ£å
¨é¨ä¿¡æ¯å¯¼åº |
| | | * @param dto |
| | | * @param response |
| | | */ |
| | | void rawAllExport(IfsInventoryQuantitySupplierDto dto, HttpServletResponse response) throws UnsupportedEncodingException; |
| | | |
| | | /** |
| | | * åæææ¥è¯¢å¯ä»¥å£åº¦æ£éªçå
容 |
| | | * @param page |
| | | * @param ifsInventoryQuantityDto |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto); |
| | | |
| | | /** |
| | | * advancedGodown |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | boolean advancedGodown(Long ifsInventoryId); |
| | | |
| | | void downloadTemplate(HttpServletResponse response); |
| | | |
| | | Result importSplitOrderData(MultipartFile file, Long ifsId, HttpServletRequest request); |
| | | |
| | | boolean confirmSplitOrder(OrderSplitDTO orderSplitDTO); |
| | | |
| | | Long getOrderCountByIfsId(Long ifsId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åææä¸åæ¨¡æ¿ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-05 |
| | | */ |
| | | public interface RawMaterialOrderTemplateService extends IService<RawMaterialOrderTemplate> { |
| | | |
| | | int addRawMaterOrderTemplate(RawMaterialOrderTemplate rawMaterialOrderTemplate); |
| | | |
| | | List<RawMaterialOrderTemplate> selectRawMaterOrderTemplate(String partNo); |
| | | |
| | | String selectRawMaterOrderTemplateById(Integer id); |
| | | |
| | | int delRawMaterOrderTemplate(Integer id); |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.ruoyi.performance.dto.AuxiliaryAllDto; |
| | | import com.ruoyi.performance.dto.AuxiliaryOriginalHoursLookDto; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface ReportService { |
| | | //é¦é¡µ-->æ¥åä»»å¡å¾ |
| | | Map<String, Object> calendarWorkByWeek(); |
| | | |
| | | AuxiliaryAllDto currentUserWorkHourCount(AuxiliaryOriginalHoursLookDto dto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarterItem; |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-09 |
| | | */ |
| | | public interface SpotCheckQuarterItemService extends IService<SpotCheckQuarterItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYearItem; |
| | | |
| | | /** |
| | | * å¹´åº¦æ½æ ·è®¡å详æ
表 |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-10-10 |
| | | */ |
| | | public interface SpotCheckYearItemService extends IService<SpotCheckYearItem> { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.pojo.WarehouseCell; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-04-06 12:13:57 |
| | | */ |
| | | public interface WarehouseCellService extends IService<WarehouseCell> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.inspect.dto.WarehouseCellAndSampleDto; |
| | | import com.ruoyi.inspect.dto.WarehouseDto; |
| | | import com.ruoyi.inspect.pojo.Warehouse; |
| | | import com.ruoyi.inspect.pojo.WarehouseShelf; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãwarehouse(ä»åº)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-04-06 12:13:57 |
| | | */ |
| | | public interface WarehouseService extends IService<Warehouse> { |
| | | |
| | | int addWarehouse(Warehouse warehouse); |
| | | |
| | | List<WarehouseDto> selectWarehouse(); |
| | | |
| | | int addShelf(WarehouseShelf warehouseShelf); |
| | | |
| | | int delWarehouse(Integer id); |
| | | |
| | | int upWarehouse(Warehouse warehouse); |
| | | |
| | | int delShelf(Integer id); |
| | | |
| | | int upShelf(WarehouseShelf warehouseShelf); |
| | | |
| | | List<WarehouseCellAndSampleDto> getWarehouse(Integer shelfId); |
| | | |
| | | int inWarehouse(String trees, String sampleCode); |
| | | |
| | | int outWarehouse(String sampleCode); |
| | | |
| | | Map<String, Object> getSampleRecord(Integer id); |
| | | |
| | | int searchSampleId(String sampleCode); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.DataAnalysisDto; |
| | | import com.ruoyi.inspect.dto.SampleProductRawAnalysisDto; |
| | | import com.ruoyi.inspect.mapper.DataAnalysisMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.service.DataAnalysisService; |
| | | import com.ruoyi.inspect.vo.DeviationAnalyzeVo; |
| | | import com.ruoyi.inspect.vo.RawMaterialSupplierVo; |
| | | import com.ruoyi.inspect.vo.RawProductAnalysisVo; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.MathContext; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ°æ®åæ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/10/16 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DataAnalysisServiceImpl implements DataAnalysisService { |
| | | |
| | | private DataAnalysisMapper dataAnalysisMapper; |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åæææ±ç¶ç»è®¡ |
| | | * @return searchTime æ¶é´ |
| | | * @return passRate åæ ¼ç |
| | | * @return sum æ»æ° |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getRawPassRateByBarChart(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | // è·åå½åæ¥æ |
| | | DateTime now = DateUtil.date(); |
| | | if (StrUtil.isNotBlank(dataAnalysisDto.getBeginDate()) && StrUtil.isNotBlank(dataAnalysisDto.getEndDate())) { |
| | | return dataAnalysisMapper.getRawPassRateByBarChartByDay(dataAnalysisDto); |
| | | } else if (dataAnalysisDto.getDateType().equals("1")) { |
| | | // è·åæ¬å¨çå¼å§æ¶é´ï¼å¨ä¸ 00:00:00ï¼ |
| | | DateTime beginOfWeek = DateUtil.beginOfWeek(now); |
| | | // è·åæ¬å¨çç»ææ¶é´ï¼å¨æ¥ 23:59:59ï¼ |
| | | // è·åæ¬å¨çç»ææ¶é´ï¼å¨æ¥ 23:59:59ï¼ |
| | | DateTime endOfWeek = DateUtil.endOfWeek(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | return dataAnalysisMapper.getRawPassRateByBarChartByWeek(dataAnalysisDto); |
| | | } else if (dataAnalysisDto.getDateType().equals("2")) { |
| | | // è·åå½åæçå¼å§æ¶é´ï¼æ¯æ1å· 00:00:00ï¼ |
| | | DateTime beginOfMonth = DateUtil.beginOfMonth(now); |
| | | // è·åå½åæçç»ææ¶é´ï¼æ¬ææåä¸å¤© 23:59:59ï¼ |
| | | DateTime endOfMonth = DateUtil.endOfMonth(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | return dataAnalysisMapper.getRawPassRateByBarChartByDay(dataAnalysisDto); |
| | | } else if (dataAnalysisDto.getDateType().equals("3")) { |
| | | // è·åå½åå¹´çå¼å§æ¶é´ï¼æ¯å¹´1æ1æ¥ 00:00:00ï¼ |
| | | DateTime beginOfYear = DateUtil.beginOfYear(now); |
| | | // è·åå½åå¹´çç»ææ¶é´ï¼æ¯å¹´12æ31æ¥ 23:59:59ï¼ |
| | | DateTime endOfYear = DateUtil.endOfYear(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | return dataAnalysisMapper.getRawPassRateByBarChartByYear(dataAnalysisDto); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¥¼ç¶å¾ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | * sum : æ»æ° |
| | | * unQualified : ä¸åæ ¼æ°é |
| | | * qualified : åæ ¼æ°é |
| | | * passRate : åæ ¼ç |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getRawPassRateByCake(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | // è·åå½åæ¥æ |
| | | DateTime now = DateUtil.date(); |
| | | if (StrUtil.isNotBlank(dataAnalysisDto.getBeginDate()) && StrUtil.isNotBlank(dataAnalysisDto.getEndDate())) { |
| | | |
| | | } else if (dataAnalysisDto.getDateType().equals("1")) { |
| | | // è·åæ¬å¨çå¼å§æ¶é´ï¼å¨ä¸ 00:00:00ï¼ |
| | | DateTime beginOfWeek = DateUtil.beginOfWeek(now); |
| | | // è·åæ¬å¨çç»ææ¶é´ï¼å¨æ¥ 23:59:59ï¼ |
| | | DateTime endOfWeek = DateUtil.endOfWeek(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (dataAnalysisDto.getDateType().equals("2")) { |
| | | // è·åå½åæçå¼å§æ¶é´ï¼æ¯æ1å· 00:00:00ï¼ |
| | | DateTime beginOfMonth = DateUtil.beginOfMonth(now); |
| | | // è·åå½åæçç»ææ¶é´ï¼æ¬ææåä¸å¤© 23:59:59ï¼ |
| | | DateTime endOfMonth = DateUtil.endOfMonth(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (dataAnalysisDto.getDateType().equals("3")) { |
| | | // è·åå½åå¹´çå¼å§æ¶é´ï¼æ¯å¹´1æ1æ¥ 00:00:00ï¼ |
| | | DateTime beginOfYear = DateUtil.beginOfYear(now); |
| | | // è·åå½åå¹´çç»ææ¶é´ï¼æ¯å¹´12æ31æ¥ 23:59:59ï¼ |
| | | DateTime endOfYear = DateUtil.endOfYear(now); |
| | | dataAnalysisDto.setBeginDate(DateUtil.format(beginOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | dataAnalysisDto.setEndDate(DateUtil.format(endOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | return dataAnalysisMapper.getRawPassRateByCake(dataAnalysisDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹åç§° |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<String> getRawItemNames(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | List<IfsInventoryQuantitySupplierDto> analysisList = dataAnalysisMapper.getRawProductAnalysisAllSample(dataAnalysisDto); |
| | | // æ ¹æ®æ ·åidæ¥è¯¢æ£æµåæ° |
| | | if (CollectionUtils.isEmpty(analysisList)) { |
| | | return null; |
| | | } |
| | | List<Integer> sampleIds = analysisList.stream().map(IfsInventoryQuantitySupplierDto::getSampleId).collect(Collectors.toList()); |
| | | // æ¥è¯¢æ£éªé¡¹ç® |
| | | |
| | | return insProductMapper.selectItemNameBySampleIds(sampleIds); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åææé¡¹æ£åæ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public RawProductAnalysisVo getRawProductAnalysis(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | List<IfsInventoryQuantitySupplierDto> analysisList = dataAnalysisMapper.getRawProductAnalysisAllSample(dataAnalysisDto); |
| | | // æ ¹æ®æ ·åidæ¥è¯¢æ£æµåæ° |
| | | if (CollectionUtils.isEmpty(analysisList)) { |
| | | return null; |
| | | } |
| | | List<Integer> sampleIds = analysisList.stream().map(IfsInventoryQuantitySupplierDto::getSampleId).collect(Collectors.toList()); |
| | | // æ¥è¯¢æ£éªé¡¹ç® |
| | | List<SampleProductRawAnalysisDto> sampleProductList = insProductMapper.selectListBySampleIds(sampleIds); |
| | | |
| | | List<String> itemNames = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(dataAnalysisDto.getItemNames())) { |
| | | itemNames = dataAnalysisDto.getItemNames(); |
| | | } else { |
| | | itemNames = insProductMapper.selectItemNameBySampleIds(sampleIds); |
| | | } |
| | | |
| | | // æ ¹æ®æ ·ååç» |
| | | List<Map<String, Object>> productList = new ArrayList<>(); |
| | | |
| | | Map<Integer, List<SampleProductRawAnalysisDto>> collect = sampleProductList.stream().collect(Collectors.groupingBy(SampleProductRawAnalysisDto::getInsSampleId)); |
| | | List<String> finalItemNames = itemNames; |
| | | collect.forEach((integer, rawAnalysisDtos) -> { |
| | | // æ£éªé¡¹ç®åç§°è½¬æ¢æmap |
| | | Map<String, Object> itemMap = new HashMap<>(); |
| | | for (String itemName : finalItemNames) { |
| | | itemMap.put(itemName, null); |
| | | } |
| | | // é忣éªé¡¹ |
| | | for (SampleProductRawAnalysisDto rawAnalysisDto : rawAnalysisDtos) { |
| | | itemMap.put(rawAnalysisDto.getInspectionItem(), rawAnalysisDto.getLastValue()); |
| | | } |
| | | itemMap.put("product", rawAnalysisDtos.get(0).getSampleCode()); |
| | | productList.add(itemMap); |
| | | }); |
| | | |
| | | RawProductAnalysisVo rawProductAnalysisVo = new RawProductAnalysisVo(); |
| | | rawProductAnalysisVo.setItemNames(itemNames); |
| | | rawProductAnalysisVo.setProductList(productList); |
| | | |
| | | return rawProductAnalysisVo; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£æµé¡¹åæå表 |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<IfsInventoryQuantitySupplierDto> getRawProductAnalysisAllList(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | return dataAnalysisMapper.getRawProductAnalysisList(dataAnalysisDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é¡¹æ£åæåæ ¼ç |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public RawProductAnalysisVo getRawProductAnalysisRawPass(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼ååæ®µ, é¿å
æ¥é |
| | | this.formatDataAnalysisDto(dataAnalysisDto); |
| | | List<IfsInventoryQuantitySupplierDto> analysisList = dataAnalysisMapper.getRawProductAnalysisAllSample(dataAnalysisDto); |
| | | // æ ¹æ®æ ·åidæ¥è¯¢æ£æµåæ° |
| | | if (CollectionUtils.isEmpty(analysisList)) { |
| | | return null; |
| | | } |
| | | List<Integer> sampleIds = analysisList.stream().map(IfsInventoryQuantitySupplierDto::getSampleId).collect(Collectors.toList()); |
| | | // æ¥è¯¢æ£éªé¡¹ç® |
| | | List<SampleProductRawAnalysisDto> sampleProductList = insProductMapper.selectListBySampleIds(sampleIds); |
| | | List<String> itemNames = new ArrayList<>(); |
| | | List<String> finalItemNames = itemNames; |
| | | if (CollectionUtils.isNotEmpty(dataAnalysisDto.getItemNames())) { |
| | | itemNames = dataAnalysisDto.getItemNames(); |
| | | } else { |
| | | itemNames = insProductMapper.selectItemNameBySampleIds(sampleIds); |
| | | } |
| | | // åç» |
| | | List<Map<String, Object>> productList = new ArrayList<>(); |
| | | |
| | | Map<String, List<SampleProductRawAnalysisDto>> groupList = new HashMap<>(); |
| | | |
| | | switch (dataAnalysisDto.getGroupType()) { |
| | | case "0": // é»è®¤æ ·ååºå |
| | | groupList = sampleProductList.stream() |
| | | .collect(Collectors.groupingBy(SampleProductRawAnalysisDto::getSample)); |
| | | |
| | | break; |
| | | case "1": // æ¹æ¬¡å·åºå |
| | | groupList = sampleProductList.stream() |
| | | .collect(Collectors.groupingBy(SampleProductRawAnalysisDto::getUpdateBatchNo)); |
| | | |
| | | break; |
| | | case "2": // åå®¶åºå |
| | | groupList = sampleProductList.stream() |
| | | .collect(Collectors.groupingBy(SampleProductRawAnalysisDto::getSupplierName)); |
| | | |
| | | break; |
| | | } |
| | | |
| | | groupList.forEach((groupName, rawAnalysisDtos) -> { |
| | | // æç
§æ£éªé¡¹åºå |
| | | // æ£éªé¡¹ç®åç§°è½¬æ¢æmap |
| | | Map<String, Object> itemMap = new HashMap<>(); |
| | | |
| | | for (String itemName : finalItemNames) { |
| | | itemMap.put(itemName, null); |
| | | } |
| | | |
| | | Map<String, List<SampleProductRawAnalysisDto>> groupItemList = rawAnalysisDtos.stream().collect(Collectors.groupingBy(SampleProductRawAnalysisDto::getInspectionItem)); |
| | | |
| | | |
| | | groupItemList.forEach((itemName, dtos) -> { |
| | | // ç»è®¡åæ ¼æ»æ° |
| | | long qualifiedCount = dtos.stream() |
| | | .filter(dto -> dto.getInsResult() != null && dto.getInsResult().equals(1)) |
| | | .count(); |
| | | long totalCount = dtos.size(); |
| | | BigDecimal passRate = new BigDecimal(qualifiedCount).divide(new BigDecimal(totalCount), 4, RoundingMode.HALF_UP) |
| | | .multiply(new BigDecimal(100)) |
| | | .setScale(2, RoundingMode.HALF_UP); |
| | | itemMap.put(itemName, passRate); |
| | | }); |
| | | |
| | | itemMap.put("product", groupName); |
| | | productList.add(itemMap); |
| | | }); |
| | | |
| | | |
| | | RawProductAnalysisVo rawProductAnalysisVo = new RawProductAnalysisVo(); |
| | | rawProductAnalysisVo.setItemNames(itemNames); |
| | | rawProductAnalysisVo.setProductList(productList); |
| | | |
| | | return rawProductAnalysisVo; |
| | | } |
| | | |
| | | @Override |
| | | public DeviationAnalyzeVo getRawSupplierCompare(DataAnalysisDto dataAnalysisDto) { |
| | | // å¤æè®¢åidæ¯å¦æäºä¸ª |
| | | if (CollectionUtils.isEmpty(dataAnalysisDto.getOrderIds()) || dataAnalysisDto.getOrderIds().size() != 5) { |
| | | throw new ErrorException("è¯·éæ©äºæ¡æ°æ®"); |
| | | } |
| | | if (CollectionUtils.isEmpty(dataAnalysisDto.getItemNames()) || dataAnalysisDto.getItemNames().size() != 1) { |
| | | throw new ErrorException("è¯·éæ©ä¸ä¸ªæ£éªé¡¹æ£éªé¡¹"); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(dataAnalysisDto.getSupplierDataList())) { |
| | | if (dataAnalysisDto.getSupplierDataList().size() != 5) { |
| | | throw new ErrorException("åå®¶æ°æ®è¯·è¾å
¥å®æ´5æ¡"); |
| | | } |
| | | } |
| | | |
| | | List<RawMaterialSupplierVo> rawMaterialSupplierVoList = dataAnalysisMapper.getItemValueByOrderIds(dataAnalysisDto.getOrderIds(), dataAnalysisDto.getItemNames().get(0)); |
| | | // 夿åå®¶ææåç§°è§æ ¼åå·æ¯å¦æ¯ä¸æ ·ç |
| | | RawMaterialSupplierVo rawMaterialSupplierVo = rawMaterialSupplierVoList.get(0); |
| | | for (RawMaterialSupplierVo materialSupplierVo : rawMaterialSupplierVoList) { |
| | | if (!materialSupplierVo.getSupplierName().equals(rawMaterialSupplierVo.getSupplierName()) || |
| | | !materialSupplierVo.getSample().equals(rawMaterialSupplierVo.getSample()) || |
| | | !materialSupplierVo.getModel().equals(rawMaterialSupplierVo.getModel())) { |
| | | throw new ErrorException("éæ©çæ£éªä¿¡æ¯ä¸å¹é
"); |
| | | } |
| | | } |
| | | |
| | | List<String> lastValues = rawMaterialSupplierVoList.stream().map(RawMaterialSupplierVo::getLastValue).collect(Collectors.toList()); |
| | | |
| | | // è®¡ç®æ¬å°æ°æ® |
| | | Map<String, List<Object>> localData = dataCompute(lastValues); |
| | | |
| | | |
| | | DeviationAnalyzeVo deviationAnalyzeVo = new DeviationAnalyzeVo(); |
| | | deviationAnalyzeVo.setLocalData(localData.get("data")); |
| | | deviationAnalyzeVo.setLocalULC(localData.get("uclData")); |
| | | deviationAnalyzeVo.setLocalLCL(localData.get("lclData")); |
| | | deviationAnalyzeVo.setLocalAverage(localData.get("averageData")); |
| | | deviationAnalyzeVo.setLocalRange(localData.get("rangeData")); |
| | | |
| | | |
| | | // 夿æ¯å¦æåå®¶æ°æ® |
| | | if (CollectionUtils.isNotEmpty(dataAnalysisDto.getSupplierDataList())) { |
| | | List<String> supplierValues = dataAnalysisDto.getSupplierDataList(); |
| | | List<Object> absoluteDeviation = new ArrayList<>(); |
| | | List<Object> averageList = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < lastValues.size(); i++) { |
| | | // 夿æå¼æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(lastValues.get(i)) || |
| | | StringUtils.isNotBlank(supplierValues.get(i))) { |
| | | BigDecimal laseValue = new BigDecimal(lastValues.get(i)); |
| | | BigDecimal supplierValue = new BigDecimal(supplierValues.get(i)); |
| | | |
| | | // è®¡ç® (B3 - B2) |
| | | BigDecimal result = laseValue.subtract(supplierValue) |
| | | .divide(laseValue, 10, RoundingMode.HALF_UP) |
| | | .abs() |
| | | .setScale(2, RoundingMode.HALF_UP); |
| | | |
| | | absoluteDeviation.add(result); |
| | | } else { |
| | | absoluteDeviation.add(null); |
| | | } |
| | | } |
| | | // 计ç®å¹³åå¼ |
| | | List<String> stringList = absoluteDeviation.stream() |
| | | .map(obj -> obj == null ? "null" : obj.toString()) |
| | | .collect(Collectors.toList()); |
| | | BigDecimal average = computeAverage(stringList); |
| | | absoluteDeviation.add(average); |
| | | for (int i = 0; i < 5; i++) { |
| | | averageList.add(average); |
| | | } |
| | | |
| | | // 计ç®åå®¶æ°æ® |
| | | Map<String, List<Object>> supplierData = dataCompute(supplierValues); |
| | | deviationAnalyzeVo.setSupplierData(supplierData.get("data")); |
| | | deviationAnalyzeVo.setSupplierULC(supplierData.get("uclData")); |
| | | deviationAnalyzeVo.setSupplierLCL(supplierData.get("lclData")); |
| | | deviationAnalyzeVo.setSupplierAverage(supplierData.get("averageData")); |
| | | deviationAnalyzeVo.setSupplierRange(supplierData.get("rangeData")); |
| | | deviationAnalyzeVo.setAbsoluteDeviation(absoluteDeviation); |
| | | deviationAnalyzeVo.setAverage(averageList); |
| | | } |
| | | |
| | | |
| | | return deviationAnalyzeVo; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¬æä¸ä¸æåæ ¼çå¯¹æ¯ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getRawUpMonth(DataAnalysisDto dataAnalysisDto) { |
| | | return dataAnalysisMapper.getRawUpMonth(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹ç±»åé¥¼å¾ |
| | | * @param dataAnalysisDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getOrderTypeCookie(DataAnalysisDto dataAnalysisDto) { |
| | | return dataAnalysisMapper.getOrderTypeCookie(); |
| | | } |
| | | |
| | | /** |
| | | * 计ç®è¿åæ°æ® |
| | | * @param lastValues |
| | | * @return |
| | | */ |
| | | private static Map<String, List<Object>> dataCompute(List<String> lastValues) { |
| | | // å¹³åå¼ |
| | | BigDecimal average = computeAverage(lastValues); |
| | | |
| | | // æ ååå·® |
| | | BigDecimal standardDeviation = computeStandardDeviation(lastValues); |
| | | |
| | | // ç¸å¯¹åå·® |
| | | BigDecimal relativeDeviation = standardDeviation.divide(average, 2, RoundingMode.HALF_UP); |
| | | |
| | | // å¹³åç¸å¯¹åå·® |
| | | BigDecimal sqrt5 = BigDecimal.valueOf(Math.sqrt(5)); |
| | | BigDecimal averageRelativeDeviation = standardDeviation.divide(sqrt5, 2, RoundingMode.HALF_UP); |
| | | |
| | | // ucl |
| | | BigDecimal ucl = average.add(new BigDecimal("3").multiply(standardDeviation)).setScale(2, RoundingMode.HALF_UP); |
| | | |
| | | // lcl |
| | | BigDecimal lcl = average.subtract(new BigDecimal("3").multiply(standardDeviation)).setScale(2, RoundingMode.HALF_UP); |
| | | |
| | | // æå·® |
| | | BigDecimal range = computeRange(lastValues); |
| | | |
| | | // æ°æ®æ¼æ¥ |
| | | // æ£æµæ°æ® |
| | | List<Object> data = new ArrayList<>(); |
| | | for (String lastValue : lastValues) { |
| | | data.add(lastValue); |
| | | } |
| | | data.add(average); |
| | | data.add(standardDeviation); |
| | | data.add(relativeDeviation); |
| | | data.add(averageRelativeDeviation); |
| | | |
| | | //ucl |
| | | List<Object> uclData = new ArrayList<>(); |
| | | |
| | | //lcl |
| | | List<Object> lclData = new ArrayList<>(); |
| | | |
| | | //å¹³åå¼ |
| | | List<Object> averageData = new ArrayList<>(); |
| | | |
| | | //æå·® |
| | | List<Object> rangeData = new ArrayList<>(); |
| | | for (int i = 0; i < 5; i++) { |
| | | uclData.add(ucl); |
| | | lclData.add(lcl); |
| | | averageData.add(average); |
| | | rangeData.add(range); |
| | | } |
| | | Map<String, List<Object>> map = new HashMap<>(); |
| | | map.put("data", data); |
| | | map.put("uclData", uclData); |
| | | map.put("lclData", lclData); |
| | | map.put("averageData", averageData); |
| | | map.put("rangeData", rangeData); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¡ç®æå·® |
| | | * @param lastValues |
| | | * @return |
| | | */ |
| | | public static BigDecimal computeRange(List<String> lastValues) { |
| | | int count = 0; |
| | | |
| | | BigDecimal min = null; |
| | | BigDecimal max = null; |
| | | |
| | | for (String value : lastValues) { |
| | | if (StrUtil.isNotBlank(value)) { |
| | | BigDecimal bigDecimalValue = new BigDecimal(value); |
| | | |
| | | if (min == null || bigDecimalValue.compareTo(min) < 0) { |
| | | min = bigDecimalValue; |
| | | } |
| | | |
| | | if (max == null || bigDecimalValue.compareTo(max) > 0) { |
| | | max = bigDecimalValue; |
| | | } |
| | | count++; |
| | | } |
| | | |
| | | } |
| | | |
| | | if (count == 0 || min == null || max == null) { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | |
| | | BigDecimal range = max.subtract(min); |
| | | |
| | | return range.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | /** |
| | | * 计ç®å¹³åå¼ |
| | | * @param values |
| | | * @return |
| | | */ |
| | | private static BigDecimal computeAverage(List<String> values) { |
| | | BigDecimal sum = BigDecimal.ZERO; |
| | | int count = 0; |
| | | |
| | | for (String value : values) { |
| | | if (StrUtil.isNotBlank(value)) { |
| | | |
| | | BigDecimal number = new BigDecimal(value); |
| | | sum = sum.add(number); |
| | | count++; |
| | | |
| | | } |
| | | } |
| | | |
| | | return count == 0 ? BigDecimal.ZERO : sum.divide(BigDecimal.valueOf(count), 2, BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | |
| | | /** |
| | | * è®¡ç®æ ååå·® |
| | | * @return |
| | | */ |
| | | private static BigDecimal computeStandardDeviation(List<String> lastValues) { |
| | | int count = 0; |
| | | |
| | | // å°å符串转æ¢ä¸º BigDecimal å表 |
| | | List<BigDecimal> values = new ArrayList<>(); |
| | | for (String value : lastValues) { |
| | | if (StrUtil.isNotBlank(value)) { |
| | | values.add(new BigDecimal(value)); |
| | | count++; |
| | | } |
| | | } |
| | | |
| | | if (count == 0) { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | |
| | | // 计ç®å¹³åå¼ |
| | | BigDecimal sum = BigDecimal.ZERO; |
| | | for (BigDecimal value : values) { |
| | | sum = sum.add(value); |
| | | } |
| | | BigDecimal mean = sum.divide(new BigDecimal(values.size()), MathContext.DECIMAL128); |
| | | |
| | | // è®¡ç®æ¯ä¸ªæ°å¼ä¸å¹³åå¼çå·®çå¹³æ¹ |
| | | BigDecimal squaredDifferenceSum = BigDecimal.ZERO; |
| | | for (BigDecimal value : values) { |
| | | BigDecimal difference = value.subtract(mean); |
| | | BigDecimal squaredDifference = difference.multiply(difference); |
| | | squaredDifferenceSum = squaredDifferenceSum.add(squaredDifference); |
| | | } |
| | | |
| | | // è®¡ç®æ åå·®ï¼æ³¨æè¿é使ç¨çæ¯æ ·æ¬æ å差计ç®å
¬å¼ |
| | | BigDecimal variance = squaredDifferenceSum.divide(new BigDecimal(values.size() - 1), MathContext.DECIMAL128); |
| | | BigDecimal stddev = sqrt(variance); |
| | | |
| | | // ä¿ç两ä½å°æ° |
| | | return stddev.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | private static BigDecimal sqrt(BigDecimal value) { |
| | | // ä½¿ç¨ Heron's method 计ç®å¹³æ¹æ ¹ |
| | | BigDecimal x = value; |
| | | BigDecimal tolerance = new BigDecimal("1E-10"); |
| | | BigDecimal guess = value.divide(BigDecimal.valueOf(2), MathContext.DECIMAL128); |
| | | |
| | | while (x.subtract(guess).abs().compareTo(tolerance) > 0) { |
| | | x = guess; |
| | | guess = x.add(value.divide(x, MathContext.DECIMAL128)).divide(new BigDecimal("2"), MathContext.DECIMAL128); |
| | | } |
| | | |
| | | return guess; |
| | | } |
| | | |
| | | /** |
| | | * *****æ ¼å¼ååæ®µ**** |
| | | * @param dataAnalysisDto |
| | | */ |
| | | private void formatDataAnalysisDto(DataAnalysisDto dataAnalysisDto) { |
| | | // æ ¼å¼è¯å段, é¿å
æ¥é |
| | | if (StrUtil.isBlank(dataAnalysisDto.getOrderType())) { |
| | | dataAnalysisDto.setOrderType("1"); |
| | | } |
| | | if (dataAnalysisDto.getOrderType().equals("2")) { |
| | | // å£åº¦æ£éª |
| | | dataAnalysisDto.setOrderType(InsOrderTypeConstants.QUARTERLY_TEST); |
| | | } else { |
| | | // è¿åæ£éª |
| | | dataAnalysisDto.setOrderType(InsOrderTypeConstants.ENTER_THE_FACTORY); |
| | | } |
| | | if (StrUtil.isBlank(dataAnalysisDto.getDateType())) { |
| | | dataAnalysisDto.setDateType("1"); |
| | | } |
| | | if (StrUtil.isBlank(dataAnalysisDto.getGroupType())) { |
| | | dataAnalysisDto.setGroupType("0"); |
| | | } |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.IfsStockQueryDTO; |
| | | import com.ruoyi.inspect.dto.SpotCheckQuarterDto; |
| | | import com.ruoyi.inspect.dto.SpotCheckYearDto; |
| | | import com.ruoyi.inspect.mapper.SpotCheckQuarterMapper; |
| | | import com.ruoyi.inspect.mapper.SpotCheckYearMapper; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarter; |
| | | import com.ruoyi.inspect.pojo.SpotCheckQuarterItem; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYear; |
| | | import com.ruoyi.inspect.pojo.SpotCheckYearItem; |
| | | import com.ruoyi.inspect.service.FinishProductSpotCheckService; |
| | | import com.ruoyi.inspect.service.SpotCheckQuarterItemService; |
| | | import com.ruoyi.inspect.service.SpotCheckYearItemService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æåæ½æ · |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/9/29 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class FinishProductSpotCheckServiceImpl implements FinishProductSpotCheckService { |
| | | |
| | | @Resource |
| | | private IfsApiUtils ifsApiUtils; |
| | | @Resource |
| | | private SpotCheckQuarterMapper spotCheckQuarterMapper; |
| | | @Resource |
| | | private SpotCheckQuarterItemService spotCheckQuarterItemService; |
| | | @Resource |
| | | private SpotCheckYearMapper spotCheckYearMapper; |
| | | @Resource |
| | | private SpotCheckYearItemService spotCheckYearItemService; |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | |
| | | public Result getIfsStockReport(IfsStockQueryDTO ifsStockQueryDTO) { |
| | | JSONObject jresult = new JSONObject(); |
| | | jresult.put("count", 0); |
| | | jresult.put("data", new JSONArray()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | generateIfsStockQueryParams(jsonObject, ifsStockQueryDTO, ifsStockQueryDTO.getPage(), ifsStockQueryDTO.getLimit()); |
| | | Result result = ifsApiUtils.getIfsStock(jsonObject.toJSONString()); |
| | | if (result.getCode() == 200) { |
| | | JSONObject data = (JSONObject) JSON.toJSON(result.getData()); |
| | | JSONArray array = new JSONArray(); |
| | | for (int i = 0; i < data.getJSONArray("LIST_INFO").size(); i++) { |
| | | JSONObject listInfo = data.getJSONArray("LIST_INFO").getJSONObject(i); |
| | | array.add(listInfo); |
| | | } |
| | | //è·åæ»æ°é |
| | | int count = data.getIntValue("TOTAL_RECORD"); |
| | | jresult.put("count", count); |
| | | jresult.put("data", array); |
| | | } |
| | | return Result.success(jresult); |
| | | } |
| | | |
| | | public void generateIfsStockQueryParams(JSONObject result, IfsStockQueryDTO ifsStockQueryDTO, Long pageNo, Long pageSize) { |
| | | result.put("PAGE", pageNo); |
| | | result.put("LIMIT", pageSize); |
| | | result.put("WAREHOUSE", "æåä»åº"); |
| | | result.put("QUANTITY_FLAG", ">0"); |
| | | //表éé¢çOTCè¡å· |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getCotcOrderNo())) { |
| | | result.put("C_OTC_ORDER_NO", ifsStockQueryDTO.getCotcOrderNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getCotcLineNo())) { |
| | | result.put("C_OTC_LINE_NO", ifsStockQueryDTO.getCotcLineNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getPartNo())) { |
| | | result.put("PART_NO", ifsStockQueryDTO.getPartNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getPartDescription())) { |
| | | result.put("PART_DESC", "%" + ifsStockQueryDTO.getPartDescription() + "%"); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocNo())) { |
| | | result.put("LOCATION_NO", ifsStockQueryDTO.getLocNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocDesc())) { |
| | | result.put("LOCATION_DESC", ifsStockQueryDTO.getLocDesc()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLotBatchNo())) { |
| | | result.put("LOT_BATCH_NO", ifsStockQueryDTO.getLotBatchNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getWdrNo())) { |
| | | result.put("WDR_NO", ifsStockQueryDTO.getWdrNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getWarehouse())) { |
| | | result.put("WAREHOUSE", ifsStockQueryDTO.getWarehouse()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocationGroup())) { |
| | | result.put("LOCATION_GROUP", ifsStockQueryDTO.getLocationGroup()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocationGroupDesc())) { |
| | | result.put("LOCATION_GROUP_DESC", ifsStockQueryDTO.getLocationGroupDesc()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getReelNumber())) { |
| | | result.put("ATTR1", ifsStockQueryDTO.getReelNumber()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getStartMeter())) { |
| | | result.put("ATTR2", ifsStockQueryDTO.getStartMeter()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getEndMeter())) { |
| | | result.put("ATTR3", ifsStockQueryDTO.getEndMeter()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getOuterColor())) { |
| | | result.put("ATTR4", ifsStockQueryDTO.getOuterColor()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getInsulationColor())) { |
| | | result.put("ATTR5", ifsStockQueryDTO.getInsulationColor()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getOtcOrderNo())) { |
| | | result.put("ATTR6", ifsStockQueryDTO.getOtcOrderNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getMpsNo())) { |
| | | result.put("ATTR7", ifsStockQueryDTO.getMpsNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLetteringInfo())) { |
| | | result.put("ATTR8", ifsStockQueryDTO.getLetteringInfo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getSStockQuantity())) { |
| | | result.put("ATTR9", ifsStockQueryDTO.getSStockQuantity()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getSAvailableStockQuantity())) { |
| | | result.put("ATTR10", ifsStockQueryDTO.getSAvailableStockQuantity()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getSunit())) { |
| | | result.put("ATTR11", ifsStockQueryDTO.getSunit()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getStockSource())) { |
| | | result.put("ATTR12", ifsStockQueryDTO.getStockSource()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getInspInstorageTime())) { |
| | | result.put("ATTR13", ifsStockQueryDTO.getInspInstorageTime()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getTestRemark())) { |
| | | result.put("ATTR14", ifsStockQueryDTO.getTestRemark()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getGrossWeight())) { |
| | | result.put("ATTR15", ifsStockQueryDTO.getGrossWeight()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getNetWeight())) { |
| | | result.put("ATTR16", ifsStockQueryDTO.getNetWeight()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getPackingManner())) { |
| | | result.put("ATTR17", ifsStockQueryDTO.getPackingManner()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getCylinderNumber())) { |
| | | result.put("ATTR18", ifsStockQueryDTO.getCylinderNumber()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getRemark())) { |
| | | result.put("ATTR19", ifsStockQueryDTO.getRemark()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getLengthRequirement())) { |
| | | result.put("ATTR20", ifsStockQueryDTO.getLengthRequirement()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getCustomerName())) { |
| | | result.put("ATTR21", ifsStockQueryDTO.getCustomerName()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getSystemNo())) { |
| | | result.put("ATTR22", ifsStockQueryDTO.getSystemNo()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getInSource())) { |
| | | result.put("ATTR23", ifsStockQueryDTO.getInSource()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getSplitQuality())) { |
| | | result.put("ATTR24", ifsStockQueryDTO.getSplitQuality()); |
| | | } |
| | | if (StrUtil.isNotBlank(ifsStockQueryDTO.getReserveQuantity())) { |
| | | result.put("QTY_RESERVED", ifsStockQueryDTO.getReserveQuantity()); |
| | | } |
| | | } |
| | | |
| | | /************************************************* å£åº¦æ½æ · ***********************************************************/ |
| | | |
| | | /** |
| | | * æ°å¢å£åº¦æ½æ£ |
| | | * @param spotCheckQuarterDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addQuarter(SpotCheckQuarterDto spotCheckQuarterDto) { |
| | | // æ ¹æ®ç¼å·æ¥è¯¢ä¹åç |
| | | SpotCheckQuarter spotCheckQuarter = spotCheckQuarterMapper.selectOne(Wrappers.<SpotCheckQuarter>lambdaQuery() |
| | | .eq(SpotCheckQuarter::getQuarterNo, spotCheckQuarterDto.getQuarterNo()) |
| | | .orderByDesc(SpotCheckQuarter::getCreateTime) |
| | | .last("limit 1")); |
| | | if (spotCheckQuarter == null) { |
| | | spotCheckQuarterMapper.insert(spotCheckQuarterDto); |
| | | // æ·»å 详æ
|
| | | for (SpotCheckQuarterItem quarterItem : spotCheckQuarterDto.getQuarterItems()) { |
| | | quarterItem.setQuarterId(spotCheckQuarterDto.getQuarterId()); |
| | | } |
| | | spotCheckQuarterItemService.saveBatch(spotCheckQuarterDto.getQuarterItems()); |
| | | } else { |
| | | // ç´¯å 详æ
|
| | | for (SpotCheckQuarterItem quarterItem : spotCheckQuarterDto.getQuarterItems()) { |
| | | quarterItem.setQuarterId(spotCheckQuarter.getQuarterId()); |
| | | } |
| | | spotCheckQuarterItemService.saveBatch(spotCheckQuarterDto.getQuarterItems()); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å£åº¦æ½æ ·è¯¦æ
|
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public SpotCheckQuarterDto getQuarter(Integer quarterId) { |
| | | SpotCheckQuarter spotCheckQuarter = spotCheckQuarterMapper.selectById(quarterId); |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<SpotCheckQuarterItem> list = spotCheckQuarterItemService.list(Wrappers.<SpotCheckQuarterItem>lambdaQuery() |
| | | .eq(SpotCheckQuarterItem::getQuarterId, spotCheckQuarter.getQuarterId())); |
| | | SpotCheckQuarterDto spotCheckQuarterDto = new SpotCheckQuarterDto(); |
| | | BeanUtil.copyProperties(spotCheckQuarter, spotCheckQuarterDto); |
| | | spotCheckQuarterDto.setQuarterItems(list); |
| | | |
| | | return spotCheckQuarterDto; |
| | | } |
| | | |
| | | /** |
| | | * å£åº¦æ½æ ·å页æ¥è¯¢ |
| | | * @param page |
| | | * @param spotCheckQuarter |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<SpotCheckQuarterDto> getQuarterPage(Page page, SpotCheckQuarterDto spotCheckQuarter) { |
| | | return spotCheckQuarterMapper.getQuarterPage(page, QueryWrappers.queryWrappers(spotCheckQuarter)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å£åº¦æ½æ · |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean deleteQuarter(Integer quarterId) { |
| | | spotCheckQuarterMapper.deleteById(quarterId); |
| | | spotCheckQuarterItemService.remove(Wrappers.<SpotCheckQuarterItem>lambdaQuery() |
| | | .eq(SpotCheckQuarterItem::getQuarterId, quarterId)); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æåä¸åç颿¥è¯¢å£åº¦ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getQuarterOnOrder() { |
| | | List<Map<String, Object>> quarterOnOrder = spotCheckQuarterMapper.getQuarterOnOrder(); |
| | | for (Map<String, Object> stringMap : quarterOnOrder) { |
| | | List<SpotCheckQuarterItem> list = spotCheckQuarterItemService.list(Wrappers.<SpotCheckQuarterItem>lambdaQuery() |
| | | .eq(SpotCheckQuarterItem::getQuarterId, (Integer) stringMap.get("value"))); |
| | | List<Map<String, Object>> itemMaps = list.stream().map(spotCheckQuarterItem -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("value", spotCheckQuarterItem.getQuarterItemId()); |
| | | map.put("label", spotCheckQuarterItem.getProductModel() + " " |
| | | + spotCheckQuarterItem.getProductType() + " " |
| | | + spotCheckQuarterItem.getSpotCheckNumber()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | stringMap.put("children", itemMaps); |
| | | |
| | | } |
| | | |
| | | return quarterOnOrder; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å£åº¦æ£éª |
| | | * @param spotCheckQuarterDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateQuarterOnOrder(SpotCheckQuarterDto spotCheckQuarterDto) { |
| | | if (CollectionUtils.isNotEmpty(spotCheckQuarterDto.getQuarterItems())) { |
| | | // æ¸
é¤ä¹å详æ
|
| | | spotCheckQuarterItemService.remove(Wrappers.<SpotCheckQuarterItem>lambdaQuery() |
| | | .eq(SpotCheckQuarterItem::getQuarterId, spotCheckQuarterDto.getQuarterId())); |
| | | // æ·»å 详æ
|
| | | for (SpotCheckQuarterItem quarterItem : spotCheckQuarterDto.getQuarterItems()) { |
| | | quarterItem.setQuarterId(spotCheckQuarterDto.getQuarterId()); |
| | | } |
| | | spotCheckQuarterItemService.saveBatch(spotCheckQuarterDto.getQuarterItems()); |
| | | } |
| | | |
| | | spotCheckQuarterMapper.updateById(spotCheckQuarterDto); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * çææç»æ¥å |
| | | * @param quarterId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean finalReportQuarter(Integer quarterId, HttpServletResponse response) { |
| | | // æ·»å æ¥åä¿¡æ¯ |
| | | SpotCheckQuarter spotCheckQuarter = spotCheckQuarterMapper.selectById(quarterId); |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<SpotCheckQuarterItem> itemList = spotCheckQuarterItemService.list(Wrappers.<SpotCheckQuarterItem>lambdaQuery() |
| | | .eq(SpotCheckQuarterItem::getQuarterId, spotCheckQuarter.getQuarterId())); |
| | | |
| | | for (SpotCheckQuarterItem spotCheckQuarterItem : itemList) { |
| | | // æ¼æ¥åå·åæ°é |
| | | spotCheckQuarterItem.setSpotCheckNumber((StringUtils.isBlank(spotCheckQuarterItem.getProductModel()) ? "" : spotCheckQuarterItem.getProductModel()) + |
| | | (StringUtils.isBlank(spotCheckQuarterItem.getSpotCheckNumber()) ? "" : spotCheckQuarterItem.getSpotCheckNumber())); |
| | | } |
| | | |
| | | //ç¼å¶äºº |
| | | String writeUrl = null; |
| | | if (spotCheckQuarter.getWriteUser() != null) { |
| | | try { |
| | | writeUrl = userMapper.selectById(spotCheckQuarter.getWriteUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(writeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // åå§åææç countersignUrl åé |
| | | String[] countersignUrls = new String[7]; |
| | | |
| | | // 妿 spotCheckQuarter.getCountersignUser() 䏿¯ç©ºæç©ºç½å符串 |
| | | if (StrUtil.isNotBlank(spotCheckQuarter.getCountersignUser())) { |
| | | String[] split = spotCheckQuarter.getCountersignUser().split(","); |
| | | |
| | | // éå split æ°ç»ï¼å¹¶å°å
ç´ ä¾æ¬¡èµå¼ç» countersignUrls æ°ç» |
| | | for (int i = 0; i < Math.min(split.length, countersignUrls.length); i++) { |
| | | |
| | | String countersignUrl = null; |
| | | try { |
| | | countersignUrl = userMapper.selectById(Integer.parseInt(split[i])).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(countersignUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | |
| | | countersignUrls[i] = countersignUrl; |
| | | } |
| | | } |
| | | |
| | | // å° countersignUrls æ°ç»ä¸çå¼ä¾æ¬¡èµå¼ç» countersignUrl1 å° countersignUrl7 |
| | | String countersignUrl1 = countersignUrls[0]; |
| | | String countersignUrl2 = countersignUrls[1]; |
| | | String countersignUrl3 = countersignUrls[2]; |
| | | String countersignUrl4 = countersignUrls[3]; |
| | | String countersignUrl5 = countersignUrls[4]; |
| | | String countersignUrl6 = countersignUrls[5]; |
| | | String countersignUrl7 = countersignUrls[6]; |
| | | |
| | | //å®¡æ ¸äºº |
| | | String examineUrl = null; |
| | | if (spotCheckQuarter.getExamineUser() != null) { |
| | | try { |
| | | examineUrl = userMapper.selectById(spotCheckQuarter.getExamineUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //æ¹å人 |
| | | String ratifyUrl = null; |
| | | if (spotCheckQuarter.getRatifyUser() != null) { |
| | | try { |
| | | ratifyUrl = userMapper.selectById(spotCheckQuarter.getRatifyUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | String finalWriteUrl = writeUrl; |
| | | String finalExamineUrl = examineUrl; |
| | | String finalRatifyUrl = ratifyUrl; |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/spot_check_quarter.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("quarter", spotCheckQuarter); |
| | | put("quarterItems", itemList); |
| | | put("writeUrl", StrUtil.isBlank(finalWriteUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalWriteUrl).create()); |
| | | put("countersignUrl1", StrUtil.isBlank(countersignUrl1) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl1).create()); |
| | | put("countersignUrl2", StrUtil.isBlank(countersignUrl2) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl2).create()); |
| | | put("countersignUrl3", StrUtil.isBlank(countersignUrl3) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl3).create()); |
| | | put("countersignUrl4", StrUtil.isBlank(countersignUrl4) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl4).create()); |
| | | put("countersignUrl5", StrUtil.isBlank(countersignUrl5) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl5).create()); |
| | | put("countersignUrl6", StrUtil.isBlank(countersignUrl6) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl6).create()); |
| | | put("countersignUrl7", StrUtil.isBlank(countersignUrl7) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl7).create()); |
| | | put("examineUrl", StrUtil.isBlank(finalExamineUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalExamineUrl).create()); |
| | | put("ratifyUrl", StrUtil.isBlank(finalRatifyUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create()); |
| | | put("createDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(spotCheckQuarter.getCreateTime())).create()); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | spotCheckQuarter.getQuarterNo() + "æ½æ ·è®¡å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /******************************************************* å¹´åº¦æ½æ · *************************************************************/ |
| | | |
| | | @Override |
| | | public boolean addSpotCheckYear(SpotCheckYearDto spotCheckYearDto) { |
| | | spotCheckYearMapper.insert(spotCheckYearDto); |
| | | // 详æ
|
| | | for (SpotCheckYearItem yearItem : spotCheckYearDto.getYearItems()) { |
| | | yearItem.setYearId(spotCheckYearDto.getYearId()); |
| | | } |
| | | spotCheckYearItemService.saveBatch(spotCheckYearDto.getYearItems()); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public SpotCheckYearDto getSpotCheckYear(Integer yearId) { |
| | | SpotCheckYear spotCheckYear = spotCheckYearMapper.selectById(yearId); |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<SpotCheckYearItem> list = spotCheckYearItemService.list(Wrappers.<SpotCheckYearItem>lambdaQuery() |
| | | .eq(SpotCheckYearItem::getYearId, spotCheckYear.getYearId())); |
| | | SpotCheckYearDto spotCheckYearDto = new SpotCheckYearDto(); |
| | | BeanUtil.copyProperties(spotCheckYear, spotCheckYearDto); |
| | | spotCheckYearDto.setYearItems(list); |
| | | |
| | | return spotCheckYearDto; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SpotCheckYearDto> getSpotCheckYearPage(Page page, SpotCheckYearDto spotCheckYear) { |
| | | return spotCheckYearMapper.getSpotCheckYearPage(page, QueryWrappers.queryWrappers(spotCheckYear)); |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteSpotCheckYear(Integer yearId) { |
| | | spotCheckYearMapper.deleteById(yearId); |
| | | spotCheckYearItemService.remove(Wrappers.<SpotCheckYearItem>lambdaQuery() |
| | | .eq(SpotCheckYearItem::getYearId, yearId)); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å¹´åº¦æ£éª |
| | | * @param spotCheckYearDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateSpotCheckYear(SpotCheckYearDto spotCheckYearDto) { |
| | | spotCheckYearMapper.updateById(spotCheckYearDto); |
| | | |
| | | // å é¤è¯¦æ
|
| | | spotCheckYearItemService.remove(Wrappers.<SpotCheckYearItem>lambdaQuery() |
| | | .eq(SpotCheckYearItem::getYearId, spotCheckYearDto.getYearId())); |
| | | |
| | | // éæ°æ°å¢ |
| | | for (SpotCheckYearItem yearItem : spotCheckYearDto.getYearItems()) { |
| | | yearItem.setYearId(spotCheckYearDto.getYearId()); |
| | | } |
| | | spotCheckYearItemService.saveBatch(spotCheckYearDto.getYearItems()); |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean finalReportSpotCheckYear(Integer yearId, HttpServletResponse response) { |
| | | SpotCheckYear spotCheckYear = spotCheckYearMapper.selectById(yearId); |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<SpotCheckYearItem> itemList = spotCheckYearItemService.list(Wrappers.<SpotCheckYearItem>lambdaQuery() |
| | | .eq(SpotCheckYearItem::getYearId, spotCheckYear.getYearId())); |
| | | |
| | | //ç¼å¶äºº |
| | | String writeUrl = null; |
| | | if (spotCheckYear.getWriteUser() != null) { |
| | | try { |
| | | writeUrl = userMapper.selectById(spotCheckYear.getWriteUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(writeUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // åå§åææç countersignUrl åé |
| | | String[] countersignUrls = new String[7]; |
| | | |
| | | // 妿䏿¯ç©ºæç©ºç½å符串 |
| | | if (StrUtil.isNotBlank(spotCheckYear.getCountersignUser())) { |
| | | String[] split = spotCheckYear.getCountersignUser().split(","); |
| | | |
| | | // éå split æ°ç»ï¼å¹¶å°å
ç´ ä¾æ¬¡èµå¼ç» countersignUrls æ°ç» |
| | | for (int i = 0; i < Math.min(split.length, countersignUrls.length); i++) { |
| | | |
| | | String countersignUrl = null; |
| | | try { |
| | | countersignUrl = userMapper.selectById(Integer.parseInt(split[i])).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(countersignUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | |
| | | countersignUrls[i] = countersignUrl; |
| | | } |
| | | } |
| | | |
| | | // å° countersignUrls æ°ç»ä¸çå¼ä¾æ¬¡èµå¼ç» countersignUrl1 å° countersignUrl7 |
| | | String countersignUrl1 = countersignUrls[0]; |
| | | String countersignUrl2 = countersignUrls[1]; |
| | | String countersignUrl3 = countersignUrls[2]; |
| | | String countersignUrl4 = countersignUrls[3]; |
| | | String countersignUrl5 = countersignUrls[4]; |
| | | String countersignUrl6 = countersignUrls[5]; |
| | | String countersignUrl7 = countersignUrls[6]; |
| | | |
| | | //å®¡æ ¸äºº |
| | | String examineUrl = null; |
| | | if (spotCheckYear.getExamineUser() != null) { |
| | | try { |
| | | examineUrl = userMapper.selectById(spotCheckYear.getExamineUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(examineUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //æ¹å人 |
| | | String ratifyUrl = null; |
| | | if (spotCheckYear.getRatifyUser() != null) { |
| | | try { |
| | | ratifyUrl = userMapper.selectById(spotCheckYear.getRatifyUser()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | if (StrUtil.isBlank(ratifyUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | String finalWriteUrl = writeUrl; |
| | | String finalExamineUrl = examineUrl; |
| | | String finalRatifyUrl = ratifyUrl; |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/spot_check_year.docx"); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("year", spotCheckYear); |
| | | put("yearItems", itemList); |
| | | put("writeUrl", StrUtil.isBlank(finalWriteUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalWriteUrl).create()); |
| | | put("countersignUrl1", StrUtil.isBlank(countersignUrl1) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl1).create()); |
| | | put("countersignUrl2", StrUtil.isBlank(countersignUrl2) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl2).create()); |
| | | put("countersignUrl3", StrUtil.isBlank(countersignUrl3) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl3).create()); |
| | | put("countersignUrl4", StrUtil.isBlank(countersignUrl4) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl4).create()); |
| | | put("countersignUrl5", StrUtil.isBlank(countersignUrl5) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl5).create()); |
| | | put("countersignUrl6", StrUtil.isBlank(countersignUrl6) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl6).create()); |
| | | put("countersignUrl7", StrUtil.isBlank(countersignUrl7) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + countersignUrl7).create()); |
| | | put("examineUrl", StrUtil.isBlank(finalExamineUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalExamineUrl).create()); |
| | | put("ratifyUrl", StrUtil.isBlank(finalRatifyUrl) ? null : |
| | | Pictures.ofLocal(imgUrl + "/" + finalRatifyUrl).create()); |
| | | put("createDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(spotCheckYear.getCreateTime())).create()); |
| | | }}); |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | spotCheckYear.getYearHead(), "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.inspect.service.IfsOrderInspectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * éå®è®¢åæ¥æ£service |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class IfsOrderInspectionServiceImpl implements IfsOrderInspectionService { |
| | | |
| | | @Autowired |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | @Override |
| | | public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) { |
| | | // todo: åªçæ |
| | | String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate(); |
| | | String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate(); |
| | | ifsInventoryQuantityDto.setBeginDeclareDate(null); |
| | | ifsInventoryQuantityDto.setEndDeclareDate(null); |
| | | IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); |
| | | ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType()))); |
| | | return ifsByOver; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO; |
| | | import com.ruoyi.inspect.mapper.IfsPartPropsRecordMapper; |
| | | import com.ruoyi.inspect.mapper.IfsSplitOrderRecordMapper; |
| | | import com.ruoyi.inspect.pojo.IfsPartPropsRecord; |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.ruoyi.inspect.service.IfsPartPropsRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_part_props_record(ifs订åé¶ä»¶å±æ§è®°å½è¡¨)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2025-10-23 15:00:34 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class IfsPartPropsRecordServiceImpl extends ServiceImpl<IfsPartPropsRecordMapper, IfsPartPropsRecord> |
| | | implements IfsPartPropsRecordService{ |
| | | |
| | | @Autowired |
| | | private IfsApiUtils ifsApiUtils; |
| | | |
| | | @Autowired |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | @Autowired |
| | | private IfsSplitOrderRecordMapper ifsSplitOrderRecordMapper; |
| | | |
| | | @Value("${ifs.contract:}") |
| | | public String contract; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean saveOrUpdateProps(IfsPartPropsRecordDTO ifsPartPropsRecord) { |
| | | if(Objects.isNull(ifsPartPropsRecord)){ |
| | | throw new RuntimeException("åæ°ä¸è½ä¸ºç©º"); |
| | | } |
| | | //æ¥è¯¢æ¯å¦å·²æåæ¹æ¬¡åé¶ä»¶å·çæ¹æ¬¡å±æ§ï¼æ²¡æææ´æ° |
| | | Long count = baseMapper.selectCountByPartNoAndLotBatchNo(ifsPartPropsRecord.getPartNo(),ifsPartPropsRecord.getLotBatchNo()); |
| | | if(count==0){ |
| | | //å¤ææ¯æ°å¢è¿æ¯æ´æ° |
| | | String actionType = Objects.isNull(ifsPartPropsRecord.getId())?"New":"Modify"; |
| | | Map<String, Object> inAttrMap = new HashMap<>(); |
| | | inAttrMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | inAttrMap.put("SYSCODE", "LIMS"); |
| | | inAttrMap.put("SYSMODEL", "åºåç©ææ¹æ¬¡å±æ§ä¿®æ¹"); |
| | | HashMap<String, Object> batchInfoMap = new HashMap<>(); |
| | | batchInfoMap.put("CONTRACT",contract);//å |
| | | batchInfoMap.put("PART_NO",ifsPartPropsRecord.getPartNo());//é¶ä»¶å· |
| | | batchInfoMap.put("LOT_BATCH_NO",ifsPartPropsRecord.getLotBatchNo());//æ¹æ¬¡å· |
| | | batchInfoMap.put("ATTR1",ifsPartPropsRecord.getDrumNo());//è½½å
·ç¼å· |
| | | batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark().toString());//èµ·å§ç±³æ |
| | | batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark().toString());//æªæ¢ç±³æ |
| | | batchInfoMap.put("ATTR4", ifsPartPropsRecord.getOuterColor());//夿¤é¢è² |
| | | batchInfoMap.put("ATTR5",ifsPartPropsRecord.getInsulationColor());//ç»ç¼é¢è² |
| | | batchInfoMap.put("ATTR8",ifsPartPropsRecord.getLetteringInfo());//å°åä¿¡æ¯ |
| | | batchInfoMap.put("ATTR23","车é´è®¢å");//å
¥åºæ¥æº |
| | | batchInfoMap.put("ATTR24","0");//åå²é¢çæ°é |
| | | batchInfoMap.put("ACTION_TYPE",actionType);//æä½ç±»å |
| | | inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap)); |
| | | Result result = ifsApiUtils.importPartLotAttr(JSONUtil.toJsonStr(inAttrMap)); |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("åºåç©ææ¹æ¬¡å±æ§æ´æ°å¤±è´¥ï¼"+result.getMsg()); |
| | | } |
| | | } |
| | | return this.saveOrUpdate(ifsPartPropsRecord); |
| | | } |
| | | |
| | | @Override |
| | | public IfsPartPropsRecord getOneByIfsId(Long ifsId) { |
| | | //æ¥è¯¢ifs订åä¿¡æ¯ |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsId); |
| | | if(Objects.isNull(ifsInventoryQuantity)){ |
| | | throw new RuntimeException("æªæ¾å°å¯¹åºçIFS订åä¿¡æ¯"); |
| | | } |
| | | //夿æ¯å¦æ¯æå订å |
| | | if(ifsInventoryQuantity.getIsSplitOrder().equals(1)&& StringUtils.equals(ifsInventoryQuantity.getOrderType(), OrderType.RAW.getValue())){ |
| | | //æ¥è¯¢æåè®°å½ |
| | | IfsSplitOrderRecord splitRecord = ifsSplitOrderRecordMapper.selectOne(Wrappers.<IfsSplitOrderRecord>lambdaQuery() |
| | | .eq(IfsSplitOrderRecord::getOrderNo, ifsInventoryQuantity.getOrderNo()) |
| | | .eq(IfsSplitOrderRecord::getPartNo, ifsInventoryQuantity.getPartNo()) |
| | | .eq(IfsSplitOrderRecord::getReleaseNo, ifsInventoryQuantity.getReleaseNo()) |
| | | .eq(IfsSplitOrderRecord::getLineNo, ifsInventoryQuantity.getLineNo()) |
| | | .eq(IfsSplitOrderRecord::getReceiptNo, ifsInventoryQuantity.getReceiptNo()) |
| | | .eq(IfsSplitOrderRecord::getLotBatchNo, ifsInventoryQuantity.getUpdateBatchNo()) |
| | | .eq(IfsSplitOrderRecord::getOrderNo, ifsInventoryQuantity.getOrderNo()) |
| | | ); |
| | | if(Objects.isNull(splitRecord)){ |
| | | throw new RuntimeException("æªæ¾å°é¶ä»¶çæåä¿¡æ¯"); |
| | | } |
| | | IfsPartPropsRecord ifsPartPropsRecord = new IfsPartPropsRecord(); |
| | | ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo()); |
| | | ifsPartPropsRecord.setLetteringInfo(splitRecord.getLetteringInfo()); |
| | | ifsPartPropsRecord.setInsulationColor(splitRecord.getInsulationColor()); |
| | | ifsPartPropsRecord.setOuterColor(splitRecord.getOuterColor()); |
| | | ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo()); |
| | | ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo()); |
| | | return ifsPartPropsRecord; |
| | | } |
| | | return this.getOne(Wrappers.<IfsPartPropsRecord>lambdaQuery().eq(IfsPartPropsRecord::getIfsInventoryId,ifsId).last("limit 1")); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.pojo.IfsSplitOrderRecord; |
| | | import com.ruoyi.inspect.service.IfsSplitOrderRecordService; |
| | | import com.ruoyi.inspect.mapper.IfsSplitOrderRecordMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãifs_split_order_record(ifsåææè®¢åæåè®°å½è¡¨)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2025-10-29 16:39:41 |
| | | */ |
| | | @Service |
| | | public class IfsSplitOrderRecordServiceImpl extends ServiceImpl<IfsSplitOrderRecordMapper, IfsSplitOrderRecord> |
| | | implements IfsSplitOrderRecordService{ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsOrderDeviceRecordMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderDeviceRecord; |
| | | import com.ruoyi.inspect.service.InsOrderDeviceRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/22 |
| | | */ |
| | | @Service |
| | | public class InsOrderDeviceRecordServiceImpl extends ServiceImpl<InsOrderDeviceRecordMapper, InsOrderDeviceRecord> implements InsOrderDeviceRecordService { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsOrderFactoryVerifyItemMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderFactoryVerifyItem; |
| | | import com.ruoyi.inspect.service.InsOrderFactoryVerifyItemService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * åææåå®¶è¿è´§éªè¯æ£éªé¡¹ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-26 |
| | | */ |
| | | @Service |
| | | public class InsOrderFactoryVerifyItemServiceImpl extends ServiceImpl<InsOrderFactoryVerifyItemMapper, InsOrderFactoryVerifyItem> implements InsOrderFactoryVerifyItemService { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsOrderFileMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import com.ruoyi.inspect.service.InsOrderFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªåä¸çéä»¶å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-06-06 10:08:21 |
| | | */ |
| | | @Service |
| | | public class InsOrderFileServiceImpl extends ServiceImpl<InsOrderFileMapper, InsOrderFile> implements InsOrderFileService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.inspect.dto.SampleOrderDto; |
| | | import com.ruoyi.inspect.dto.TemplateRateDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderRatesMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderRates; |
| | | import com.ruoyi.inspect.service.InsOrderRatesService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 订åè´¹ç¨è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | @Service |
| | | public class InsOrderRatesServiceImpl extends ServiceImpl<InsOrderRatesMapper, InsOrderRates> implements InsOrderRatesService { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢åè´¹ç¨å表 |
| | | * @param page |
| | | * @param sampleOrderDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<SampleOrderDto> selectInsOrderRates(Page page, SampleOrderDto sampleOrderDto) { |
| | | return baseMapper.selectInsOrderRates(page, QueryWrappers.queryWrappers(sampleOrderDto)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TemplateRateDto> selectTemplateRatesDetail(Page page, Integer insOrderId) { |
| | | return baseMapper.selectTemplateRatesDetail(page, insOrderId); |
| | | } |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.InventoryDetailDTO; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingVo; |
| | | import com.ruoyi.basic.dto.TemplateInspectionItemDto; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.service.StandardMethodService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.enums.OrderType; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsOrderStateService; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import com.ruoyi.inspect.service.InsSampleService; |
| | | import com.ruoyi.inspect.vo.IfsOrderVO; |
| | | import com.ruoyi.inspect.vo.InsOrderPrintingVo; |
| | | import com.ruoyi.inspect.vo.OrderTemplateSummaryVo; |
| | | import com.ruoyi.inspect.vo.TemplateConditionVo; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.Month; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author gaoaoy |
| | | * @description é对表ãins_order(æ£éªä¸å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-12 16:17:55 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsOrderServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> |
| | | implements InsOrderService { |
| | | |
| | | private static final String DIRECT_TEMPLATE_LABORATORY = "æ°è"; |
| | | |
| | | private InsOrderMapper insOrderMapper; |
| | | private InsSampleService insSampleService; |
| | | private InsSampleMapper insSampleMapper; |
| | | private InsProductService insProductService; |
| | | private InsProductMapper insProductMapper; |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | private InsOrderStateService insOrderStateService; |
| | | private UserMapper userMapper; |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | private final NumberGenerator<InsOrder> numberGenerator; |
| | | private InsReportMapper insReportMapper; |
| | | private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper; |
| | | private IfsApiUtils ifsApiUtils; |
| | | private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper; |
| | | private StandardProductListMapper standardProductListMapper; |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | private StandardTreeService standardTreeService; |
| | | private StandardMethodService standardMethodService; |
| | | private StandardTemplateService standardTemplateService; |
| | | private InsOrderStandardTemplateMapper insOrderStandardTemplateMapper; |
| | | private InsOrderTemplateDeviceMapper insOrderTemplateDeviceMapper; |
| | | private InsSampleReceiptMapper insSampleReceiptMapper; |
| | | private ApplicationEventPublisher applicationEventPublisher; |
| | | |
| | | |
| | | |
| | | //è·åæ£éªä¸åæ°æ® |
| | | @Override |
| | | public IPage<SampleOrderDto> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | String laboratory = null; |
| | | // 夿æ¯å¦æ¯å
¨é¨ |
| | | String isOrderAll = null; |
| | | if (sampleOrderDto.getState() != null && sampleOrderDto.getState() == -2) { |
| | | isOrderAll = "1"; |
| | | sampleOrderDto.setState(null); |
| | | } |
| | | // æ£éªä¸ï¼æ°èä¸åå
å®¡æ ¸å³åçï¼éæ ·åæ¥æ¶æäº¤åï¼ins_sample_receipt.status=1ï¼æå±ç¤º |
| | | String receiptSubmitted = sampleOrderDto.getState() != null && sampleOrderDto.getState() == 1 ? "1" : null; |
| | | return insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), laboratory, |
| | | isOrderAll, receiptSubmitted); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åé
æ£éªäºº |
| | | * |
| | | * @return |
| | | */ |
| | | @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(StringUtils.isNotEmpty(appointed) ? LocalDate.parse(appointed) : null); |
| | | insOrder.setSendTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(insOrder); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | List<Integer> ids = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = ids.isEmpty() |
| | | ? Collections.emptyList() |
| | | : insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getState, 1) |
| | | .select(InsProduct::getSonLaboratory).groupBy(InsProduct::getSonLaboratory)); |
| | | |
| | | InsOrder order = insOrderMapper.selectById(orderId); |
| | | boolean directTemplateOrder = isDirectTemplateOrder(order, insSamples); |
| | | Set<String> taskLaboratories = directTemplateOrder |
| | | ? Collections.singleton(DIRECT_TEMPLATE_LABORATORY) |
| | | : insProducts.stream() |
| | | .map(InsProduct::getSonLaboratory) |
| | | .filter(StringUtils::isNotBlank) |
| | | .collect(Collectors.toCollection(LinkedHashSet::new)); |
| | | if (!directTemplateOrder && taskLaboratories.size() != insProducts.size()) { |
| | | throw new ErrorException("该æ£éªåææªç»´æ¤å®éªå®¤çæ£éªé¡¹ç®"); |
| | | } |
| | | |
| | | // æ¹éæ·»å æ£éªä»»å¡ç¶æè¡¨ |
| | | List<InsOrderState> insOrderStateList = taskLaboratories.stream() |
| | | .filter(laboratory -> insOrderStateService.count(Wrappers.<InsOrderState>lambdaQuery() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, laboratory)) == 0) |
| | | .map(laboratory -> { |
| | | InsOrderState insOrderState = new InsOrderState(); |
| | | insOrderState.setInsOrderId(orderId); |
| | | insOrderState.setLaboratory(laboratory); |
| | | insOrderState.setInsState(0); |
| | | return insOrderState; |
| | | }).collect(Collectors.toList()); |
| | | if (!insOrderStateList.isEmpty()) { |
| | | insOrderStateService.saveBatch(insOrderStateList); |
| | | } |
| | | |
| | | if (userId != null) { |
| | | Set<String> assignedLaboratories = StringUtils.isBlank(sonLaboratory) |
| | | ? taskLaboratories |
| | | : Collections.singleton(sonLaboratory); |
| | | for (String laboratory : assignedLaboratories) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setUserId(userId); |
| | | insSampleUser.setInsSampleId(orderId); |
| | | insSampleUser.setSonLaboratory(laboratory); |
| | | insSampleUserMapper.insert(insSampleUser); |
| | | } |
| | | } |
| | | |
| | | // å¤æè®¢åææ²¡æç»å®æ½æ ·è®¡å |
| | | if (order.getQuarterItemId() != null) { |
| | | // éè¦æ·»å ä¸åæ¶é´å°æ½æ ·æ¶é´, åæ ·äººåå°±æ¯æ£æµäºº |
| | | SpotCheckQuarterItem spotCheckQuarterItem = spotCheckQuarterItemMapper.selectById(order.getQuarterItemId()); |
| | | spotCheckQuarterItem.setSpotCheckTime(order.getSendTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | User user = userMapper.selectById(userId); |
| | | spotCheckQuarterItem.setSamplingUser(user.getName()); |
| | | spotCheckQuarterItemMapper.updateById(spotCheckQuarterItem); |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | private boolean isDirectTemplateOrder(InsOrder order, List<InsSample> samples) { |
| | | if (order == null || CollectionUtils.isEmpty(samples)) { |
| | | return false; |
| | | } |
| | | Long snapshotCount = insOrderStandardTemplateMapper.selectCount( |
| | | Wrappers.<InsOrderStandardTemplate>lambdaQuery() |
| | | .eq(InsOrderStandardTemplate::getInsOrderId, order.getId())); |
| | | return snapshotCount > 0 && samples.stream().anyMatch(sample -> |
| | | sample.getStandardMethodListId() == null |
| | | && StringUtils.isBlank(sample.getFactory()) |
| | | && StringUtils.isBlank(sample.getSampleType()) |
| | | && StringUtils.isBlank(sample.getModel()) |
| | | && StringUtils.isBlank(order.getFactory()) |
| | | && StringUtils.isBlank(order.getSampleType())); |
| | | } |
| | | |
| | | |
| | | public static String getWeek(String dayStr) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | try { |
| | | Date date = sdf.parse(dayStr); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); |
| | | int day = calendar.get(Calendar.DAY_OF_MONTH); |
| | | return getWeekDay(dayOfWeek); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String getWeekDay(int dayOfWeek) { |
| | | switch (dayOfWeek) { |
| | | case Calendar.MONDAY: |
| | | return "å¨ä¸"; |
| | | case Calendar.TUESDAY: |
| | | return "å¨äº"; |
| | | case Calendar.WEDNESDAY: |
| | | return "å¨ä¸"; |
| | | case Calendar.THURSDAY: |
| | | return "å¨å"; |
| | | case Calendar.FRIDAY: |
| | | return "å¨äº"; |
| | | case Calendar.SATURDAY: |
| | | return "å¨å
"; |
| | | case Calendar.SUNDAY: |
| | | return "卿¥"; |
| | | default: |
| | | return "æªç¥"; |
| | | } |
| | | } |
| | | |
| | | |
| | | // å¦æä½ ä½¿ç¨ Java 8+ï¼ä¹å¯ä»¥ç¨ Stream API ç®å代ç ï¼ |
| | | public List<StandardProductList> findMissingItemsWithStream(List<StandardProductList> standardList, |
| | | List<InsProduct> insList) { |
| | | Set<Integer> insIds = insList.stream() |
| | | .map(InsProduct::getStructureItemParameterId) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | return standardList.stream() |
| | | .filter(product -> !insIds.contains(product.getStructureItemParameterId())) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder) { |
| | | // todo: ä¸åå¤ææ½æ ·è®¡åçå¯ä¸æ§ |
| | | if (insOrder.getQuarterItemId() != null) { |
| | | Long quarterItemCount = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getQuarterItemId, insOrder.getQuarterItemId()) |
| | | .notIn(InsOrder::getState, -1 ,2 ,3)); |
| | | if (quarterItemCount > 0) { |
| | | throw new ErrorException("è¯¥æ½æ ·è®¡å已被ç»å®è¿"); |
| | | } |
| | | } |
| | | insOrder.setState(0); |
| | | |
| | | LocalDate appointed = insOrder.getAppointed(); |
| | | |
| | | insOrderMapper.insert(insOrder); // 主表 |
| | | |
| | | list.forEach(a -> { |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | insSampleMapper.insert(a); |
| | | if (ObjectUtil.isNotEmpty(a.getInsProduct())) { |
| | | // 夿æ¯å¦å¡«åå¾
æ£é¡¹æ°é |
| | | if (a.getQuantity() != null) { |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (Integer i = 1; i <= a.getQuantity(); i++) { |
| | | // éæ°æ·è´ å建æ°å¯¹è±¡ |
| | | AtomicInteger atomicInteger = new AtomicInteger(i); |
| | | List<InsProduct> insProducts = a.getInsProduct().stream().map(insProduct -> { |
| | | insProduct.setRawMaterialTag(String.valueOf(atomicInteger.get())); |
| | | InsProduct product = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, product); |
| | | return product; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | ip2.addAll(insProducts); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } else { |
| | | addInsProductMethod(a.getId(), a.getInsProduct()); |
| | | } |
| | | } |
| | | // 夿æ¯å¦æçµç¼é
ç½® |
| | | if (ObjectUtil.isNotEmpty(a.getInsulating())) { |
| | | // 夿æ¯å¦æè¾
å©çº¿è¯ |
| | | if (ObjectUtil.isNotEmpty(a.getAuxiliaryWireCore())) { |
| | | if (a.getAuxiliaryWireCore().getInsProduct().stream().filter(insProduct -> insProduct.getState() == 1).count() != |
| | | a.getInsulating().getInsProduct().stream().filter(insProduct -> insProduct.getState() == 1).count()) { |
| | | throw new ErrorException("çµç¼é
ç½®è¾
å©çº¿è¯æ£éªé¡¹æ°éä¸ç»ä¸, è¯·æ£æ¥"); |
| | | } |
| | | } |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (String s : a.getInsulating().getNum()) { |
| | | // éæ°æ·è´ å建æ°å¯¹è±¡ |
| | | List<InsProduct> insProducts = a.getInsulating().getInsProduct().stream().map(insProduct -> { |
| | | insProduct.setCableTag(s); |
| | | InsProduct product = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, product); |
| | | return product; |
| | | }).collect(Collectors.toList()); |
| | | ip2.addAll(insProducts); |
| | | } |
| | | for (InsProduct product : ip2) { |
| | | product.setStandardMethodListId(a.getInsulating().getStandardMethodListId()); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } |
| | | // 夿æ¯å¦æè¾
å©çº¿è¯ |
| | | if (ObjectUtil.isNotEmpty(a.getAuxiliaryWireCore())) { |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (String s : a.getAuxiliaryWireCore().getNum()) { |
| | | // éæ°æ·è´ å建æ°å¯¹è±¡ |
| | | List<InsProduct> insProducts = a.getAuxiliaryWireCore().getInsProduct().stream().map(insProduct -> { |
| | | insProduct.setCableTag(s); |
| | | InsProduct product = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, product); |
| | | return product; |
| | | }).collect(Collectors.toList()); |
| | | ip2.addAll(insProducts); |
| | | } |
| | | for (InsProduct product : ip2) { |
| | | product.setStandardMethodListId(a.getAuxiliaryWireCore().getStandardMethodListId()); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } |
| | | // åæ ·åé
ç½® |
| | | 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()); |
| | | insSampleMapper.insert(b); |
| | | if (ObjectUtil.isNotEmpty(b.getInsProduct())) { |
| | | addInsProductMethod(b.getId(), b.getInsProduct()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | // ä¸åæ¶çæå§æç¼å·å¹¶æ ¡éªå¯ä¸æ§ï¼å£åº¦æ£éªå¤ç¨è¿åæ£éªç¼å·ï¼çå¾
å®¡æ ¸å¤çã |
| | | if (!InsOrderTypeConstants.QUARTERLY_TEST.equals(insOrder.getOrderType())) { |
| | | String entrustCode = buildEntrustCode(insOrder, Collections.emptyList()); |
| | | assertEntrustCodeUnique(entrustCode, insOrder.getId()); |
| | | insOrder.setEntrustCode(entrustCode); |
| | | insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getId, insOrder.getId()) |
| | | .set(InsOrder::getEntrustCode, entrustCode)); |
| | | } |
| | | //åææä¸åæå¤è´æåä¸å |
| | | if (Objects.nonNull(insOrder.getTypeSource())&&Objects.nonNull(insOrder.getIfsInventoryId())) { |
| | | // å§æäººå°±æ¯æ¥æ£äºº, ç产åä½å°±æ¯ä¾åºååä½ |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId()); |
| | | Integer declareUserId = ifsInventoryQuantity.getDeclareUserId(); |
| | | User user = userMapper.selectById(declareUserId); |
| | | if (user == null) { |
| | | throw new ErrorException("ç¼ºå°æ¥æ£äººä¿¡æ¯"); |
| | | } |
| | | // ä¾åºååç§° |
| | | insOrder.setProduction(ifsInventoryQuantity.getSupplierName()); |
| | | insOrder.setProductionEn(""); |
| | | // å§æäººåç§° |
| | | insOrder.setPrepareUserId(user.getId()); |
| | | insOrder.setPrepareUser(user.getName()); |
| | | insOrder.setPrepareUserEn(user.getNameEn()); |
| | | insOrder.setPhone(user.getPhone()); |
| | | insOrder.setState(1); |
| | | Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getIfsInventoryId, insOrder.getIfsInventoryId()) |
| | | .ne(InsOrder::getState, -1) |
| | | .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY) |
| | | .ne(InsOrder::getId, insOrder.getId())); |
| | | // 夿ä¹åæ¯å¦æè¿åæ£éª |
| | | if (count1 == 0) { |
| | | ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>().set(IfsInventoryQuantity::getState, 1) |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | | } |
| | | |
| | | // å¤æç»æç¶æä¿®æ¹åæ ¼ç¶æ |
| | | if (ifsInventoryQuantity.getIsFinish().equals(0)) { |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()) |
| | | .set(IfsInventoryQuantity::getInspectStatus, 0)); |
| | | } |
| | | |
| | | // å®¡æ ¸æ£éªå |
| | | upInsOrderOfState(insOrder); |
| | | |
| | | // å®¡æ ¸éè¿åä»
è¿å
¥æ ·åæ¥æ¶ï¼ç±æ ·åæ¥æ¶é¡µé¢éæ©ä¸»æ£éªäººååå建æ£éªä»»å¡ã |
| | | |
| | | //æ¯å¦ä¸ºåææä¸å |
| | | if(insOrder.getTypeSource().equals(1)){ |
| | | // æ ¹æ®é¶ä»¶å·å¤ææ¯å¦æ¯è¾
æ |
| | | boolean isRaw = false; |
| | | StructureTestObject productObject = insOrderMapper.selectProductByPartNo(ifsInventoryQuantity.getPartNo()); |
| | | // æ¥è¯¢äº§å |
| | | if (productObject != null && StrUtil.isNotBlank(productObject.getObjectType()) && productObject.getObjectType().equals("1")) { |
| | | isRaw = true; |
| | | } else { |
| | | // æ¥è¯¢å¯¹è±¡ |
| | | StructureTestObject testObject = insOrderMapper.selectByPartNo(ifsInventoryQuantity.getPartNo()); |
| | | if (testObject != null && StrUtil.isNotBlank(testObject.getObjectType()) && testObject.getObjectType().equals("1")) { |
| | | isRaw = true; |
| | | } |
| | | } |
| | | |
| | | if (isRaw) { |
| | | // è·åå½åå£åº¦çå¼å§æ¶é´åç»ææ¶é´ |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | // è·åå½åæä»½ |
| | | int month = now.getMonthValue(); |
| | | // ç¡®å®å½åå£åº¦çå¼å§æä»½ |
| | | int startMonth = (month - 1) / 3 * 3 + 1; |
| | | // æé å£åº¦çå¼å§æ¶é´ |
| | | LocalDateTime startOfQuarter = LocalDateTime.of(now.getYear(), Month.of(startMonth), 1, 0, 0); |
| | | // 计ç®ä¸ä¸ä¸ªå£åº¦çå¼å§æ¶é´ |
| | | LocalDateTime startOfNextQuarter = startOfQuarter.plusMonths(3); |
| | | // 计ç®å½åå£åº¦çç»ææ¶é´ |
| | | LocalDateTime endOfQuarter = startOfNextQuarter.minusSeconds(1); |
| | | |
| | | // æ ¹æ®ä¸åçè§æ ¼åå·å¤ææ¯å¦ä¸ºå£åº¦é¦æ¬¡åºç° |
| | | Integer count = ifsInventoryQuantityMapper.selectIsFirst(insOrder.getPartDetail(), |
| | | ifsInventoryQuantity.getSupplierName(), |
| | | startOfNextQuarter, |
| | | endOfQuarter); |
| | | |
| | | if (count == 0) { |
| | | ifsInventoryQuantity.setIsFirst(1); |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()) |
| | | .set(IfsInventoryQuantity::getIsFirst, 1)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return insOrder.getId(); |
| | | } |
| | | |
| | | /** |
| | | * æ°èæ ååºç´ç»æ¨¡æ¿çä¸åæµç¨ï¼ä¸ä¸ªè®¢åãä¸ä¸ªæ ·åï¼æ£éªè®°å½å®å
¨ç±æ¨¡æ¿æ è®°çæã |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addNewJuInsOrder(InsPlaceOrderDto dto) { |
| | | if (dto == null || dto.getInsOrder() == null || dto.getStandardTreeId() == null) { |
| | | throw new ErrorException("ä¸åä¿¡æ¯ææ åä¸è½ä¸ºç©º"); |
| | | } |
| | | String sampleCode = StringUtils.trim(dto.getSampleCode()); |
| | | if (StringUtils.isBlank(sampleCode) || sampleCode.length() < 2) { |
| | | throw new ErrorException("æ ·åç¼å·ä¸è½ä¸ºç©ºä¸ä¸è½å°äº2ä½"); |
| | | } |
| | | // å§æè¦æ±åæ®µæ ¡éªï¼åç»åéå¿
éï¼åå
/å¿«éèå¨å¿
å¡« |
| | | InsOrder reqOrder = dto.getInsOrder(); |
| | | if (reqOrder.getSubcontractType() == null || reqOrder.getSampleDisposal() == null |
| | | || reqOrder.getResultEvaluation() == null || reqOrder.getReportDelivery() == null) { |
| | | throw new ErrorException("è¯·éæ©åå
å
å®¹ãæ ·åå¤ç½®ãå¯¹ç»æè¯ä»·åæ¥åäº¤ä»æ¹å¼"); |
| | | } |
| | | if (Integer.valueOf(1).equals(reqOrder.getSubcontractType()) |
| | | && StringUtils.isBlank(reqOrder.getSubcontractCompany())) { |
| | | throw new ErrorException("åå
å
å®¹ä¸ºææ¶ï¼åå
åä½ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | if (Integer.valueOf(2).equals(reqOrder.getReportDelivery())) { |
| | | if (StringUtils.isBlank(reqOrder.getReportAddress())) { |
| | | throw new ErrorException("æ¥åäº¤ä»æ¹å¼ä¸ºå¿«éæ¶ï¼æ¥åå¯éå°åä¸è½ä¸ºç©º"); |
| | | } |
| | | if (StringUtils.isBlank(reqOrder.getReportReceiver())) { |
| | | throw new ErrorException("æ¥åäº¤ä»æ¹å¼ä¸ºå¿«éæ¶ï¼æ¶ä»¶äººåçµè¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | } |
| | | StandardTree standard = standardTreeService.getById(dto.getStandardTreeId()); |
| | | if (standard == null || StringUtils.isBlank(standard.getSample()) |
| | | || standard.getSampleType() != null || standard.getModel() != null) { |
| | | throw new ErrorException("è¯·éæ©æ ååºäºçº§æ å"); |
| | | } |
| | | List<StandardTreeTemplateBindingVo> bindings = standardTreeService.selectTemplateBindings(dto.getStandardTreeId()); |
| | | if (bindings.isEmpty()) { |
| | | throw new ErrorException("该æ åå°æªç»å®å¯ç¨çåå§è®°å½æ¨¡æ¿"); |
| | | } |
| | | Map<Integer, StandardTreeTemplateBindingVo> bindingMap = bindings.stream() |
| | | .collect(Collectors.toMap(StandardTreeTemplateBindingVo::getTemplateId, |
| | | binding -> binding, (first, ignored) -> first)); |
| | | List<OrderTemplateSelectionDto> selections = dto.getTemplateList(); |
| | | if (selections == null) { |
| | | selections = bindings.stream().map(binding -> { |
| | | OrderTemplateSelectionDto selection = new OrderTemplateSelectionDto(); |
| | | selection.setTemplateId(binding.getTemplateId()); |
| | | selection.setSort(binding.getSort()); |
| | | return selection; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | if (selections.isEmpty()) { |
| | | throw new ErrorException("请è³å°ä¿çä¸ä¸ªåå§è®°å½æ¨¡æ¿"); |
| | | } |
| | | Set<Integer> selectedTemplateIds = new HashSet<>(); |
| | | for (int index = 0; index < selections.size(); index++) { |
| | | OrderTemplateSelectionDto selection = selections.get(index); |
| | | if (selection == null || selection.getTemplateId() == null |
| | | || !bindingMap.containsKey(selection.getTemplateId())) { |
| | | throw new ErrorException("æéåå§è®°å½æ¨¡æ¿ä¸å±äºå½åæ å"); |
| | | } |
| | | if (!selectedTemplateIds.add(selection.getTemplateId())) { |
| | | throw new ErrorException("åå§è®°å½æ¨¡æ¿ä¸è½éå¤éæ©"); |
| | | } |
| | | if (selection.getSort() == null) { |
| | | selection.setSort(index); |
| | | } |
| | | } |
| | | selections.sort(Comparator.comparing(OrderTemplateSelectionDto::getSort) |
| | | .thenComparing(OrderTemplateSelectionDto::getTemplateId)); |
| | | Map<Integer, Integer> templateSortMap = selections.stream() |
| | | .collect(Collectors.toMap(OrderTemplateSelectionDto::getTemplateId, |
| | | OrderTemplateSelectionDto::getSort)); |
| | | List<TemplateInspectionItemDto> templateItems = standardTreeService |
| | | .selectTemplateInspectionItems(dto.getStandardTreeId()).stream() |
| | | .filter(item -> selectedTemplateIds.contains(item.getTemplateId())) |
| | | .sorted(Comparator |
| | | .comparing((TemplateInspectionItemDto item) -> templateSortMap.get(item.getTemplateId())) |
| | | .thenComparing(item -> item.getTemplateRowIndex() == null |
| | | ? Integer.MAX_VALUE : item.getTemplateRowIndex())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | StandardMethod standardMethod = standardMethodService.getById(standard.getStandardMethodId()); |
| | | if (standardMethod == null || StringUtils.isBlank(standardMethod.getCode())) { |
| | | throw new ErrorException("æ åç¼å·ä¸åå¨"); |
| | | } |
| | | String standardCode = standardMethod.getCode().trim(); |
| | | |
| | | InsOrder order = dto.getInsOrder(); |
| | | order.setId(null); |
| | | // æ°èä¸åå
å®¡æ ¸ï¼ç´æ¥åçï¼ä¸å峿µè½¬å°æ ·åæ¥æ¶ |
| | | order.setState(1); |
| | | order.setExamineTime(LocalDateTime.now()); |
| | | order.setIsExemption(0); |
| | | order.setFactory(null); |
| | | order.setLaboratory(standard.getLaboratory()); |
| | | order.setSampleType(null); |
| | | order.setSample(standardCode); |
| | | order.setPrepareUserEn(null); |
| | | order.setPrepareCode(null); |
| | | order.setRemarkEn(null); |
| | | // æ°è订åçç¯å¢æ¡ä»¶ç±æ£éªä»»å¡å¡«åï¼é¿å
ä¸åæ¨¡æ¿ææµè§å¨ç¼å带å
¥æ§å¼ã |
| | | order.setTemperature(null); |
| | | order.setHumidity(null); |
| | | // æªå½ä¸è卿¡ä»¶æ¶æ¸
ç©ºå¯¹åºææ¬å段ï¼é¿å
模æ¿å¿«ç
§ææµè§å¨ç¼å带å
¥æ§å¼ã |
| | | if (!Integer.valueOf(1).equals(order.getSubcontractType())) { |
| | | order.setSubcontractCompany(null); |
| | | } |
| | | if (!Integer.valueOf(2).equals(order.getReportDelivery())) { |
| | | order.setReportAddress(null); |
| | | order.setReportReceiver(null); |
| | | } |
| | | insOrderMapper.insert(order); |
| | | |
| | | InsSample sample = new InsSample(); |
| | | sample.setInsOrderId(order.getId()); |
| | | sample.setSampleCode(sampleCode); |
| | | sample.setFactory(null); |
| | | sample.setLaboratory(standard.getLaboratory()); |
| | | sample.setSampleType(null); |
| | | sample.setSample(standardCode); |
| | | sample.setModel(null); |
| | | sample.setQuantity(1); |
| | | sample.setStandardMethodListId(null); |
| | | insSampleMapper.insert(sample); |
| | | |
| | | int productSort = 0; |
| | | for (TemplateInspectionItemDto item : templateItems) { |
| | | InsProduct product = new InsProduct(); |
| | | product.setInsSampleId(sample.getId()); |
| | | product.setInspectionItem(item.getInspectionItem()); |
| | | product.setInspectionItemClass(""); |
| | | product.setInspectionItemSubclass(""); |
| | | product.setFactory(null); |
| | | product.setLaboratory(standard.getLaboratory()); |
| | | product.setSampleType(null); |
| | | product.setSample(standardCode); |
| | | product.setModel(null); |
| | | product.setTemplateId(item.getTemplateId()); |
| | | product.setTemplateRowIndex(item.getTemplateRowIndex()); |
| | | product.setSonLaboratory(DIRECT_TEMPLATE_LABORATORY); |
| | | product.setState(1); |
| | | product.setSort(productSort++); |
| | | insProductMapper.insert(product); |
| | | } |
| | | saveTemplateSnapshots(order.getId(), selections, bindingMap); |
| | | |
| | | // ä¸åæ¶çæå§æç¼å·å¹¶æ ¡éªå¯ä¸æ§ï¼éå¤åæç¤ºï¼é¿å
çå°å®¡æ ¸ææ¥éã |
| | | String entrustCode = buildEntrustCode(order, Collections.singletonList(sample)); |
| | | assertEntrustCodeUnique(entrustCode, order.getId()); |
| | | insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getId, order.getId()) |
| | | .set(InsOrder::getEntrustCode, entrustCode)); |
| | | // å
å®¡æ ¸åç±ä¸åçæå¾
æ¥æ¶çæ ·åæ¥æ¶è®°å½ï¼ä¸»æ£éªäººä»å¨æ ·åæ¥æ¶é¡µé¢éæ©åæå建æ£éªä»»å¡ |
| | | insSampleReceiptMapper.insertIgnore(order.getId(), sample.getId()); |
| | | // åäºå¡å
åå¸ä¸åäºä»¶ï¼ç± cnas-process èªå¨çææ£éªå§æåï¼çå¬å¨å¼å¸¸ä¼è¿å¸¦ä¸ååæ» |
| | | applicationEventPublisher.publishEvent(new com.ruoyi.inspect.event.NewJuOrderPlacedEvent(order.getId())); |
| | | return order.getId(); |
| | | } |
| | | |
| | | private void saveTemplateSnapshots(Integer orderId, List<OrderTemplateSelectionDto> selections, |
| | | Map<Integer, StandardTreeTemplateBindingVo> bindingMap) { |
| | | for (OrderTemplateSelectionDto selection : selections) { |
| | | StandardTemplate template = standardTemplateService.getById(selection.getTemplateId()); |
| | | if (template == null) { |
| | | throw new ErrorException("åå§è®°å½æ¨¡æ¿ä¸åå¨"); |
| | | } |
| | | InsOrderStandardTemplate snapshot = new InsOrderStandardTemplate(); |
| | | snapshot.setInsOrderId(orderId); |
| | | snapshot.setTemplateId(template.getId()); |
| | | snapshot.setName(template.getName()); |
| | | snapshot.setNumber(template.getNumber()); |
| | | snapshot.setRemark(template.getRemark()); |
| | | snapshot.setThing(template.getThing()); |
| | | snapshot.setSort(selection.getSort()); |
| | | insOrderStandardTemplateMapper.insert(snapshot); |
| | | |
| | | StandardTreeTemplateBindingVo binding = bindingMap.get(selection.getTemplateId()); |
| | | List<Integer> deviceIds = binding == null || binding.getDeviceIds() == null |
| | | ? Collections.emptyList() : binding.getDeviceIds(); |
| | | for (int index = 0; index < deviceIds.size(); index++) { |
| | | InsOrderTemplateDevice relation = new InsOrderTemplateDevice(); |
| | | relation.setInsOrderId(orderId); |
| | | relation.setTemplateId(selection.getTemplateId()); |
| | | relation.setDeviceId(deviceIds.get(index)); |
| | | relation.setSort(index); |
| | | insOrderTemplateDeviceMapper.insert(relation); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ£éªé¡¹ |
| | | * @param sampleId |
| | | * @param productList |
| | | */ |
| | | private void addInsProductMethod(Integer sampleId, List<InsProduct> productList) { |
| | | for (InsProduct product : productList) { |
| | | if (product.getState() == 1) { |
| | | product.setId(null); |
| | | product.setCreateTime(null); |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setInsSampleId(sampleId); |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | if (StringUtils.isBlank(product.getAsk()) || StringUtils.isBlank(product.getTell())) { |
| | | throw new ErrorException("ææ£éªé¡¹çè¦æ±å¼æè¦æ±æè¿°ä¸ºç©º, 请å
廿 ååºé
ç½®è¦æ±å¼æè¦æ±æè¿°"); |
| | | } |
| | | if (StringUtils.isBlank(product.getSonLaboratory())) { |
| | | throw new ErrorException("ææ£éªé¡¹ççåå®éªå®¤ä¸ºç»å®, 请å
ç»å®åå®éªå®¤"); |
| | | } |
| | | insProductMapper.insert(product); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> getInsOrder(Integer id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | InsOrder insOrder = insOrderMapper.selectById(id); |
| | | List<SampleProductDto> list; |
| | | // 夿æ¯å¦æ¯è¿åæ¥åå
æ£ |
| | | if (insOrder.getIsExemption().equals(1)) { |
| | | list = insSampleMapper.selectExemptionByOrderId(id); |
| | | } else { |
| | | list = insSampleMapper.selectSampleProductListByOrderId2(id); |
| | | } |
| | | Map<String, Object> map1 = insSampleMapper.selectInsOrder(id); |
| | | List<InsSample> orderSamples = insSampleMapper.selectList( |
| | | Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, id) |
| | | .select(InsSample::getSampleCode) |
| | | .orderByAsc(InsSample::getId)); |
| | | List<OrderTemplateSummaryVo> templateList = insOrderStandardTemplateMapper.selectList( |
| | | Wrappers.<InsOrderStandardTemplate>lambdaQuery() |
| | | .eq(InsOrderStandardTemplate::getInsOrderId, id) |
| | | .orderByAsc(InsOrderStandardTemplate::getSort, |
| | | InsOrderStandardTemplate::getId)) |
| | | .stream() |
| | | .map(template -> { |
| | | OrderTemplateSummaryVo summary = new OrderTemplateSummaryVo(); |
| | | summary.setTemplateId(template.getTemplateId()); |
| | | summary.setName(template.getName()); |
| | | summary.setNumber(template.getNumber()); |
| | | summary.setRemark(template.getRemark()); |
| | | summary.setSort(template.getSort()); |
| | | return summary; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | map.put("insOrder", insOrder); |
| | | map.put("sampleProduct", list); |
| | | // æ ·åç¼å·ç´æ¥ä»æ ·å表读åï¼ä¸ä¾èµæ£éªé¡¹ç®å
³èæ¥è¯¢æ¯å¦æç»æã |
| | | map.put("sampleCode", orderSamples.isEmpty() ? null : orderSamples.get(0).getSampleCode()); |
| | | map.put("insOrderTemplate", map1); |
| | | map.put("templateList", templateList); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸æ£éªå |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upInsOrderOfState(InsOrder insOrder) { |
| | | insOrder.setExamineTime(LocalDateTime.now()); |
| | | if (insOrder.getState() == 1) { |
| | | //å§æç¼å·å·²å¨ä¸åæ¶çæå¹¶æ ¡éªå¯ä¸æ§ï¼å®¡æ ¸æ¶å¤ç¨ï¼åå²/å£åº¦æ£éªè®¢åå
åºçæã |
| | | InsOrder order = this.getById(insOrder.getId()); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId()) |
| | | .orderByAsc(InsSample::getId)); |
| | | String no = order.getEntrustCode(); |
| | | // 夿æ¯å¦æ¯å£åº¦æ£éª, æ¯å£åº¦æ£éªåæ¶åææå£åº¦æ£éªä¸å |
| | | if (InsOrderTypeConstants.QUARTERLY_TEST.equals(order.getOrderType())) { |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()) |
| | | .set(IfsInventoryQuantity::getIsQuarter, 0)); |
| | | |
| | | // æ¥è¯¢æ¯å¦æè¿è¿åæ£éª, æè·åéé¢çç¼å· |
| | | InsOrder order1 = insOrderMapper.selectOne(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getIfsInventoryId, order.getIfsInventoryId()) |
| | | .ne(InsOrder::getState, -1) |
| | | .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY)); |
| | | if (order1 != null) { |
| | | no = order1.getEntrustCode(); |
| | | } |
| | | } |
| | | if (StringUtils.isBlank(no)) { |
| | | no = buildEntrustCode(order, insSamples); |
| | | } |
| | | assertEntrustCodeUnique(no, order.getId()); |
| | | |
| | | int count = 1; |
| | | for (InsSample insSample : insSamples) { |
| | | if (StringUtils.isBlank(insSample.getSampleCode())) { |
| | | // å¦æåªæä¸ä¸ªæ ·åå°±ä¸éè¦æ¼æ¥æ°å |
| | | if (insSamples.size() != 1) { |
| | | insSample.setSampleCode(no + "-" + count); |
| | | count++; |
| | | } else { |
| | | insSample.setSampleCode(no); |
| | | } |
| | | } |
| | | } |
| | | insSampleService.updateBatchById(insSamples); |
| | | |
| | | insOrder.setEntrustCode(no); |
| | | } |
| | | int updated = insOrderMapper.updateById(insOrder); |
| | | if (updated > 0 && Integer.valueOf(1).equals(insOrder.getState())) { |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId()) |
| | | .orderByAsc(InsSample::getId)); |
| | | if (samples.size() != 1) { |
| | | throw new ErrorException("å§æåå¿
é¡»ä¸åªè½å
å«ä¸ä¸ªæ ·åï¼ä¸è½è¿å
¥æ ·åæ¥æ¶æµç¨"); |
| | | } |
| | | insSampleReceiptMapper.insertIgnore(insOrder.getId(), samples.get(0).getId()); |
| | | } |
| | | return updated; |
| | | } |
| | | |
| | | /** |
| | | * å§æç¼å·å
¨å±å¯ä¸ï¼çæç¼å·ååç»æäº¤ååéæé¤å½å订ååæ ¡éªã |
| | | */ |
| | | private void assertEntrustCodeUnique(String entrustCode, Integer currentOrderId) { |
| | | Long count = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getEntrustCode, entrustCode) |
| | | .ne(currentOrderId != null, InsOrder::getId, currentOrderId)); |
| | | if (count > 0) { |
| | | throw new ErrorException("æ ·å/å§æåå·²åå¨ï¼è¯·ç¡®è®¤æ ·åç¼å·"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * çæå§æç¼å·ï¼æ°èç´ç»æ¨¡æ¿è®¢åæ«ä¸¤ä½åæ ·åç¼å·æ«ä¸¤ä½ï¼å
¶ä½æéæ ·æ¥æçæåºå·ã |
| | | */ |
| | | private String buildEntrustCode(InsOrder order, List<InsSample> insSamples) { |
| | | LocalDate entrustDate = order.getSampleDate() == null ? LocalDate.now() : order.getSampleDate(); |
| | | String entrustCodePrefix = "LMSY-" |
| | | + entrustDate.format(DateTimeFormatter.BASIC_ISO_DATE) |
| | | + "-"; |
| | | if (isDirectTemplateOrder(order, insSamples)) { |
| | | String sampleCode = insSamples.get(0).getSampleCode(); |
| | | if (StringUtils.isBlank(sampleCode) || sampleCode.trim().length() < 2) { |
| | | throw new ErrorException("æ ·åç¼å·ä¸è½ä¸ºç©ºä¸ä¸è½å°äº2ä½"); |
| | | } |
| | | sampleCode = sampleCode.trim(); |
| | | return entrustCodePrefix + sampleCode.substring(sampleCode.length() - 2); |
| | | } |
| | | return numberGenerator.generateNumberWithPrefix(2, entrustCodePrefix, InsOrder::getEntrustCode); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // InsOrder insOrder = insOrderMapper.selectById(id); |
| | | IfsOrderVO ifsOrderVO = insOrderMapper.selectOrderInfoById(id); |
| | | Map<Integer, List<Integer>> templateDeviceIds = insOrderTemplateDeviceMapper.selectList( |
| | | Wrappers.<InsOrderTemplateDevice>lambdaQuery() |
| | | .eq(InsOrderTemplateDevice::getInsOrderId, id) |
| | | .orderByAsc(InsOrderTemplateDevice::getSort, |
| | | InsOrderTemplateDevice::getId)) |
| | | .stream().collect(Collectors.groupingBy( |
| | | InsOrderTemplateDevice::getTemplateId, |
| | | LinkedHashMap::new, |
| | | Collectors.mapping(InsOrderTemplateDevice::getDeviceId, Collectors.toList()))); |
| | | List<TemplateConditionVo> templateConditions = insOrderStandardTemplateMapper.selectList( |
| | | Wrappers.<InsOrderStandardTemplate>lambdaQuery() |
| | | .eq(InsOrderStandardTemplate::getInsOrderId, id) |
| | | .select(InsOrderStandardTemplate::getTemplateId, |
| | | InsOrderStandardTemplate::getTemperature, |
| | | InsOrderStandardTemplate::getHumidity, |
| | | InsOrderStandardTemplate::getDetectionTime, |
| | | InsOrderStandardTemplate::getDetectionPlace, |
| | | InsOrderStandardTemplate::getInsResult) |
| | | .orderByAsc(InsOrderStandardTemplate::getSort, |
| | | InsOrderStandardTemplate::getId)) |
| | | .stream().map(snapshot -> { |
| | | TemplateConditionVo condition = new TemplateConditionVo(); |
| | | condition.setTemplateId(snapshot.getTemplateId()); |
| | | condition.setTemperature(snapshot.getTemperature()); |
| | | condition.setHumidity(snapshot.getHumidity()); |
| | | condition.setDetectionTime(snapshot.getDetectionTime()); |
| | | condition.setDetectionPlace(snapshot.getDetectionPlace()); |
| | | condition.setInsResult(snapshot.getInsResult()); |
| | | condition.setDeviceIds(templateDeviceIds.getOrDefault( |
| | | snapshot.getTemplateId(), Collections.emptyList())); |
| | | return condition; |
| | | }).collect(Collectors.toList()); |
| | | ifsOrderVO.setTemplateConditions(templateConditions); |
| | | List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory); |
| | | map.put("insOrder", ifsOrderVO); |
| | | map.put("sampleProduct", list); |
| | | //æ¥è¯¢ææè®°å½æ¨¡çå»é |
| | | List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(id, laboratory); |
| | | map.put("reportModel", list2); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto) { |
| | | IPage<SampleProductDto2> productDto2IPage = insOrderMapper.selectSampleAndProductByOrderId(page, |
| | | QueryWrappers.queryWrappers(sampleProductDto) |
| | | .orderByAsc("sample_code") |
| | | .orderByAsc("cable_tag") |
| | | .orderByAsc("sort"), |
| | | sampleProductDto.getId()); |
| | | return productDto2IPage; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int updateStatus(Integer id) { |
| | | return insOrderMapper.updateStatus(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åifsåºåä¿¡æ¯ |
| | | * @param |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void getIfsOrder(Map<String, Object> map,Boolean isSplitOrder) { |
| | | List<Map<String, Object>> inventory = ifsApiUtils.getInventory(JSONUtil.toJsonStr(map)); |
| | | if(inventory.isEmpty()) { |
| | | return; |
| | | } |
| | | // è¿è¡ä¿å |
| | | for (Map<String, Object> map1 : inventory) { |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // æ¶é´æ ¼å¼å |
| | | IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity(); |
| | | ifsInventoryQuantity.setContract(map1.get("CONTRACT") == null ? "" : map1.get("CONTRACT").toString()); // å |
| | | ifsInventoryQuantity.setPartNo(map1.get("PART_NO") == null ? "" : map1.get("PART_NO").toString() ); // é¶ä»¶å· |
| | | ifsInventoryQuantity.setPartDesc(map1.get("PART_DESC") == null ? "" : map1.get("PART_DESC").toString()); // é¶ä»¶æè¿° |
| | | ifsInventoryQuantity.setOrderNo(map1.get("ORDER_NO") == null ? "" : map1.get("ORDER_NO").toString()); // 订åå· |
| | | ifsInventoryQuantity.setLineNo(map1.get("LINE_NO") == null ? "" : map1.get("LINE_NO").toString()); // è¡å· |
| | | ifsInventoryQuantity.setReleaseNo(map1.get("RELEASE_NO") == null ? "" : map1.get("RELEASE_NO").toString()); // ä¸è¾¾å· |
| | | ifsInventoryQuantity.setReceiptNo(Integer.parseInt(map1.get("RECEIPT_NO") == null ? "" : map1.get("RECEIPT_NO").toString())); // æ¥æ¶å· |
| | | ifsInventoryQuantity.setStatus(map1.get("STATE") == null ? "" : map1.get("STATE").toString()); // ç¶ææè¿° |
| | | ifsInventoryQuantity.setStatusDb(map1.get("STATE_DB") == null ? "" : map1.get("STATE_DB").toString()); // ç¶æ |
| | | if(map1.get("QTY_ARRIVED") != null) { |
| | | ifsInventoryQuantity.setQtyArrived(new BigDecimal(map1.get("QTY_ARRIVED").toString())); // æµè¾¾çéè´æ°é |
| | | } |
| | | if(map1.get("QTY_INSPECTED") != null) { |
| | | ifsInventoryQuantity.setQtyInspected(new BigDecimal(map1.get("QTY_INSPECTED").toString())); // å·²æ£éªçè´ä¹°æ°é |
| | | } |
| | | if(map1.get("QTY_TO_INSPECT") != null) { |
| | | ifsInventoryQuantity.setQtyToInspect(new BigDecimal(map1.get("QTY_TO_INSPECT").toString())); // è¦æ£éªçéè´æ°é |
| | | } |
| | | if(map1.get("INV_QTY_IN_STORE") != null) { |
| | | ifsInventoryQuantity.setInvQtyInStore(new BigDecimal(map1.get("INV_QTY_IN_STORE").toString())); // æµè¾¾çåºåæ°é |
| | | } |
| | | if(map1.get("PUR_QTY_IN_STORE") != null) { |
| | | ifsInventoryQuantity.setPurQtyInStore(new BigDecimal( map1.get("PUR_QTY_IN_STORE").toString())); // æµè¾¾çéè´æ°é |
| | | |
| | | } |
| | | ifsInventoryQuantity.setSupplierId(map1.get("SUPPLIER_ID") == null ? "" : map1.get("SUPPLIER_ID").toString()); // ä¾åºåID |
| | | ifsInventoryQuantity.setSupplierName(map1.get("SUPPLIER_NAME") == null ? "" : map1.get("SUPPLIER_NAME").toString()); // ä¾åºååç§° |
| | | ifsInventoryQuantity.setConfigurationId(map1.get("CONFIGURATION_ID") == null ? "" : map1.get("CONFIGURATION_ID").toString()); // é
ç½®æ è¯ |
| | | ifsInventoryQuantity.setLotBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // æ¹æ¬¡å· |
| | | ifsInventoryQuantity.setUpdateBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // æ¹æ¬¡å· |
| | | ifsInventoryQuantity.setWaivDevRejNo(map1.get("WAIV_DEV_REJ_NO") == null ? "" : map1.get("WAIV_DEV_REJ_NO").toString()); // WDRå· |
| | | ifsInventoryQuantity.setActivitySeq(map1.get("ACTIVITY_SEQ") == null ? null : Integer.parseInt(map1.get("ACTIVITY_SEQ").toString())); // æ´»å¨åºå |
| | | ifsInventoryQuantity.setSerialNo(map1.get("SERIAL_NO") == null ? "" : map1.get("SERIAL_NO").toString()); // åºåå· |
| | | ifsInventoryQuantity.setLocationNo(map1.get("LOCATION_NO") == null ? "" : map1.get("LOCATION_NO").toString()); // åºä½å· |
| | | ifsInventoryQuantity.setEngChgLevel(map1.get("ENG_CHG_LEVEL") == null ? "" : map1.get("ENG_CHG_LEVEL").toString()); // çæ¬å· |
| | | ifsInventoryQuantity.setReceiver(map1.get("RECEIVER") == null ? "" : map1.get("RECEIVER").toString()); // æ¥æ¶äºº |
| | | ifsInventoryQuantity.setReceiverName(map1.get("RECEIVER_NAME") == null ? "" : map1.get("RECEIVER_NAME").toString()); // æ¥æ¶äººåç§° |
| | | ifsInventoryQuantity.setBuyerCode(map1.get("BUYER_CODE") == null ? "" : map1.get("BUYER_CODE").toString()); // éè´å |
| | | ifsInventoryQuantity.setBuyerName(map1.get("BUYER_NAME") == null ? "" : map1.get("BUYER_NAME").toString()); // éè´ååç§° |
| | | |
| | | if(map1.get("ARRIVE_DATE") != null) { |
| | | ifsInventoryQuantity.setArriveDate(LocalDateTime.parse(map1.get("ARRIVE_DATE").toString(),dateTimeFormatter)); // å®é
å°è´§æ¥æ |
| | | } |
| | | if(map1.get("DELIVERY_DATE") != null) { |
| | | ifsInventoryQuantity.setDeliveryDate(LocalDateTime.parse(map1.get("DELIVERY_DATE").toString(),dateTimeFormatter)); // å®é
äº¤è´§æ¥æ |
| | | } |
| | | if(map1.get("PRODUCT_DATE") != null) { |
| | | ifsInventoryQuantity.setProductDate(LocalDateTime.parse(map1.get("PRODUCT_DATE").toString(),dateTimeFormatter)); // çäº§æ¥æ |
| | | |
| | | } |
| | | if(map1.get("INVALID_DATE") != null) { |
| | | ifsInventoryQuantity.setInvalidDate(LocalDateTime.parse(map1.get("INVALID_DATE").toString(),dateTimeFormatter)); // å¤±ææ¥æ |
| | | } |
| | | if(map1.get("APPROVED_DATE") != null) { |
| | | ifsInventoryQuantity.setApprovedDate(LocalDateTime.parse(map1.get("APPROVED_DATE").toString(),dateTimeFormatter)); // å®¡æ¹æ¥æ |
| | | } |
| | | ifsInventoryQuantity.setReqCeater(map1.get("REQ_CEATER") == null ? "" : map1.get("REQ_CEATER").toString()); // éè´ç³è¯·å建人 |
| | | ifsInventoryQuantity.setReqCeaterName(map1.get("REQ_CEATER_NAME") == null ? "" : map1.get("REQ_CEATER_NAME").toString()); // éè´ç³è¯·å建人åç§° |
| | | ifsInventoryQuantity.setLineRemarks(map1.get("LINE_REMARKS") == null ? "" : map1.get("LINE_REMARKS").toString()); // éè´è®¢åè¡å¤æ³¨ |
| | | ifsInventoryQuantity.setBuyUnitMeas(map1.get("BUY_UNIT_MEAS") == null ? "" : map1.get("BUY_UNIT_MEAS").toString()); // éè´åä½ |
| | | ifsInventoryQuantity.setReceiverDate(LocalDateTime.now()); // æ¥æ¶æ¥æ |
| | | ifsInventoryQuantity.setIsSource(1); |
| | | ifsInventoryQuantity.setState(0); |
| | | |
| | | Long count = ifsInventoryQuantityMapper.selectCount(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | .eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo()) |
| | | .eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo()) |
| | | .eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo()) |
| | | .eq(IfsInventoryQuantity::getReceiptNo, ifsInventoryQuantity.getReceiptNo()) |
| | | .eq(IfsInventoryQuantity::getLocationNo, ifsInventoryQuantity.getLocationNo()) |
| | | .eq(IfsInventoryQuantity::getLotBatchNo, ifsInventoryQuantity.getLotBatchNo()) |
| | | .eq(IfsInventoryQuantity::getSerialNo, ifsInventoryQuantity.getSerialNo()) |
| | | .eq(IfsInventoryQuantity::getEngChgLevel, ifsInventoryQuantity.getEngChgLevel()) |
| | | .eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo()) |
| | | .eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq()) |
| | | ); |
| | | if(count == 0) { |
| | | ifsInventoryQuantity.setIsFirst(0); |
| | | if(isSplitOrder){ |
| | | ifsInventoryQuantity.setIsSplitOrder(1); |
| | | } |
| | | ifsInventoryQuantityMapper.insert(ifsInventoryQuantity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * idæ¯åææçid |
| | | * |
| | | * ä¿®æ¹è®¢ååå· |
| | | * @param insOrder |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateEntrustCode(InsOrder insOrder) { |
| | | // 夿å½åè®¢åæ¯å¦çæäºæ¥å, çæäºæ¥åä¸è½ä¿®æ¹åå· |
| | | List<InsOrder> insOrders = insOrderMapper.selectList(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getIfsInventoryId, insOrder.getId()) |
| | | .ne(InsOrder::getState, -1)); |
| | | List<Integer> insOrderIds = insOrders.stream().map(InsOrder::getId).collect(Collectors.toList()); |
| | | Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery() |
| | | .in(InsReport::getInsOrderId, insOrderIds)); |
| | | if (count > 0 ) { |
| | | throw new ErrorException("å½å订åå·²ç»çæäºæ¥åä¸è½ä¿®æ¹ç¼å·"); |
| | | } |
| | | |
| | | |
| | | Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getEntrustCode, insOrder.getEntrustCode()) |
| | | .ne(InsOrder::getIfsInventoryId, insOrder.getId()) |
| | | .ne(InsOrder::getInsState, -1)); |
| | | if (count1 > 0) { |
| | | throw new ErrorException("该ç¼å·éå¤"); |
| | | } |
| | | |
| | | //ä¿®æ¹æ¥åçç¼å· |
| | | insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getIfsInventoryId, insOrder.getId()) |
| | | .set(InsOrder::getEntrustCode, insOrder.getEntrustCode())); |
| | | |
| | | // ä¿®æ¹æ ·åçç¼å· |
| | | // æ¥è¯¢ææçæ ·å |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .in(InsSample::getInsOrderId, insOrderIds)); |
| | | for (InsSample insSample : insSamples) { |
| | | String sampleCode = insSample.getSampleCode(); |
| | | String updateCode = insOrder.getEntrustCode(); |
| | | // æ¥æ¾æåä¸ä¸ª'-'çä½ç½® |
| | | int lastDashIndex = sampleCode.lastIndexOf('-'); |
| | | if (lastDashIndex != -1) { |
| | | int secondLastDashIndex = sampleCode.lastIndexOf('-', lastDashIndex - 1); |
| | | // å¤çæåä¸ä¸ª'-'åçé¨å |
| | | if (secondLastDashIndex != -1) { |
| | | // å¤çæåä¸ä¸ª'-'åä¹åçé¨å |
| | | String afterLastDash = sampleCode.substring(lastDashIndex); |
| | | |
| | | updateCode = updateCode + afterLastDash; |
| | | } |
| | | } |
| | | insSampleMapper.update(null, Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, insSample.getId()) |
| | | .set(InsSample::getSampleCode, updateCode)); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<InsUnqualifiedRetestProduct> getRetestResult(Integer insProductId) { |
| | | return insUnqualifiedRetestProductMapper.selectList(Wrappers.<InsUnqualifiedRetestProduct>lambdaQuery() |
| | | .eq(InsUnqualifiedRetestProduct::getInsProductId, insProductId)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹éè´è®¢åæ¥æ¶ç¶æ, é¿å
åæ» |
| | | * @param id |
| | | */ |
| | | @Transactional |
| | | public void updateIfsInventoryQuantity(Long id) { |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .set(IfsInventoryQuantity::getIsRegister, 1) |
| | | .eq(IfsInventoryQuantity::getId, id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢éåä¸ä¸å |
| | | * @param list |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int addRawCopperOrder(List<SampleProductDto> list, CopperInsOrderDto insOrder) { |
| | | insOrder.setState(1); |
| | | insOrder.setTypeSource(1); |
| | | |
| | | LocalDate appointed = insOrder.getAppointed(); |
| | | |
| | | insOrderMapper.insert(insOrder); // 主表 |
| | | |
| | | list.forEach(a -> { |
| | | a.setId(null); |
| | | a.setInsOrderId(insOrder.getId()); |
| | | insSampleMapper.insert(a); |
| | | if (ObjectUtil.isNotEmpty(a.getInsProduct())) { |
| | | // 夿æ¯å¦å¡«åå¾
æ£é¡¹æ°é |
| | | if (a.getQuantity() != null) { |
| | | List<InsProduct> ip2 = new ArrayList<>(); |
| | | for (Integer i = 1; i <= a.getQuantity(); i++) { |
| | | // éæ°æ·è´ å建æ°å¯¹è±¡ |
| | | AtomicInteger atomicInteger = new AtomicInteger(i); |
| | | List<InsProduct> insProducts = a.getInsProduct().stream().map(insProduct -> { |
| | | insProduct.setRawMaterialTag(String.valueOf(atomicInteger.get())); |
| | | InsProduct product = new InsProduct(); |
| | | BeanUtils.copyProperties(insProduct, product); |
| | | return product; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | ip2.addAll(insProducts); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } else { |
| | | addInsProductMethod(a.getId(), a.getInsProduct()); |
| | | } |
| | | } |
| | | 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()); |
| | | insSampleMapper.insert(b); |
| | | if (ObjectUtil.isNotEmpty(b.getInsProduct())) { |
| | | addInsProductMethod(b.getId(), b.getInsProduct()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // æ·»å åææä¿¡æ¯ |
| | | IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity(); |
| | | // åºæ¬ä¿¡æ¯ |
| | | ifsInventoryQuantity.setIsSource(0); |
| | | ifsInventoryQuantity.setIsInspect(1); |
| | | ifsInventoryQuantity.setState(1); |
| | | ifsInventoryQuantity.setIsFinish(0); |
| | | ifsInventoryQuantity.setIsCopper(1); |
| | | ifsInventoryQuantity.setIsQuarter(0); |
| | | ifsInventoryQuantity.setInspectStatus(0); |
| | | //éææä¸åé»è®¤å¼ |
| | | ifsInventoryQuantity.setOrderType(OrderType.RAW.getValue()); |
| | | ifsInventoryQuantity.setMaterialProp("01Cu"); |
| | | |
| | | ifsInventoryQuantity.setQtyArrived(insOrder.getQtyArrived()); |
| | | ifsInventoryQuantity.setBuyUnitMeas(insOrder.getBuyUnitMeas()); |
| | | ifsInventoryQuantity.setSupplierName(insOrder.getSupplierName()); |
| | | ifsInventoryQuantity.setUpdateBatchNo(insOrder.getUpdateBatchNo()); |
| | | ifsInventoryQuantity.setDeclareDate(insOrder.getDeclareDate()); |
| | | |
| | | ifsInventoryQuantityMapper.insert(ifsInventoryQuantity); |
| | | |
| | | insOrder.setIfsInventoryId(ifsInventoryQuantity.getId()); |
| | | insOrder.setState(1); |
| | | |
| | | upInsOrderOfState(insOrder); |
| | | // å®¡æ ¸éè¿åä»
è¿å
¥æ ·åæ¥æ¶ï¼ç±æ ·åæ¥æ¶é¡µé¢éæ©ä¸»æ£éªäººååå建æ£éªä»»å¡ã |
| | | |
| | | return insOrder.getId(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹å§æä¸åç¼å· |
| | | * @param insOrder |
| | | */ |
| | | @Override |
| | | public void updateOrderEntrustCode(InsOrder insOrder) { |
| | | // 夿å½åè®¢åæ¯å¦çæäºæ¥å, çæäºæ¥åä¸è½ä¿®æ¹åå· |
| | | Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery() |
| | | .eq(InsReport::getInsOrderId, insOrder.getId())); |
| | | if (count > 0 ) { |
| | | throw new ErrorException("å½å订åå·²ç»çæäºæ¥åä¸è½ä¿®æ¹ç¼å·"); |
| | | } |
| | | |
| | | Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getEntrustCode, insOrder.getEntrustCode())); |
| | | if (count1 > 0) { |
| | | throw new ErrorException("该ç¼å·éå¤"); |
| | | } |
| | | |
| | | //ä¿®æ¹æ¥åçç¼å· |
| | | insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getId, insOrder.getId()) |
| | | .set(InsOrder::getEntrustCode, insOrder.getEntrustCode())); |
| | | |
| | | // ä¿®æ¹æ ·åçç¼å· |
| | | // æ¥è¯¢ææçæ ·å |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId())); |
| | | for (InsSample insSample : insSamples) { |
| | | String sampleCode = insSample.getSampleCode(); |
| | | String updateCode = insOrder.getEntrustCode(); |
| | | // æ¥æ¾æåä¸ä¸ª'-'çä½ç½® |
| | | int lastDashIndex = sampleCode.lastIndexOf('-'); |
| | | if (lastDashIndex != -1) { |
| | | int secondLastDashIndex = sampleCode.lastIndexOf('-', lastDashIndex - 1); |
| | | // å¤çæåä¸ä¸ª'-'åçé¨å |
| | | if (secondLastDashIndex != -1) { |
| | | // å¤çæåä¸ä¸ª'-'åä¹åçé¨å |
| | | String afterLastDash = sampleCode.substring(lastDashIndex); |
| | | |
| | | updateCode = updateCode + afterLastDash; |
| | | } |
| | | } |
| | | insSampleMapper.update(null, Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, insSample.getId()) |
| | | .set(InsSample::getSampleCode, updateCode)); |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£éªä¸åå
容 |
| | | * @param insOrderUpdateDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateInsOrder(InsOrderUpdateDto insOrderUpdateDto) { |
| | | InsOrder currentOrder = insOrderMapper.selectById(insOrderUpdateDto.getInsOrder().getId()); |
| | | if (currentOrder == null || !Objects.equals(currentOrder.getState(), 2)) { |
| | | throw new ErrorException("åªæéåçæ£éªåå¯ä»¥ä¿®æ¹"); |
| | | } |
| | | boolean hasSelectedProduct = CollectionUtils.isNotEmpty(insOrderUpdateDto.getSampleProduct()) |
| | | && insOrderUpdateDto.getSampleProduct().stream() |
| | | .filter(sample -> CollectionUtils.isNotEmpty(sample.getInsProduct())) |
| | | .flatMap(sample -> sample.getInsProduct().stream()) |
| | | .anyMatch(product -> Objects.equals(product.getState(), 1)); |
| | | if (!hasSelectedProduct) { |
| | | throw new ErrorException("请è³å°éæ©ä¸ä¸ªæ£éªé¡¹"); |
| | | } |
| | | |
| | | // ä¿®æ¹è®¢å |
| | | insOrderUpdateDto.getInsOrder().setState(0); |
| | | insOrderUpdateDto.getInsOrder().setTell(""); |
| | | insOrderMapper.updateById(insOrderUpdateDto.getInsOrder()); |
| | | |
| | | // ä¿®æ¹æ£éªé¡¹ |
| | | for (SampleProductDto sampleProductDto : insOrderUpdateDto.getSampleProduct()) { |
| | | Long sampleCount = insSampleMapper.selectCount(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getId, sampleProductDto.getId()) |
| | | .eq(InsSample::getInsOrderId, insOrderUpdateDto.getInsOrder().getId())); |
| | | if (sampleCount == 0) { |
| | | throw new ErrorException("æ£éªæ ·åæ°æ®å¼å¸¸"); |
| | | } |
| | | |
| | | insSampleService.update(Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, sampleProductDto.getId()) |
| | | .set(InsSample::getSpecialStandardMethod, sampleProductDto.getSpecialStandardMethod())); |
| | | |
| | | List<InsProduct> products = sampleProductDto.getInsProduct(); |
| | | if (CollectionUtils.isEmpty(products)) { |
| | | continue; |
| | | } |
| | | |
| | | Set<Integer> productIds = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleProductDto.getId())) |
| | | .stream() |
| | | .map(InsProduct::getId) |
| | | .collect(Collectors.toSet()); |
| | | if (products.stream().anyMatch(product -> product.getId() != null && !productIds.contains(product.getId()))) { |
| | | throw new ErrorException("æ£éªé¡¹æ°æ®å¼å¸¸"); |
| | | } |
| | | |
| | | List<Integer> removedIds = products.stream() |
| | | .filter(product -> product.getId() != null && !Objects.equals(product.getState(), 1)) |
| | | .map(InsProduct::getId) |
| | | .collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(removedIds)) { |
| | | insProductService.removeByIds(removedIds); |
| | | } |
| | | |
| | | List<InsProduct> existingProducts = products.stream() |
| | | .filter(product -> product.getId() != null && Objects.equals(product.getState(), 1)) |
| | | .collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(existingProducts)) { |
| | | insProductService.updateBatchById(existingProducts); |
| | | } |
| | | |
| | | List<InsProduct> newProducts = products.stream() |
| | | .filter(product -> product.getId() == null && Objects.equals(product.getState(), 1)) |
| | | .collect(Collectors.toList()); |
| | | addInsProductMethod(sampleProductDto.getId(), newProducts); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æåæ ç¾æå° |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InsOrderPrintingVo> labelOrderPrinting(List<Integer> ids) { |
| | | return insOrderMapper.labelOrderPrinting(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<InventoryDetailDTO> labelOutsideOrderPrinting(List<Integer> ids) { |
| | | return insOrderMapper.labelOutsideOrderPrinting(ids); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ ·åidæ¥è¯¢æ£éªé¡¹æ |
| | | * @param insSampleId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<StandardProductList> getProductTreeBySampleId(Integer insSampleId) { |
| | | // æ¥è¯¢ç¬¬ä¸ä¸ªæ£éªé¡¹è·åæ£éªé¡¹æ |
| | | InsProduct insProduct = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSampleId) |
| | | .last("limit 1")); |
| | | String tree; |
| | | if (insProduct.getSampleType() == null && insProduct.getModel() == null |
| | | && StringUtils.isNotBlank(insProduct.getLaboratory()) |
| | | && StringUtils.isNotBlank(insProduct.getSample())) { |
| | | tree = StandardTreePathParser.canonical(insProduct.getLaboratory(), insProduct.getSample()); |
| | | } else { |
| | | tree = insProduct.getFactory() + " - " + |
| | | insProduct.getLaboratory() + " - " + |
| | | insProduct.getSampleType() + " - " + |
| | | insProduct.getSample() + " - " + |
| | | insProduct.getModel(); |
| | | } |
| | | // æ¥è¯¢æ åæ |
| | | List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, insProduct.getStandardMethodListId()) |
| | | .eq(StandardProductList::getTree, tree) |
| | | .orderByAsc(StandardProductList::getSort)); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | standardProductList.setId(null); |
| | | } |
| | | |
| | | return standardProductLists; |
| | | } |
| | | |
| | | /** |
| | | * æ·»å éæ¼çæ£éªé¡¹ |
| | | * @param omitOrderProductDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addOmitOrderProduct(OmitOrderProductDto omitOrderProductDto) { |
| | | if (omitOrderProductDto.getInsSampleId() == null) { |
| | | throw new ErrorException("ç¼ºå°æ ·åId"); |
| | | } |
| | | for (InsProduct product : omitOrderProductDto.getInsProductBindingList()) { |
| | | if (product.getState() == 1) { |
| | | product.setId(null); |
| | | product.setCreateTime(null); |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setSection(null); |
| | | product.setInsSampleId(omitOrderProductDto.getInsSampleId()); |
| | | if (StringUtils.isBlank(product.getCableTag())) { |
| | | product.setCableTag(null); |
| | | } |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | if (StringUtils.isBlank(product.getAsk()) || StringUtils.isBlank(product.getTell())) { |
| | | throw new ErrorException("ææ£éªé¡¹çè¦æ±å¼æè¦æ±æè¿°ä¸ºç©º, 请填åè¦æ±å¼æè¦æ±æè¿°"); |
| | | } |
| | | insProductMapper.insert(product); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * æåæ£éªåå¯¼åº |
| | | * @param sampleOrderDto |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response) { |
| | | List<SampleOrderDto> sampleOrderDtoList = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(sampleOrderDto.getIds())) { |
| | | List<String> orderIds = StrUtil.split(sampleOrderDto.getIds(), ","); |
| | | sampleOrderDtoList = insOrderMapper.getInsOrderExportByIds(orderIds); |
| | | } else { |
| | | String laboratory = null; |
| | | // 夿æ¯å¦æ¯å
¨é¨ |
| | | String isOrderAll = null; |
| | | if (sampleOrderDto.getState() != null && sampleOrderDto.getState() == -2) { |
| | | isOrderAll = "1"; |
| | | sampleOrderDto.setState(null); |
| | | } |
| | | sampleOrderDto.setIds(null); |
| | | sampleOrderDtoList = insOrderMapper.rawAllInsOrderExport(QueryWrappers.queryWrappers(sampleOrderDto), laboratory, isOrderAll); |
| | | } |
| | | |
| | | // 夿æ¯å¦æ¯ä¸åæ ¼, ä¸åæ ¼æ¥è¯¢ä¸åæ ¼é¡¹ |
| | | for (SampleOrderDto orderDto : sampleOrderDtoList) { |
| | | if (orderDto.getInsResult() != null && orderDto.getInsResult() == 0){ |
| | | // æ¥è¯¢ä¸åæ ¼é¡¹ |
| | | List<String> unqualifiedList = insProductMapper.selectUnqualifiedList(orderDto.getId()); |
| | | orderDto.setUnqualifiedItem(CollUtil.join(unqualifiedList, ",")); |
| | | } |
| | | orderDto.setCreateTimeString(orderDto.getCreateTime() == null ? "" : orderDto.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | |
| | | } |
| | | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | try { |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | String fileName = URLEncoder.encode("å§ææ£æµä¿¡æ¯å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | //æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | //è·åsheet0对象 |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(0, "å§ææ£æµä¿¡æ¯å¯¼åº").head(SampleOrderDto.class).build(); |
| | | |
| | | //åsheet0åå
¥æ°æ® ä¼ å
¥ç©ºlistè¿æ ·åªå¯¼åºè¡¨å¤´ |
| | | excelWriter.write(sampleOrderDtoList, mainSheet); |
| | | //å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ ·ååå· |
| | | * @param insSample |
| | | */ |
| | | @Override |
| | | public void updateSampleModel(InsSample insSample) { |
| | | // 夿å½åè®¢åæ¯å¦çæäºæ¥å, çæäºæ¥åä¸è½ä¿®æ¹åå· |
| | | Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery() |
| | | .eq(InsReport::getInsOrderId, insSample.getInsOrderId())); |
| | | if (count > 0 ) { |
| | | throw new ErrorException("å½å订åå·²ç»çæäºæ¥åä¸è½ä¿®æ¹ç¼å·"); |
| | | } |
| | | |
| | | insSampleService.update(Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, insSample.getId()) |
| | | .set(InsSample::getModel, insSample.getModel())); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åæ¶é´æ¯å¦æ²¡æè¯¥æ£æµé¡¹çæ½æ ·è®¡å |
| | | * @param sampleList |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result judgeNotSpotCheckOrder(List<SampleProductDto> sampleList, InsOrder insOrder) { |
| | | // todo: ä¸åå¤ææ½æ ·è®¡åçå¯ä¸æ§ |
| | | if (insOrder.getQuarterItemId() != null) { |
| | | Long quarterItemCount = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery() |
| | | .eq(InsOrder::getQuarterItemId, insOrder.getQuarterItemId()) |
| | | .notIn(InsOrder::getState, -1 ,2 ,3)); |
| | | if (quarterItemCount > 0) { |
| | | throw new ErrorException("è¯¥æ½æ ·è®¡å已被ç»å®è¿"); |
| | | } |
| | | } |
| | | |
| | | // 夿æ¯å¦æ¯æ½æ ·æ£æµ |
| | | if (insOrder.getOrderType().equals(InsOrderTypeConstants.SPOT_CHECK)) { |
| | | Set<String> monthMessageSet = new HashSet<>(); |
| | | Set<String> quarterMessageSet = new HashSet<>(); |
| | | Set<String> yearMessageSet = new HashSet<>(); |
| | | |
| | | String formatTime = "yyyy-MM-dd HH:mm:ss"; |
| | | // æ¥è¯¢å½åæææ ·åçæ£éªé¡¹ |
| | | for (SampleProductDto sampleProductDto : sampleList) { |
| | | List<StandardProductList> standardProductList = getProductTreeBySampleId(sampleProductDto.getId()); |
| | | |
| | | Set<Integer> insIds = sampleProductDto.getInsProduct().stream() |
| | | .map(InsProduct::getStructureItemParameterId) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | List<StandardProductList> productLists = standardProductList.stream() |
| | | .filter(product -> !insIds.contains(product.getStructureItemParameterId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // æ¥è¯¢æ£éªé¡¹åºç¡è¡¨, æ¥è¯¢æ¯å¦ææåº¦, å£åº¦, å¹´åº¦çæ£éªé¡¹ |
| | | List<StructureItemParameter> itemParameterList = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | .in(StructureItemParameter::getId, productLists.stream().map(StandardProductList::getStructureItemParameterId).collect(Collectors.toList()))); |
| | | |
| | | for (StructureItemParameter item : itemParameterList) { |
| | | if (StringUtils.isNotBlank(item.getSpotCheckType())) { |
| | | switch (item.getSpotCheckType()) { |
| | | case "1": // æåº¦ |
| | | // æ¥è¯¢å½ææ¯å¦æè¯¥æ£æµé¡¹çæ½æ ·è®¡å |
| | | // 彿å¼å§æ¶é´ |
| | | DateTime monthStart = DateUtil.beginOfMonth(DateUtil.date()); |
| | | String monthStartTime = monthStart.toString(formatTime); |
| | | // å½æç»ææ¶é´ |
| | | DateTime monthEnd = DateUtil.endOfMonth(DateUtil.date()); |
| | | String monthEndTime = monthEnd.toString(formatTime); |
| | | Integer count = insOrderMapper.selectNotSpotCheckOrder(item.getId(), monthStartTime, monthEndTime); |
| | | if (count == 0) { |
| | | String monthMessage = item.getInspectionItemClass() + |
| | | item.getInspectionItem() + |
| | | item.getInspectionItemSubclass(); |
| | | monthMessageSet.add(monthMessage); |
| | | } |
| | | break; |
| | | case "2": // å£åº¦ |
| | | DateTime quarterStart = DateUtil.beginOfQuarter(DateUtil.date()); |
| | | String quarterStartTime = quarterStart.toString(formatTime); |
| | | // å½æç»ææ¶é´ |
| | | DateTime quarterEnd = DateUtil.endOfQuarter(DateUtil.date()); |
| | | String quarterEndTime = quarterEnd.toString(formatTime); |
| | | Integer quarterCount = insOrderMapper.selectNotSpotCheckOrder(item.getId(), quarterStartTime, quarterEndTime); |
| | | if (quarterCount == 0) { |
| | | String quarterMessage = item.getInspectionItemClass() + |
| | | item.getInspectionItem() + |
| | | item.getInspectionItemSubclass(); |
| | | quarterMessageSet.add(quarterMessage); |
| | | } |
| | | |
| | | break; |
| | | case "3": // 年度 |
| | | DateTime yearStart = DateUtil.beginOfQuarter(DateUtil.date()); |
| | | String yearStartTime = yearStart.toString(formatTime); |
| | | // å½æç»ææ¶é´ |
| | | DateTime yearEnd = DateUtil.endOfQuarter(DateUtil.date()); |
| | | String yearEndTime = yearEnd.toString(formatTime); |
| | | Integer yearCount = insOrderMapper.selectNotSpotCheckOrder(item.getId(), yearStartTime, yearEndTime); |
| | | if (yearCount == 0) { |
| | | String yearMessage = item.getInspectionItemClass() + |
| | | item.getInspectionItem() + |
| | | item.getInspectionItemSubclass(); |
| | | yearMessageSet.add(yearMessage); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | String message = ""; |
| | | if (CollectionUtils.isNotEmpty(monthMessageSet)) { |
| | | message += StrUtil.format("<p>æ£éªé¡¹<span style=\"color: red\">{}</span>å½æè¿æªè¿è¡æ½æ ·æ£æµ, 请æ¥çæ¯å¦éè¦æ·»å å½åæ£éªé¡¹</p>", CollUtil.join(monthMessageSet, ", ")); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(quarterMessageSet)) { |
| | | message += StrUtil.format("<p>æ£éªé¡¹<span style=\"color: red\">{}</span>å½åå£åº¦è¿æªè¿è¡æ½æ ·æ£æµ, è¯·çæ¯å¦éè¦æ·»å å½åæ£éªé¡¹</p>", CollUtil.join(quarterMessageSet, ", ")); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(yearMessageSet)) { |
| | | message += StrUtil.format("<p>æ£éªé¡¹<span style=\"color: red\">{}</span>ä»å¹´è¿æªè¿è¡æ½æ ·æ£æµ, è¯·çæ¯å¦éè¦æ·»å å½åæ£éªé¡¹</p>", CollUtil.join(yearMessageSet, ", ")); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(message)) { |
| | | return Result.success(false, message); |
| | | } |
| | | } |
| | | return Result.success(true); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ifsç§»åºæä½ |
| | | * @param inventoryQuantity |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public String moveRawMaterial(IfsInventoryQuantity inventoryQuantity) { |
| | | //æ¥è¯¢ifs订å详æ
|
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectById(inventoryQuantity.getId()); |
| | | String toLocation; |
| | | // ç»è®°éè´æ£éªç»æSTD |
| | | if (one.getIsRegister().equals(0)) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | map.put("LINE_NO", one.getLineNo()); // è¡å· |
| | | map.put("RELEASE_NO", one.getReleaseNo()); // ä¸è¾¾å· |
| | | map.put("RECEIPT_NO", one.getReceiptNo()); // æ¥æ¶å· |
| | | map.put("PURCH_QTY", one.getQtyToInspect()); // è¦æ£éªçéè´æ°é |
| | | resultList.add(map); |
| | | resultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | resultMap.put("SYSCODE", "LIMS"); |
| | | resultMap.put("SYSMODEL", "ç»è®°éè´æ£éªç»æ"); |
| | | resultMap.put("BATCH_INFO", resultList); |
| | | Result result = ifsApiUtils.getProcurementResults(JSONUtil.toJsonStr(resultMap)); |
| | | if (result.getCode() != 200) { |
| | | throw new ErrorException("IFSç»è®°éè´æ£éªç»æå¤±è´¥: " + result.getMsg()); |
| | | } |
| | | //å¦ææ¯æå订åï¼åå°å䏿¥æ¶å·çè®¢åæ è®°å·²ç»è®°æ ¡éª |
| | | if(one.getIsSplitOrder()==1){ |
| | | //æ¥è¯¢å
¶ä½æåç订å |
| | | List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery() |
| | | .eq(IfsInventoryQuantity::getOrderNo, one.getOrderNo()) |
| | | .eq(IfsInventoryQuantity::getPartNo, one.getPartNo()) |
| | | .eq(IfsInventoryQuantity::getLineNo, one.getLineNo()) |
| | | .eq(IfsInventoryQuantity::getReleaseNo, one.getReleaseNo()) |
| | | .eq(IfsInventoryQuantity::getReceiptNo, one.getReceiptNo()) |
| | | .eq(IfsInventoryQuantity::getIsSplitOrder, 1) |
| | | ); |
| | | if(Objects.nonNull(quantityList) && !quantityList.isEmpty()){ |
| | | //ä¿®æ¹éè´è®¢åç»è®°ç¶æ |
| | | List<Long> ids = quantityList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList()); |
| | | ifsInventoryQuantityMapper.update(null,Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .set(IfsInventoryQuantity::getIsRegister,1) |
| | | .in(IfsInventoryQuantity::getId, ids) |
| | | ); |
| | | } |
| | | }else{ |
| | | this.updateIfsInventoryQuantity(one.getId()); |
| | | } |
| | | } |
| | | /** |
| | | * TODO åç»éè¦è°ç¨IFSçæ¥å£ ç§»å
¥çåºä½å· toLocation |
| | | */ |
| | | // æ£éªåç§»åº |
| | | //1301:åææåæ ¼åºï¼CP-02-001:æååº |
| | | if(StringUtils.equals(inventoryQuantity.getOrderType(), OrderType.RAW.getValue())){ |
| | | toLocation = "1301"; |
| | | }else if(StringUtils.equals(inventoryQuantity.getOrderType(), OrderType.WG.getValue())){ |
| | | toLocation = "CP-02-001"; |
| | | }else{ |
| | | toLocation = "1301"; |
| | | } |
| | | Map<String, Object> moveResultMap = new HashMap<>(); |
| | | List<Map<String, Object>> moveResultList = new ArrayList<>(); |
| | | Map<String, Object> moveMap = new HashMap<>(); |
| | | moveMap.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | moveMap.put("LINE_NO", one.getLineNo()); |
| | | moveMap.put("RELEASE_NO", one.getReleaseNo()); |
| | | moveMap.put("RECEIPT_NO", one.getReceiptNo()); |
| | | moveMap.put("PART_NO", one.getPartNo()); |
| | | moveMap.put("QTY", one.getPurQtyInStore()); |
| | | moveMap.put("LOCATION_NO", one.getLocationNo()); |
| | | moveMap.put("TO_LOCATION_NO", toLocation); |
| | | moveMap.put("LOT_BATCH_NO", one.getLotBatchNo()); |
| | | moveMap.put("SERIAL_NO", one.getSerialNo()); |
| | | moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); |
| | | moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); |
| | | moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); |
| | | moveResultList.add(moveMap); |
| | | moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | moveResultMap.put("SYSCODE", "LIMS"); |
| | | moveResultMap.put("SYSMODEL", "æ£éªåç§»åº"); |
| | | moveResultMap.put("BATCH_INFO", moveResultList); |
| | | |
| | | Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); |
| | | // 妿æå¿
须为é¶ä»¶æå®æ¹å·æ¥ééè¦éæ°æäº¤ç§»åºä¿¡æ¯å»æå®æ¹å· |
| | | if (result1.getCode() != 200) { |
| | | String message = result1.getMsg(); |
| | | if (message.contains("å¿
须为é¶ä»¶") && message.contains("æå®æ¹å·")) { |
| | | updaeBatch(one, toLocation); |
| | | } else { |
| | | throw new ErrorException("IFSæ£éªåç§»åºå¤±è´¥: " + result1.getMsg()); |
| | | } |
| | | } |
| | | return toLocation; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
ä¿®æ¹éè´è®¢åæ¹æ¬¡å·, åè¿è¡ç§»åºæä½ |
| | | * @param one |
| | | * @param toLocation |
| | | */ |
| | | private void updaeBatch(IfsInventoryQuantity one, String toLocation) { |
| | | if (one.getIsUpdateBatch().equals(0)) { |
| | | // å
ä¿®æ¹æ¹æ¬¡å·åè¿è¡ç§»åº |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | map.put("LINE_NO", one.getLineNo()); // è¡å· |
| | | map.put("RELEASE_NO", one.getReleaseNo()); // ä¸è¾¾å· |
| | | map.put("RECEIPT_NO", one.getReceiptNo()); // æ¥æ¶å· |
| | | map.put("PART_NO", one.getPartNo()); //é¶ä»¶å· |
| | | map.put("CONFIGURATION_ID", one.getConfigurationId()); // é
ç½®æ è¯ |
| | | map.put("LOCATION_NO", one.getLocationNo()); // åºä½å· |
| | | map.put("LOT_BATCH_NO", one.getLotBatchNo());// æ¹æ¬¡å· |
| | | map.put("NEW_LOT_BATCH_NO", one.getUpdateBatchNo()); // ç®æ æ¹æ¬¡å· |
| | | map.put("SERIAL_NO", one.getSerialNo()); // åºåå· |
| | | map.put("ENG_CHG_LEVEL", one.getEngChgLevel()); // çæ¬å· |
| | | map.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); // wdrå· |
| | | map.put("ACTIVITY_SEQ", one.getActivitySeq()); // æ´»å¨åºå· |
| | | map.put("QTY_TO_CHANGE", one.getQtyArrived()); // åæ´æ°é |
| | | resultList.add(map); |
| | | resultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | resultMap.put("SYSCODE", "LIMS"); |
| | | resultMap.put("SYSMODEL", "ä¿®æ¹éè´è®¢åæ¹æ¬¡å·"); |
| | | resultMap.put("BATCH_INFO", resultList); |
| | | |
| | | Result result = ifsApiUtils.updateMoveReceiptLot(JSONUtil.toJsonStr(resultMap)); |
| | | |
| | | if (result.getCode() != 200) { |
| | | throw new ErrorException("IFSä¿®æ¹æ¹æ¬¡å·å¤±è´¥: " + result.getMsg()); |
| | | } |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .set(IfsInventoryQuantity::getIsUpdateBatch, 1) |
| | | .eq(IfsInventoryQuantity::getId, one.getId())); |
| | | } |
| | | |
| | | Map<String, Object> moveResultMap = new HashMap<>(); |
| | | List<Map<String, Object>> moveResultList = new ArrayList<>(); |
| | | Map<String, Object> moveMap = new HashMap<>(); |
| | | moveMap.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | moveMap.put("LINE_NO", one.getLineNo()); |
| | | moveMap.put("RELEASE_NO", one.getReleaseNo()); |
| | | moveMap.put("RECEIPT_NO", one.getReceiptNo()); |
| | | moveMap.put("PART_NO", one.getPartNo()); |
| | | moveMap.put("QTY", one.getQtyArrived()); |
| | | moveMap.put("LOCATION_NO", one.getLocationNo()); |
| | | moveMap.put("TO_LOCATION_NO", toLocation); |
| | | moveMap.put("LOT_BATCH_NO", one.getUpdateBatchNo()); |
| | | moveMap.put("SERIAL_NO", one.getSerialNo()); |
| | | moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); |
| | | moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); |
| | | moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); |
| | | moveResultList.add(moveMap); |
| | | moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | moveResultMap.put("SYSCODE", "LIMS"); |
| | | moveResultMap.put("SYSMODEL", "æ£éªåç§»åº"); |
| | | moveResultMap.put("BATCH_INFO", moveResultList); |
| | | |
| | | Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); |
| | | if (result1.getCode() != 200) { |
| | | throw new ErrorException("IFSæ£éªåç§»åºå¤±è´¥: " + result1.getMsg()); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsOrderStandardTemplateMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderStandardTemplate; |
| | | import com.ruoyi.inspect.service.InsOrderStandardTemplateService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * è®¢åæ åæ¨¡æ¿å¤å¶ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-11-05 |
| | | */ |
| | | @Service |
| | | public class InsOrderStandardTemplateServiceImpl extends ServiceImpl<InsOrderStandardTemplateMapper, InsOrderStandardTemplate> implements InsOrderStandardTemplateService { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsOrderStateMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | import com.ruoyi.inspect.service.InsOrderStateService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡ç¶æ |
| | | * |
| | | * @author zhuo |
| | | * @since 2025-02-28 |
| | | */ |
| | | @Service |
| | | public class InsOrderStateServiceImpl extends ServiceImpl<InsOrderStateMapper, InsOrderState> implements InsOrderStateService { |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingVo; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import com.ruoyi.inspect.mapper.InsOrderTemplateMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplate; |
| | | import com.ruoyi.inspect.service.InsOrderTemplateService; |
| | | import com.ruoyi.inspect.vo.InsOrderTemplateDetailVo; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_order_templateãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-18 14:14:54 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsOrderTemplateServiceImpl extends ServiceImpl<InsOrderTemplateMapper, InsOrderTemplate> |
| | | implements InsOrderTemplateService { |
| | | |
| | | private InsOrderTemplateMapper insOrderTemplateMapper; |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | @Override |
| | | public int addInsOrderTemplate(InsOrderTemplate insOrderTemplate) { |
| | | return insOrderTemplateMapper.insert(insOrderTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public List<InsOrderTemplate> selectInsOrderTemplate(String company) { |
| | | if (ObjectUtils.isEmpty(company) || company.equals("")) { |
| | | return insOrderTemplateMapper.selectList(Wrappers.<InsOrderTemplate>lambdaQuery() |
| | | .select(InsOrderTemplate.class, info -> !info.getColumn().equals("thing"))); |
| | | } else { |
| | | //æ ¹æ®å§æåä½è¿è¡çé |
| | | return insOrderTemplateMapper.selectList(Wrappers.<InsOrderTemplate>lambdaQuery() |
| | | .like(InsOrderTemplate::getThing,"\"company\":\""+ company+"\"") |
| | | .select(InsOrderTemplate.class, info -> !info.getColumn().equals("thing"))); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public InsOrderTemplateDetailVo selectInsOrderTemplateById(Integer id) { |
| | | InsOrderTemplate template = insOrderTemplateMapper.selectById(id); |
| | | InsOrderTemplateDetailVo vo = new InsOrderTemplateDetailVo(); |
| | | if (template == null) { |
| | | vo.setTemplateBindings(new ArrayList<>()); |
| | | return vo; |
| | | } |
| | | vo.setThing(template.getThing()); |
| | | // ä¼å
忍¡æ¿å䏿ä¹
åçæ åIDï¼å岿°æ®åéå°ä»è¡¨åå¿«ç
§ addObj.standardTreeId è§£æ |
| | | Integer standardTreeId = template.getStandardTreeId(); |
| | | if (standardTreeId == null) { |
| | | standardTreeId = parseStandardTreeId(template.getThing()); |
| | | } |
| | | vo.setStandardTreeId(standardTreeId); |
| | | if (standardTreeId != null) { |
| | | List<StandardTreeTemplateBindingVo> bindings = standardTreeService.selectTemplateBindings(standardTreeId); |
| | | vo.setTemplateBindings(bindings == null ? new ArrayList<>() : bindings); |
| | | } else { |
| | | vo.setTemplateBindings(new ArrayList<>()); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | private Integer parseStandardTreeId(String thing) { |
| | | if (StringUtils.isBlank(thing)) { |
| | | return null; |
| | | } |
| | | try { |
| | | JSONObject addObj = JSON.parseObject(thing).getJSONObject("addObj"); |
| | | return addObj == null ? null : addObj.getInteger("standardTreeId"); |
| | | } catch (Exception ignored) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int delInsOrderTemplate(Integer id) { |
| | | return insOrderTemplateMapper.deleteById(id); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail; |
| | | import com.ruoyi.inspect.mapper.InsProductDeviationWarningDetailMapper; |
| | | import com.ruoyi.inspect.service.InsProductDeviationWarningDetailService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:58 |
| | | */ |
| | | @Service |
| | | public class InsProductDeviationWarningDetailServiceImpl extends ServiceImpl<InsProductDeviationWarningDetailMapper, InsProductDeviationWarningDetail> implements InsProductDeviationWarningDetailService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.inspect.dto.InsProductDeviationWarningDto; |
| | | import com.ruoyi.inspect.pojo.InsProductDeviationWarning; |
| | | import com.ruoyi.inspect.mapper.InsProductDeviationWarningMapper; |
| | | import com.ruoyi.inspect.service.InsProductDeviationWarningService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£éªé¡¹åå·®é¢è¦ä¸»è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author |
| | | * @since 2025-03-28 02:18:02 |
| | | */ |
| | | @Service |
| | | public class InsProductDeviationWarningServiceImpl extends ServiceImpl<InsProductDeviationWarningMapper, InsProductDeviationWarning> implements InsProductDeviationWarningService { |
| | | |
| | | /** |
| | | * æ¥çé¢è¦å表 |
| | | * @param page |
| | | * @param deviationWarningDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InsProductDeviationWarningDto> selectDeviationWarningPage(Page page, InsProductDeviationWarningDto deviationWarningDto) { |
| | | return baseMapper.selectDeviationWarningPage(page, QueryWrappers.queryWrappers(deviationWarningDto)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.utils.StandardTreePathParser; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.InsProductBindingDto; |
| | | import com.ruoyi.inspect.dto.WriteInspectionConditionDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderStandardTemplateMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderTemplateDeviceMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderStandardTemplate; |
| | | import com.ruoyi.inspect.pojo.InsOrderTemplateDevice; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.service.InsProductService; |
| | | import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InsProductServiceImpl extends ServiceImpl<InsProductMapper, InsProduct> |
| | | implements InsProductService { |
| | | |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | private InsOrderStandardTemplateMapper insOrderStandardTemplateMapper; |
| | | |
| | | private InsOrderTemplateDeviceMapper insOrderTemplateDeviceMapper; |
| | | |
| | | @Override |
| | | public int selectOrderManDay(Integer orderId) { |
| | | return insProductMapper.selectOrderManDay(orderId); |
| | | } |
| | | |
| | | @Override |
| | | public int updateInspected(Integer id, String ids) { |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(id); |
| | | insOrder.setIsRevocation(1);//éè¦å®¡æ ¸ |
| | | insOrder.setRevocationInsProductIds(ids); |
| | | return insOrderMapper.updateById(insOrder); |
| | | } |
| | | |
| | | @Override |
| | | public boolean write(WriteInspectionConditionDto dto) { |
| | | if (dto == null || dto.getId() == null) { |
| | | throw new ErrorException("订åIDä¸è½ä¸ºç©º"); |
| | | } |
| | | if (dto.getTemplateId() != null) { |
| | | InsOrderStandardTemplate snapshot = insOrderStandardTemplateMapper.selectOne( |
| | | Wrappers.<InsOrderStandardTemplate>lambdaQuery() |
| | | .eq(InsOrderStandardTemplate::getInsOrderId, dto.getId()) |
| | | .eq(InsOrderStandardTemplate::getTemplateId, dto.getTemplateId()) |
| | | .last("limit 1")); |
| | | if (snapshot == null) { |
| | | throw new ErrorException("æªæ¾å°å½å模æ¿çåå§è®°å½å¿«ç
§"); |
| | | } |
| | | boolean hasSnapshotField = dto.isTemperaturePresent() || dto.isHumidityPresent() |
| | | || dto.isDetectionTimePresent() || dto.isDetectionPlacePresent() |
| | | || dto.isInsResultPresent(); |
| | | if (hasSnapshotField) { |
| | | insOrderStandardTemplateMapper.update(null, |
| | | Wrappers.<InsOrderStandardTemplate>lambdaUpdate() |
| | | .eq(InsOrderStandardTemplate::getId, snapshot.getId()) |
| | | .set(dto.isTemperaturePresent(), |
| | | InsOrderStandardTemplate::getTemperature, dto.getTemperature()) |
| | | .set(dto.isHumidityPresent(), |
| | | InsOrderStandardTemplate::getHumidity, dto.getHumidity()) |
| | | .set(dto.isDetectionTimePresent(), |
| | | InsOrderStandardTemplate::getDetectionTime, dto.getDetectionTime()) |
| | | .set(dto.isDetectionPlacePresent(), |
| | | InsOrderStandardTemplate::getDetectionPlace, dto.getDetectionPlace()) |
| | | .set(dto.isInsResultPresent(), |
| | | InsOrderStandardTemplate::getInsResult, dto.getInsResult())); |
| | | } |
| | | if (dto.isDeviceIdsPresent()) { |
| | | insOrderTemplateDeviceMapper.delete( |
| | | Wrappers.<InsOrderTemplateDevice>lambdaQuery() |
| | | .eq(InsOrderTemplateDevice::getInsOrderId, dto.getId()) |
| | | .eq(InsOrderTemplateDevice::getTemplateId, dto.getTemplateId())); |
| | | List<Integer> deviceIds = dto.getDeviceIds() == null |
| | | ? Collections.emptyList() |
| | | : dto.getDeviceIds().stream() |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | if (!deviceIds.isEmpty() |
| | | && insOrderTemplateDeviceMapper.selectExistingDeviceIds(deviceIds).size() != deviceIds.size()) { |
| | | throw new ErrorException("æé设å¤ä¸åå¨ï¼è¯·å·æ°è®¾å¤å表åéè¯"); |
| | | } |
| | | for (int index = 0; index < deviceIds.size(); index++) { |
| | | InsOrderTemplateDevice relation = new InsOrderTemplateDevice(); |
| | | relation.setInsOrderId(dto.getId()); |
| | | relation.setTemplateId(dto.getTemplateId()); |
| | | relation.setDeviceId(deviceIds.get(index)); |
| | | relation.setSort(index); |
| | | insOrderTemplateDeviceMapper.insert(relation); |
| | | } |
| | | } |
| | | if (!hasSnapshotField && !dto.isDeviceIdsPresent()) { |
| | | throw new ErrorException("没æéè¦ä¿åçæ¨¡æ¿æ£éªæ¡ä»¶"); |
| | | } |
| | | return true; |
| | | } |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(dto.getId()); |
| | | insOrder.setRemark(dto.getRemark()); |
| | | insOrderMapper.updateById(insOrder); |
| | | return true; |
| | | } |
| | | |
| | | //æ¥è¯¢å¾
æ£é¡¹ç® |
| | | @Override |
| | | public IPage<InsProduct> selectNoProducts(Page page, InsProduct insProduct, Integer orderId, String ids) { |
| | | List<Integer> noIds = null; |
| | | if (StringUtils.isNotBlank(ids)) { |
| | | noIds = Arrays.asList(ids.split(",")).stream() |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | IPage<InsProduct> insProductIPage = baseMapper.selectNoProducts(page, orderId, noIds); |
| | | return insProductIPage; |
| | | } |
| | | |
| | | //å®¡æ ¸å¾
æ£æ¤é |
| | | @Override |
| | | public void checkUpdate(Integer orderId, Integer state) { |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | if (state == 1) { |
| | | List<String> list = new ArrayList<>(); |
| | | try { |
| | | list = Arrays.asList(insOrder.getRevocationInsProductIds().split(",")); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("è¿æ²¡æéæ©åºè¯¥è¦æ¤éçæ£éªé¡¹ç®"); |
| | | } |
| | | List<Integer> ids = list.stream() |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | List<Integer> collect = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).in(InsProduct::getInsSampleId, collect)); |
| | | if (insProducts.stream().map(InsProduct::getId).collect(Collectors.toList()).equals(ids)) { |
| | | //å¦æè¯¥æ£éªåä¸çææé¡¹ç®å
¨é¨é½æ¤é,é£ä¹è¿ä¸ªååä¹éè¦æ¤é |
| | | insOrder.setState(3); |
| | | } else { |
| | | List<InsProduct> products = insProductMapper.selectBatchIds(ids); |
| | | //é¦å
æ ¹æ®éæ©ç项ç®idè¿è¡æ¤éé¡¹ç® |
| | | updateBatchById(products.stream().map(insProduct -> { |
| | | insProduct.setState(0); |
| | | return insProduct; |
| | | }).collect(Collectors.toList())); |
| | | } |
| | | //insProductMapper.updateInspected(id); |
| | | } |
| | | //ä¸éè¿ |
| | | insOrder.setIsRevocation(0); |
| | | insOrderMapper.updateById(insOrder); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ£éªé¡¹idæ¥è¯¢æ£éªé¡¹æ ä¿¡æ¯ |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InsProduct> getProductTreeByProductId(Integer productId) { |
| | | // æ¥è¯¢æ£éªé¡¹ä¿¡æ¯ |
| | | InsProduct insProduct = insProductMapper.selectById(productId); |
| | | String tree; |
| | | if (insProduct.getSampleType() == null && insProduct.getModel() == null |
| | | && StringUtils.isNotBlank(insProduct.getLaboratory()) |
| | | && StringUtils.isNotBlank(insProduct.getSample())) { |
| | | tree = StandardTreePathParser.canonical(insProduct.getLaboratory(), insProduct.getSample()); |
| | | } else { |
| | | tree = insProduct.getFactory() + " - " + |
| | | insProduct.getLaboratory() + " - " + |
| | | insProduct.getSampleType() + " - " + |
| | | insProduct.getSample() + " - " + |
| | | insProduct.getModel(); |
| | | } |
| | | // æ¥è¯¢æ åæ |
| | | List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, insProduct.getStandardMethodListId()) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | |
| | | List<InsProduct> insProducts = standardProductLists.stream().map(standardProductList -> { |
| | | InsProduct product = new InsProduct(); |
| | | BeanUtils.copyProperties(standardProductList, product); |
| | | // 鲿¢åºååé误 |
| | | product.setTemplate(null); |
| | | product.setStyle(null); |
| | | return product; |
| | | }).sorted((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())).collect(Collectors.toList()); |
| | | return insProducts; |
| | | } |
| | | |
| | | /** |
| | | * ç¹æ®æ£éªé¡¹ç»å® |
| | | * @param insProductBindingDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean bindingProductTreeByProductId(InsProductBindingDto insProductBindingDto) { |
| | | if (insProductBindingDto.getInsProductId() == null) { |
| | | throw new ErrorException("ç¼ºå°æ£éªé¡¹ç»å®id"); |
| | | } |
| | | |
| | | List<InsProduct> insProductBindingList = insProductBindingDto.getInsProductBindingList(); |
| | | // æ¥è¯¢åæ¬æ£éªé¡¹ |
| | | InsProduct insProduct = insProductMapper.selectById(insProductBindingDto.getInsProductId()); |
| | | |
| | | for (InsProduct product : insProductBindingList) { |
| | | product.setBindingProductId(insProductBindingDto.getInsProductId()); |
| | | product.setAsk(null); |
| | | product.setTell(null); |
| | | product.setPrice(null); |
| | | product.setManHour(null); |
| | | product.setSection(null); |
| | | // å
³èæ è¯ |
| | | product.setRawMaterialTag(insProduct.getRawMaterialTag()); |
| | | product.setRepetitionTag(insProduct.getRepetitionTag()); |
| | | product.setInsSampleId(insProduct.getInsSampleId()); |
| | | product.setIsBinding(1); |
| | | product.setState(1); |
| | | } |
| | | |
| | | // 夿æ¯å¦æ¯çµç¼æ¯çµç¼éè¦æ·»å ææçµç¼å
³èå
³ç³» |
| | | if (StringUtils.isNotBlank(insProduct.getCableTag())) { |
| | | // æ¥è¯¢å
¶ä»çµç¼ |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insProduct.getInsSampleId()) |
| | | .eq(InsProduct::getStructureItemParameterId, insProduct.getStructureItemParameterId()) |
| | | .isNotNull(InsProduct::getCableTag)); |
| | | for (InsProduct product : insProducts) { |
| | | for (InsProduct insProduct1 : insProductBindingList) { |
| | | insProduct1.setId(null); |
| | | insProduct1.setBindingProductId(product.getId()); |
| | | insProduct1.setCableTag(product.getCableTag()); |
| | | } |
| | | this.saveBatch(insProductBindingList); |
| | | } |
| | | } else { |
| | | this.saveBatch(insProductBindingList); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ®æ£éªé¡¹ç»å®ä¿¡æ¯ |
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean removeBindingProductTree(Integer productId) { |
| | | // æ¥è¯¢æ£éªé¡¹ |
| | | InsProduct insProduct = insProductMapper.selectById(productId); |
| | | // 夿æ¯å¦æ¯çµç¼é
ç½®, éè¦å é¤å
³èçææçæ£éªé¡¹ |
| | | if (StringUtils.isNotBlank(insProduct.getCableTag())) { |
| | | insProductMapper.delete(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insProduct.getInsSampleId()) |
| | | .eq(InsProduct::getIsBinding, 1) |
| | | .isNotNull(InsProduct::getBindingProductId) |
| | | .eq(InsProduct::getStructureItemParameterId, insProduct.getStructureItemParameterId()) |
| | | .isNotNull(InsProduct::getCableTag)); |
| | | } else { |
| | | insProductMapper.deleteById(productId); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public List<InsProduct> getRevocationInsProductList(Integer orderId) { |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | if(Objects.isNull(insOrder)){ |
| | | throw new RuntimeException("æªæ¾å°è¯¥è®¢å"); |
| | | } |
| | | String revocationInsProductIds = insOrder.getRevocationInsProductIds(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(revocationInsProductIds)){ |
| | | ids = Arrays.asList(revocationInsProductIds.split(",")).stream().map(Integer::parseInt).collect(Collectors.toList()); |
| | | } |
| | | return baseMapper.getRevocationInsProductList(ids); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.aspose.words.FontSettings; |
| | | import com.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.itextpdf.text.BadElementException; |
| | | import com.itextpdf.text.DocumentException; |
| | | import com.itextpdf.text.pdf.PdfContentByte; |
| | | import com.itextpdf.text.pdf.PdfReader; |
| | | import com.itextpdf.text.pdf.PdfStamper; |
| | | import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import com.ruoyi.common.config.WechatProperty; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.InformationNotification; |
| | | import com.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.WxCpUtils; |
| | | import com.ruoyi.common.utils.api.IfsApiUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.InsReportExport; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsReportService; |
| | | import com.ruoyi.inspect.service.RawMaterialOrderService; |
| | | import com.ruoyi.inspect.util.PreserveReportPicturePlaceholderHandler; |
| | | import com.ruoyi.inspect.util.ReportSignaturePictureUtils; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.InformationNotificationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import javax.imageio.ImageIO; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.*; |
| | | import java.net.URLEncoder; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.nio.file.StandardCopyOption; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipFile; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class InsReportServiceImpl extends ServiceImpl<InsReportMapper, InsReport> |
| | | implements InsReportService { |
| | | static { |
| | | // Linux æå¡å¨ç¼ºå°ä¸æåä½ï¼æ¥å转 PDF æ¶ä¸æä¼åææ¹åï¼å°æ¨¡æ¿å使 å°å° Noto CJK å
åºã |
| | | FontSettings.addFontSubstitutes("å®ä½", "Noto Serif CJK SC"); |
| | | FontSettings.addFontSubstitutes("é»ä½", "Noto Sans CJK SC"); |
| | | } |
| | | |
| | | private static final int DETECTION_REPORT = 0; |
| | | private static final int INSPECTION_REPORT = 1; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | @Resource |
| | | private InsProductMapper insProductMapper; |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | @Resource |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | @Resource |
| | | private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper; |
| | | @Resource |
| | | private InsSampleMapper insSampleMapper; |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | @Resource |
| | | private InsOrderService insOrderService; |
| | | @Resource |
| | | private WechatProperty wechatProperty; |
| | | @Resource |
| | | private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper; |
| | | @Resource |
| | | private IfsApiUtils ifsApiUtils; |
| | | @Resource |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | @Autowired |
| | | private RawMaterialOrderService rawMaterialOrderService; |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> pageInsReport(Page page, ReportPageDto reportPageDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // todo: ä»
çèªå·± |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String laboratory = null; |
| | | |
| | | Integer createOrderUser = reportPageDto.getCreateOrderUser(); |
| | | String queryStatus = reportPageDto.getQueryStatus(); |
| | | reportPageDto.setQueryStatus(null); |
| | | reportPageDto.setCreateOrderUser(null); |
| | | |
| | | map.put("body", insReportMapper.pageInsReport(page, |
| | | QueryWrappers.queryWrappers(reportPageDto), |
| | | laboratory, |
| | | SecurityUtils.getUserId().intValue(), |
| | | queryStatus, |
| | | createOrderUser)); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int inReport(String url, Integer id) { |
| | | InsReport insReport = new InsReport(); |
| | | insReport.setId(id); |
| | | insReport.setUrlS(url); |
| | | // è¿åpdf |
| | | String tempUrlPdf = wordToPdfTemp(insReport.getUrlS().replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | @Override |
| | | public int upReportUrl(Integer id) { |
| | | InsReport report = insReportMapper.selectById(id); |
| | | // è¿åpdf |
| | | String tempUrlPdf = wordToPdfTemp(report.getUrl().replace("/word", wordUrl)); |
| | | |
| | | return insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate() |
| | | .eq(InsReport::getId, id) |
| | | .set(InsReport::getUrlS, null) |
| | | .set(InsReport::getTempUrlPdf, "/word/" + tempUrlPdf)); |
| | | } |
| | | |
| | | //æäº¤ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int writeReport(Integer id, Integer userId, Integer submitUserId) { |
| | | submitUserId = submitUserId == null ? SecurityUtils.getUserId().intValue() : submitUserId; |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setId(id); |
| | | insReport.setState(1); |
| | | insReport.setWriteUserId(submitUserId);//æäº¤äºº |
| | | if (userId == null) { |
| | | throw new ErrorException("缺å°å®¡æ ¸äºº"); |
| | | } |
| | | insReport.setExamineUserId(userId);//å®¡æ ¸äºº |
| | | insReport.setWriteTime(LocalDateTime.now());//æäº¤æ¶é´ |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getWriteUserId()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | if (ObjectUtils.isEmpty(signatureUrl) || signatureUrl.equals("")) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | |
| | | Integer insOrderId = insReportMapper.selectById(id).getInsOrderId(); |
| | | InsOrder order = insOrderMapper.selectById(insOrderId); |
| | | boolean isRawMater = order.getTypeSource() != null && order.getTypeSource().equals(1); |
| | | |
| | | //åéæ¶æ¯ |
| | | InformationNotification info = new InformationNotification(); |
| | | info.setCreateUser(insProductMapper.selectUserById(userId).get("name")); |
| | | info.setMessageType("3"); |
| | | info.setTheme("å®¡æ ¸éç¥"); |
| | | info.setContent("æ¨æä¸æ¡æ¥åç¼å¶å¾
å®¡æ ¸æ¶æ¯, ç¼å·:" + insReport.getCode()); |
| | | info.setSenderId(submitUserId); //åé人 |
| | | info.setConsigneeId(userId); //æ¶ä»¶äºº |
| | | info.setViewStatus(false); |
| | | info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION); |
| | | informationNotificationService.addInformationNotification(info); |
| | | String primaryReportUrl = getPrimaryReportUrl(insReport); |
| | | |
| | | // 夿æ¯å¦æ¯åææ éè¦æ¿æ¢****æä¾åºå |
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId())); |
| | | if (one != null) { |
| | | if (isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) { |
| | | for (String reportUrl : getApprovalReportUrls(insReport)) { |
| | | changeText(new HashMap<String, String>() {{ |
| | | put("**********", one.getSupplierName()); |
| | | }}, reportUrl.replace("/word", wordUrl)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | Map<String, Object> writeMarks = new HashMap<String, Object>() {{ |
| | | put("writeUrl", ReportSignaturePictureUtils.create(imgUrl, signatureUrl)); |
| | | put("writeDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create()); |
| | | put("insUrl", ReportSignaturePictureUtils.create(imgUrl, signatureUrl)); |
| | | }}; |
| | | writeMarksToReportFiles(insReport, writeMarks); |
| | | |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp(primaryReportUrl.replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | |
| | | insReportMapper.updateById(insReport); |
| | | |
| | | // æ¸
ç©ºå®¡æ ¸æ¶é´, å®¡æ ¸ç¶æ |
| | | insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate() |
| | | .eq(InsReport::getId, insReport.getId()) |
| | | .set(InsReport::getRatifyTime, null) |
| | | .set(InsReport::getIsRatify, null) |
| | | .set(InsReport::getExamineTime, null) |
| | | .set(InsReport::getIsExamine, null)); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int examineReport(Integer id, Integer isExamine, String examineTell, Integer userId) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setIsExamine(isExamine); |
| | | if (ObjectUtils.isNotEmpty(examineTell)) { |
| | | insReport.setExamineTell(examineTell); |
| | | } |
| | | |
| | | // æ£éªäºº |
| | | String userName = insProductMapper.selectUserById(insReport.getWriteUserId()).get("name"); |
| | | String userAccount = insProductMapper.selectUserById(insReport.getWriteUserId()).get("account"); |
| | | |
| | | // å®¡æ ¸äºº |
| | | Integer checkUserId = SecurityUtils.getUserId().intValue(); |
| | | String checkUserName = insProductMapper.selectUserById(checkUserId).get("name"); |
| | | |
| | | insReport.setExamineTime(LocalDateTime.now());//å®¡æ ¸æ¶é´ |
| | | if (isExamine == 0) { |
| | | // åéä¼ä¸å¾®ä¿¡éç¥(å®¡æ ¸éå) |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢è®¢å |
| | | InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId()); |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insReport.getInsOrderId()) |
| | | .last("limit 1")); |
| | | // æ¥è¯¢åææ |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId()); |
| | | |
| | | String message = ""; |
| | | message += "æ¥åç¼å¶å®¡æ ¸éåéç¥"; |
| | | message += "\nå®¡æ ¸äºº: " + checkUserName; |
| | | message += "\nå§æç¼å·: " + order.getEntrustCode(); |
| | | message += "\næ ·ååç§°: " + insSample.getModel(); |
| | | message += "\nè§æ ¼åå·: " + order.getPartDetail(); |
| | | if (ifsInventoryQuantity != null) { |
| | | message += "\næ¹æ¬¡å·: " + ifsInventoryQuantity.getUpdateBatchNo(); |
| | | } |
| | | message += "\néååå : " + examineTell; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ æäº¤å¤æ ¸ |
| | | try { |
| | | WxCpUtils.inform(userAccount, message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | |
| | | //å¦æå®¡æ ¸ä¸éè¿ |
| | | insReport.setState(0);//æäº¤ç¶ææ¹ä¸ºå¾
æäº¤ |
| | | return insReportMapper.updateById(insReport); |
| | | } else { |
| | | if (userId == null) { |
| | | throw new ErrorException("ç¼ºå°æ¹å人"); |
| | | } |
| | | if (Objects.equals(insReport.getExamineUserId(), userId)) { |
| | | throw new ErrorException("å®¡æ ¸äººåæ¹å人ä¸è½ä¸ºåä¸äººï¼è¯·éæ°éæ©æ¹å人"); |
| | | } |
| | | } |
| | | insReport.setRatifyUserId(userId);//æ¹å人 |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | if (StringUtils.isBlank(signatureUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | |
| | | // æ¹å人 |
| | | String sendUserAccount = insProductMapper.selectUserById(userId).get("account"); |
| | | |
| | | //åéæ¶æ¯ |
| | | InformationNotification info = new InformationNotification(); |
| | | info.setCreateUser(insProductMapper.selectUserById(userId).get("name")); |
| | | info.setMessageType("3"); |
| | | info.setTheme("æ¹åéç¥"); |
| | | info.setContent("æ¨æä¸æ¡æ¥åç¼å¶å¾
æ¹åæ¶æ¯, ç¼å·:" + insReport.getCode()); |
| | | info.setSenderId(checkUserId); //åé人 |
| | | info.setConsigneeId(userId); //æ¶ä»¶äºº |
| | | info.setViewStatus(false); |
| | | info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION); |
| | | informationNotificationService.addInformationNotification(info); |
| | | String primaryReportUrl = getPrimaryReportUrl(insReport); |
| | | Map<String, Object> examineMarks = new HashMap<String, Object>() {{ |
| | | put("examineUrl", ReportSignaturePictureUtils.create(imgUrl, signatureUrl)); |
| | | put("examineDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create()); |
| | | }}; |
| | | writeMarksToReportFiles(insReport, examineMarks); |
| | | |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp(primaryReportUrl.replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥(éç¥æ¹å人审æ¹) |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢è®¢å |
| | | InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId()); |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insReport.getInsOrderId()) |
| | | .last("limit 1")); |
| | | // æ¥è¯¢åææ |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId()); |
| | | |
| | | String message = ""; |
| | | message += "æ¥åç¼å¶æ¹åéç¥"; |
| | | message += "\næ£éªäºº: " + userName; |
| | | message += "\n夿 ¸äºº: " + checkUserName; |
| | | message += "\nå§æç¼å·: " + order.getEntrustCode(); |
| | | message += "\næ ·ååç§°: " + insSample.getModel(); |
| | | message += "\nè§æ ¼åå·: " + order.getPartDetail(); |
| | | if (ifsInventoryQuantity != null) { |
| | | message += "\nç产åå®¶: " + ifsInventoryQuantity.getSupplierName(); |
| | | message += "\næ¹æ¬¡å·: " + ifsInventoryQuantity.getUpdateBatchNo(); |
| | | } |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ æäº¤å¤æ ¸ |
| | | try { |
| | | WxCpUtils.inform(sendUserAccount, message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | insReportMapper.updateById(insReport); |
| | | |
| | | // æ¸
空æ¹å夿³¨, æ¹åæ¶é´, æ¹åç¶æ |
| | | insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate() |
| | | .eq(InsReport::getId, insReport.getId()) |
| | | .set(InsReport::getExamineTell, null) |
| | | .set(InsReport::getRatifyTime, null) |
| | | .set(InsReport::getIsRatify, null)); |
| | | return 1; |
| | | } |
| | | |
| | | //æ¹å |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | if (Objects.equals(insReport.getExamineUserId(), SecurityUtils.getUserId().intValue())) { |
| | | throw new ErrorException("å®¡æ ¸äººåæ¹å人ä¸è½ä¸ºåä¸äººï¼è¯·éæ°éæ©æ¹å人"); |
| | | } |
| | | insReport.setIsRatify(isRatify); |
| | | if (ObjectUtils.isNotEmpty(ratifyTell)) { |
| | | insReport.setRatifyTell(ratifyTell); |
| | | } |
| | | insReport.setRatifyTime(LocalDateTime.now());//æ¹åæ¶é´ |
| | | if (isRatify == 0) { |
| | | |
| | | // æ¹å人 |
| | | Integer ratifyUserId = SecurityUtils.getUserId().intValue(); |
| | | String ratifyUserName = insProductMapper.selectUserById(ratifyUserId).get("name"); |
| | | |
| | | // åé人(å®¡æ ¸äºº)(æ£éªäºº) |
| | | // æ£éªäºº |
| | | String userAccount = insProductMapper.selectUserById(insReport.getWriteUserId()).get("account"); |
| | | // å®¡æ ¸äºº |
| | | String checkUserAccount = insProductMapper.selectUserById(insReport.getExamineUserId()).get("account"); |
| | | |
| | | |
| | | // åéä¼ä¸å¾®ä¿¡éç¥(æ¹åéå) |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // æ¥è¯¢è®¢å |
| | | InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId()); |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insReport.getInsOrderId()) |
| | | .last("limit 1")); |
| | | // æ¥è¯¢åææ |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId()); |
| | | |
| | | String message = ""; |
| | | message += "æ¥åç¼å¶æ¹åéåéç¥"; |
| | | message += "\næ¹å人: " + ratifyUserName; |
| | | message += "\nå§æç¼å·: " + order.getEntrustCode(); |
| | | message += "\næ ·ååç§°: " + insSample.getModel(); |
| | | message += "\nè§æ ¼åå·: " + order.getPartDetail(); |
| | | if (ifsInventoryQuantity != null) { |
| | | message += "\næ¹æ¬¡å·: " + ifsInventoryQuantity.getUpdateBatchNo(); |
| | | } |
| | | message += "\néååå : " + ratifyTell; |
| | | //åéä¼ä¸å¾®ä¿¡æ¶æ¯éç¥ æäº¤å¤æ ¸ |
| | | try { |
| | | // 审æ¹äºº |
| | | WxCpUtils.inform(checkUserAccount, message, null); |
| | | |
| | | // æ£éªäºº |
| | | WxCpUtils.inform(userAccount, message, null); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | |
| | | //妿æ¹åä¸éè¿ ç´æ¥éåå°æäº¤äººé£è¾¹å» |
| | | insReport.setState(0); |
| | | insReport.setIsExamine(0); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | //è·åæ¹å人çç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | if (StringUtils.isBlank(signatureUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | Integer insOrderId = insReportMapper.selectById(id).getInsOrderId(); |
| | | InsOrder order = insOrderMapper.selectById(insOrderId); |
| | | boolean isRawMater = order.getTypeSource() != null && order.getTypeSource().equals(1); |
| | | |
| | | //è·ååºæçæ¥åä¸ç¨ç« |
| | | String sealUrl; |
| | | String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory(); |
| | | try { |
| | | String type = ""; |
| | | if (isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) { |
| | | type = "è¿åæ¥å"; |
| | | } else { |
| | | type = "å§ææ¥å"; |
| | | } |
| | | sealUrl = insReportMapper.getLaboratoryByName(laboratory, type); |
| | | } catch (Exception e) { |
| | | throw new ErrorException(laboratory + "æ¾ä¸å°æ¥åä¸ç¨ç« "); |
| | | } |
| | | if (StringUtils.isBlank(sealUrl)) { |
| | | throw new ErrorException(laboratory + "æ¾ä¸å°æ¥åä¸ç¨ç« "); |
| | | } |
| | | String primaryReportUrl = getPrimaryReportUrl(insReport); |
| | | String finalUrl = primaryReportUrl.replace("/word", wordUrl); |
| | | |
| | | Map<String, Object> ratifyMarks = new HashMap<String, Object>() {{ |
| | | put("ratifyUrl", ReportSignaturePictureUtils.create(imgUrl, signatureUrl)); |
| | | put("ratifyDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create()); |
| | | put("seal1", Pictures.ofLocal(imgUrl + "/" + sealUrl).create()); |
| | | put("seal2", Pictures.ofLocal(imgUrl + "/" + sealUrl).create()); |
| | | }}; |
| | | writeMarksToReportFiles(insReport, ratifyMarks); |
| | | |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | insReport.setTempUrlPdf(primaryReportUrl.replace(".docx", ".pdf")); |
| | | |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(insOrderId); |
| | | insOrder.setState(4); |
| | | insOrderMapper.updateById(insOrder); |
| | | |
| | | for (String reportUrl : getApprovalReportUrls(insReport)) { |
| | | wordToPdf(reportUrl.replace("/word", wordUrl), sealUrl, |
| | | isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)); |
| | | } |
| | | |
| | | // 夿æ¯å¦ä¸ºåææ |
| | | if (isRawMater) { |
| | | // ä¿®æ¹ifsåºåç¶æ |
| | | ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getState, 2) |
| | | .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId())); |
| | | } |
| | | insReport.setRatifyTell(""); |
| | | |
| | | // åéæä»¶å°å§æäºº |
| | | if (StringUtils.isNotBlank(order.getPrepareCode())) { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | String message = ""; |
| | | message += "å§æç¼å·: " + order.getEntrustCode(); |
| | | message += "å§ææ ·å: " + order.getSampleView(); |
| | | message += "å·²æ£æµç»æ, è¯·æ¥æ¶"; |
| | | try { |
| | | WxCpUtils.inform(order.getPrepareCode(), message, new File(finalUrl.replace(".docx", ".pdf"))); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | @Override |
| | | public int wordInsertUrl(Map<String, Object> map, String url) { |
| | | Configure configure = Configure.builder() |
| | | .setValidErrorHandler(new PreserveReportPicturePlaceholderHandler()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(url, configure).render(map); |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(url))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | private String getPrimaryReportUrl(InsReport report) { |
| | | String reportUrl = StringUtils.isNotBlank(report.getUrlS()) ? report.getUrlS() : report.getUrl(); |
| | | if (StringUtils.isBlank(reportUrl)) { |
| | | throw new ErrorException("æ£æµæ¥åæä»¶ä¸åå¨"); |
| | | } |
| | | return reportUrl; |
| | | } |
| | | |
| | | private List<String> getApprovalReportUrls(InsReport report) { |
| | | return Arrays.asList(getPrimaryReportUrl(report), report.getInspectionUrl()).stream() |
| | | .filter(StringUtils::isNotBlank) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | private void writeMarksToReportFiles(InsReport report, Map<String, Object> marks) { |
| | | for (String reportUrl : getApprovalReportUrls(report)) { |
| | | wordInsertUrl(marks, reportUrl.replace("/word", wordUrl)); |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ¥åæ¹éä¸è½½ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String downAll(String ids) { |
| | | List<Long> list = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList()); |
| | | List<InsReport> insReports = insReportMapper.selectBatchIds(list); |
| | | String zipFilePath = null; |
| | | // ä¸´æ¶æä»¶å¤¹è·¯å¾ |
| | | try { |
| | | String tempFolderPath = wordUrl + "/tempFolder"; |
| | | File tempFolder = new File(tempFolderPath); |
| | | if (tempFolder.exists()) { |
| | | deleteDirectory(tempFolder); // å 餿§çä¸´æ¶æä»¶å¤¹ |
| | | } |
| | | tempFolder.mkdirs(); // å建æ°çä¸´æ¶æä»¶å¤¹ |
| | | for (InsReport insReport : insReports) { |
| | | File sourceFile = new File((ObjectUtils.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl()).replace("/word", wordUrl)); |
| | | File destinationFile = new File(tempFolder, sourceFile.getName()); |
| | | Files.copy(sourceFile.toPath(), destinationFile.toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | } |
| | | // åç¼©ä¸´æ¶æä»¶å¤¹ |
| | | zipFilePath = wordUrl + "/zip/output.zip"; |
| | | // 夿zipè·¯å¾æ¯å¦åå¨ |
| | | File zipDir = new File(wordUrl + "/zip"); |
| | | if(!zipDir.isDirectory()){ |
| | | zipDir.mkdirs(); |
| | | } |
| | | zipDirectory(tempFolderPath, zipFilePath); |
| | | |
| | | // æ¸
çä¸´æ¶æä»¶å¤¹ |
| | | deleteDirectory(tempFolder); |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return "/word/zip/output.zip"; |
| | | } |
| | | |
| | | @Override |
| | | public void download(Integer id, Integer reportType, Integer createOrderUser, HttpServletResponse response) { |
| | | if (id == null) { |
| | | throw new ErrorException("æ¥åä¸è½ä¸ºç©º"); |
| | | } |
| | | reportType = reportType == null ? DETECTION_REPORT : reportType; |
| | | if (!Objects.equals(reportType, DETECTION_REPORT) && !Objects.equals(reportType, INSPECTION_REPORT)) { |
| | | throw new ErrorException("æ¥åç±»å䏿£ç¡®"); |
| | | } |
| | | InsReport report = insReportMapper.selectDownloadableReport(id, createOrderUser); |
| | | if (report == null) { |
| | | throw new ErrorException("æ¥åä¸åå¨ãå°æªçæææ æä¸è½½"); |
| | | } |
| | | String reportUrl = Objects.equals(reportType, INSPECTION_REPORT) |
| | | ? report.getInspectionUrl() : getPrimaryReportUrl(report); |
| | | if (StringUtils.isBlank(reportUrl) || !reportUrl.replace('\\', '/').startsWith("/word/")) { |
| | | throw new ErrorException((Objects.equals(reportType, INSPECTION_REPORT) ? "æ£éªæ¥å" : "æ£æµæ¥å") |
| | | + "æä»¶ä¸åå¨ï¼è¯·è系管çå"); |
| | | } |
| | | Path root = Paths.get(wordUrl).toAbsolutePath().normalize(); |
| | | Path file = root.resolve(reportUrl.replace('\\', '/').substring("/word/".length())).normalize(); |
| | | if (!file.startsWith(root) || !Files.isRegularFile(file)) { |
| | | throw new ErrorException("æ¥åæä»¶ä¸åå¨ï¼è¯·è系管çå"); |
| | | } |
| | | try { |
| | | String filename = file.getFileName().toString(); |
| | | String encodedName = URLEncoder.encode(filename, "UTF-8").replace("+", "%20"); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); |
| | | response.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + encodedName); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition,download-filename"); |
| | | response.setHeader("download-filename", encodedName); |
| | | response.setContentLengthLong(Files.size(file)); |
| | | try (InputStream inputStream = Files.newInputStream(file); |
| | | OutputStream outputStream = response.getOutputStream()) { |
| | | byte[] buffer = new byte[8192]; |
| | | int length; |
| | | while ((length = inputStream.read(buffer)) != -1) { |
| | | outputStream.write(buffer, 0, length); |
| | | } |
| | | outputStream.flush(); |
| | | } |
| | | } catch (IOException e) { |
| | | log.error("ä¸è½½æ¥å失败ï¼reportId={}", id, e); |
| | | throw new ErrorException("æ¥åä¸è½½å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | //æ¹éä¸ä¼ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upAll(MultipartFile file) throws IOException { |
| | | File tempFile = null; |
| | | File unzipDir = null; |
| | | try { |
| | | tempFile = File.createTempFile(wordUrl, ".zip"); |
| | | file.transferTo(tempFile); |
| | | |
| | | unzipDir = new File("uploaded_files"); |
| | | if (!unzipDir.exists()) { |
| | | unzipDir.mkdir(); |
| | | } |
| | | unzip(tempFile, unzipDir); |
| | | // å¤çè§£ååçæä»¶ |
| | | File[] files = unzipDir.listFiles(); |
| | | if (files != null) { |
| | | for (File f : files) { |
| | | // æ ¹æ®æä»¶åæ¥è¯¢id |
| | | String name = f.getName(); |
| | | InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().like(InsReport::getCode, f.getName().replace(".docx", "").replace("JCZX", "JCZX/"))); |
| | | if (ObjectUtils.isEmpty(insReport)) { |
| | | throw new ErrorException("æ²¡ææ¾å° " + f.getName() + " è¿ä¸ªæä»¶å¯¹åºçæ¥åæ°æ®"); |
| | | } |
| | | String urlString; |
| | | String pathName; |
| | | try { |
| | | String path = wordUrl; |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + f.getName(); |
| | | urlString = realpath + "/" + pathName; |
| | | // å¤å¶æä»¶å°æå®è·¯å¾ |
| | | Files.copy(f.toPath(), new File(urlString).toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | inReport("/word/" + pathName, insReport.getId()); |
| | | } catch (IOException e) { |
| | | throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | } |
| | | } |
| | | } |
| | | } catch (IOException e) { |
| | | throw new ErrorException("æä»¶å¤ç失败"); |
| | | } finally { |
| | | if (tempFile != null && tempFile.exists()) { |
| | | tempFile.delete(); |
| | | } |
| | | // éå½å é¤è§£åç®å½åå
¶ä¸çæä»¶ |
| | | if (unzipDir.exists()) { |
| | | deleteDirectory(unzipDir); // å 餿§çä¸´æ¶æä»¶å¤¹ |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | //è§£åæä»¶å¤¹ |
| | | private void unzip(File zipFile, File destDir) throws IOException { |
| | | try (ZipFile zip = new ZipFile(zipFile)) { |
| | | Enumeration<? extends ZipEntry> entries = zip.entries(); |
| | | while (entries.hasMoreElements()) { |
| | | ZipEntry entry = entries.nextElement(); |
| | | File file = new File(destDir, entry.getName()); |
| | | if (entry.isDirectory()) { |
| | | file.mkdirs(); |
| | | } else { |
| | | file.getParentFile().mkdirs(); |
| | | try (InputStream in = zip.getInputStream(entry); |
| | | OutputStream out = new FileOutputStream(file)) { |
| | | byte[] buffer = new byte[1024]; |
| | | int len; |
| | | while ((len = in.read(buffer)) > 0) { |
| | | out.write(buffer, 0, len); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å缩æä»¶å¤¹ |
| | | public static void zipDirectory(String sourceDirPath, String zipFilePath) throws IOException { |
| | | try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFilePath))) { |
| | | Path sourceDir = Paths.get(sourceDirPath); |
| | | Files.walk(sourceDir) |
| | | .filter(path -> !Files.isDirectory(path)) |
| | | .forEach(path -> { |
| | | ZipEntry zipEntry = new ZipEntry(sourceDir.relativize(path).toString()); |
| | | try { |
| | | zipOut.putNextEntry(zipEntry); |
| | | Files.copy(path, zipOut); |
| | | zipOut.closeEntry(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // å 餿件夹åå
¶å
容 |
| | | public static void deleteDirectory(File directory) throws IOException { |
| | | if (directory.isDirectory()) { |
| | | File[] files = directory.listFiles(); |
| | | if (files != null) { |
| | | for (File file : files) { |
| | | deleteDirectory(file); |
| | | } |
| | | } |
| | | } |
| | | Files.delete(directory.toPath()); |
| | | } |
| | | |
| | | @Override |
| | | public void wordToPdf(String path, String sealUrl, boolean isRawMater) { |
| | | try { |
| | | wordToPdf(path, path.replace(".docx", ".pdf"), sealUrl, isRawMater); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("转æ¢å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | |
| | | public String wordToPdf(String wordPath, String pdfPath, String sealUrl, boolean isRawMater) { |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | | log.info("Licenseéªè¯ä¸éè¿..."); |
| | | return null; |
| | | } |
| | | //çæä¸ä¸ªç©ºçPDFæä»¶ |
| | | File file; |
| | | //夿æ¯å¦æ¯è¿åæ¥å |
| | | if (!isRawMater) { |
| | | file = new File(pdfPath.replace(".pdf", "-1.pdf")); |
| | | } else { |
| | | file = new File(pdfPath.replace(".pdf", ".pdf")); |
| | | } |
| | | os = new FileOutputStream(file); |
| | | //è¦è½¬æ¢çwordæä»¶ |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | doc.save(os, SaveFormat.PDF); |
| | | |
| | | //æ·»å éªç¼ç« |
| | | if (!isRawMater) { |
| | | stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl); |
| | | } |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * åå²å¾ç |
| | | * |
| | | * @param Path å¾çè·¯å¾ |
| | | * @param n åå²ä»½æ° |
| | | */ |
| | | public static com.itextpdf.text.Image[] slicingImages(String Path, int n) throws IOException, BadElementException { |
| | | com.itextpdf.text.Image[] nImage = new com.itextpdf.text.Image[n]; |
| | | BufferedImage img = ImageIO.read(new File(Path)); |
| | | |
| | | int h = img.getHeight(); |
| | | int w = img.getWidth(); |
| | | |
| | | int sw = w / n; |
| | | for (int i = 0; i < n; i++) { |
| | | BufferedImage subImg; |
| | | if (i == n - 1) {//æåå©ä½é¨å |
| | | subImg = img.getSubimage(i * sw, 0, w - i * sw, h); |
| | | } else {//ån-1åååå |
| | | subImg = img.getSubimage(i * sw, 0, sw, h); |
| | | } |
| | | ByteArrayOutputStream out = new ByteArrayOutputStream(); |
| | | ImageIO.write(subImg, Path.substring(Path.lastIndexOf('.') + 1), out); |
| | | nImage[i] = com.itextpdf.text.Image.getInstance(out.toByteArray()); |
| | | |
| | | } |
| | | return nImage; |
| | | } |
| | | |
| | | /** |
| | | * çéªç¼ç« |
| | | * |
| | | * @param infilePath åPDFè·¯å¾ |
| | | * @param outFilePath è¾åºPDFè·¯å¾ |
| | | */ |
| | | public static void stamperCheckMarkPDF(String infilePath, String outFilePath, String picPath) throws IOException, DocumentException { |
| | | PdfReader reader = new PdfReader(infilePath);//éæ©éè¦å°ç« çpdf |
| | | PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(outFilePath));//å å®å°ç« åçpdf |
| | | |
| | | |
| | | com.itextpdf.text.Rectangle pageSize = reader.getPageSize(1);//è·å¾ç¬¬ä¸é¡µ |
| | | float height = pageSize.getHeight(); |
| | | float width = pageSize.getWidth(); |
| | | |
| | | int nums = reader.getNumberOfPages(); |
| | | com.itextpdf.text.Image[] nImage = slicingImages(picPath, nums);//çæéªç¼ç« åå²å¾ç |
| | | |
| | | for (int n = 1; n <= nums; n++) { |
| | | PdfContentByte over = stamp.getOverContent(n);//设置å¨ç¬¬å 页æå°å°ç« |
| | | com.itextpdf.text.Image img = nImage[n - 1];//éæ©å¾ç |
| | | float newHeight = 100f; |
| | | float newWidth = img.getWidth() / (img.getHeight() / 100); |
| | | img.scaleAbsolute(newWidth, newHeight);//æ§å¶å¾çå¤§å° |
| | | img.setAbsolutePosition(width - newWidth, height / 2 - newHeight / 2);//æ§å¶å¾çä½ç½® |
| | | over.addImage(img); |
| | | } |
| | | stamp.close(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public void isRawMaterial(InsOrder insOrder,Boolean registerInsResults,Boolean hasExemption) { |
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | | if (Objects.isNull(one)) { |
| | | throw new ErrorException("æ¾ä¸å°åææä¿¡æ¯"); |
| | | } |
| | | // 夿æ¯å¦æä¸åæ ¼ä¿¡æ¯ |
| | | Long count = insUnqualifiedHandlerMapper.selectCount(Wrappers.<InsUnqualifiedHandler>lambdaQuery() |
| | | .eq(InsUnqualifiedHandler::getInventoryQuantityId, one.getId())); |
| | | String toLocation = null; |
| | | |
| | | // 夿æ¯å¦æä¸åæ ¼ |
| | | Long unqualifiedCount = getUnqualifiedCount(insOrder); |
| | | |
| | | if (count.equals(0L) && unqualifiedCount.equals(0L) && one.getIsFinish().equals(0) |
| | | && one.getIsSource().equals(1) && Boolean.TRUE.equals(registerInsResults)) { |
| | | // åææç§»åº |
| | | //å¦ææ¯æåç订åï¼åææåçæææ¹æ¬¡é½ç§»åº |
| | | if(one.getIsSplitOrder()==1 && !hasExemption){ |
| | | //æ¥è¯¢æå订å详æ
|
| | | List<IfsInventoryQuantityVO> ifsInventoryQuantityVOS = ifsInventoryQuantityMapper.selectSplitOrderList(one.getPartNo(), one.getLineNo(), one.getReleaseNo(), one.getReceiptNo(), one.getOrderNo()); |
| | | for (IfsInventoryQuantityVO vo : ifsInventoryQuantityVOS) { |
| | | //妿æå§æåä¿¡æ¯ä¸åæ ¼ï¼èµ°ç»è®°åç§»åºï¼å¦ææ²¡æï¼åèµ°å
æ£ï¼ä¸åæ ¼ä¸åå¤ç |
| | | if(Objects.isNull(vo.getInsOrderId())){ |
| | | rawMaterialOrderService.rawOrderRelease(vo.getId(), vo.getPartDesc()); |
| | | }else if(Objects.equals(vo.getInsOrderId(),insOrder.getId())){ |
| | | toLocation = insOrderService.moveRawMaterial(vo); |
| | | }else if(Objects.nonNull(vo.getInsResult()) && 1 == vo.getInsResult()){ |
| | | toLocation = insOrderService.moveRawMaterial(vo); |
| | | } |
| | | } |
| | | }else{ |
| | | toLocation = insOrderService.moveRawMaterial(one); |
| | | } |
| | | } |
| | | |
| | | // å¤æç»æç¶æä¿®æ¹åæ ¼ç¶æ |
| | | int inspectStatus = (count == 0 && unqualifiedCount == 0) ? 1 : 2; |
| | | insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getId, insOrder.getId()) |
| | | .set(InsOrder::getInsResult, inspectStatus)); |
| | | |
| | | if (one.getIsFinish().equals(0)) { |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()) |
| | | .set(IfsInventoryQuantity::getInspectStatus, inspectStatus)); |
| | | |
| | | // ä¿®æ¹ifsåºåç¶æ |
| | | if (StringUtils.isBlank(toLocation)) { |
| | | ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getIsFinish, 1) |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | | } else { |
| | | ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>() |
| | | .set(IfsInventoryQuantity::getIsFinish, 1) |
| | | .set(IfsInventoryQuantity::getToLocation, toLocation) |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | | } |
| | | |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // ä¼ä¸å¾®ä¿¡éç¥ |
| | | String message = ""; |
| | | message += "æ£æµç»ææäº¤éç¥"; |
| | | message += "\næ¹æ¬¡å·: " + one.getUpdateBatchNo(); |
| | | message += "\né¶ä»¶å·: " + one.getPartNo(); |
| | | message += "\né¶ä»¶æè¿°: " + one.getPartDesc(); |
| | | message += "\nä¾åºååç§°: " + one.getSupplierName(); |
| | | message += "\næµè¾¾æ°é: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); |
| | | // åéä¼ä¸inspectStatusä¿¡éç¥ |
| | | if (inspectStatus == 1) { |
| | | message += "\næ£æµç»æ: åæ ¼"; |
| | | } else { |
| | | message += "\næ£æµç»æ: ä¸åæ ¼"; |
| | | } |
| | | WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦æä¸åæ ¼ |
| | | * @param insOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long getUnqualifiedCount(InsOrder insOrder) { |
| | | Long unqualifiedCount = 0L; |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId())); |
| | | if (CollectionUtils.isNotEmpty(insSamples)) { |
| | | unqualifiedCount = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).collect(Collectors.toList())) |
| | | .eq(InsProduct::getInsResult, 0)); |
| | | |
| | | // 夿妿æä¸åæ ¼çæ£éªé¡¹, å¤æææ²¡ææ£éªé¡¹å¤æµ, 夿 ¸åæ ¼ä¹ç®åæ ¼éè¿ |
| | | if (!unqualifiedCount.equals(0L)) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).collect(Collectors.toList())) |
| | | .eq(InsProduct::getInsResult, 0)); |
| | | |
| | | boolean flag = true; |
| | | for (InsProduct insProduct : insProducts) { |
| | | Long unqualifiedProductCount = insUnqualifiedRetestProductMapper.selectCount(Wrappers.<InsUnqualifiedRetestProduct>lambdaQuery() |
| | | .eq(InsUnqualifiedRetestProduct::getInsProductId, insProduct.getId()) |
| | | .ne(InsUnqualifiedRetestProduct::getInsResult, 0)); |
| | | if (unqualifiedProductCount != 2) { |
| | | flag = false; |
| | | } |
| | | } |
| | | if (flag) { |
| | | unqualifiedCount = 0L; |
| | | } |
| | | } |
| | | } |
| | | return unqualifiedCount; |
| | | } |
| | | |
| | | /** |
| | | * éåå°æ£éªä»»å¡ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean sendBackTask(Integer id) { |
| | | InsReport report = insReportMapper.selectById(id); |
| | | // æ ¹æ®è®¢åæ¥è¯¢è¯éªå®¤ |
| | | String laboratory = insOrderMapper.selectLaboratoryByOrderId(report.getInsOrderId()); |
| | | |
| | | // ä¿®æ¹è®¢åç¶æ |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, report.getInsOrderId()) |
| | | .eq(InsOrderState::getLaboratory, laboratory) |
| | | .set(InsOrderState::getInsState, 4)); |
| | | |
| | | Integer insSampleId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery() |
| | | .eq(InsSampleUser::getInsSampleId, report.getInsOrderId()) |
| | | .orderByDesc(InsSampleUser::getId) |
| | | .last("limit 1")).getId(); |
| | | insSampleUserMapper.deleteById(insSampleId); |
| | | |
| | | // ä¿®æ¹æ¥åè¡ä¸ºæªæ¾ç¤º |
| | | insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate() |
| | | .eq(InsReport::getId, id) |
| | | .set(InsReport::getIsPass, 0)); |
| | | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * æ¥åæ¥è¡¨å¯¼åº |
| | | * @param dto |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void reportAllExport(ReportPageDto dto, HttpServletResponse response) throws UnsupportedEncodingException { |
| | | |
| | | Integer createOrderUser = dto.getCreateOrderUser(); |
| | | String queryStatus = dto.getQueryStatus(); |
| | | dto.setQueryStatus(null); |
| | | dto.setCreateOrderUser(null); |
| | | |
| | | List<InsReportExport> insReportExports = insReportMapper.reportAllExport(QueryWrappers.queryWrappers(dto), |
| | | SecurityUtils.getUserId().intValue(), |
| | | queryStatus, |
| | | createOrderUser); |
| | | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | String fileName = URLEncoder.encode("æ¥åæ¥è¡¨å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | try { |
| | | //æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | //è·åsheet0对象 |
| | | WriteSheet mainSheet = EasyExcel.writerSheet(0, "æ¥åæ¥è¡¨å¯¼åº").head(InsReportExport.class).build(); |
| | | |
| | | //åsheet0åå
¥æ°æ® ä¼ å
¥ç©ºlistè¿æ ·åªå¯¼åºè¡¨å¤´ |
| | | excelWriter.write(insReportExports, mainSheet); |
| | | //å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
ä¿®æ¹éè´è®¢åæ¹æ¬¡å·, åè¿è¡ç§»åºæä½ |
| | | * @param one |
| | | * @param toLocation |
| | | */ |
| | | private void updaeBatch(IfsInventoryQuantity one, String toLocation) { |
| | | if (one.getIsUpdateBatch().equals(0)) { |
| | | // å
ä¿®æ¹æ¹æ¬¡å·åè¿è¡ç§»åº |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | map.put("LINE_NO", one.getLineNo()); // è¡å· |
| | | map.put("RELEASE_NO", one.getReleaseNo()); // ä¸è¾¾å· |
| | | map.put("RECEIPT_NO", one.getReceiptNo()); // æ¥æ¶å· |
| | | map.put("PART_NO", one.getPartNo()); //é¶ä»¶å· |
| | | map.put("CONFIGURATION_ID", one.getConfigurationId()); // é
ç½®æ è¯ |
| | | map.put("LOCATION_NO", one.getLocationNo()); // åºä½å· |
| | | map.put("LOT_BATCH_NO", one.getLotBatchNo());// æ¹æ¬¡å· |
| | | map.put("NEW_LOT_BATCH_NO", one.getUpdateBatchNo()); // ç®æ æ¹æ¬¡å· |
| | | map.put("SERIAL_NO", one.getSerialNo()); // åºåå· |
| | | map.put("ENG_CHG_LEVEL", one.getEngChgLevel()); // çæ¬å· |
| | | map.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); // wdrå· |
| | | map.put("ACTIVITY_SEQ", one.getActivitySeq()); // æ´»å¨åºå· |
| | | map.put("QTY_TO_CHANGE", one.getQtyArrived()); // åæ´æ°é |
| | | resultList.add(map); |
| | | resultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | resultMap.put("SYSCODE", "LIMS"); |
| | | resultMap.put("SYSMODEL", "ä¿®æ¹éè´è®¢åæ¹æ¬¡å·"); |
| | | resultMap.put("BATCH_INFO", resultList); |
| | | |
| | | Result result = ifsApiUtils.updateMoveReceiptLot(JSONUtil.toJsonStr(resultMap)); |
| | | |
| | | if (result.getCode() != 200) { |
| | | throw new ErrorException("IFSä¿®æ¹æ¹æ¬¡å·å¤±è´¥: " + result.getMsg()); |
| | | } |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .set(IfsInventoryQuantity::getIsUpdateBatch, 1) |
| | | .eq(IfsInventoryQuantity::getId, one.getId())); |
| | | } |
| | | |
| | | Map<String, Object> moveResultMap = new HashMap<>(); |
| | | List<Map<String, Object>> moveResultList = new ArrayList<>(); |
| | | Map<String, Object> moveMap = new HashMap<>(); |
| | | moveMap.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· |
| | | moveMap.put("LINE_NO", one.getLineNo()); |
| | | moveMap.put("RELEASE_NO", one.getReleaseNo()); |
| | | moveMap.put("RECEIPT_NO", one.getReceiptNo()); |
| | | moveMap.put("PART_NO", one.getPartNo()); |
| | | moveMap.put("QTY", one.getQtyArrived()); |
| | | moveMap.put("LOCATION_NO", one.getLocationNo()); |
| | | moveMap.put("TO_LOCATION_NO", toLocation); |
| | | moveMap.put("LOT_BATCH_NO", one.getUpdateBatchNo()); |
| | | moveMap.put("SERIAL_NO", one.getSerialNo()); |
| | | moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); |
| | | moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); |
| | | moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); |
| | | moveResultList.add(moveMap); |
| | | moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); |
| | | moveResultMap.put("SYSCODE", "LIMS"); |
| | | moveResultMap.put("SYSMODEL", "æ£éªåç§»åº"); |
| | | moveResultMap.put("BATCH_INFO", moveResultList); |
| | | |
| | | Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); |
| | | if (result1.getCode() != 200) { |
| | | throw new ErrorException("IFSæ£éªåç§»åºå¤±è´¥: " + result1.getMsg()); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ¿æ¢æ®µè½ææ¬ |
| | | * @param filePath docxè§£æå¯¹è±¡ |
| | | * @param textMap éè¦æ¿æ¢çä¿¡æ¯éå |
| | | */ |
| | | public static void changeText(Map<String, String> textMap, String filePath) { |
| | | try { |
| | | FileInputStream stream = new FileInputStream(filePath); |
| | | XWPFDocument document = new XWPFDocument(stream); |
| | | List<XWPFTable> tables = document.getTables(); |
| | | for (XWPFTable table : tables) { |
| | | for (XWPFTableRow row : table.getRows()) { |
| | | for (XWPFTableCell cell : row.getTableCells()) { |
| | | |
| | | textMap.forEach((s, s2) -> { |
| | | if (cell.getText().equals(s)) { |
| | | XWPFParagraph paragraph = cell.getParagraphs().get(0); |
| | | XWPFRun oldRun = paragraph.getRuns().get(0); |
| | | // ä¿ååæ ·å¼ |
| | | String fontFamily = oldRun.getFontFamily(); |
| | | int fontSize = oldRun.getFontSize(); |
| | | String color = oldRun.getColor(); |
| | | ParagraphAlignment alignment = paragraph.getAlignment(); |
| | | // æ¿æ¢å
容 |
| | | paragraph.removeRun(0); // ç§»é¤åæç run |
| | | XWPFRun newRun = paragraph.createRun(); |
| | | newRun.setText(s2); |
| | | // åºç¨åæ ·å¼ |
| | | newRun.setFontFamily(fontFamily); |
| | | newRun.setFontSize(fontSize); |
| | | newRun.setColor(color); |
| | | paragraph.setAlignment(alignment); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | FileOutputStream fileOutputStream = new FileOutputStream(filePath); |
| | | document.write(fileOutputStream); |
| | | fileOutputStream.close(); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * word转æ¢pdf |
| | | * @param path |
| | | * @return |
| | | */ |
| | | private String wordToPdfTemp(String path) { |
| | | try { |
| | | return wordToPdf(path, path.replace(".docx", "-临æ¶.pdf")); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("转æ¢å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | private String wordToPdf(String wordPath, String pdfPath) { |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | | log.info("Licenseéªè¯ä¸éè¿..."); |
| | | return null; |
| | | } |
| | | //çæä¸ä¸ªç©ºçPDFæä»¶ |
| | | File file; |
| | | //夿æ¯å¦æ¯è¿åæ¥å |
| | | file = new File(pdfPath); |
| | | os = new FileOutputStream(file); |
| | | //è¦è½¬æ¢çwordæä»¶ |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | doc.save(os, SaveFormat.PDF); |
| | | return file.getName(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.SampleReceiptActionDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptPageDto; |
| | | import com.ruoyi.inspect.dto.SampleReceiptQueryDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderStandardTemplateMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleReceiptMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleUserMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderStandardTemplate; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.pojo.InsSampleReceipt; |
| | | import com.ruoyi.inspect.pojo.InsSampleUser; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsOrderStateService; |
| | | import com.ruoyi.inspect.service.InsSampleReceiptService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class InsSampleReceiptServiceImpl extends ServiceImpl<InsSampleReceiptMapper, InsSampleReceipt> |
| | | implements InsSampleReceiptService { |
| | | private final InsSampleReceiptMapper receiptMapper; |
| | | private final InsOrderMapper insOrderMapper; |
| | | private final InsOrderStandardTemplateMapper insOrderStandardTemplateMapper; |
| | | private final InsSampleMapper insSampleMapper; |
| | | private final InsProductMapper insProductMapper; |
| | | private final InsSampleUserMapper insSampleUserMapper; |
| | | private final InsOrderStateService insOrderStateService; |
| | | private final InsOrderService insOrderService; |
| | | private final UserMapper userMapper; |
| | | |
| | | @Override |
| | | public com.baomidou.mybatisplus.core.metadata.IPage<SampleReceiptPageDto> page(Page<?> page, SampleReceiptQueryDto query) { |
| | | return receiptMapper.selectPage(page, query); |
| | | } |
| | | |
| | | @Override |
| | | public SampleReceiptPageDto detail(Integer id) { |
| | | return receiptMapper.selectDetail(id); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void submit(SampleReceiptActionDto dto) { |
| | | if (dto == null || dto.getReceiptId() == null || dto.getMainInspectorId() == null) { |
| | | throw new ErrorException("è¯·éæ©ä¸»æ£éªäºº"); |
| | | } |
| | | InsSampleReceipt receipt = receiptMapper.selectForUpdate(dto.getReceiptId()); |
| | | ensurePending(receipt); |
| | | InsOrder order = insOrderMapper.selectById(receipt.getInsOrderId()); |
| | | if (order == null || !Integer.valueOf(1).equals(order.getState())) { |
| | | throw new ErrorException("è¯¥å§æå½åç¶æä¸å
è®¸æ ·åæ¥æ¶"); |
| | | } |
| | | List<InsSample> samples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, order.getId()).orderByAsc(InsSample::getId)); |
| | | if (samples.size() != 1 || !samples.get(0).getId().equals(receipt.getInsSampleId())) { |
| | | throw new ErrorException("è¯¥å§æçæ ·åæ°éå¼å¸¸ï¼è¯·æ£æ¥ä¸åæ°æ®"); |
| | | } |
| | | InsSample sample = samples.get(0); |
| | | // åªèµ°æ°èç´ç»æ¨¡æ¿æµç¨ï¼å§æåå¿
须已ç»å®åå§è®°å½æ¨¡æ¿ï¼ä¸åæ¶çæè®¢å模æ¿å¿«ç
§ï¼ |
| | | Long snapshotCount = insOrderStandardTemplateMapper.selectCount(Wrappers.<InsOrderStandardTemplate>lambdaQuery() |
| | | .eq(InsOrderStandardTemplate::getInsOrderId, order.getId())); |
| | | if (snapshotCount == 0) { |
| | | throw new ErrorException("è¯¥å§ææªç»å®åå§è®°å½æ¨¡æ¿ï¼ä¸è½æäº¤æ£éª"); |
| | | } |
| | | Long productCount = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()).eq(InsProduct::getState, 1)); |
| | | if (productCount == 0) { |
| | | throw new ErrorException("è¯¥å§ææªç»å®æ£éªé¡¹ç®ï¼ä¸è½æäº¤æ£éª"); |
| | | } |
| | | if (userMapper.selectById(dto.getMainInspectorId()) == null) { |
| | | throw new ErrorException("主æ£éªäººä¸å卿已åç¨"); |
| | | } |
| | | if (insOrderStateService.count(Wrappers.lambdaQuery(com.ruoyi.inspect.pojo.InsOrderState.class) |
| | | .eq(com.ruoyi.inspect.pojo.InsOrderState::getInsOrderId, order.getId())) > 0 |
| | | || insSampleUserMapper.selectCount(Wrappers.<InsSampleUser>lambdaQuery() |
| | | .eq(InsSampleUser::getInsSampleId, order.getId())) > 0) { |
| | | throw new ErrorException("è¯¥å§æå·²è¿å
¥æ£éªä»»å¡ï¼ä¸è½éå¤æäº¤"); |
| | | } |
| | | String appointed = LocalDateTime.now().plusHours(insProductMapper.selectOrderManDay(order.getId())) |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | insOrderService.upInsOrder(order.getId(), sample.getId(), appointed, dto.getMainInspectorId(), null); |
| | | receipt.setStatus(1); |
| | | receipt.setMainInspectorId(dto.getMainInspectorId()); |
| | | receipt.setReceiveUserId(SecurityUtils.getUserId().intValue()); |
| | | receipt.setReceiveTime(LocalDateTime.now()); |
| | | receipt.setSubmitTime(LocalDateTime.now()); |
| | | receiptMapper.updateById(receipt); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void reject(SampleReceiptActionDto dto) { |
| | | if (dto == null || dto.getReceiptId() == null || StringUtils.isBlank(dto.getRemark())) { |
| | | throw new ErrorException("è¯·å¡«åææ¶å¤æ³¨"); |
| | | } |
| | | if (dto.getRemark().trim().length() > 500) { |
| | | throw new ErrorException("ææ¶å¤æ³¨ä¸è½è¶
è¿500个å符"); |
| | | } |
| | | InsSampleReceipt receipt = receiptMapper.selectForUpdate(dto.getReceiptId()); |
| | | ensurePending(receipt); |
| | | if (insOrderStateService.count(Wrappers.lambdaQuery(com.ruoyi.inspect.pojo.InsOrderState.class) |
| | | .eq(com.ruoyi.inspect.pojo.InsOrderState::getInsOrderId, receipt.getInsOrderId())) > 0) { |
| | | throw new ErrorException("è¯¥å§æå·²è¿å
¥æ£éªä»»å¡ï¼ä¸è½ææ¶"); |
| | | } |
| | | receipt.setStatus(2); |
| | | receipt.setRejectRemark(dto.getRemark().trim()); |
| | | receipt.setReceiveUserId(SecurityUtils.getUserId().intValue()); |
| | | receipt.setReceiveTime(LocalDateTime.now()); |
| | | receiptMapper.updateById(receipt); |
| | | InsOrder order = new InsOrder(); |
| | | order.setId(receipt.getInsOrderId()); |
| | | order.setState(5); |
| | | insOrderMapper.updateById(order); |
| | | } |
| | | |
| | | private void ensurePending(InsSampleReceipt receipt) { |
| | | if (receipt == null || !Integer.valueOf(0).equals(receipt.getStatus())) { |
| | | throw new ErrorException("è¯¥æ ·åæ¥æ¶è®°å½å·²è¢«å¤çï¼è¯·å·æ°åéè¯"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void export(SampleReceiptQueryDto query, HttpServletResponse response) { |
| | | List<SampleReceiptPageDto> list = receiptMapper.selectExportList(query); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | try { |
| | | String fileName = URLEncoder.encode("æ ·åæ¥æ¶å¯¼åº", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet sheet = EasyExcel.writerSheet(0, "æ ·åæ¥æ¶å¯¼åº").head(SampleReceiptPageDto.class).build(); |
| | | excelWriter.write(list, sheet); |
| | | excelWriter.finish(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.service.InsSampleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_sample(æ£éªæ ·å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-14 17:14:57 |
| | | */ |
| | | @Service |
| | | public class InsSampleServiceImpl extends ServiceImpl<InsSampleMapper, InsSample> |
| | | implements InsSampleService { |
| | | |
| | | /** |
| | | * æ ¹æ®è®¢åidæ¥è¯¢æ ·å |
| | | * @param insOrderId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<InsSample> getSampleByOrderId(Integer insOrderId) { |
| | | return baseMapper.getSampleByOrderId(insOrderId); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.inspect.service.impl; |
| | | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.mapper.InsUnqualifiedHandlerFileMapper; |
| | | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; |
| | | import com.ruoyi.inspect.service.InsUnqualifiedHandlerFileService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãins_unqualified_handler_file(ä¸åæ ¼å¤çéä»¶è®°å½è¡¨)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-07-31 13:38:38 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class InsUnqualifiedHandlerFileServiceImpl extends ServiceImpl<InsUnqualifiedHandlerFileMapper, InsUnqualifiedHandlerFile> |
| | | implements InsUnqualifiedHandlerFileService { |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public InsUnqualifiedHandlerFile uploadFile(Long handlerId, MultipartFile file) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String prefix; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | InsUnqualifiedHandlerFile unqualifiedHandlerFile = new InsUnqualifiedHandlerFile(); |
| | | // unqualifiedHandlerFile.setUnqualifiedId(handlerId); |
| | | unqualifiedHandlerFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | prefix = "/image/"; |
| | | unqualifiedHandlerFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | prefix = "/word/"; |
| | | unqualifiedHandlerFile.setType(2); |
| | | } |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | unqualifiedHandlerFile.setFileUrl(pathName); |
| | | baseMapper.insert(unqualifiedHandlerFile); |
| | | return unqualifiedHandlerFile; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("éä»¶ä¸ä¼ é误"); |
| | | throw new ErrorException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsUnqualifiedHandlerServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsUnqualifiedRetestProductServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/OutsourcingFinishProductInspectionServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderTemplateServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/ReportServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/SpotCheckQuarterItemServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/SpotCheckYearItemServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/WarehouseCellServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/WarehouseServiceImpl.java
inspect-server/src/main/java/com/ruoyi/inspect/task/RawMaterIalSchedule.java
inspect-server/src/main/java/com/ruoyi/inspect/util/HackLoopTableRenderPolicy.java
inspect-server/src/main/java/com/ruoyi/inspect/util/PreserveReportPicturePlaceholderHandler.java
inspect-server/src/main/java/com/ruoyi/inspect/util/ReportSignaturePictureUtils.java
inspect-server/src/main/java/com/ruoyi/inspect/util/UserUtils.java
inspect-server/src/main/java/com/ruoyi/inspect/util/XWPFDocumentUtils.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/IfsOrderVO.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderTemplateDetailVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsSampleUserVO.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/OrderTemplateSummaryVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/TemplateConditionVo.java
inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java
inspect-server/src/main/resources/lib/license.xml
inspect-server/src/main/resources/mapper/DataAnalysisMapper.xml
inspect-server/src/main/resources/mapper/IfsPartPropsRecordMapper.xml
inspect-server/src/main/resources/mapper/IfsSplitOrderRecordMapper.xml
inspect-server/src/main/resources/mapper/InsOrderDeviceRecordMapper.xml
inspect-server/src/main/resources/mapper/InsOrderFileMapper.xml
inspect-server/src/main/resources/mapper/InsOrderMapper.xml
inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml
inspect-server/src/main/resources/mapper/InsOrderStateMapper.xml
inspect-server/src/main/resources/mapper/InsOrderTemplateDeviceMapper.xml
inspect-server/src/main/resources/mapper/InsOrderTemplateMapper.xml
inspect-server/src/main/resources/mapper/InsProductDeviationWarningDetailMapper.xml
inspect-server/src/main/resources/mapper/InsProductDeviationWarningMapper.xml
inspect-server/src/main/resources/mapper/InsProductMapper.xml
inspect-server/src/main/resources/mapper/InsProductResultMapper.xml
inspect-server/src/main/resources/mapper/InsProductUserMapper.xml
inspect-server/src/main/resources/mapper/InsReportMapper.xml
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
inspect-server/src/main/resources/mapper/InsSampleReceiptMapper.xml
inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml
inspect-server/src/main/resources/mapper/InsUnqualifiedRetestProductMapper.xml
inspect-server/src/main/resources/mapper/RawMaterialOrderTemplateMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckQuarterItemMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckQuarterMapper.xml
inspect-server/src/main/resources/mapper/SpotCheckYearMapper.xml
inspect-server/src/main/resources/mapper/WarehouseCellMapper.xml
inspect-server/src/main/resources/mapper/WarehouseHistoryMapper.xml
inspect-server/src/main/resources/mapper/WarehouseMapper.xml
inspect-server/src/main/resources/static/detection-report-template-v2.docx
inspect-server/src/main/resources/static/detection-report-template.docx
inspect-server/src/main/resources/static/factory_verify.docx
inspect-server/src/main/resources/static/inspection-report-template-v2.docx
inspect-server/src/main/resources/static/report-template.docx
inspect-server/src/main/resources/static/small-detection-template.docx
inspect-server/src/main/resources/static/small-report-template.docx
inspect-server/src/main/resources/static/small-wg-detection-template.docx
inspect-server/src/main/resources/static/small-wg-report-template.docx
inspect-server/src/main/resources/static/split_order_import_template.xlsx
inspect-server/src/main/resources/static/spot_check_quarter.docx
inspect-server/src/main/resources/static/spot_check_year.docx
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java
performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java
performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java
performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryAllDto.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryOriginalHoursLookDto.java
performance-server/src/main/java/com/ruoyi/performance/dto/AuxiliaryOutputWorkingHoursTemporaryDto.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryCorrectionHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursTemporaryMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursDayMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java
performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java
performance-server/src/main/java/com/ruoyi/performance/pojo/AuxiliaryOutputWorkingHoursTemporary.java
performance-server/src/main/java/com/ruoyi/performance/service/AuxiliaryOutputWorkingHoursTemporaryService.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryCorrectionHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOriginalHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOutputWorkingHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryOutputWorkingHoursTemporaryServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryWorkingHoursDayServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/service/impl/AuxiliaryWorkingHoursServiceImpl.java
performance-server/src/main/java/com/ruoyi/performance/utils/CustomerDoubleSerialize.java
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursTemporaryMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursMapper.xml
performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/QueryWrappers.java
ruoyi-framework/src/main/java/com/ruoyi/framework/exception/ErrorException.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserMapper.java
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/UserService.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserServiceImpl.java
ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
ruoyi-system/src/main/resources/mapper/system/UserMapper.xml |