搬迁基础模块(检验对象+检验项目+原始记录模块+标准库+标准方法+场所与设施+实验室资质)
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>ruoyi</artifactId> |
| | | <groupId>com.ruoyi</groupId> |
| | | <version>3.8.9</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>basic-server</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-common</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-framework</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-system</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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)表æ§å¶å± |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 16:21:17 |
| | | */ |
| | | @Api(tags = "è½åèå´") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/capacityScope") |
| | | public class CapacityScopeController { |
| | | |
| | | private CapacityScopeService capacityScopeService; |
| | | |
| | | private ProductService productService; |
| | | |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "è·åé¡¹ç®æ£éªåæ°å表") |
| | | @PostMapping("/selectItemParameterList") |
| | | public Result selectItemParameterList(Page page,StructureItemParameter itemParameter) throws Exception { |
| | | return Result.success(capacityScopeService.selectItemParameterList(page, itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/addItemParameter") |
| | | public Result addItemParameter(@RequestBody StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.addItemParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/delItemParameter") |
| | | public Result<?> delItemParameter(Integer id) { |
| | | return Result.success(capacityScopeService.delItemParameter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹é¡¹ç®æ£éªåæ°") |
| | | @PostMapping("/upItemParameter") |
| | | public Result<?> upItemParameter(@RequestBody StructureItemParameter itemParameter) { |
| | | return Result.success(capacityScopeService.upItemParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ£éªå¯¹è±¡") |
| | | @PostMapping("/selectTestObjectList") |
| | | public Result selectTestObjectList(Page page,PageTestObjectDto pageTestObjectDto) throws Exception { |
| | | return Result.success(capacityScopeService.selectTestObjectList(page, pageTestObjectDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å æ£éªå¯¹è±¡") |
| | | @PostMapping("/addTestObject") |
| | | public Result addTestObject(@RequestBody StructureTestObject testObject) { |
| | | return Result.success(capacityScopeService.addTestObject(testObject)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿£éªå¯¹è±¡") |
| | | @PostMapping("/delTestObject") |
| | | public Result<?> delTestObject(Integer id) { |
| | | return Result.success(capacityScopeService.delTestObject(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ£éªå¯¹è±¡") |
| | | @PostMapping("/upTestObject") |
| | | public Result upTestObject(@RequestBody StructureTestObject testObject) { |
| | | return Result.success(capacityScopeService.upTestObject(testObject)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ£éªå¯¹è±¡æä¸¾") |
| | | @GetMapping("/selectTestObjectByName") |
| | | public Result selectTestObjectByName() { |
| | | return Result.success(capacityScopeService.selectTestObjectByName()); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ)") |
| | | @PostMapping("/getInsProduction") |
| | | public Result getInsProduction() { |
| | | return Result.success(capacityScopeService.getInsProduction()); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»´æ¤æ£éªå¯¹è±¡ç产å") |
| | | @PostMapping("/selectProductListByObjectId") |
| | | public Result selectProductListByObjectId(Page page,ProductDTO1 productDTO) throws Exception { |
| | | return Result.success(productService.selectProductListByObjectId(page, productDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å 产å") |
| | | @PostMapping("/addProduct") |
| | | public Result addProduct(@RequestBody Product product) { |
| | | return Result.success(productService.addProduct(product)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹äº§å") |
| | | @PostMapping("/upProduct") |
| | | public Result upProduct(@RequestBody Product product) { |
| | | return Result.success(productService.upProduct(product)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤äº§å") |
| | | @PostMapping("/delProduct") |
| | | public Result delProduct(Integer id) { |
| | | return Result.success(productService.delProduct(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ£éªå¯¹è±¡æ ") |
| | | @GetMapping("/getItemTree") |
| | | public Result getItemTree() { |
| | | return Result.success(capacityScopeService.getItemTree()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "è£
å¤å¯¼å
¥æ£éªé¡¹ç®") |
| | | @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("æå¡ç«¯æ¥é"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "导å
¥æ£éªå¯¹è±¡") |
| | | @PostMapping("/importExcel") |
| | | public Result importExcel(@RequestParam("file") MultipartFile file) { |
| | | try { |
| | | EasyExcel.read(file.getInputStream(), StructureTestObjectData.class, new StructureTestObjectListener(productService)).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.Certification; |
| | | import com.ruoyi.basic.service.CertificationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | @Api(tags = "èµè´¨è¯´æ") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/certification") |
| | | |
| | | public class CertificationController { |
| | | |
| | | private CertificationService certificationService; |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢èµè´¨æç»å表") |
| | | @PostMapping("/getCertificationDetail") |
| | | public Result getCertificationDetail(Page page,Certification certification) { |
| | | return Result.success(certificationService.getCertificationDetail(page, certification)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å èµè´¨æç»å表") |
| | | @PostMapping("/addCertificationDetail") |
| | | public Result addCertificationDetail(@RequestBody Certification certification) { |
| | | return Result.success(certificationService.addCertificationDetail(certification)); |
| | | } |
| | | @ApiOperation(value = "å é¤èµè´¨æç»å表") |
| | | @PostMapping("/delCertificationDetail") |
| | | public Result<?> delCertificationDetail( String ids) { |
| | | return Result.success(certificationService.delCertificationDetail(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.Laboratory; |
| | | import com.ruoyi.basic.service.LaboratoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * å®éªå®¤ç®¡ç(LaboratoryController)表æ§å¶å± |
| | | */ |
| | | @Api(tags = "åºææè®¾æ½") |
| | | |
| | | @RestController |
| | | @RequestMapping("/laboratoryScope") |
| | | public class LaboratoryController { |
| | | |
| | | @Resource |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å®éªå®¤ç®¡çå表") |
| | | @PostMapping("/selectItemParameter") |
| | | public Result selectItemParameter(Page page ,Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.selectItemParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å å®éªå®¤åæ°") |
| | | @PostMapping("/addParameter") |
| | | public Result addParameter(@RequestBody Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.addParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤å®éªå®¤åæ°") |
| | | @PostMapping("/delParameter") |
| | | public Result<?> delParameter(Integer id) { |
| | | return Result.success(laboratoryService.delParameter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹å®éªå®¤åæ°") |
| | | @PostMapping("/upParameter") |
| | | public Result<?> upParameter(@RequestBody Laboratory itemParameter) { |
| | | return Result.success(laboratoryService.upParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åå®éªå®¤åç§°") |
| | | @GetMapping("/obtainItemParameterList") |
| | | public Result obtainItemParameterList() { |
| | | return Result.success(laboratoryService.obtainItemParameterList()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | import com.ruoyi.basic.service.ProductPartService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/productPart") |
| | | @Api(tags = "产åé¶ä»¶ç»å®") |
| | | public class ProductPartController { |
| | | |
| | | private ProductPartService productPartService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByProductId") |
| | | public Result selectByProductId(Page page,ProductPart productPart){ |
| | | return Result.success(productPartService.selectByProductId(page,productPart)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢äº§åé¶ä»¶") |
| | | @PostMapping("/addProductPart") |
| | | public Result addProductPart(@RequestBody ProductPart productPart) { |
| | | productPartService.addProductPart(productPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°äº§åé¶ä»¶") |
| | | @PostMapping("/updateProductPart") |
| | | public Result updateProductPart(@RequestBody ProductPart productPart) { |
| | | productPartService.updateProductPartById(productPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤äº§åé¶ä»¶") |
| | | @PostMapping("/deleteProductPart") |
| | | public Result deleteProductPart(Integer id) { |
| | | productPartService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.ProductSupplierDensity; |
| | | import com.ruoyi.basic.service.ProductSupplierDensityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * 产ååå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-19 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/productSupplierDensity") |
| | | @AllArgsConstructor |
| | | @Api(tags = "产ååå®¶å¯åº¦ç»å®") |
| | | public class ProductSupplierDensityController { |
| | | |
| | | private ProductSupplierDensityService productSupplierDensityService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/selectSupplierDensityByProductId") |
| | | public Result selectSupplierDensityByProductId(Page page,ProductSupplierDensity supplierDensity) { |
| | | return Result.success(productSupplierDensityService.selectByProductId(page, supplierDensity)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/addProductSupplierDensity") |
| | | public Result addProductSupplierDensity(@RequestBody ProductSupplierDensity supplierDensity) { |
| | | productSupplierDensityService.addProductSupplierDensity(supplierDensity); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/updateProductSupplierDensity") |
| | | public Result updateProductSupplierDensity(@RequestBody ProductSupplierDensity supplierDensity) { |
| | | productSupplierDensityService.updateProductSupplierDensity(supplierDensity); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå®¶å¯åº¦ç»å®") |
| | | @PostMapping("/deleteProductSupplierDensity") |
| | | public Result deleteProductSupplierDensity(Integer id) { |
| | | productSupplierDensityService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import com.ruoyi.basic.service.StandardMethodService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Api(tags = "æ åæ¹æ³") |
| | | @RestController |
| | | @RequestMapping("/standardMethod") |
| | | @AllArgsConstructor |
| | | public class StandardMethodController { |
| | | |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | @ApiOperation(value = "è·åæ åæ¹æ³å表") |
| | | @PostMapping("/selectStandardMethodList") |
| | | public Result selectStandardMethodList(Page page,StandardMethod standardMethod) throws Exception { |
| | | return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethods") |
| | | public Result selectStandardMethods(){ |
| | | return Result.success(standardMethodService.selectStandardMethods()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å æ åæ¹æ³") |
| | | @PostMapping("/addStandardMethod") |
| | | public Result addStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.addStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ¹æ³") |
| | | @PostMapping("/delStandardMethod") |
| | | public Result<?> delStandardMethod(Integer id) { |
| | | return Result.success(standardMethodService.delStandardMethod(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ åæ¹æ³") |
| | | @PostMapping("/upStandardMethod") |
| | | public Result<?> upStandardMethod(@RequestBody StandardMethod standardMethod) { |
| | | return Result.success(standardMethodService.upStandardMethod(standardMethod)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导å
¥æ åæç»") |
| | | @PostMapping("/importStandardDetails") |
| | | public Result<?> importStandardDetails(@RequestPart("file") MultipartFile file) throws IOException { |
| | | standardMethodService.inputExcel(file); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RequestMapping("/StandardTemplate") |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @Api(tags = "åå§è®°å½æ¨¡æ¿") |
| | | public class StandardTemplateController { |
| | | |
| | | private StandardTemplateService standardTemplateService; |
| | | |
| | | @ApiOperation(value = "è·ååå§è®°å½æ¨¡æ¿å表") |
| | | @PostMapping("/selectStandardTemplatePageList") |
| | | public Result selectStandardTemplatePageList(Page page,StandardTemplate standardTemplate) throws Exception { |
| | | return Result.success(standardTemplateService.selectStandardTemplatePageList(page, standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/addStandardTemplate") |
| | | public Result addStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.addStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/upStandardTemplate") |
| | | public Result<?> upStandardTemplate(@RequestBody StandardTemplate standardTemplate) { |
| | | return Result.success(standardTemplateService.upStandardTemplate(standardTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/delStandardTemplate") |
| | | public Result<?> delStandardTemplate(Integer id) { |
| | | return Result.success(standardTemplateService.delStandardTemplate(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾") |
| | | @GetMapping("/getStandardTemplate") |
| | | public Result<?> getStandardTemplate() { |
| | | return Result.success(standardTemplateService.getStandardTemplate()); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ¨¡æ¿idè·åæ£éªé¡¹æ¨¡æ¿å
容") |
| | | @PostMapping("/getStandTempThingById") |
| | | public Result<?> getStandTempThingById(Integer id) { |
| | | return Result.success(standardTemplateService.getStandTempThingById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾æ¨¡æ¿ç¼å¶") |
| | | @GetMapping("/getEditTemplatePreparation") |
| | | public Result<?> getEditTemplatePreparation(@RequestParam("id") Integer id) { |
| | | StandardTemplate byId = standardTemplateService.getById(id); |
| | | return Result.success("OK", byId.getThing()); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¤å¶åå§è®°å½æ¨¡æ¿") |
| | | @PostMapping("/copyStandardTemplate") |
| | | public Result copyStandardTemplate(@RequestBody StandardTemplate newTemplate) { |
| | | return Result.success(standardTemplateService.copyStandardTemplate(newTemplate)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | 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.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.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/standardTree") |
| | | @Api(tags = "æ ååº") |
| | | public class StandardTreeController { |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | private StandardProductListSupplierAskService standardProductListSupplierAskService; |
| | | |
| | | @ApiOperation(value = "è·åæ åæ ") |
| | | @GetMapping("/selectStandardTreeList") |
| | | public Result selectStandardTreeList() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ (æ£éªä¸å)") |
| | | @GetMapping("/selectStandardTreeList2") |
| | | public Result selectStandardTreeList2() { |
| | | return Result.success(standardTreeService.selectStandardTreeList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å æ åæ ") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»æ åæ æ·»å æ£éªæ å") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId) { |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ åæ è¿è¡æ åæ¥è¯¢") |
| | | @PostMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºä¸çå
容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(String str) { |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ ååºåºé´") |
| | | @PostMapping("/updateSection") |
| | | public Result updateSection(String str) { |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªæ å") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ åæ ä¸çæ£éªé¡¹ç®") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree) { |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿 åæ çå±çº§") |
| | | @PostMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductList") |
| | | public Result selectStandardProductList(@RequestBody InsSampleReceiveDto insSample) { |
| | | return Result.success(standardProductListService.selectStandardProductList(insSample)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿æ£éªæ åæ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æ£éªé¡¹ç®") |
| | | @PostMapping("/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)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éç¼è¾æ¥è¯¢æææ£éªé¡¹ç®åæ£éªå项æä¸¾") |
| | | @PostMapping("/selectStandardProductEnumByMethodId") |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åæ åæ ä¸æ åæ¹æ³æä¸¾") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åäº§åæ¶æ") |
| | | @GetMapping("/getStandardTree2") |
| | | public Result getStandardTree2() { |
| | | return Result.success(standardTreeService.getStandardTree2()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éä¿®æ¹é¡¹ç®å
容") |
| | | @PostMapping("/upStandardProducts") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "standardProductList", dataTypeClass = StandardProductList.class), |
| | | @ApiImplicitParam(name = "ids", dataTypeClass = Integer.class) |
| | | }) |
| | | public Result upStandardProducts(@RequestBody Map<String, Object> product) { |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("ä»
è·åå
纤çåå·") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ApiOperation("导å
¥æ ååº") |
| | | @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(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºåä»·") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºå·¥æ¶ç³»æ°") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("éç½®æ ååºè¦æ±æè¿°åè¦æ±å¼") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(String tree, Integer standardId) { |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("æ ååºææ½") |
| | | @PostMapping("/resetTreeDrag") |
| | | public Result resetTreeDrag(@RequestBody ResetTreeDragDTO resetTreeDragDTO) { |
| | | standardProductListService.resetTreeDrag(resetTreeDragDTO); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("æ ååºææ½å
¨é¨") |
| | | @PostMapping("/resetTreeDragBatch") |
| | | public Result resetTreeDragBatch(@RequestBody Map<String, Object> params) { |
| | | List<StandardProductList> standardProductLists = (List<StandardProductList>) params.get("params"); |
| | | standardProductListService.resetTreeDragBatch(standardProductLists); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åæ æåº") |
| | | @PostMapping("/updateTreeSort") |
| | | public Result updateTreeSort(@RequestBody List<FactoryDto> list) { |
| | | return Result.success(standardTreeService.updateTreeSort(list)); |
| | | } |
| | | |
| | | /*************************************************** åå®¶ç¹æ®è¦æ±å¼å¤ç ************************************************************/ |
| | | |
| | | @ApiOperation(value = "æ ¹æ®äº§åidæ¥è¯¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/selectSupplierAsk") |
| | | public Result selectSupplierAsk(StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | return Result.success(standardProductListSupplierAskService.selectByProductId(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/addProductSupplierAsk") |
| | | public Result addProductSupplierAsk(String str) { |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | return Result.success(standardProductListSupplierAskService.addProductSupplierAsk(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/updateProductSupplierAsk") |
| | | public Result updateProductSupplierAsk(String str) { |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | standardProductListSupplierAskService.updateProductSupplierAsk(supplierAsk); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åå®¶è¦æ±å¼ç»å®") |
| | | @PostMapping("/deleteProductSupplierAsk") |
| | | public Result deleteProductSupplierAsk(Integer supplierAskId) { |
| | | standardProductListSupplierAskService.removeById(supplierAskId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹æ åæ ") |
| | | @PostMapping("/updateStandardTree") |
| | | public Result updateStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.updateStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªé¡¹è¦æ±å¼å¤å¶å¯¹æ¯") |
| | | @PostMapping("/copyStandardProductList") |
| | | public Result copyStandardProductList(@RequestBody CopyStandardProductListDto copyStandardProductListDto) { |
| | | return Result.success(standardProductListService.copyStandardProductList(copyStandardProductListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªé¡¹è¦æ±å¼åç¬å¯¹æ¯") |
| | | @PostMapping("/copyStandardProductOne") |
| | | public Result copyStandardProductOne(@RequestBody CopyStandardProductListDto copyStandardProductListDto) { |
| | | return Result.success(standardProductListService.copyStandardProductOne(copyStandardProductListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªé¡¹æ¹éä¿®æ¹è¦æ±å¼è¦æ±æè¿°") |
| | | @PostMapping("/updateStandardProductListBatch") |
| | | public Result updateStandardProductListBatch(@RequestBody Map<String, Object> param) { |
| | | List<StandardProductList> standardProductList = (List<StandardProductList>) param.get("standardProductList"); |
| | | return Result.success(standardProductListService.updateBatchById(standardProductList)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ£éªé¡¹å¤å¶æåº") |
| | | @PostMapping("/copyStandardProductSort") |
| | | public Result copyStandardProductSort(@RequestBody CopyStandardProductListDto copyStandardProductListDto) { |
| | | return Result.success(standardProductListService.copyStandardProductSort(copyStandardProductListDto)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.pojo.StructureTestObjectPart; |
| | | import com.ruoyi.basic.service.StructureTestObjectPartService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * æ£éªå¯¹è±¡é¶ä»¶è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/structureTestObjectPart") |
| | | @AllArgsConstructor |
| | | @Api(tags = "æ£éªå¯¹è±¡é¶ä»¶è¡¨") |
| | | public class StructureTestObjectPartController { |
| | | |
| | | private StructureTestObjectPartService structureTestObjectPartService; |
| | | |
| | | @ApiOperation(value = "æ ¹æ®æ£éªå¯¹è±¡idæ¥è¯¢é¶ä»¶") |
| | | @PostMapping("/selectByTestObjectId") |
| | | public Result selectByTestObjectId(Page page,StructureTestObjectPart structureTestObjectPart){ |
| | | return Result.success(structureTestObjectPartService.selectByTestObjectId(page,structureTestObjectPart)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ£éªå¯¹è±¡é¶ä»¶") |
| | | @PostMapping("/addTestObjectPart") |
| | | public Result addTestObjectPart(@RequestBody StructureTestObjectPart structureTestObjectPart) { |
| | | structureTestObjectPartService.addTestObjectPart(structureTestObjectPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°æ£éªå¯¹è±¡é¶ä»¶") |
| | | @PostMapping("/updateTestObjectPart") |
| | | public Result updateTestObjectPart(@RequestBody StructureTestObjectPart structureTestObjectPart) { |
| | | structureTestObjectPartService.updateTestObjectPart(structureTestObjectPart); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿£éªå¯¹è±¡é¶ä»¶") |
| | | @PostMapping("/deleteTestObjectPart") |
| | | public Result deleteTestObjectPart(Integer id) { |
| | | structureTestObjectPartService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ 忣éªé¡¹å¤å¶ |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/10/31 |
| | | */ |
| | | @Data |
| | | public class CopyStandardProductListDto { |
| | | |
| | | @ApiModelProperty("忬æ£éªé¡¹ä¿¡æ¯") |
| | | private List<StandardProductList> oldStandardProductList; |
| | | |
| | | @ApiModelProperty("éè¦å¯¹æ¯çæ£éªé¡¹ä¿¡æ¯") |
| | | private List<StandardProductList> newStandardProductList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FactoryDto { |
| | | |
| | | private String code = "[1]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<LaboratoryDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * åæææ¥è¯¢, æé¤äºä¾åºå |
| | | * @Author zhuo |
| | | * @Date 2024/8/28 |
| | | */ |
| | | @Data |
| | | public class IfsInventoryQuantityCheckDto implements Serializable { |
| | | |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å") |
| | | private String contract; |
| | | |
| | | @ApiModelProperty("订åå·") |
| | | private String orderNo; |
| | | |
| | | |
| | | @ApiModelProperty("è¡å·") |
| | | private String lineNo; |
| | | |
| | | @ApiModelProperty("ä¸è¾¾å·") |
| | | private String releaseNo; |
| | | |
| | | @ApiModelProperty("æ¥æ¶å·") |
| | | private Integer receiptNo; |
| | | |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @ApiModelProperty("é¶ä»¶æè¿°") |
| | | private String partDesc; |
| | | |
| | | @ApiModelProperty("ç¶ææè¿°") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String statusDb; |
| | | |
| | | @ApiModelProperty("æµè¾¾çéè´æ°é") |
| | | private BigDecimal qtyArrived; |
| | | |
| | | @ApiModelProperty("å·²æ£éªçè´ä¹°æ°é") |
| | | private BigDecimal qtyInspected; |
| | | |
| | | @ApiModelProperty("è¦æ£éªçéè´æ°é") |
| | | private BigDecimal qtyToInspect; |
| | | |
| | | @ApiModelProperty("æµè¾¾çåºåæ°é") |
| | | private BigDecimal invQtyInStore; |
| | | |
| | | @ApiModelProperty("æµè¾¾çéè´æ°é") |
| | | private BigDecimal purQtyInStore; |
| | | |
| | | @ApiModelProperty("é
ç½®æ è¯") |
| | | private String configurationId; |
| | | |
| | | @ApiModelProperty("æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | @ApiModelProperty("wdrå·") |
| | | private String waivDevRejNo; |
| | | |
| | | @ApiModelProperty("æ´»å¨åºå") |
| | | private Integer activitySeq; |
| | | |
| | | |
| | | @ApiModelProperty("åºåå·") |
| | | private String serialNo; |
| | | |
| | | @ApiModelProperty("åºä½å·") |
| | | private String locationNo; |
| | | |
| | | @ApiModelProperty("çæ¬å·") |
| | | private String engChgLevel; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private String receiver; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äººå§å") |
| | | private String receiverName; |
| | | |
| | | @ApiModelProperty("éè´å") |
| | | private String buyerCode; |
| | | |
| | | @ApiModelProperty("éè´åå§å") |
| | | private String buyerName; |
| | | |
| | | @ApiModelProperty("å®é
å°è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime arriveDate; |
| | | |
| | | @ApiModelProperty("å®é
äº¤è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime deliveryDate; |
| | | |
| | | @ApiModelProperty("çäº§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime productDate; |
| | | |
| | | @ApiModelProperty("å¤±ææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime invalidDate; |
| | | |
| | | |
| | | @ApiModelProperty("å®¡æ¹æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime approvedDate; |
| | | |
| | | @ApiModelProperty("éè´ç³è¯·å建人") |
| | | private String reqCeater; |
| | | |
| | | @ApiModelProperty("éè´ç³è¯·å建人å§å") |
| | | private String reqCeaterName; |
| | | |
| | | @ApiModelProperty("éè´è®¢åè¡å¤æ³¨") |
| | | private String lineRemarks; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String buyUnitMeas; |
| | | |
| | | |
| | | private Integer isSource; |
| | | |
| | | private Integer number; |
| | | |
| | | |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime receiverDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ä¸ºé¦æ¬¡åºç° 0 å¦ 1 æ¯") |
| | | private Integer isFirst; |
| | | |
| | | @ApiModelProperty("ç®æ åºä½å·") |
| | | private String toLocation; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¯æ¥æ£ 0 å¦ 1 æ¯") |
| | | private Integer isInspect; |
| | | |
| | | @ApiModelProperty("æ¥æ£äºº") |
| | | private String declareUser; |
| | | |
| | | |
| | | @ApiModelProperty("æ¥æ£äººid") |
| | | private Integer declareUserId; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String partUnit; |
| | | |
| | | @ApiModelProperty("产ä¸é¾æ£æµæ°æ®") |
| | | private String industryChain; |
| | | |
| | | @ApiModelProperty("æ¥æ£æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime declareDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦å¡å¯ä»¥å£åº¦æ£éª 0 å¦ 1 æ¯") |
| | | private Integer isQuarter; |
| | | |
| | | // ä¿®æ¹åç |
| | | @ApiModelProperty("æ¹å·") |
| | | private String updateBatchNo; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¯éåä¸, 0å¦, 1æ¯") |
| | | private Integer isCopper; |
| | | |
| | | @ApiModelProperty("ç©æç±»å") |
| | | private Integer isExpire; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class IfsInventoryQuantityDto extends IfsInventoryQuantityCheckDto { |
| | | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @ApiModelProperty("æ ·ååå·") |
| | | private String sampleModel; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | // è¿å |
| | | @ApiModelProperty("订åid") |
| | | private Integer enterOrderId; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String enterReportId; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææ¥åå°å") |
| | | private String enterUrl; |
| | | |
| | | @ApiModelProperty("æå¨ä¸ä¼ æ¥åå°å") |
| | | private String enterUrlS; |
| | | |
| | | // å£åº¦ |
| | | @ApiModelProperty("订åid") |
| | | private Integer quarterOrderId; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String quarterReportId; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææ¥åå°å") |
| | | private String quarterUrl; |
| | | |
| | | @ApiModelProperty("æå¨ä¸ä¼ æ¥åå°å") |
| | | private String quarterUrlS; |
| | | |
| | | private Integer orderState; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | |
| | | @ApiModelProperty("ææåå®¶") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("å§æäºº") |
| | | private String prepareUser; |
| | | |
| | | @ApiModelProperty("é¢è²") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("æ ç¾ç¶æ") |
| | | private String labelStatus; |
| | | |
| | | @ApiModelProperty("æ ç¾æ¡å½¢ç ") |
| | | private String labelBarCode; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String userName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * è½æ¥è¯¢å°ä¾åºå |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class IfsInventoryQuantitySupplierDto extends IfsInventoryQuantity { |
| | | |
| | | /** |
| | | * å§æç¼å· |
| | | */ |
| | | @ExcelProperty(index = 2, value = "å§æç¼å·") |
| | | @ApiModelProperty("å§æç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ ·åid") |
| | | private Integer sampleId; |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡") |
| | | private String sampleType; |
| | | |
| | | @ExcelProperty(index = 7, value = "æ ·ååç§°") |
| | | @ApiModelProperty("æ ·ååç§°") |
| | | private String sampleName; |
| | | |
| | | @ExcelProperty(index = 8, value = "æ ·ååå·") |
| | | @ApiModelProperty("æ ·ååå·") |
| | | private String sampleModel; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | // è¿å |
| | | @ApiModelProperty("è¿å订åid") |
| | | private Integer enterOrderId; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String enterReportId; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææ¥åå°å") |
| | | private String enterUrl; |
| | | |
| | | @ApiModelProperty("æå¨ä¸ä¼ æ¥åå°å") |
| | | private String enterUrlS; |
| | | |
| | | // å£åº¦ |
| | | @ApiModelProperty("å£åº¦è®¢åid") |
| | | private Integer quarterOrderId; |
| | | |
| | | @ApiModelProperty("æ¥åid") |
| | | private String quarterReportId; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææ¥åå°å") |
| | | private String quarterUrl; |
| | | |
| | | @ApiModelProperty("æå¨ä¸ä¼ æ¥åå°å") |
| | | private String quarterUrlS; |
| | | |
| | | private Integer orderState; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime sendTime; |
| | | |
| | | @ApiModelProperty("å§æäºº") |
| | | private String prepareUser; |
| | | |
| | | @ApiModelProperty("é¢è²") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("æ ç¾ç¶æ") |
| | | private String labelStatus; |
| | | |
| | | @ApiModelProperty("æ ç¾æ¡å½¢ç ") |
| | | private String labelBarCode; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private Integer createUser; |
| | | |
| | | @ExcelProperty(index = 9, value = "æ£éªäºº") |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String userName; |
| | | |
| | | @ExcelProperty(index = 10, value = "ä¸åæ¶é´") |
| | | private String sendTimeString; |
| | | |
| | | @ExcelProperty(index = 14, value = "æ¥æ¶æ¶é´") |
| | | private String receiverDateString; |
| | | |
| | | @ExcelProperty(index = 15, value = "æ¥æ£æ¶é´") |
| | | private String declareDateString; |
| | | |
| | | // åæ ¼ç¶æ,: 0 æ£éªä¸, 1åæ ¼, 2ä¸åæ ¼, 3æªä¸å,4è®©æ¥æ¾è¡ |
| | | @ExcelProperty(index = 6, value = "æ£éªç¶æ") |
| | | private String inspectStatusString; |
| | | |
| | | @ApiModelProperty("æ¥æ£å¼å§æ¶é´") |
| | | private String beginDeclareDate; |
| | | |
| | | @ApiModelProperty("æ¥æ£ç»ææ¶é´") |
| | | private String endDeclareDate; |
| | | |
| | | @ApiModelProperty("ä¸åæ ¼æè¿°") |
| | | @ExcelProperty(index = 16, value = "ä¸åæ ¼æè¿°") |
| | | private String unqualifiedDesc; |
| | | |
| | | |
| | | @ApiModelProperty("ä¸åæ ¼é¡¹") |
| | | @ExcelProperty(index = 17, value = "ä¸åæ ¼é¡¹") |
| | | private String unqualifiedItem; |
| | | |
| | | @ApiModelProperty("å
æ£") |
| | | private Integer isExemption; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.InsSample1; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/10/29 |
| | | */ |
| | | @Data |
| | | public class InsSampleReceiveDto extends InsSample1 { |
| | | |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @ApiModelProperty("åææid") |
| | | private Integer ifsInventoryId; |
| | | |
| | | @ApiModelProperty("è¯æ°") |
| | | private String cores; |
| | | |
| | | @ApiModelProperty("åå·åæ°") |
| | | private String modelNum; |
| | | |
| | | @ApiModelProperty("å¯¼ä½æè´¨") |
| | | private String conductorMaterial; |
| | | |
| | | @ApiModelProperty("导ä½ç±»å") |
| | | private String conductorType; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¯çµç¼é
ç½®") |
| | | private String isCableTag; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class LaboratoryDto { |
| | | |
| | | private String code = "[2]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private List<SampleTypeDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ModelDto { |
| | | |
| | | private String code = "[5]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author æ´å |
| | | * @Date 2024/2/26 |
| | | */ |
| | | @Data |
| | | public class PageTestObjectDto extends StructureTestObject { |
| | | |
| | | @ApiModelProperty(value = "产å") |
| | | private String product; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateUserName; |
| | | |
| | | @ApiModelProperty(value = "é¶ä»¶å·") |
| | | private String partNo; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/8/5 |
| | | */ |
| | | @Data |
| | | public class ProductDTO1 extends Product { |
| | | |
| | | @ApiModelProperty(value = "é¶ä»¶å·") |
| | | private String partNo; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductDto { |
| | | |
| | | private Integer id; |
| | | |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/8/22 |
| | | */ |
| | | @Data |
| | | public class ResetTreeDragDTO { |
| | | @ApiModelProperty(value = "å¼å§ç´¢å¼") |
| | | private String beginIndex; |
| | | |
| | | @ApiModelProperty(value = "ç»æç´¢å¼") |
| | | private String endIndex; |
| | | |
| | | @ApiModelProperty(value = "æ åç¼å·id") |
| | | private String methodId; |
| | | |
| | | @ApiModelProperty(value = "æ°") |
| | | private String tree; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹è¡id") |
| | | private String productionId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleDto { |
| | | |
| | | private String code = "[4]"; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private String partNo; |
| | | |
| | | // æ ·åè±æ |
| | | private String sampleEn; |
| | | |
| | | private List<ModelDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SampleTypeDto { |
| | | |
| | | private String code = "[3]"; |
| | | |
| | | // æ£æµå¯¹è±¡id |
| | | private Integer sampleTypeId; |
| | | |
| | | // æ£æµå¯¹è±¡æåº |
| | | private Integer sort; |
| | | |
| | | private String label; |
| | | |
| | | private String value; |
| | | |
| | | private String partNo; |
| | | |
| | | // å¯¹è±¡è±æ |
| | | private String sampleTypeEn; |
| | | |
| | | private List<SampleDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class TestItemDto { |
| | | |
| | | private Integer id; |
| | | |
| | | private String name; |
| | | |
| | | private List<ProductDto> children; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class StructureTestObjectData { |
| | | @ExcelProperty(value = "åºæ") |
| | | private String laboratory; |
| | | |
| | | @ExcelProperty(value = "æ£æµå¯¹è±¡") |
| | | private String specimenName; |
| | | |
| | | @ExcelProperty(value = "æ£æµå¯¹è±¡(EN)") |
| | | private String specimenNameEn; |
| | | |
| | | @ExcelProperty(value = "对象代å·") |
| | | private String code; |
| | | |
| | | @ExcelProperty(value = "产ååç§°") |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "产ååç§°(EN)") |
| | | private String nameEn; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.excel; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.ruoyi.basic.service.ProductService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class StructureTestObjectListener extends AnalysisEventListener<StructureTestObjectData> { |
| | | private static final int BATCH_COUNT = 1000; |
| | | List<StructureTestObjectData> list = new ArrayList<>(); |
| | | |
| | | private ProductService productService; |
| | | |
| | | public StructureTestObjectListener(ProductService productService) { |
| | | this.productService = productService; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(StructureTestObjectData data, AnalysisContext analysisContext) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | save(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | save(); |
| | | } |
| | | |
| | | |
| | | private void save() { |
| | | productService.importPartExcel(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.Certification; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface CertificationMapper extends BaseMapper<Certification> { |
| | | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | IPage<Certification> getCertificationDetail(Page page, @Param("ew") QueryWrapper<Certification> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.dto.IfsInventoryQuantityDto; |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface IfsInventoryQuantityMapper extends BaseMapper<IfsInventoryQuantity> { |
| | | |
| | | /** |
| | | * æå°æ ç¾æ¥è¯¢ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantityDto> printLabel(@Param("ids") List<Integer> ids); |
| | | |
| | | /** |
| | | * |
| | | * @param ifsInventoryId |
| | | * @return |
| | | */ |
| | | int selectReportCountById(@Param("ifsInventoryId") Integer ifsInventoryId); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åå£åº¦æ¯å¦åºç°è¿è¯¥ææ |
| | | * @param partDetail åå· |
| | | * @param supplierName ä¾åºååç§° |
| | | * @param startOfNextQuarter å£åº¦å¼å§æ¶é´ |
| | | * @param endOfQuarter å£åº¦ç»ææ¶é´ |
| | | * @return |
| | | */ |
| | | Integer selectIsFirst(@Param("partDetail") String partDetail, |
| | | @Param("supplierName") String supplierName, |
| | | @Param("startOfNextQuarter") LocalDateTime startOfNextQuarter, |
| | | @Param("endOfQuarter") LocalDateTime endOfQuarter); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.Laboratory; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * å®éªå®¤ç®¡ç(Laboratory)è¡¨æ°æ®åºè®¿é®å± |
| | | */ |
| | | public interface LaboratoryMapper extends BaseMapper<Laboratory> { |
| | | |
| | | IPage<Laboratory> selectItemParameter(Page page, @Param("ew") QueryWrapper<Laboratory> ew); |
| | | |
| | | Object obtainItemParameterList(@Param("page") Page page, @Param("ew") QueryWrapper<Laboratory> ew); |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.ProductDTO1; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãproduct(产å表)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-04-26 01:11:02 |
| | | * @Entity com.ruoyi.basic.pojo.Product |
| | | */ |
| | | public interface ProductMapper extends BaseMapper<Product> { |
| | | |
| | | IPage<Product> selectProductListByObjectId(Page page, @Param("ew") QueryWrapper<ProductDTO1> ew, @Param("partNo") String partNo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.basic.pojo.ProductPart; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface ProductPartMapper extends BaseMapper<ProductPart> { |
| | | IPage<ProductPart> selectListByProductId(IPage<ProductPart> page, |
| | | @Param("ew") QueryWrapper<ProductPart> ew, |
| | | @Param("productId") Integer productId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.ProductSupplierDensity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 产ååå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-19 |
| | | */ |
| | | @Mapper |
| | | public interface ProductSupplierDensityMapper extends BaseMapper<ProductSupplierDensity> { |
| | | |
| | | IPage<ProductSupplierDensity> selectListByProductId(@Param("page") Page page, @Param("ew") QueryWrapper<ProductSupplierDensity> ew, @Param("productId") Integer productId); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method_list(æ åæ ä¸çæ åå表)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-04 13:44:04 |
| | | * @Entity com.ruoyi.basic.pojo.StandardMethodList |
| | | */ |
| | | public interface StandardMethodListMapper extends BaseMapper<StandardMethodList> { |
| | | |
| | | Map<String, String> selectStandardMethodById(Integer id); |
| | | |
| | | String selectUserById(Integer id); |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists(String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodListsByNull(String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists3(String tree); |
| | | |
| | | List<StandardMethodList> selectStandardMethodLists2(@Param("data1") String data1, @Param("data2") String data2, @Param("data3") String data3, @Param("data4") String data4, @Param("data5") String data5); |
| | | |
| | | List<StandardProductList> selectParameterList(String code); |
| | | |
| | | List<StandardMethodList> selectListEnum(); |
| | | |
| | | Integer getStandardMethodId(String code); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethod; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method(æ åæ¹æ³)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-03 19:21:41 |
| | | * @Entity com.ruoyi.basic.pojo.StandardMethod |
| | | */ |
| | | public interface StandardMethodMapper extends MyBaseMapper<StandardMethod> { |
| | | |
| | | IPage<StandardMethod> selectStandardMethodList(Page page, @Param("ew") QueryWrapper<StandardMethod> ew); |
| | | |
| | | StandardMethod selectStandMethodById(Integer id); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-05 10:33:29 |
| | | * @Entity com.ruoyi.basic.pojo.StandardProductList |
| | | */ |
| | | public interface StandardProductListMapper extends BaseMapper<StandardProductList> { |
| | | |
| | | IPage<StandardProductList> standardProductListIPage(@Param("id") Integer id, @Param("tree") String tree, IPage<StandardProductList> page, @Param("laboratory") String laboratory, @Param("insItem") String insItem, @Param("insItems") String insItems); |
| | | |
| | | StandardProductList getOne(@Param("standardMethodListId") Integer standardMethodListId, @Param("inspectionItem") String inspectionItem, @Param("sample") String sample, @Param("inspectionItemSubclass") String inspectionItemSubclass, @Param("model") String model, @Param("inspectionItemClass") String inspectionItemClass); |
| | | |
| | | List<StandardProductList> selectDetail(@Param("standardMethodListId") Integer standardMethodListId, @Param("state") int state, @Param("model") String model, @Param("isCableTag") String isCableTag); |
| | | |
| | | List<StandardProductList> selectDetail2(@Param("standardMethodListId") Integer standardMethodListId, @Param("state") int state, @Param("tree") String tree, @Param("isCableTag") String isCableTag); |
| | | |
| | | /** |
| | | * æ¥è¯¢é¶ä»¶é¢è² |
| | | * @param partNo |
| | | * @return |
| | | */ |
| | | Map<String, String> selectPartColor(@Param("partNo") String partNo); |
| | | |
| | | /** |
| | | * åºé´ä¿®æ¹ |
| | | * @param productList |
| | | * @return |
| | | */ |
| | | void updateSection(@Param("productList") StandardProductList productList); |
| | | |
| | | |
| | | /** |
| | | * ä»ä¸å¾ä¸ä¿®æ¹é¡ºåº |
| | | * @param beginIndex å¼å§ä½ç½® |
| | | * @param endIndex ç»æä½ç½® |
| | | * @param methodId æ åid |
| | | * @param tree æ |
| | | */ |
| | | void updateSortUp(@Param("beginIndex") Integer beginIndex, |
| | | @Param("endIndex") Integer endIndex, |
| | | @Param("methodId") Integer methodId, |
| | | @Param("tree") String tree); |
| | | |
| | | /** |
| | | * ä»ä¸ç½ä¸ä¿®æ¹é¡ºåº |
| | | * @param beginIndex |
| | | * @param endIndex |
| | | * @param methodId |
| | | * @param tree |
| | | */ |
| | | void updateSortDown(@Param("beginIndex") Integer beginIndex, |
| | | @Param("endIndex") Integer endIndex, |
| | | @Param("methodId") Integer methodId, |
| | | @Param("tree") String tree); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-23 |
| | | */ |
| | | @Mapper |
| | | public interface StandardProductListSupplierAskMapper extends BaseMapper<StandardProductListSupplierAsk> { |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.StandardTemplate; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_template(æ 忍¡æ¿)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-11 13:47:52 |
| | | * @Entity com.ruoyi.basic.pojo.StandardTemplate |
| | | */ |
| | | public interface StandardTemplateMapper extends BaseMapper<StandardTemplate> { |
| | | |
| | | IPage<StandardTemplate> selectStandardTemplatePageList(Page page, @Param("ew") QueryWrapper<StandardTemplate> ew); |
| | | |
| | | StandardTemplate getStandTempIdByName(String name); |
| | | |
| | | /** |
| | | * æ¥è¯¢å缩åçæ°æ® |
| | | * @param templateId |
| | | * @return |
| | | */ |
| | | String selectCompressThing(Integer templateId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.*; |
| | | 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 org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_tree(æ åæ )ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2024-03-01 15:06:44 |
| | | * @Entity com.ruoyi.basic.pojo.StandardTree |
| | | */ |
| | | public interface StandardTreeMapper extends BaseMapper<StandardTree> { |
| | | |
| | | List<FactoryDto> selectStandardTreeList(); |
| | | |
| | | List<StandardTree> selectStandardTreeList2(String sampleType); |
| | | |
| | | StandardProductList selectStandardProductById(Integer id); |
| | | |
| | | List<StandardProductList> getStandardProductListBySample(String sampleType); |
| | | |
| | | List<StandardMethodList> getStandardMethodListBySample(String sampleType); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree(String tree, String sample, String model, String trees, String laboratory); |
| | | |
| | | List<StandardProductList> selectStandardProductListByTree2(String tree, String sample, String model, String trees, String laboratory); |
| | | |
| | | |
| | | List<SampleTypeDto> getStandardTree2(); |
| | | |
| | | List<SampleDto> getStandardTree3(String sampleType); |
| | | |
| | | |
| | | String getLaboratory(String str); |
| | | |
| | | Integer getStructureItemParameterId(String sampleType, String item, String itemChild, String inspectionItemClass); |
| | | |
| | | List<ProductDto> selectPList(String name); |
| | | |
| | | String selSample(String sample); |
| | | |
| | | List<FactoryDto> selectStandardTreeListByPartNo(@Param("partNo") String partNo); |
| | | |
| | | IPage<IfsInventoryQuantity> selectIfsPage(IPage<IfsInventoryQuantity> page, |
| | | @Param("ew") QueryWrapper<IfsInventoryQuantity> ew); |
| | | |
| | | IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, |
| | | @Param("ew") QueryWrapper<IfsInventoryQuantityDto> ew); |
| | | |
| | | |
| | | IPage<IfsInventoryQuantityCheckDto> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, @Param("ew")QueryWrapper<IfsInventoryQuantityCheckDto> ew); |
| | | |
| | | /** |
| | | * åææ¥æ£æ¥è¯¢å
¨é¨(å页) |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, @Param("ew") QueryWrapper<IfsInventoryQuantitySupplierDto> ew, @Param("beginDeclareDate") String beginDeclareDate, @Param("endDeclareDate")String endDeclareDate); |
| | | |
| | | /** |
| | | * åææ¥æ£æ¥è¯¢å
¨é¨(æ å页) |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | List<IfsInventoryQuantitySupplierDto> getIfsByOverList(@Param("ew") QueryWrapper<IfsInventoryQuantitySupplierDto> ew, @Param("beginDeclareDate") String beginDeclareDate, @Param("endDeclareDate")String endDeclareDate); |
| | | |
| | | /** |
| | | * åæææ¥è¯¢å£åº¦æ£éª |
| | | * @param page |
| | | * @param |
| | | * @param beginDeclareDate |
| | | * @param endDeclareDate |
| | | * @return |
| | | */ |
| | | IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page<IfsInventoryQuantitySupplierDto> page, @Param("ew") QueryWrapper<IfsInventoryQuantitySupplierDto> ew, @Param("beginDeclareDate") String beginDeclareDate, @Param("endDeclareDate")String endDeclareDate); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.TestItemDto; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)è¡¨æ°æ®åºè®¿é®å± |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 16:21:17 |
| | | */ |
| | | public interface StructureItemParameterMapper extends BaseMapper<StructureItemParameter> { |
| | | |
| | | IPage<StructureItemParameter> selectItemParameterList(Page page, @Param("ew") QueryWrapper<StructureItemParameter> ew); |
| | | |
| | | List<Map<String, Object>> getInsProduction(); |
| | | |
| | | List<TestItemDto> getItemTree(); |
| | | |
| | | int removeNoSample(@Param("sample") String sample); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.PageTestObjectDto; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * æ£æµå¯¹è±¡(StructureTestObject)è¡¨æ°æ®åºè®¿é®å± |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 17:36:41 |
| | | */ |
| | | public interface StructureTestObjectMapper extends BaseMapper<StructureTestObject> { |
| | | |
| | | IPage<PageTestObjectDto> selectTestObjectList(Page page, @Param("ew") QueryWrapper<PageTestObjectDto> ew, @Param("partNo") String partNo); |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.StructureTestObjectPart; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * æ£éªå¯¹è±¡é¶ä»¶è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface StructureTestObjectPartMapper extends BaseMapper<StructureTestObjectPart> { |
| | | IPage<StructureTestObjectPart> selectListByTestObjectId(Page page, @Param("ew") QueryWrapper<StructureTestObjectPart> structureTestObjectPartQueryWrapper, @Param("testObjectId") Integer testObjectId); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @TableName(value = "certification") |
| | | @Data |
| | | public class Certification implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨ç¼ç ") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "é¢åæºæ") |
| | | private String organization; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨è¯´æ") |
| | | private String explanation; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡é¢åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime firstIssuanceDate; |
| | | |
| | | @ApiModelProperty(value = "æè¿é¢åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime latestIssuanceDate; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "å°æé¢åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime expireTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é¢å¸æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime dateOfIssuance; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨å¾çå°å") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨éä»¶å°å") |
| | | private String fileUrl; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | 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.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("ifs_inventory_quantity") |
| | | @ExcelIgnoreUnannotated |
| | | public class IfsInventoryQuantity implements Serializable { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty("å") |
| | | private String contract; |
| | | |
| | | @ExcelProperty(index = 13, value = "订åå·") |
| | | @ApiModelProperty("订åå·") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty("è¡å·") |
| | | private String lineNo; |
| | | |
| | | @ApiModelProperty("ä¸è¾¾å·") |
| | | private String releaseNo; |
| | | |
| | | @ApiModelProperty("æ¥æ¶å·") |
| | | private Integer receiptNo; |
| | | |
| | | @ExcelProperty(index = 3, value = "é¶ä»¶å·") |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @ExcelProperty(index = 4, value = "é¶ä»¶æè¿°") |
| | | @ApiModelProperty("é¶ä»¶æè¿°") |
| | | private String partDesc; |
| | | |
| | | @ApiModelProperty("ç¶ææè¿°(IFS忬æåçç¶æ)") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("ç¶æ(IFS忬æåçç¶æ)") |
| | | private String statusDb; |
| | | |
| | | @ExcelProperty(index = 11, value = "æµè¾¾çéè´æ°é") |
| | | @ApiModelProperty("æµè¾¾çéè´æ°é") |
| | | private BigDecimal qtyArrived; |
| | | |
| | | @ApiModelProperty("å·²æ£éªçè´ä¹°æ°é") |
| | | private BigDecimal qtyInspected; |
| | | |
| | | @ApiModelProperty("è¦æ£éªçéè´æ°é") |
| | | private BigDecimal qtyToInspect; |
| | | |
| | | @ApiModelProperty("ä¾åºåç¼å·") |
| | | private String supplierId; |
| | | |
| | | @ExcelProperty(index = 5, value = "ä¾åºååç§°") |
| | | @ApiModelProperty("ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("æµè¾¾çåºåæ°é") |
| | | private BigDecimal invQtyInStore; |
| | | |
| | | @ApiModelProperty("æµè¾¾çéè´æ°é") |
| | | private BigDecimal purQtyInStore; |
| | | |
| | | @ApiModelProperty("é
ç½®æ è¯") |
| | | private String configurationId; |
| | | |
| | | @ApiModelProperty("æ¹å·") |
| | | private String lotBatchNo; |
| | | |
| | | @ApiModelProperty("wdrå·") |
| | | private String waivDevRejNo; |
| | | |
| | | @ApiModelProperty("æ´»å¨åºå") |
| | | private Integer activitySeq; |
| | | |
| | | @ApiModelProperty("åºåå·") |
| | | private String serialNo; |
| | | |
| | | @ApiModelProperty("åºä½å·") |
| | | private String locationNo; |
| | | |
| | | @ApiModelProperty("çæ¬å·") |
| | | private String engChgLevel; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private String receiver; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äººå§å") |
| | | private String receiverName; |
| | | |
| | | @ApiModelProperty("éè´å") |
| | | private String buyerCode; |
| | | |
| | | @ApiModelProperty("éè´åå§å") |
| | | private String buyerName; |
| | | |
| | | @ApiModelProperty("å®é
å°è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime arriveDate; |
| | | |
| | | @ApiModelProperty("å®é
äº¤è´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime deliveryDate; |
| | | |
| | | @ApiModelProperty("çäº§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime productDate; |
| | | |
| | | @ApiModelProperty("å¤±ææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime invalidDate; |
| | | |
| | | |
| | | @ApiModelProperty("å®¡æ¹æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime approvedDate; |
| | | |
| | | @ApiModelProperty("éè´ç³è¯·å建人") |
| | | private String reqCeater; |
| | | |
| | | @ApiModelProperty("éè´ç³è¯·å建人å§å") |
| | | private String reqCeaterName; |
| | | |
| | | @ApiModelProperty("éè´è®¢åè¡å¤æ³¨") |
| | | private String lineRemarks; |
| | | |
| | | @ExcelProperty(index = 12, value = "åä½") |
| | | @ApiModelProperty("åä½") |
| | | private String buyUnitMeas; |
| | | |
| | | @ApiModelProperty("æ¯å¦ä¸ºifsæå,0 å¦, 1æ¯") |
| | | private Integer isSource; |
| | | |
| | | private Integer number; |
| | | |
| | | |
| | | @ApiModelProperty("ç¶æ: 0:å¾
æ¥æ£, 1:å¾
æ£éª, :å·²å®¡æ ¸") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime receiverDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ä¸ºé¦æ¬¡åºç° 0 å¦ 1 æ¯") |
| | | private Integer isFirst; |
| | | |
| | | @ApiModelProperty("ç®æ åºä½å·") |
| | | private String toLocation; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¯æ¥æ£ 0 å¦ 1 æ¯") |
| | | private Integer isInspect; |
| | | |
| | | @ApiModelProperty("æ¥æ£äºº") |
| | | private String declareUser; |
| | | |
| | | |
| | | @ApiModelProperty("æ¥æ£äººid") |
| | | private Integer declareUserId; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String partUnit; |
| | | |
| | | @ApiModelProperty("产ä¸é¾æ£æµæ°æ®") |
| | | private String industryChain; |
| | | |
| | | @ApiModelProperty("æ¥æ£æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private LocalDateTime declareDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦å¡å¯ä»¥å£åº¦æ£éª 0 å¦ 1 æ¯") |
| | | private Integer isQuarter; |
| | | |
| | | // ä¿®æ¹åç |
| | | @ExcelProperty(index = 1, value = "æ¹å·") |
| | | @ApiModelProperty("æ¹å·") |
| | | private String updateBatchNo; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ, 0å¦, 1æ¯") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ¯éåä¸, 0å¦, 1æ¯") |
| | | private Integer isCopper; |
| | | |
| | | // åæ ¼ç¶æ,: 0 æ£éªä¸, 1åæ ¼, 2ä¸åæ ¼, 3æªä¸å,4è®©æ¥æ¾è¡ |
| | | @ApiModelProperty("æ£éªç¶æ") |
| | | private Integer inspectStatus; |
| | | |
| | | @ApiModelProperty("æ¯å¦éè´è®¢åç»è®°: 0å¦, 1:æ¯") |
| | | private Integer isRegister; |
| | | |
| | | @ApiModelProperty("æ¯å¦ä¿®æ¹è¿æ¹å·: 0å¦, 1:æ¯") |
| | | private Integer isUpdateBatch; |
| | | |
| | | // æ¯å¦æ¯è¿æææ: 0å¦, 1:æ¯" |
| | | @ApiModelProperty("ç©æç±»å") |
| | | private Integer isExpire; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªæ ·å |
| | | * @TableName ins_sample |
| | | */ |
| | | @TableName(value ="ins_sample") |
| | | @Data |
| | | public class InsSample1 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; |
| | | |
| | | @ApiModelProperty("æ ·ååä½") |
| | | private String unit; |
| | | |
| | | private Integer cellId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | private Integer parentId; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | private Integer quantity; |
| | | |
| | | @ApiModelProperty("ç¹æ®æ åæ¹æ³") |
| | | private String specialStandardMethod; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Integer num=1; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * å®éªå®¤ç®¡ç(Laboratory)表对象 |
| | | */ |
| | | @TableName(value = "laboratory") |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class Laboratory implements Serializable { |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å®éªå®¤åç§°") |
| | | private String laboratoryName; |
| | | |
| | | @ApiModelProperty(value = "åºæç¼ç ") |
| | | private String laboratoryNumber; |
| | | |
| | | @ApiModelProperty(value = "å®éªå®¤ä»£å·") |
| | | private String laboratoryCode; |
| | | |
| | | @ApiModelProperty(value = "è´è´£äººçµè¯") |
| | | private String phoneNumber; |
| | | |
| | | @ApiModelProperty(value = "è´è´£äºº") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String head; |
| | | |
| | | @ApiModelProperty(value = "å°å") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 产å表 |
| | | * @TableName product |
| | | */ |
| | | @TableName(value ="product") |
| | | @Data |
| | | public class Product implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产ååç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 产ååç§°EN |
| | | */ |
| | | private String nameEn; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * å¤é®ï¼structure_test_object表id |
| | | */ |
| | | private Integer objectId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("product_part") |
| | | public class ProductPart implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("产åid") |
| | | private Integer productId; |
| | | |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @ApiModelProperty("é¢è²") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("è²æ ") |
| | | private String colorCode; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 产ååå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-19 |
| | | */ |
| | | @Data |
| | | @TableName("product_supplier_density") |
| | | public class ProductSupplierDensity implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("产åid") |
| | | private Integer productId; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åå®¶åç§°") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("å¯åº¦å¼") |
| | | private String densityValue; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ¹æ³ |
| | | * @TableName standard_method |
| | | */ |
| | | @TableName(value ="standard_method") |
| | | @Data |
| | | public class StandardMethod implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private String field; |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡") |
| | | private String structureTestObjectId; |
| | | |
| | | /** |
| | | * æ åç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "æ åç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * æ åæ¹æ³ |
| | | */ |
| | | @ApiModelProperty(value = "æ åæè¿°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æ åæè¿°EN") |
| | | private String nameEn; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "èµè´¨") |
| | | private String qualificationId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦äº§åæ å") |
| | | private Integer isProduct; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å¯ç¨") |
| | | private Integer isUse; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建人") |
| | | @TableField(exist = false,select = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | @TableField(exist = false,select = false) |
| | | private String updateUserName; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ ä¸çæ åå表 |
| | | * @TableName standard_method_list |
| | | */ |
| | | @TableName(value ="standard_method_list") |
| | | @Data |
| | | public class StandardMethodList implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * æ åç¼å· |
| | | */ |
| | | @ApiModelProperty("æ åç¼å·") |
| | | private String code; |
| | | |
| | | /** |
| | | * æ ååç§° |
| | | */ |
| | | @ApiModelProperty("æ åç§°å·") |
| | | private String name; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å·¥å") |
| | | private String factory; |
| | | |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ ä¸çæ£éªé¡¹ç® |
| | | * @TableName standard_product_list |
| | | */ |
| | | @TableName(value ="standard_product_list") |
| | | @Data |
| | | public class StandardProductList implements Serializable { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(value = "id",type = IdType.ASSIGN_ID) |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹EN") |
| | | private String inspectionItemEn; |
| | | |
| | | /** |
| | | * æ£éªé¡¹å°ç±» |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹å°ç±»") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹å°ç±»EN") |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty("åå®éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | /** |
| | | * 计éåä½ |
| | | */ |
| | | @ApiModelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * åä»·(å
) |
| | | */ |
| | | @ApiModelProperty("åä»·") |
| | | private String price; |
| | | |
| | | /** |
| | | * å·¥æ¶(H) |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶") |
| | | private String manHour; |
| | | |
| | | /** |
| | | * å·¥æ¶åç» |
| | | */ |
| | | @ApiModelProperty("å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | /** |
| | | * æ£éªå¼ç±»å |
| | | */ |
| | | @ApiModelProperty("æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | /** |
| | | * æ£éªæ¬¡æ° |
| | | */ |
| | | @ApiModelProperty("æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | | /** |
| | | * åºé´ |
| | | */ |
| | | @ApiModelProperty("åºé´") |
| | | private String section; |
| | | |
| | | /** |
| | | * åºé´ |
| | | */ |
| | | @ApiModelProperty("è¯æ°åºé´") |
| | | private String cores; |
| | | |
| | | /** |
| | | * æ¹æ³ |
| | | */ |
| | | @ApiModelProperty("æ¹æ³å表") |
| | | private String method; |
| | | |
| | | @ApiModelProperty("æ¹æ³") |
| | | private String methodS; |
| | | |
| | | /** |
| | | * é¢è®¡æ¶é´(天) |
| | | */ |
| | | @ApiModelProperty("é¢è®¡æ¶é´") |
| | | private Integer manDay; |
| | | |
| | | /** |
| | | * ç¹æ®æ è¯ |
| | | */ |
| | | @ApiModelProperty("ç¹æ®æ è¯") |
| | | private String bsm; |
| | | |
| | | /** |
| | | * è¦æ±å¼ |
| | | */ |
| | | @ApiModelProperty("è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @ApiModelProperty("è¦æ±æè¿°") |
| | | private String tell; |
| | | |
| | | /** |
| | | * å¤é®ï¼æ åæ¹æ³id |
| | | */ |
| | | @ApiModelProperty("æ åæ¹æ³id") |
| | | private Integer standardMethodListId; |
| | | |
| | | @ApiModelProperty("å·¥å") |
| | | private String factory; |
| | | |
| | | @ApiModelProperty("æ ·ååç±»") |
| | | private String sampleType; |
| | | |
| | | @ApiModelProperty("æ ·å") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private Integer templateId; |
| | | |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("1ï¼ææ 0ï¼æ æ") |
| | | private Integer state; |
| | | |
| | | private String dic; |
| | | |
| | | private String tree; |
| | | |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | @ApiModelProperty(value = "æ¡ä»¶") |
| | | private String radius; |
| | | |
| | | @ApiModelProperty(value = "æ¡ä»¶å表") |
| | | private String radiusList; |
| | | |
| | | @ApiModelProperty(value = "æ¶è´¹æ å(å
/次)") |
| | | private String rates; |
| | | |
| | | @ApiModelProperty(value = "ç´¢å¼é¡ºåº") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * å¯¼ä½æè´¨ |
| | | */ |
| | | @ApiModelProperty("å¯¼ä½æè´¨") |
| | | private String conductorMaterial; |
| | | |
| | | /** |
| | | * 导ä½ç±»å |
| | | */ |
| | | @ApiModelProperty("导ä½ç±»å") |
| | | private String conductorType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-23 |
| | | */ |
| | | @TableName(value ="standard_product_list_supplier_ask") |
| | | @Data |
| | | public class StandardProductListSupplierAsk { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer supplierAskId; |
| | | |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("æ£éªé¡¹ç®id") |
| | | private Long productListId; |
| | | |
| | | @ApiModelProperty("åå®¶åç§°") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @ApiModelProperty("è¦æ±æè¿°") |
| | | private String tell; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ 忍¡æ¿ |
| | | * @TableName standard_template |
| | | */ |
| | | @TableName(value ="standard_template") |
| | | @Data |
| | | public class StandardTemplate implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @ApiModelProperty("模æ¿åç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 模æ¿ç»æ |
| | | */ |
| | | private String thing; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("æ´æ°ç¨æ·") |
| | | @TableField(exist = false) |
| | | private String updateUserName; |
| | | |
| | | /** |
| | | * 模æ¿ç¼å· |
| | | */ |
| | | @ApiModelProperty("模æ¿ç¼å·") |
| | | private String number; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ åæ |
| | | * @TableName standard_tree |
| | | */ |
| | | @TableName(value ="standard_tree") |
| | | @Data |
| | | public class StandardTree implements Serializable { |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @NotNull(message="[]ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty("") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * å·¥å |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å·¥å") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String factory; |
| | | /** |
| | | * å®éªå®¤ |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("å®éªå®¤") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String laboratory; |
| | | /** |
| | | * æ ·å大类 |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("æ ·å大类") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String sampleType; |
| | | /** |
| | | * æ ·å |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("æ ·å") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String sample; |
| | | /** |
| | | * åå· |
| | | */ |
| | | @Size(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | @ApiModelProperty("åå·") |
| | | @Length(max= 255,message="ç¼ç é¿åº¦ä¸è½è¶
è¿255") |
| | | private String model; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | /** |
| | | * |
| | | */ |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹ååç§° |
| | | */ |
| | | @TableField(exist = false,select = false) |
| | | private String oldModel; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)表对象 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 16:21:17 |
| | | */ |
| | | @TableName(value ="structure_item_parameter") |
| | | @Data |
| | | public class StructureItemParameter implements Serializable { |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹EN") |
| | | private String inspectionItemEn; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå项EN") |
| | | private String inspectionItemSubclassEn; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¯¹è±¡") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty(value = "åä»·(å
)") |
| | | private String price; |
| | | |
| | | @ApiModelProperty(value = "åºæ") |
| | | private String laboratory; |
| | | |
| | | @ApiModelProperty(value = "è¯éªå®¤") |
| | | private String sonLaboratory; |
| | | |
| | | @ApiModelProperty(value = "è¦æ±æè¿°") |
| | | private String askTell; |
| | | |
| | | @ApiModelProperty(value = "è¦æ±å¼") |
| | | private String ask; |
| | | |
| | | @ApiModelProperty(value = "计éåä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value = "è¯éªæ¹æ³") |
| | | private String method; |
| | | |
| | | @ApiModelProperty(value = "å·¥æ¶(H)") |
| | | private Double manHour; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡æ¶é´(H)") |
| | | private Integer manDay; |
| | | |
| | | @ApiModelProperty(value = "å·¥æ¶åç»") |
| | | private String manHourGroup; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç±»å") |
| | | private String inspectionItemType; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¼ç±»å") |
| | | private String inspectionValueType; |
| | | |
| | | @ApiModelProperty(value = "æ£éªæ¬¡æ°") |
| | | private Integer checkoutNumber; |
| | | |
| | | @ApiModelProperty(value = "åºé´") |
| | | private String section; |
| | | |
| | | @ApiModelProperty(value = "ç¹æ®æ è¯") |
| | | private String bsm; |
| | | |
| | | @ApiModelProperty(value = "åå§è®°å½æ¨¡æ¿") |
| | | private Integer templateId; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "åå
¸ç±»å") |
| | | private String dic; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»") |
| | | private String inspectionItemClass; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹åç±»EN") |
| | | private String inspectionItemClassEn; |
| | | |
| | | @ApiModelProperty(value = "æ¡ä»¶") |
| | | private String radiusList; |
| | | |
| | | @ApiModelProperty(value = "æ¶è´¹æ å(å
/次)") |
| | | private String rates; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£æµå¯¹è±¡(StructureTestObject)表对象 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 17:36:41 |
| | | */ |
| | | @TableName(value ="structure_test_object") |
| | | @Data |
| | | public class StructureTestObject implements Serializable { |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "åºæ") |
| | | private Integer laboratoryId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¯¹è±¡") |
| | | private String specimenName; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¯¹è±¡EN") |
| | | private String specimenNameEn; |
| | | |
| | | @ApiModelProperty(value = "对象代å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "æåº") |
| | | private Integer sort; |
| | | |
| | | //"对象类å, 1:åææ, 2:æå, 3:è¾
æ" |
| | | @ApiModelProperty(value = "对象类å") |
| | | private String objectType; |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªå¯¹è±¡é¶ä»¶è¡¨(StructureTestObjectPart)$desc |
| | | * |
| | | * @author makejava |
| | | * @since 2024-08-07 10:10:30 |
| | | */ |
| | | @TableName(value ="structure_test_object_part") |
| | | @Data |
| | | public class StructureTestObjectPart implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡id") |
| | | private Integer testObjectId; |
| | | |
| | | @ApiModelProperty("é¶ä»¶å·") |
| | | private String partNo; |
| | | |
| | | @ApiModelProperty("é¢è²") |
| | | private String color; |
| | | |
| | | @ApiModelProperty("è²æ ") |
| | | private String colorCode; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.PageTestObjectDto; |
| | | import com.ruoyi.basic.dto.TestItemDto; |
| | | |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)表æå¡æ¥å£ |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 16:21:17 |
| | | */ |
| | | public interface CapacityScopeService extends IService<StructureItemParameter> { |
| | | |
| | | IPage<StructureItemParameter> selectItemParameterList(Page page, StructureItemParameter itemParameter); |
| | | |
| | | int addItemParameter(StructureItemParameter itemParameter); |
| | | |
| | | int delItemParameter(Integer id); |
| | | |
| | | int upItemParameter(StructureItemParameter itemParameter); |
| | | |
| | | IPage<PageTestObjectDto> selectTestObjectList(Page page, PageTestObjectDto pageTestObjectDto); |
| | | |
| | | int addTestObject(StructureTestObject testObject); |
| | | |
| | | int delTestObject(Integer id); |
| | | |
| | | int upTestObject(StructureTestObject testObject); |
| | | |
| | | List<StructureTestObject> selectTestObjectByName(); |
| | | |
| | | //设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ) |
| | | List<Map<String, Object>> getInsProduction(); |
| | | |
| | | List<TestItemDto> getItemTree(); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.Certification; |
| | | |
| | | public interface CertificationService extends IService<Certification> { |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | IPage<Certification> getCertificationDetail(Page page, Certification certification); |
| | | |
| | | //æ·»å èµè´¨æç»å表 |
| | | int addCertificationDetail(Certification certification); |
| | | |
| | | //å é¤èµè´¨æç»å表 |
| | | int delCertificationDetail(String ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.Laboratory; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å®éªå®¤ç®¡ç(Laboratory)表æå¡æ¥å£ |
| | | */ |
| | | public interface LaboratoryService extends IService<Laboratory> { |
| | | |
| | | IPage<Laboratory> selectItemParameter(Page page, Laboratory itemParameter); |
| | | |
| | | int addParameter(Laboratory itemParameter); |
| | | |
| | | int delParameter(Integer id); |
| | | |
| | | int upParameter(Laboratory itemParameter); |
| | | |
| | | List<Laboratory> obtainItemParameterList(); |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | |
| | | public interface ProductPartService extends IService<ProductPart> { |
| | | |
| | | IPage<ProductPart> selectByProductId(IPage<ProductPart> page,ProductPart productPart); |
| | | |
| | | void addProductPart(ProductPart productPart); |
| | | |
| | | void updateProductPartById(ProductPart productPart); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.ProductDTO1; |
| | | import com.ruoyi.basic.excel.StructureTestObjectData; |
| | | import com.ruoyi.basic.pojo.Product; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãproduct(产å表)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-04-26 01:11:02 |
| | | */ |
| | | public interface ProductService extends IService<Product> { |
| | | |
| | | IPage<Product> selectProductListByObjectId(Page page, ProductDTO1 productDto); |
| | | |
| | | int addProduct(Product product); |
| | | |
| | | int upProduct(Product product); |
| | | |
| | | int delProduct(Integer id); |
| | | |
| | | void importPartExcel(List<StructureTestObjectData> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.ProductSupplierDensity; |
| | | |
| | | /** |
| | | * 产ååå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-19 |
| | | */ |
| | | public interface ProductSupplierDensityService extends IService<ProductSupplierDensity> { |
| | | |
| | | IPage<ProductSupplierDensity> selectByProductId(Page page, ProductSupplierDensity supplierDensity); |
| | | |
| | | void addProductSupplierDensity(ProductSupplierDensity supplierDensity); |
| | | |
| | | void updateProductSupplierDensity(ProductSupplierDensity supplierDensity); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method_list(æ åæ ä¸çæ åå表)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-04 13:44:04 |
| | | */ |
| | | public interface StandardMethodListService extends IService<StandardMethodList> { |
| | | |
| | | int addStandardMethodList(Integer standardId, String tree); |
| | | |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM(String tree); |
| | | |
| | | Map<String, List<?>> selectsStandardMethodByFLSSM2(String tree); |
| | | |
| | | int delStandardMethodByFLSSM(Integer id); |
| | | |
| | | List<StandardMethodList> selectStandardMethodEnum(); |
| | | |
| | | Integer getStandardMethodId(String code); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.StandardMethod; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method(æ åæ¹æ³)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-03 19:21:41 |
| | | */ |
| | | public interface StandardMethodService extends IService<StandardMethod> { |
| | | |
| | | IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod); |
| | | |
| | | List<StandardMethod> selectStandardMethods(); |
| | | |
| | | int addStandardMethod(StandardMethod standardMethod); |
| | | |
| | | int delStandardMethod(Integer id); |
| | | |
| | | int upStandardMethod(StandardMethod standardMethod); |
| | | |
| | | void inputExcel(MultipartFile file) throws IOException; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | 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; |
| | | import com.ruoyi.basic.dto.InsSampleReceiveDto; |
| | | import com.ruoyi.basic.dto.ResetTreeDragDTO; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | public interface StandardProductListService extends IService<StandardProductList> { |
| | | |
| | | int upStandardProductList(StandardProductList list); |
| | | |
| | | int delStandardProduct(JSONArray list); |
| | | |
| | | List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample); |
| | | |
| | | Map<String, Object> selectStandardProductListByMethodId(Integer id, String tree, Integer page); |
| | | |
| | | IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items); |
| | | |
| | | Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree, String item); |
| | | |
| | | boolean updateSection(StandardProductList list); |
| | | |
| | | /** |
| | | * æ ååºææ½ |
| | | * @param resetTreeDragDTO |
| | | */ |
| | | void resetTreeDrag(ResetTreeDragDTO resetTreeDragDTO); |
| | | |
| | | /** |
| | | * æ ååºææ½ |
| | | * @param standardProductLists |
| | | */ |
| | | void resetTreeDragBatch(List<StandardProductList> standardProductLists); |
| | | |
| | | /** |
| | | * æ£éªé¡¹è¦æ±å¼å¯¹æ¯ |
| | | * @param copyStandardProductListDto |
| | | * @return |
| | | */ |
| | | List<StandardProductList> copyStandardProductList(CopyStandardProductListDto copyStandardProductListDto); |
| | | |
| | | /** |
| | | * æ£éªé¡¹è¦æ±å¼å¯¹æ¯ä¸ä¸ª |
| | | * @param copyStandardProductListDto |
| | | * @return |
| | | */ |
| | | List<StandardProductList> copyStandardProductOne(CopyStandardProductListDto copyStandardProductListDto); |
| | | |
| | | /** |
| | | * æ£éªé¡¹å¤å¶æåº |
| | | * @param copyStandardProductListDto |
| | | * @return |
| | | */ |
| | | boolean copyStandardProductSort(CopyStandardProductListDto copyStandardProductListDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | public interface StandardProductListService2 extends IService<StandardProductList> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author makejava |
| | | * @since 2024-09-23 |
| | | */ |
| | | public interface StandardProductListSupplierAskService extends IService<StandardProductListSupplierAsk> { |
| | | |
| | | List<StandardProductListSupplierAsk> selectByProductId(StandardProductListSupplierAsk supplierAsk); |
| | | |
| | | Integer addProductSupplierAsk(StandardProductListSupplierAsk supplierAsk); |
| | | |
| | | Integer updateProductSupplierAsk(StandardProductListSupplierAsk supplierAsk); |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.StandardTemplate; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_template(æ 忍¡æ¿)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-11 13:47:52 |
| | | */ |
| | | public interface StandardTemplateService extends IService<StandardTemplate> { |
| | | |
| | | IPage<StandardTemplate> selectStandardTemplatePageList(Page page, StandardTemplate standardTemplate); |
| | | |
| | | int addStandardTemplate(StandardTemplate standardTemplate); |
| | | |
| | | int upStandardTemplate(StandardTemplate standardTemplate); |
| | | |
| | | int delStandardTemplate(Integer id); |
| | | |
| | | List<StandardTemplate> getStandardTemplate(); |
| | | |
| | | String getStandTempThingById(Integer templateId); |
| | | |
| | | String getStandTempNameById(Integer templateId); |
| | | |
| | | StandardTemplate getStandTempIdByName(String name); |
| | | |
| | | int copyStandardTemplate(StandardTemplate newTemplate); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.SampleTypeDto; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_tree(æ åæ )ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-01 15:06:44 |
| | | */ |
| | | public interface StandardTreeService extends IService<StandardTree> { |
| | | |
| | | List<FactoryDto> selectStandardTreeList(); |
| | | |
| | | |
| | | int addStandardTree(StandardTree standardTree); |
| | | |
| | | 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); |
| | | |
| | | int updateStandardTree(StandardTree standardTree); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | |
| | | public interface StructureItemParameterService extends IService<StructureItemParameter> { |
| | | void removeNoSample(String sample); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.pojo.StructureTestObjectPart; |
| | | |
| | | /** |
| | | * æ£éªå¯¹è±¡é¶ä»¶è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-07 |
| | | */ |
| | | public interface StructureTestObjectPartService extends IService<StructureTestObjectPart> { |
| | | |
| | | IPage<StructureTestObjectPart> selectByTestObjectId(Page page, StructureTestObjectPart structureTestObjectPart); |
| | | |
| | | void addTestObjectPart(StructureTestObjectPart structureTestObjectPart); |
| | | |
| | | void updateTestObjectPart(StructureTestObjectPart structureTestObjectPart); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | |
| | | /** |
| | | * æ£æµå¯¹è±¡(StructureTestObject)$desc |
| | | * |
| | | * @author makejava |
| | | * @since 2024-09-13 09:45:55 |
| | | */ |
| | | public interface StructureTestObjectService extends IService<StructureTestObject> { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | 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.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.dto.PageTestObjectDto; |
| | | import com.ruoyi.basic.dto.TestItemDto; |
| | | import com.ruoyi.basic.mapper.*; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.service.CapacityScopeService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åæ°(StructureItemParameter)表æå¡å®ç°ç±» |
| | | * |
| | | * @author makejava |
| | | * @since 2024-02-26 16:21:17 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class CapacityScopeServiceImpl extends ServiceImpl<StructureItemParameterMapper, StructureItemParameter> implements CapacityScopeService { |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | private ProductMapper productMapper; |
| | | |
| | | private StructureTestObjectPartMapper structureTestObjectPartMapper; |
| | | |
| | | private ProductPartMapper productPartMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | @Override |
| | | public IPage<StructureItemParameter> selectItemParameterList(Page page, StructureItemParameter itemParameter) { |
| | | return structureItemParameterMapper.selectItemParameterList(page, QueryWrappers.queryWrappers(itemParameter)); |
| | | } |
| | | |
| | | @Override |
| | | public int addItemParameter(StructureItemParameter itemParameter) { |
| | | if (itemParameter.getBsm().equals("")||itemParameter.getBsm()==null){ |
| | | itemParameter.setBsm("0"); |
| | | } |
| | | int insert = structureItemParameterMapper.insert(itemParameter); |
| | | return insert; |
| | | } |
| | | |
| | | @Override |
| | | public int delItemParameter(Integer id) { |
| | | return structureItemParameterMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int upItemParameter(StructureItemParameter itemParameter) { |
| | | return structureItemParameterMapper.updateById(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PageTestObjectDto> selectTestObjectList(Page page, PageTestObjectDto pageTestObjectDto) { |
| | | String partNo = pageTestObjectDto.getPartNo(); |
| | | pageTestObjectDto.setPartNo(null); |
| | | return structureTestObjectMapper.selectTestObjectList(page, QueryWrappers.queryWrappers(pageTestObjectDto),partNo); |
| | | } |
| | | |
| | | @Override |
| | | public int addTestObject(StructureTestObject testObject) { |
| | | Long count = structureTestObjectMapper.selectCount(Wrappers.<StructureTestObject>lambdaQuery().eq(StructureTestObject::getSpecimenName, testObject.getSpecimenName())); |
| | | if(count.compareTo(0L) > 0){ |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸è½éå¤"); |
| | | } |
| | | |
| | | return structureTestObjectMapper.insert(testObject); |
| | | } |
| | | |
| | | @Override |
| | | public int delTestObject(Integer id) { |
| | | // äº§åºæ£éªå¯¹è±¡äº§åç»´æ¤ |
| | | structureTestObjectPartMapper.delete(Wrappers.<StructureTestObjectPart>lambdaQuery() |
| | | .eq(StructureTestObjectPart::getTestObjectId, id)); |
| | | |
| | | // å é¤äº§åç»´æ¤çé¶ä»¶ç»å® |
| | | 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)); |
| | | |
| | | // å é¤äº§åç»´æ¤ |
| | | productMapper.delete(Wrappers.<Product>lambdaQuery() |
| | | .in(Product::getId, productIds)); |
| | | |
| | | return structureTestObjectMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int upTestObject(StructureTestObject testObject) { |
| | | // æ¥è¯¢æ§çæ£éªå¯¹è±¡ |
| | | StructureTestObject oldTestObject = structureTestObjectMapper.selectById(testObject.getId()); |
| | | |
| | | if (!oldTestObject.getSpecimenName().equals(testObject.getSpecimenName())) { |
| | | // æ¥è¯¢ææå¯¹è±¡ä¸æ ·çæ£éªé¡¹ç® |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getSampleType, oldTestObject.getSpecimenName())); |
| | | if (CollectionUtils.isNotEmpty(standardProductLists)){ |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | // ä¿®æ¹ææç对象åç§°åæ°åç»æ |
| | | standardProductList.setSampleType(testObject.getSpecimenName()); |
| | | // éè¦æªå第ä¸çº§, é¿å
ä¸å级åç§°ä¸æ ·ä¿®æ¹é误 |
| | | String[] trees = standardProductList.getTree().split(" - "); |
| | | trees[2] = testObject.getSpecimenName(); |
| | | List<String> list = CollUtil.newArrayList(trees); |
| | | String newName = CollUtil.join(list, " - "); |
| | | standardProductList.setTree(newName); |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | } |
| | | // ä¿®æ¹æ£éªé¡¹ç®åæ°çæ£éªå¯¹è±¡ |
| | | // æ¼æ¥ ["object", æ¥è¯¢æ£éªé¡¹ç®åæ°ä¿®æ¹ç»å®çæ£éªå¯¹è±¡ |
| | | String format = "[\"{}\","; |
| | | String sampleOld = StrUtil.format(format, oldTestObject.getSpecimenName()); |
| | | List<StructureItemParameter> itemParameterList = structureItemParameterService.list(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | .like(StructureItemParameter::getSample, sampleOld)); |
| | | if (CollectionUtils.isNotEmpty(itemParameterList)) { |
| | | for (StructureItemParameter structureItemParameter : itemParameterList) { |
| | | // ä¿®æ¹ç»å®çæ ·ååç§° |
| | | String sampleNew = StrUtil.format(format, testObject.getSpecimenName()); |
| | | String sampleUp = structureItemParameter.getSample().replace(sampleOld, sampleNew); |
| | | structureItemParameter.setSample(sampleUp); |
| | | } |
| | | structureItemParameterService.updateBatchById(itemParameterList); |
| | | } |
| | | |
| | | // ä¿®æ¹æ çåå· |
| | | standardTreeMapper.update(null, Wrappers.<StandardTree>lambdaUpdate() |
| | | .eq(StandardTree::getSampleType, oldTestObject.getSpecimenName()) |
| | | .set(StandardTree::getSampleType, testObject.getSpecimenName())); |
| | | } |
| | | |
| | | Long count = structureTestObjectMapper.selectCount(Wrappers.<StructureTestObject>lambdaQuery() |
| | | .eq(StructureTestObject::getSpecimenName, testObject.getSpecimenName()) |
| | | .ne(StructureTestObject::getId, testObject.getId())); |
| | | if(count.compareTo(0L) > 0){ |
| | | throw new BaseException("æ£éªå¯¹è±¡ä¸è½éå¤"); |
| | | } |
| | | |
| | | return structureTestObjectMapper.updateById(testObject); |
| | | } |
| | | |
| | | @Override |
| | | public List<StructureTestObject> selectTestObjectByName() { |
| | | return structureTestObjectMapper.selectList(Wrappers.<StructureTestObject>lambdaQuery().select(StructureTestObject::getSpecimenName,StructureTestObject::getId)); |
| | | } |
| | | |
| | | //设å¤éé¢éæ©æ£éªé¡¹ç®(æ å½¢ç»æ) |
| | | @Override |
| | | public List<Map<String, Object>> getInsProduction() { |
| | | return structureItemParameterMapper.getInsProduction(); |
| | | } |
| | | |
| | | @Override |
| | | public List<TestItemDto> getItemTree() { |
| | | return structureItemParameterMapper.getItemTree(); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | 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.basic.mapper.CertificationMapper; |
| | | import com.ruoyi.basic.pojo.Certification; |
| | | import com.ruoyi.basic.service.CertificationService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CertificationServiceImpl extends ServiceImpl<CertificationMapper, Certification> implements CertificationService { |
| | | |
| | | |
| | | private CertificationMapper certificationMapper; |
| | | |
| | | |
| | | //æ¥è¯¢èµè´¨æç»å表 |
| | | @Override |
| | | public IPage<Certification> getCertificationDetail(Page page, Certification certification) { |
| | | return certificationMapper.getCertificationDetail(page, QueryWrappers.queryWrappers(certification)); |
| | | } |
| | | |
| | | //æ·»å èµè´¨æç»å表 |
| | | @Override |
| | | public int addCertificationDetail(Certification certification) { |
| | | return certificationMapper.insert(certification); |
| | | } |
| | | |
| | | //å é¤èµè´¨æç»å表 |
| | | @Override |
| | | public int delCertificationDetail(String ids) { |
| | | List<Integer> list = JSON.parseArray(ids,Integer.class); |
| | | return certificationMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.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.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å®éªå®¤ç®¡ç(Laboratory)表æå¡å®ç°ç±» |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class LaboratoryServiceImpl extends ServiceImpl<LaboratoryMapper, Laboratory> implements LaboratoryService { |
| | | |
| | | |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | @Override |
| | | public IPage<Laboratory> selectItemParameter(Page page, Laboratory itemParameter) { |
| | | return laboratoryMapper.selectItemParameter(page, QueryWrappers.queryWrappers(itemParameter)); |
| | | } |
| | | |
| | | @Override |
| | | public int addParameter(Laboratory itemParameter) { |
| | | return laboratoryMapper.insert(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public int delParameter(Integer id) { |
| | | return laboratoryMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int upParameter(Laboratory itemParameter) { |
| | | return laboratoryMapper.updateById(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public List<Laboratory> obtainItemParameterList() { |
| | | return laboratoryMapper.selectList(Wrappers.<Laboratory>lambdaQuery().select(Laboratory::getLaboratoryName, Laboratory::getId)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.ProductPartMapper; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectPartMapper; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | import com.ruoyi.basic.pojo.StructureTestObjectPart; |
| | | import com.ruoyi.basic.service.ProductPartService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Transactional |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProductPartServiceImpl extends ServiceImpl<ProductPartMapper, ProductPart> implements ProductPartService { |
| | | |
| | | private ProductPartMapper productPartMapper; |
| | | private StructureTestObjectPartMapper structureTestObjectPartMapper; |
| | | |
| | | |
| | | @Override |
| | | public IPage<ProductPart> selectByProductId(IPage<ProductPart> page,ProductPart productPart) { |
| | | return productPartMapper.selectListByProductId(page, QueryWrappers.queryWrappers(productPart),productPart.getProductId()); |
| | | } |
| | | |
| | | @Override |
| | | public void addProductPart(ProductPart productPart) { |
| | | if (productPart.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | this.isPartNoExist(productPart.getPartNo(), productPart.getProductId(), null); |
| | | productPartMapper.insert(productPart); |
| | | } |
| | | |
| | | @Override |
| | | public void updateProductPartById(ProductPart productPart) { |
| | | this.isPartNoExist(productPart.getPartNo(), productPart.getProductId(), productPart.getId()); |
| | | if (productPart.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | productPartMapper.updateById(productPart); |
| | | } |
| | | |
| | | // 夿é¶ä»¶å·æ¯å¦åå¨ |
| | | public void isPartNoExist(String partNo,Integer productId, Integer id) { |
| | | // é¶ä»¶å·å¯ä¸ ä½ä¸å¿
å¡« |
| | | if (StringUtils.isNotBlank(partNo)) { |
| | | Long count = productPartMapper.selectCount(new LambdaQueryWrapper<ProductPart>() |
| | | // .eq(ProductPart::getProductId, productId) |
| | | .eq(ProductPart::getPartNo, partNo) |
| | | .ne(id != null, ProductPart::getId, id)); |
| | | Long selectCount = structureTestObjectPartMapper.selectCount(Wrappers.<StructureTestObjectPart>lambdaQuery() |
| | | .eq(StructureTestObjectPart::getPartNo, partNo)); |
| | | if (count > 0 || selectCount > 0) { |
| | | throw new BaseException("该é¶ä»¶å·å·²ç»å®è¿æ£éªå¯¹è±¡"); |
| | | } |
| | | } else { |
| | | throw new BaseException("请è¾å
¥é¶ä»¶å·"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.dto.ProductDTO1; |
| | | import com.ruoyi.basic.excel.StructureTestObjectData; |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.ProductPartMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectMapper; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.basic.service.LaboratoryService; |
| | | import com.ruoyi.basic.service.ProductService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author z1292 |
| | | * @description é对表ãproduct(产å表)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-04-26 01:11:02 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> |
| | | implements ProductService{ |
| | | |
| | | private ProductMapper productMapper; |
| | | |
| | | private LaboratoryService laboratoryService; |
| | | |
| | | private StructureTestObjectMapper structureTestObjectMapper; |
| | | |
| | | private ProductPartMapper productPartMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StructureItemParameterService structureItemParameterService; |
| | | |
| | | @Override |
| | | public IPage<Product> selectProductListByObjectId(Page page, ProductDTO1 product) { |
| | | String partNo = product.getPartNo(); |
| | | product.setPartNo(null); |
| | | return productMapper.selectProductListByObjectId(page, QueryWrappers.queryWrappers(product), partNo); |
| | | } |
| | | |
| | | @Override |
| | | public int addProduct(Product product) { |
| | | |
| | | return productMapper.insert(product); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upProduct(Product product) { |
| | | // æ¥è¯¢åæ¬çåç§° |
| | | Product oldProduct = productMapper.selectById(product.getId()); |
| | | |
| | | if (!oldProduct.getName().equals(product.getName())) { |
| | | // ä¿®æ¹åç§°å¹é
çæ åæ ä¸çæ£éªé¡¹ç® |
| | | // æ¥è¯¢ææå¯¹è±¡+åç§°çæ |
| | | StructureTestObject testObject = structureTestObjectMapper.selectById(oldProduct.getObjectId()); |
| | | |
| | | List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getSample, oldProduct.getName()) |
| | | .eq(StandardProductList::getSampleType, testObject.getSpecimenName())); |
| | | if (CollectionUtils.isNotEmpty(standardProductLists)) { |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | // ä¿®æ¹æ ·ååç§° |
| | | standardProductList.setSample(product.getName()); |
| | | // ä¿®æ¹æ åç§° |
| | | // éè¦æªå第å级, é¿å
ä¸å级åç§°ä¸æ ·ä¿®æ¹é误 |
| | | String[] trees = standardProductList.getTree().split(" - "); |
| | | trees[3] = product.getName(); |
| | | List<String> list = CollUtil.newArrayList(trees); |
| | | String newName = CollUtil.join(list, " - "); |
| | | standardProductList.setTree(newName); |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | // ä¿®æ¹æ£éªé¡¹ç®åæ°çæ£éªå¯¹è±¡ |
| | | // æ¼æ¥["object","product"]æ¥è¯¢æ£éªé¡¹ç®åæ°ä¿®æ¹ç»å®çæ£éªå¯¹è±¡ |
| | | String format = "[\"{}\",\"{}\"]"; |
| | | String sampleOld = StrUtil.format(format, testObject.getSpecimenName(), oldProduct.getName()); |
| | | List<StructureItemParameter> itemParameterList = structureItemParameterService.list(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | .like(StructureItemParameter::getSample, sampleOld)); |
| | | if (CollectionUtils.isNotEmpty(itemParameterList)) { |
| | | for (StructureItemParameter structureItemParameter : itemParameterList) { |
| | | // ä¿®æ¹ç»å®çæ ·ååç§° |
| | | String sampleNew = StrUtil.format(format, testObject.getSpecimenName(), product.getName()); |
| | | String sampleUp = structureItemParameter.getSample().replace(sampleOld, sampleNew); |
| | | structureItemParameter.setSample(sampleUp); |
| | | } |
| | | structureItemParameterService.updateBatchById(itemParameterList); |
| | | } |
| | | |
| | | // ä¿®æ¹æ çåå· |
| | | standardTreeMapper.update(null, Wrappers.<StandardTree>lambdaUpdate() |
| | | .eq(StandardTree::getSampleType, testObject.getSpecimenName()) |
| | | .eq(StandardTree::getSample, oldProduct.getName()) |
| | | .set(StandardTree::getSample, product.getName())); |
| | | } |
| | | |
| | | return productMapper.updateById(product); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delProduct(Integer id) { |
| | | // å é¤é¶ä»¶ç»å® |
| | | productPartMapper.delete(Wrappers.<ProductPart>lambdaQuery() |
| | | .eq(ProductPart::getProductId, id)); |
| | | |
| | | return productMapper.deleteById(id); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void importPartExcel(List<StructureTestObjectData> list) { |
| | | list.forEach(i -> { |
| | | // æ£éªå¯¹è±¡ |
| | | StructureTestObject structureTestObject1 = structureTestObjectMapper.selectOne(Wrappers.<StructureTestObject>lambdaQuery() |
| | | .eq(StructureTestObject::getSpecimenName, i.getSpecimenName()) |
| | | .eq(StructureTestObject::getSpecimenNameEn, i.getSpecimenNameEn())); |
| | | Laboratory laboratory = laboratoryService.getOne(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryName, i.getLaboratory())); |
| | | if (ObjectUtils.isEmpty(laboratory)) { |
| | | throw new BaseException("æªæ¾å°è¯¥åºæï¼" + i.getLaboratory() + "ï¼è¯·æ£æ¥æ¯å¦åå¨è¯¥åºæï¼"); |
| | | } |
| | | // å¦æä¸ºç©ºè¿è¡æ°å¢ |
| | | if(ObjectUtils.isEmpty(structureTestObject1)) { |
| | | StructureTestObject structureTestObject = new StructureTestObject(); |
| | | structureTestObject.setLaboratoryId(laboratory.getId()); |
| | | structureTestObject.setSpecimenName(i.getSpecimenName()); |
| | | structureTestObject.setSpecimenNameEn(i.getSpecimenNameEn()); |
| | | structureTestObject.setCode(i.getCode()); |
| | | structureTestObjectMapper.insert(structureTestObject); |
| | | |
| | | // 产å |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery() |
| | | .eq(Product::getName, i.getName()) |
| | | .eq(Product::getNameEn, i.getNameEn())); |
| | | if (ObjectUtils.isEmpty(product)){ |
| | | Product product1 = new Product(); |
| | | product1.setName(i.getName()); |
| | | product1.setNameEn(i.getNameEn()); |
| | | product1.setObjectId(structureTestObject.getId()); |
| | | baseMapper.insert(product1); |
| | | } |
| | | } else { |
| | | structureTestObject1.setCode(i.getCode()); |
| | | structureTestObject1.setLaboratoryId(laboratory.getId()); |
| | | structureTestObjectMapper.updateById(structureTestObject1); |
| | | // 产å |
| | | Product product = productMapper.selectOne(Wrappers.<Product>lambdaQuery() |
| | | .eq(Product::getName, i.getName()) |
| | | .eq(Product::getNameEn, i.getNameEn())); |
| | | if (ObjectUtils.isEmpty(product)){ |
| | | Product product1 = new Product(); |
| | | product1.setName(i.getName()); |
| | | product1.setNameEn(i.getNameEn()); |
| | | product1.setObjectId(structureTestObject1.getId()); |
| | | baseMapper.insert(product1); |
| | | } else { |
| | | product.setName(i.getName()); |
| | | product.setNameEn(i.getNameEn()); |
| | | product.setObjectId(structureTestObject1.getId()); |
| | | baseMapper.updateById(product); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.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.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.ProductSupplierDensityMapper; |
| | | import com.ruoyi.basic.pojo.ProductSupplierDensity; |
| | | import com.ruoyi.basic.service.ProductSupplierDensityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 产ååå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-19 |
| | | */ |
| | | @Service |
| | | public class ProductSupplierDensityServiceImpl extends ServiceImpl<ProductSupplierDensityMapper, ProductSupplierDensity> implements ProductSupplierDensityService { |
| | | |
| | | @Override |
| | | public IPage<ProductSupplierDensity> selectByProductId(Page page, ProductSupplierDensity supplierDensity) { |
| | | if (supplierDensity.getProductId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | return baseMapper.selectListByProductId(page, QueryWrappers.queryWrappers(supplierDensity), supplierDensity.getProductId()); |
| | | } |
| | | |
| | | @Override |
| | | public void addProductSupplierDensity(ProductSupplierDensity supplierDensity) { |
| | | 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); |
| | | } |
| | | |
| | | @Override |
| | | public void updateProductSupplierDensity(ProductSupplierDensity 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); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StandardMethodListMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.pojo.StandardMethodList; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.service.StandardMethodListService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method_list(æ åæ ä¸çæ åå表)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-04 13:44:04 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardMethodListServiceImpl extends ServiceImpl<StandardMethodListMapper, StandardMethodList> |
| | | implements StandardMethodListService{ |
| | | |
| | | private StandardMethodListMapper standardMethodListMapper; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Override |
| | | public int addStandardMethodList(Integer standardId, String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | Map<String, String> map = standardMethodListMapper.selectStandardMethodById(standardId); |
| | | StandardMethodList list = new StandardMethodList(); |
| | | list.setCode(map.get("code")); |
| | | list.setName(map.get("name")); |
| | | list.setRemark(map.get("remark")); |
| | | list.setFactory(trees[0]); |
| | | try { |
| | | list.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | list.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardMethodListMapper.insert(list); |
| | | List<StandardProductList> standardProductLists = standardMethodListMapper.selectParameterList(list.getCode()); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | standardProductList.setStandardMethodListId(list.getId()); |
| | | standardProductList.setFactory(trees[0]); |
| | | try { |
| | | standardProductList.setLaboratory(trees[1]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | }catch (Exception e){} |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | }catch (Exception e){} |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | String str = ""; |
| | | List<StandardMethodList> standardMethodLists = new ArrayList<>(); |
| | | switch (trees.length){ |
| | | case 5: |
| | | str += "\"" + trees[2] + "\",\"" + trees[3] + "\",\"" + trees[4] + "\""; |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists(str)); |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists("\"" + trees[2] + "\",\"" + trees[3] + "\"")); |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists("\"" + trees[2] + "\"")); |
| | | break; |
| | | case 4: |
| | | str += "\"" + trees[2] + "\",\"" + trees[3] + "\""; |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists(str)); |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists("\"" + trees[2] + "\"")); |
| | | break; |
| | | case 3: |
| | | str += "\"" + trees[2] + "\""; |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodLists3(str)); |
| | | break; |
| | | default: |
| | | map.put("standardMethodList", null); |
| | | return map; |
| | | } |
| | | standardMethodLists.addAll(standardMethodListMapper.selectStandardMethodListsByNull(str)); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectsStandardMethodByFLSSM2(String tree) { |
| | | String[] trees = tree.split(" - "); |
| | | List<StandardMethodList> standardMethodLists = null; |
| | | switch (trees.length){ |
| | | case 5: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],trees[3],trees[4]); |
| | | break; |
| | | case 4: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],trees[3],null); |
| | | break; |
| | | case 3: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],trees[2],null,null); |
| | | break; |
| | | case 2: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],trees[1],null,null,null); |
| | | break; |
| | | case 1: |
| | | standardMethodLists = standardMethodListMapper.selectStandardMethodLists2(trees[0],null,null,null,null); |
| | | break; |
| | | } |
| | | Map<String, List<?>> map = new HashMap<>(); |
| | | map.put("standardMethodList", standardMethodLists); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardMethodByFLSSM(Integer id) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id)); |
| | | return standardMethodListMapper.deleteById(id); |
| | | } |
| | | @Override |
| | | public List<StandardMethodList> selectStandardMethodEnum() { |
| | | return standardMethodListMapper.selectListEnum(); |
| | | } |
| | | |
| | | @Override |
| | | public Integer getStandardMethodId(String code) { |
| | | return baseMapper.getStandardMethodId(code); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.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.pojo.StandardMethod; |
| | | 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 org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_method(æ åæ¹æ³)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @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; |
| | | |
| | | StructureItemParameterMapper structureItemParameterMapper; |
| | | StructureItemParameterService structureItemParameterService; |
| | | |
| | | @Override |
| | | public IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod) { |
| | | return standardMethodMapper.selectStandardMethodList(page, QueryWrappers.queryWrappers(standardMethod)); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardMethod> selectStandardMethods() { |
| | | return standardMethodMapper.selectList(Wrappers.<StandardMethod>lambdaQuery().select(StandardMethod::getId, StandardMethod::getCode, StandardMethod::getName).ne(StandardMethod::getId, 0)); |
| | | } |
| | | |
| | | @Override |
| | | public int addStandardMethod(StandardMethod standardMethod) { |
| | | int insert = standardMethodMapper.insert(standardMethod); |
| | | return insert; |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardMethod(Integer id) { |
| | | int i = standardMethodMapper.deleteById(id); |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public int upStandardMethod(StandardMethod standardMethod) { |
| | | StandardMethod oldStandardMethod = standardMethodMapper.selectById(standardMethod.getId()); |
| | | if (!oldStandardMethod.getCode().equals(standardMethod.getCode())) { |
| | | CompletableFuture.supplyAsync(() -> replaceMethod(oldStandardMethod.getCode(), standardMethod.getCode())); |
| | | } |
| | | int i = standardMethodMapper.updateById(standardMethod); |
| | | return i; |
| | | } |
| | | |
| | | //ç¼è¾methodåå
¨é¨æ¿æ¢ |
| | | public String replaceMethod(String oldCode, String code) { |
| | | //æ¥è¯¢StandardProductList䏿æMethod妿å
å«ä¹åçåæ¿æ¢ |
| | | List<StandardProductList> standardProductLists = standardProductListMapper.selectList(null); |
| | | for (StandardProductList standardProductList : standardProductLists) { |
| | | if (standardProductList.getMethod().contains(oldCode)) { |
| | | String[] split = standardProductList.getMethod().split(","); |
| | | String a = null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | String methodName = split[i].substring(1, split[i].length() - 1); |
| | | if (i == 0) { |
| | | methodName = split[i].substring(2, split[i].length() - 1); |
| | | } else if (i == split.length - 1) { |
| | | methodName = split[i].substring(1, split[i].length() - 2); |
| | | } |
| | | if (methodName.equals(oldCode)) { |
| | | methodName = code; |
| | | } |
| | | a += "\"" + methodName + "\","; |
| | | } |
| | | String method = "[\"" + a.substring(0, a.length() - 1) + "\"]"; |
| | | standardProductList.setMethod(method); |
| | | } |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | //æ¥è¯¢StructureItemParameter䏿æMethod妿å
å«ä¹åçåæ¿æ¢ |
| | | List<StructureItemParameter> structureItemParameters = structureItemParameterMapper.selectList(null); |
| | | for (StructureItemParameter structureItemParameter : structureItemParameters) { |
| | | if (structureItemParameter.getMethod().contains(oldCode)) { |
| | | String[] split = structureItemParameter.getMethod().split(","); |
| | | String a = null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | String methodName = split[i].substring(1, split[i].length() - 1); |
| | | if (i == 0) { |
| | | methodName = split[i].substring(2, split[i].length() - 1); |
| | | } else if (i == split.length - 1) { |
| | | methodName = split[i].substring(1, split[i].length() - 2); |
| | | } |
| | | if (methodName.equals(oldCode)) { |
| | | methodName = code; |
| | | } |
| | | a += "\"" + methodName + "\","; |
| | | } |
| | | String method = "[\"" + a.substring(0, a.length() - 1) + "\"]"; |
| | | structureItemParameter.setMethod(method); |
| | | } |
| | | } |
| | | structureItemParameterService.updateBatchById(structureItemParameters); |
| | | 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) { |
| | | StandardMethod standardMethod = new StandardMethod(); |
| | | standardMethod.setField(list.get(1).toString()); |
| | | // é æ ¼å¼ |
| | | List<List<Object>> structureTestObjectId = new ArrayList<>(); |
| | | if (ObjectUtils.isEmpty(list.get(3))) { |
| | | structureTestObjectId.add(Arrays.asList(list.get(2))); |
| | | } else { |
| | | structureTestObjectId.add(Arrays.asList(list.get(2), list.get(3))); |
| | | } |
| | | standardMethod.setStructureTestObjectId(JSONUtil.toJsonStr(structureTestObjectId)); |
| | | standardMethod.setCode(list.get(4).toString()); |
| | | standardMethod.setName(list.get(5).toString()); |
| | | standardMethod.setNameEn(list.get(6).toString()); |
| | | if (!Objects.equals(list.get(7), null)) { |
| | | standardMethod.setRemark(list.get(7).toString()); |
| | | } |
| | | standardMethod.setQualificationId(list.get(8).toString()); |
| | | if (ObjectUtils.isNotEmpty(list.get(9))) { |
| | | if (list.get(9).equals("æ¯")) { |
| | | standardMethod.setIsProduct(1); |
| | | } else if (list.get(9).equals("å¦")) { |
| | | standardMethod.setIsProduct(0); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(list.get(10))) { |
| | | if (list.get(10).equals("æ¯")) { |
| | | standardMethod.setIsUse(1); |
| | | } else if (list.get(9).equals("å¦")) { |
| | | standardMethod.setIsUse(0); |
| | | } |
| | | } |
| | | 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)); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | if (!addList.isEmpty()) { |
| | | // æ°å¢ |
| | | baseMapper.insertBatchSomeColumn(addList); |
| | | } |
| | | |
| | | if (!deleteListId.isEmpty()) { |
| | | // å é¤ |
| | | baseMapper.deleteBatchIds(deleteListId); |
| | | } |
| | | |
| | | if (!updateList.isEmpty()) { |
| | | // æ´æ° |
| | | updateList.forEach(i -> { |
| | | baseMapper.updateById(i); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.service.StandardProductListService2; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class StandardProductListService2Impl extends ServiceImpl<StandardProductListMapper, StandardProductList> |
| | | implements StandardProductListService2 { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.*; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | 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.StandardProductListSupplierAskMapper; |
| | | 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 lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_product_list(æ åæ ä¸çæ£éªé¡¹ç®)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-05 10:33:29 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardProductListServiceImpl extends ServiceImpl<StandardProductListMapper, StandardProductList> |
| | | implements StandardProductListService { |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardProductListService2 standardProductListService2; |
| | | |
| | | private IfsInventoryQuantityMapper ifsInventoryQuantityMapper; |
| | | |
| | | private StandardProductListSupplierAskMapper standardProductListSupplierAskMapper; |
| | | |
| | | |
| | | @Override |
| | | public int upStandardProductList(StandardProductList list) { |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardProduct(JSONArray list) { |
| | | return standardProductListMapper.deleteBatchIds(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSampleReceiveDto insSample) { |
| | | // æ¯å¦æ²¡æäº§å |
| | | 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) { |
| | | if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) { |
| | | return null; |
| | | } |
| | | String[] split = insSample.getFactory().split(" - "); |
| | | split[3] = split[3].replace("- ", ""); |
| | | String tree = split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3] + " - null"; |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree, insSample.getIsCableTag()); |
| | | if (list.size() == 0) { |
| | | String tree1 = split[0] + " - " + split[1] + " - " + split[2] + " - null - " + split[3]; |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree1, insSample.getIsCableTag()); |
| | | |
| | | // åªæå¯¹è±¡çä¸å± |
| | | if (list.size() == 0) { |
| | | String tree2 = split[0] + " - " + split[1] + " - " + split[2] + " - null - null"; |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree2, insSample.getIsCableTag()); |
| | | // æ ·åç´æ¥èµå¼æ ·ååç±» |
| | | list.forEach(standardProductList -> standardProductList.setSample(standardProductList.getSampleType())); |
| | | isNoSample = true; |
| | | } |
| | | } |
| | | } |
| | | String[] split1 = insSample.getFactory().split(" - "); |
| | | if (!isNoSample) { |
| | | //夿é¿åº¦ |
| | | if (split1.length > 4) { |
| | | if (ObjectUtils.isNotEmpty(split1[3])) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSample()) && Objects.equals(list1.getSample(), split1[3])).collect(Collectors.toList()); |
| | | } else if (split1[3].equals("")) { |
| | | list = list.stream().filter(list1 -> Objects.nonNull(list1.getSampleType()) && Objects.equals(list1.getSampleType(), split1[2])).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | } |
| | | list = list.stream().filter(a -> { |
| | | try { |
| | | if (a.getSection() != null && !Objects.equals(a.getSection(), "")) { |
| | | 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); // å¯¼ä½æè´¨ |
| | | List<String> conductorTypes = JSON.parseArray(a.getConductorType(), String.class); // 导ä½ç±»å |
| | | List<String> asks = JSON.parseArray(a.getAsk(), String.class); |
| | | List<String> tells = JSON.parseArray(a.getTell(), String.class); |
| | | boolean isIf; |
| | | for (int i = 0; i < sections.size(); i++) { |
| | | if (Objects.equals(a.getBsm(), "1")) { |
| | | return true; |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | isIf = getIsIf(split[0], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample) |
| | | && getIsIf(split[1], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | } else { |
| | | isIf = getIsIf(sections.get(i), modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | } |
| | | if (isIf) { |
| | | a.setSection(sections.get(i)); |
| | | a.setAsk(asks.get(i)); |
| | | a.setTell(tells.get(i)); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } catch (Exception ignored) { |
| | | return false; |
| | | } |
| | | return true; |
| | | }).peek(standardProductList -> { |
| | | // todo: 夿æ¯å¦æ¯åæä¸å, éè¦åæé¢è²ç»å®å°è¯æ ·é¢è²çè¦æ±å¼ä¸ |
| | | if (StringUtils.isNotBlank(insSample.getPartNo())) { |
| | | // 夿æ¯å¦æè¿ä¸ªåæ®µä¸æ¯ææ¬ç±»å |
| | | if (StringUtils.isNotBlank(standardProductList.getInspectionItem()) |
| | | && standardProductList.getInspectionItem().contains("è¯æ ·é¢è²")) { |
| | | Map<String, String> partColor = baseMapper.selectPartColor(insSample.getPartNo()); |
| | | if (CollectionUtils.isNotEmpty(partColor)) { |
| | | if (StringUtils.isNotBlank(partColor.get("color"))) { |
| | | // 夿æ£éªå¼æ¯å¦ä¸ºç©ºåä¸çäº - å / |
| | | if (StringUtils.isBlank(standardProductList.getAsk()) || partColor.get("color").contains("æ¬")) { // 没æaskç´æ¥å¤å¶ |
| | | // æ¥è¯¢å¯¹è±¡ç»å®è¡¨å产åç»å®è¡¨ |
| | | standardProductList.setAsk("=" + partColor.get("color") |
| | | + (StringUtils.isBlank(partColor.get("color_code")) ? "" : "(" + partColor.get("color_code") + ")")); |
| | | standardProductList.setTell(partColor.get("color") |
| | | + (StringUtils.isBlank(partColor.get("color_code")) ? "" : "(" + partColor.get("color_code") + ")")); |
| | | standardProductList.setInspectionValueType("2"); |
| | | } else { // æ¼æ¥å°è¦æ±æè¿°åé¢ |
| | | standardProductList.setTell(partColor.get("color") |
| | | + (StringUtils.isBlank(partColor.get("color_code")) ? "" : "(" + partColor.get("color_code") + ")") + "@" + standardProductList.getTell()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // æ¥è¯¢åå®¶æ¯å¦æç¹æ®è¦æ±å¼ |
| | | if (insSample.getIfsInventoryId() != null) { |
| | | // æ¥è¯¢åææåå®¶åç§° |
| | | String supplierName = ifsInventoryQuantityMapper.selectById(insSample.getIfsInventoryId()) |
| | | .getSupplierName(); |
| | | List<Long> collect = list.stream().map(StandardProductList::getId).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(collect)) { |
| | | List<StandardProductListSupplierAsk> supplierAsks = standardProductListSupplierAskMapper.selectList(Wrappers.<StandardProductListSupplierAsk>lambdaQuery() |
| | | .in(StandardProductListSupplierAsk::getProductListId, collect) |
| | | .eq(StandardProductListSupplierAsk::getSupplierName, supplierName)); |
| | | |
| | | // å¤æææ²¡æç¹æ®å¼ç»å® |
| | | if (CollectionUtils.isNotEmpty(supplierAsks)) { |
| | | for (StandardProductList standardProductList : list) { |
| | | for (StandardProductListSupplierAsk supplierAsk : supplierAsks) { |
| | | if (standardProductList.getId().equals(supplierAsk.getProductListId())) { |
| | | // éæ°èµå¼è¦æ±å¼åè¦æ±æè¿° |
| | | standardProductList.setAsk(supplierAsk.getAsk()); |
| | | standardProductList.setTell(supplierAsk.getTell()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param str å¤å®å
¬å¼ |
| | | * @param model åå· |
| | | * @param standardCores è¯æ° |
| | | * @param conductorMaterial å¯¼ä½æè´¨ |
| | | * @param conductorType 导ä½ç±»å |
| | | * @param insSample |
| | | * @return |
| | | */ |
| | | private boolean getIsIf(String str, String model, String standardCores, String conductorMaterial, String conductorType,InsSampleReceiveDto insSample) { |
| | | Matcher matcher = Pattern.compile("\\d+(\\.\\d+)?").matcher(model); |
| | | String model2 = ""; |
| | | while (matcher.find()) { |
| | | model2 += matcher.group(); |
| | | break; |
| | | } |
| | | boolean flag = false; |
| | | if (str.contains("â¥") || str.contains(">=")) { |
| | | String param = str.replace("â¥", "").replace(">=", ""); |
| | | flag = new BigDecimal(model2).compareTo(new BigDecimal(param)) > -1; |
| | | } else if (str.contains("â¤") || str.contains("<=")) { |
| | | String param = str.replace("â¤", "").replace("<=", ""); |
| | | flag = new BigDecimal(model2).compareTo(new BigDecimal(param)) < 1; |
| | | } else if (str.contains(">") || str.contains("ï¼")) { |
| | | String param = str.replace(">", "").replace("ï¼", ""); |
| | | flag = new BigDecimal(model2).compareTo(new BigDecimal(param)) > 0; |
| | | } else if (str.contains("<") || str.contains("ï¼")) { |
| | | String param = str.replace("<", "").replace("ï¼", ""); |
| | | flag = new BigDecimal(model2).compareTo(new BigDecimal(param)) < 0; |
| | | } else if (str.contains("=")) { |
| | | String param = str.replace("=", ""); |
| | | flag = new BigDecimal(model2).compareTo(new BigDecimal(param)) == 0; |
| | | } |
| | | if (flag) { |
| | | boolean coresMatch = true; |
| | | boolean conductorMaterialMatch = true; |
| | | boolean conductorTypeMatch = true; |
| | | |
| | | // 夿æ¯å¦æçº¿è¯æ°é |
| | | if (StringUtils.isNotBlank(standardCores)) { |
| | | if (StringUtils.isBlank(insSample.getCores()) || !standardCores.equals(insSample.getCores())) { |
| | | coresMatch = false; |
| | | } |
| | | } |
| | | |
| | | // 夿æ¯å¦æå¯¼ä½æè´¨ |
| | | if (StringUtils.isNotBlank(conductorMaterial)) { |
| | | if (StringUtils.isBlank(insSample.getConductorMaterial()) || !conductorMaterial.equals(insSample.getConductorMaterial())) { |
| | | conductorMaterialMatch = false; |
| | | } |
| | | } |
| | | |
| | | // 夿æ¯å¦æå¯¼ä½ç±»å |
| | | if (StringUtils.isNotBlank(conductorType)) { |
| | | if (StringUtils.isBlank(insSample.getConductorType()) || !conductorType.equals(insSample.getConductorType())) { |
| | | conductorTypeMatch = false; |
| | | } |
| | | } |
| | | // æç»å¤æ |
| | | flag = coresMatch && conductorMaterialMatch && conductorTypeMatch; |
| | | } |
| | | |
| | | return flag; |
| | | } |
| | | |
| | | @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("æä½å¤ªå¿«,ç³»ç»ä¼ åé误!!!!"); |
| | | } |
| | | 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])); |
| | | } |
| | | 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() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getTree, tree)); |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree)); |
| | | } |
| | | |
| | | 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()); |
| | | } |
| | | } |
| | | } |
| | | 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; |
| | | } else { |
| | | int num1 = extractNumber(field1); |
| | | int num2 = extractNumber(field2); |
| | | return Integer.compare(num1, num2); |
| | | } |
| | | }); |
| | | // æç
§ç´¢å¼æåº |
| | | 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()); |
| | | return map; |
| | | } |
| | | |
| | | private int extractNumber(String s) { |
| | | // ä»åç¬¦ä¸²ä¸æåæ°åçé»è¾ï¼è¿éåè®¾åæ®µçæ ¼å¼æ¯ "text<number>" |
| | | String number = s; |
| | | if (!s.matches("\\d+")) { |
| | | number = s.replaceAll("\\D", ""); |
| | | } |
| | | return Integer.parseInt(number); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) { |
| | | IPage<StandardProductList> iPage = new Page<>(); |
| | | iPage.setSize(100); |
| | | iPage.setCurrent(page); |
| | | return standardProductListMapper.standardProductListIPage(id, tree, iPage, laboratory, item, items); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<?>> selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | HashMap<String, List<?>> map = new HashMap<>(); |
| | | map.put("item", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItem) |
| | | .groupBy(StandardProductList::getInspectionItem))); |
| | | if (ObjectUtils.isNotEmpty(item)) { |
| | | map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .eq(StandardProductList::getInspectionItem, item) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItemSubclass) |
| | | .groupBy(StandardProductList::getInspectionItemSubclass))); |
| | | } else { |
| | | map.put("items", standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, id) |
| | | .like(StandardProductList::getTree, tree) |
| | | .select(StandardProductList::getInspectionItemSubclass) |
| | | .groupBy(StandardProductList::getInspectionItemSubclass))); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ ååºåºé´ |
| | | * @param list |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateSection(StandardProductList list) { |
| | | standardProductListMapper.updateSection(list); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ååºææ½ |
| | | * @param resetTreeDragDTO |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void resetTreeDrag(ResetTreeDragDTO resetTreeDragDTO) { |
| | | Integer beginIndex = Integer.parseInt(resetTreeDragDTO.getBeginIndex()); |
| | | Integer endIndex = Integer.parseInt(resetTreeDragDTO.getEndIndex()); |
| | | Integer methodId = Integer.parseInt(resetTreeDragDTO.getMethodId()); |
| | | Long productionId = Long.parseLong(resetTreeDragDTO.getProductionId()); |
| | | // 夿æ¯ä»ä¸å¾ä¸ææ½è¿æ¯ä»ä¸å¾ä¸æ¾ææ½ |
| | | // ä»ä¸å¾ä¸ |
| | | if (beginIndex < endIndex) { |
| | | standardProductListMapper.updateSortUp(beginIndex, |
| | | endIndex, |
| | | methodId, |
| | | resetTreeDragDTO.getTree()); |
| | | |
| | | // ä»ä¸å¾ä¸ |
| | | } else if (beginIndex > endIndex){ |
| | | standardProductListMapper.updateSortDown(beginIndex, |
| | | endIndex, |
| | | methodId, |
| | | resetTreeDragDTO.getTree()); |
| | | } else { |
| | | return; |
| | | } |
| | | // ä¿®æ¹æ ååºé¡¹é¡ºåº |
| | | standardProductListMapper.update(null, Wrappers.<StandardProductList>lambdaUpdate() |
| | | .eq(StandardProductList::getId, productionId) |
| | | .set(StandardProductList::getSort, endIndex)); |
| | | } |
| | | |
| | | @Override |
| | | public void resetTreeDragBatch(List<StandardProductList> standardProductLists) { |
| | | standardProductListService2.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | /** |
| | | * æ£éªé¡¹è¦æ±å¼å¯¹æ¯ |
| | | * @param copyDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<StandardProductList> copyStandardProductList(CopyStandardProductListDto copyDto) { |
| | | List<StandardProductList> productLists = new ArrayList<>(); |
| | | |
| | | // å¯¹æ¯æ£éªé¡¹ä¸æ ·çå¡«å
è¦æ±å¼è¦æ±æè¿° |
| | | for (StandardProductList oldProductList : copyDto.getOldStandardProductList()) { |
| | | String oldItemName = oldProductList.getInspectionItemClassEn() |
| | | + oldProductList.getInspectionItem() |
| | | + oldProductList.getInspectionItemSubclass(); |
| | | for (StandardProductList newProductList : copyDto.getNewStandardProductList()) { |
| | | String newItemName = newProductList.getInspectionItemClassEn() |
| | | + newProductList.getInspectionItem() |
| | | + newProductList.getInspectionItemSubclass(); |
| | | // 夿åç§°æ¯å¦ä¸æ · |
| | | if (oldItemName.equals(newItemName)) { |
| | | // åºé´ |
| | | oldProductList.setSection(newProductList.getSection()); |
| | | // è¯æ° |
| | | oldProductList.setCores(newProductList.getCores()); |
| | | // è¦æ±å¼ |
| | | oldProductList.setAsk(newProductList.getAsk()); |
| | | // è¦æ±æè¿° |
| | | oldProductList.setTell(newProductList.getTell()); |
| | | // åä»· |
| | | oldProductList.setPrice(newProductList.getPrice()); |
| | | // å·¥æ¶åç» |
| | | oldProductList.setManHour(newProductList.getManHour()); |
| | | // å¯¼ä½æè´¨ |
| | | oldProductList.setConductorMaterial(newProductList.getConductorMaterial()); |
| | | // 导ä½ç±»å |
| | | oldProductList.setConductorType(newProductList.getConductorType()); |
| | | productLists.add(oldProductList); |
| | | } |
| | | } |
| | | } |
| | | return productLists; |
| | | } |
| | | |
| | | /** |
| | | * æ£éªé¡¹å¤å¶å¯¹æ¯ä¸ä¸ª |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<StandardProductList> copyStandardProductOne(CopyStandardProductListDto dto) { |
| | | if (CollectionUtils.isEmpty(dto.getNewStandardProductList()) && dto.getNewStandardProductList().size() == 1 && |
| | | CollectionUtils.isEmpty(dto.getOldStandardProductList()) && dto.getOldStandardProductList().size() == 1) { |
| | | throw new BaseException("éè¦å¯¹æ¯çæ£éªé¡¹è¯·éæ©ä¸ä¸ª"); |
| | | } |
| | | StandardProductList newProductList = dto.getNewStandardProductList().get(0); |
| | | StandardProductList oldProductList = dto.getOldStandardProductList().get(0); |
| | | // åºé´ |
| | | oldProductList.setSection(newProductList.getSection()); |
| | | // è¯æ° |
| | | oldProductList.setCores(newProductList.getCores()); |
| | | // è¦æ±å¼ |
| | | oldProductList.setAsk(newProductList.getAsk()); |
| | | // è¦æ±æè¿° |
| | | oldProductList.setTell(newProductList.getTell()); |
| | | // åä»· |
| | | oldProductList.setPrice(newProductList.getPrice()); |
| | | // å·¥æ¶åç» |
| | | oldProductList.setManHour(newProductList.getManHour()); |
| | | // å¯¼ä½æè´¨ |
| | | oldProductList.setConductorMaterial(newProductList.getConductorMaterial()); |
| | | // 导ä½ç±»å |
| | | oldProductList.setConductorType(newProductList.getConductorType()); |
| | | List<StandardProductList> productLists = new ArrayList<>(); |
| | | productLists.add(oldProductList); |
| | | return productLists; |
| | | } |
| | | |
| | | /** |
| | | * æ£éªé¡¹å¤å¶æåº |
| | | * @param copyDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean copyStandardProductSort(CopyStandardProductListDto copyDto) { |
| | | List<StandardProductList> productLists = new ArrayList<>(); |
| | | |
| | | // å¯¹æ¯æ£éªé¡¹ä¸æ ·çå¡«å
è¦æ±å¼è¦æ±æè¿° |
| | | for (StandardProductList oldProductList : copyDto.getOldStandardProductList()) { |
| | | String oldItemName = oldProductList.getInspectionItemClassEn() |
| | | + oldProductList.getInspectionItem() |
| | | + oldProductList.getInspectionItemSubclass(); |
| | | for (StandardProductList newProductList : copyDto.getNewStandardProductList()) { |
| | | String newItemName = newProductList.getInspectionItemClassEn() |
| | | + newProductList.getInspectionItem() |
| | | + newProductList.getInspectionItemSubclass(); |
| | | // 夿åç§°æ¯å¦ä¸æ · |
| | | if (oldItemName.equals(newItemName)) { |
| | | StandardProductList standardProductList = new StandardProductList(); |
| | | standardProductList.setId(oldProductList.getId()); |
| | | // å¤å¶æåº |
| | | standardProductList.setSort(newProductList.getSort()); |
| | | productLists.add(standardProductList); |
| | | } |
| | | } |
| | | } |
| | | this.updateBatchById(productLists); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | 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.mapper.StandardProductListSupplierAskMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.service.StandardProductListSupplierAskService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£éªé¡¹ç®åå®¶å¯åº¦ç»å®è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-23 |
| | | */ |
| | | @Service |
| | | public class StandardProductListSupplierAskServiceImpl extends ServiceImpl<StandardProductListSupplierAskMapper, StandardProductListSupplierAsk> implements StandardProductListSupplierAskService { |
| | | |
| | | /** |
| | | * æ¥è¯¢åå®¶è¦æ±å¼ç»å® |
| | | * @param supplierAsk |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<StandardProductListSupplierAsk> selectByProductId(StandardProductListSupplierAsk supplierAsk) { |
| | | if (supplierAsk.getProductListId() == null) { |
| | | throw new BaseException("ç¼ºå°æ£éªé¡¹id"); |
| | | } |
| | | return baseMapper.selectList(Wrappers.<StandardProductListSupplierAsk>lambdaQuery() |
| | | .eq(StandardProductListSupplierAsk::getProductListId, supplierAsk.getProductListId())); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åå®¶è¦æ±å¼ç»å® |
| | | * @param supplierAsk |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer addProductSupplierAsk(StandardProductListSupplierAsk supplierAsk) { |
| | | if (supplierAsk.getProductListId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | Long count = baseMapper.selectCount(Wrappers.<StandardProductListSupplierAsk>lambdaQuery() |
| | | .eq(StandardProductListSupplierAsk::getProductListId, supplierAsk.getProductListId()) |
| | | .eq(StandardProductListSupplierAsk::getSupplierName, supplierAsk.getSupplierName())); |
| | | if (count > 0){ |
| | | throw new BaseException("该产åå·²ç»å®è¿è¯¥åå®¶"); |
| | | } |
| | | baseMapper.insert(supplierAsk); |
| | | return supplierAsk.getSupplierAskId(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åå®¶è¦æ±å¼ç»å® |
| | | * @param supplierAsk |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer updateProductSupplierAsk(StandardProductListSupplierAsk supplierAsk) { |
| | | if (supplierAsk.getProductListId() == null) { |
| | | throw new BaseException("ç¼ºå°æ£éªé¡¹id"); |
| | | } |
| | | // æ¥è¯¢æ¹åå®¶æ¯å¦ç»å®è¿ |
| | | Long count = baseMapper.selectCount(Wrappers.<StandardProductListSupplierAsk>lambdaQuery() |
| | | .ne(StandardProductListSupplierAsk::getSupplierAskId, supplierAsk.getSupplierAskId()) |
| | | .eq(StandardProductListSupplierAsk::getProductListId, supplierAsk.getProductListId()) |
| | | .eq(StandardProductListSupplierAsk::getSupplierName, supplierAsk.getSupplierName())); |
| | | if (count > 0){ |
| | | throw new BaseException("该æ£éªé¡¹å·²ç»å®è¿è¯¥åå®¶"); |
| | | } |
| | | baseMapper.updateById(supplierAsk); |
| | | return supplierAsk.getSupplierAskId(); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | 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.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.StandardTemplateMapper; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_template(æ 忍¡æ¿)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-11 13:47:52 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardTemplateServiceImpl extends ServiceImpl<StandardTemplateMapper, StandardTemplate> |
| | | implements StandardTemplateService{ |
| | | |
| | | private StandardTemplateMapper standardTemplateMapper; |
| | | |
| | | |
| | | private final NumberGenerator<StandardTemplate> numberGenerator; |
| | | |
| | | @Override |
| | | public IPage<StandardTemplate> selectStandardTemplatePageList(Page page, StandardTemplate standardTemplate) { |
| | | return standardTemplateMapper.selectStandardTemplatePageList(page, QueryWrappers.queryWrappers(standardTemplate)); |
| | | } |
| | | |
| | | @Override |
| | | public int addStandardTemplate(StandardTemplate standardTemplate) { |
| | | if (StringUtils.isBlank(standardTemplate.getNumber())) { |
| | | String giveCode = numberGenerator.generateNumberWithPrefix(5, |
| | | "MB" + DateUtil.format(new Date(), "yyMM"), |
| | | StandardTemplate::getNumber); |
| | | standardTemplate.setNumber(giveCode); |
| | | } |
| | | return standardTemplateMapper.insert(standardTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if(standardTemplate.getThing().equals("")){ |
| | | standardTemplate.setThing(null); |
| | | } |
| | | return standardTemplateMapper.updateById(standardTemplate); |
| | | } |
| | | |
| | | @Override |
| | | public int delStandardTemplate(Integer id) { |
| | | return standardTemplateMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<StandardTemplate> getStandardTemplate() { |
| | | return standardTemplateMapper.selectList(Wrappers.<StandardTemplate>lambdaQuery().select(StandardTemplate::getId,StandardTemplate::getName)); |
| | | } |
| | | |
| | | @Override |
| | | public String getStandTempThingById(Integer templateId) { |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectOne(Wrappers.<StandardTemplate>lambdaQuery() |
| | | .eq(StandardTemplate::getId, templateId) |
| | | .select(StandardTemplate::getThing)); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return 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 |
| | | public String getStandTempNameById(Integer templateId) { |
| | | StandardTemplate standardTemplate = standardTemplateMapper.selectOne(Wrappers.<StandardTemplate>lambdaQuery() |
| | | .eq(StandardTemplate::getId, templateId) |
| | | .select(StandardTemplate::getName)); |
| | | if(standardTemplate==null){ |
| | | return null; |
| | | }else{ |
| | | return standardTemplate.getName(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public StandardTemplate getStandTempIdByName(String name) { |
| | | return standardTemplateMapper.getStandTempIdByName(name); |
| | | } |
| | | |
| | | /** |
| | | * å¤å¶åå§è®°å½æ¨¡æ¿ |
| | | * @param newTemplate |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int copyStandardTemplate(StandardTemplate newTemplate) { |
| | | // æ¥è¯¢æ§æ¨¡æ¿ |
| | | StandardTemplate standardTemplate = baseMapper.selectById(newTemplate.getId()); |
| | | newTemplate.setThing(standardTemplate.getThing()); |
| | | |
| | | if (StringUtils.isBlank(newTemplate.getNumber())) { |
| | | String giveCode = numberGenerator.generateNumberWithPrefix(5, |
| | | "MB" + DateUtil.format(new Date(), "yyMM"), |
| | | StandardTemplate::getNumber); |
| | | newTemplate.setNumber(giveCode); |
| | | } |
| | | newTemplate.setId(null); |
| | | |
| | | return standardTemplateMapper.insert(newTemplate); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.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.SampleTypeDto; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.mapper.StandardTreeMapper; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.*; |
| | | 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.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãstandard_tree(æ åæ )ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-01 15:06:44 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StandardTreeServiceImpl extends ServiceImpl<StandardTreeMapper, StandardTree> |
| | | implements StandardTreeService { |
| | | |
| | | |
| | | private StandardTreeMapper standardTreeMapper; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | | 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())); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | return factoryDtos; |
| | | } |
| | | |
| | | |
| | | |
| | | @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()); |
| | | } |
| | | |
| | | StandardTree tree = standardTreeMapper.selectOne(wrapper); |
| | | if (tree != null) { |
| | | throw new BaseException("该åå·å·²åå¨"); |
| | | } |
| | | return standardTreeMapper.insert(standardTree); |
| | | } |
| | | |
| | | @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;*/ |
| | | } |
| | | 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) { |
| | | } |
| | | try { |
| | | standardProductList.setSampleType(trees[2]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setSample(trees[3]); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | standardProductList.setModel(trees[4]); |
| | | } catch (Exception e) { |
| | | } |
| | | standardProductListMapper.insert(standardProductList); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<SampleTypeDto> getStandardTree2() { |
| | | return standardTreeMapper.getStandardTree2(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upStandardProducts(Map<String, Object> product) { |
| | | List<Integer> ids = JSON.parseArray(product.get("ids") + ""); |
| | | StandardProductList productList = JSON.parseObject(JSON.toJSONString(product.get("standardProductList")), StandardProductList.class); |
| | | if (productList.getMethodS() != null) { |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids).like(StandardProductList::getMethod, productList.getMethodS())); |
| | | return 1; |
| | | } |
| | | if (productList.getRadiusList() != null) { |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids).like(StandardProductList::getRadiusList, productList.getRadius())); |
| | | return 1; |
| | | } |
| | | standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids)); |
| | | return 1; |
| | | } |
| | | |
| | | @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) + ""); |
| | | } |
| | | |
| | | 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++; |
| | | } |
| | | } |
| | | } |
| | | structureTestObjectService.updateBatchById(testObjects); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ åæ° |
| | | * @param standardTree |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int updateStandardTree(StandardTree standardTree) { |
| | | // ä¿®æ¹åç§°å¹é
çæ åæ ä¸çæ£éªé¡¹ç® |
| | | // æ¥è¯¢ææå¯¹è±¡+åç§°çæ |
| | | |
| | | 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); |
| | | } |
| | | standardProductListService.updateBatchById(standardProductLists); |
| | | } |
| | | |
| | | // ä¿®æ¹æ åæ°æ£éªé¡¹ç® |
| | | 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()); |
| | | } |
| | | return standardTreeMapper.update(null, wrapper); |
| | | } |
| | | |
| | | @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)); |
| | | } |
| | | |
| | | @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)); |
| | | } |
| | | |
| | | @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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.basic.service.StructureItemParameterService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StructureItemParameterServiceImpl extends ServiceImpl<StructureItemParameterMapper, StructureItemParameter> implements StructureItemParameterService { |
| | | |
| | | @Resource |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Override |
| | | public void removeNoSample(String sample) { |
| | | structureItemParameterMapper.removeNoSample("\""+sample+"\""); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.basic.mapper.ProductPartMapper; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectPartMapper; |
| | | import com.ruoyi.basic.pojo.ProductPart; |
| | | import com.ruoyi.basic.pojo.StructureTestObjectPart; |
| | | import com.ruoyi.basic.service.StructureTestObjectPartService; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * æ£éªå¯¹è±¡é¶ä»¶è¡¨ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Transactional |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class StructureTestObjectPartServiceImpl extends ServiceImpl<StructureTestObjectPartMapper, StructureTestObjectPart> implements StructureTestObjectPartService { |
| | | |
| | | private ProductPartMapper productPartMapper; |
| | | |
| | | @Override |
| | | public IPage<StructureTestObjectPart> selectByTestObjectId(Page page, StructureTestObjectPart structureTestObjectPart) { |
| | | return baseMapper.selectListByTestObjectId(page, QueryWrappers.queryWrappers(structureTestObjectPart),structureTestObjectPart.getTestObjectId()); |
| | | } |
| | | |
| | | @Override |
| | | public void addTestObjectPart(StructureTestObjectPart structureTestObjectPart) { |
| | | this.isPartNoExist(structureTestObjectPart.getPartNo(), null); |
| | | if (structureTestObjectPart.getTestObjectId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | baseMapper.insert(structureTestObjectPart); |
| | | } |
| | | |
| | | @Override |
| | | public void updateTestObjectPart(StructureTestObjectPart structureTestObjectPart) { |
| | | this.isPartNoExist(structureTestObjectPart.getPartNo(), structureTestObjectPart.getId()); |
| | | if (structureTestObjectPart.getTestObjectId() == null) { |
| | | throw new BaseException("缺å°äº§å对象id"); |
| | | } |
| | | baseMapper.updateById(structureTestObjectPart); |
| | | } |
| | | |
| | | // 夿é¶ä»¶å·æ¯å¦åå¨ |
| | | public void isPartNoExist(String partNo, Integer id) { |
| | | // é¶ä»¶å·å¯ä¸ ä½ä¸å¿
å¡« |
| | | if (StringUtils.isNotBlank(partNo)) { |
| | | Long count = productPartMapper.selectCount(new LambdaQueryWrapper<ProductPart>() |
| | | .eq(ProductPart::getPartNo, partNo)); |
| | | Long selectCount = baseMapper.selectCount(Wrappers.<StructureTestObjectPart>lambdaQuery() |
| | | .eq(StructureTestObjectPart::getPartNo, partNo) |
| | | .ne(id != null, StructureTestObjectPart::getId, id)); |
| | | if (count > 0 || selectCount > 0) { |
| | | throw new BaseException("该é¶ä»¶å·å·²ç»å®è¿æ£éªå¯¹è±¡"); |
| | | } |
| | | } else { |
| | | throw new BaseException("请è¾å
¥é¶ä»¶å·"); |
| | | } |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureTestObjectMapper; |
| | | import com.ruoyi.basic.pojo.StructureTestObject; |
| | | import com.ruoyi.basic.service.StructureTestObjectService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * æ£æµå¯¹è±¡ |
| | | * |
| | | * @author zhuo |
| | | * @since 2024-09-13 |
| | | */ |
| | | @Service |
| | | public class StructureTestObjectServiceImpl extends ServiceImpl<StructureTestObjectMapper, StructureTestObject> implements StructureTestObjectService { |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.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> |
| | | </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.IfsInventoryQuantityMapper"> |
| | | |
| | | <select id="printLabel" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityDto"> |
| | | SELECT io.sample sample_name, |
| | | iiq.supplier_name, |
| | | io.part_detail part_desc, |
| | | io.send_time, |
| | | io.prepare_user, |
| | | io.entrust_code, |
| | | iiq.qty_arrived, |
| | | iiq.buy_unit_meas, |
| | | CASE |
| | | WHEN pp.color IS NOT NULL |
| | | THEN pp.color |
| | | ELSE sto.color |
| | | END color, |
| | | case |
| | | when iiq.state = 2 then '2' |
| | | when iiq.state = 1 then case |
| | | when ROUND((select count(*) |
| | | from ins_product ip |
| | | where state = 1 |
| | | and ins_result is not null |
| | | and ip.ins_sample_id in (select id |
| | | from ins_sample |
| | | where ins_sample.ins_order_id = io.id)) / |
| | | (select count(*) |
| | | from ins_product ip2 |
| | | where state = 1 |
| | | and ip2.ins_sample_id in |
| | | (select id from ins_sample where ins_sample.ins_order_id = io.id)) * |
| | | 100, 2) != 100 then '0' |
| | | else '1' end |
| | | end labelStatus, |
| | | JSON_OBJECT( |
| | | 'sample_ame', io.sample, |
| | | 'supplier_name', iiq.supplier_name, |
| | | 'part_desc', iiq.part_desc, |
| | | 'entrust_code', io.entrust_code |
| | | ) labelBarCode |
| | | FROM ifs_inventory_quantity iiq |
| | | LEFT JOIN ins_order io on io.id = (SELECT io2.id |
| | | FROM ins_order io2 |
| | | WHERE io2.ifs_inventory_id = iiq.id |
| | | and io2.state != -1 |
| | | order by io2.send_time desc |
| | | limit 1) COLLATE utf8mb4_general_ci |
| | | LEFT JOIN product_part pp ON pp.part_no = iiq.part_no COLLATE utf8mb4_general_ci |
| | | LEFT JOIN structure_test_object_part sto ON sto.part_no = iiq.part_no COLLATE utf8mb4_general_ci |
| | | WHERE iiq.id in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectReportCountById" resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from ifs_inventory_quantity iiq |
| | | left join ins_order io on io.ifs_inventory_id = iiq.id and io.state |
| | | left join ins_report ir on ir.ins_order_id = io.id |
| | | where iiq.id = #{ifsInventoryId} |
| | | and ir.id is not null |
| | | </select> |
| | | <select id="selectIsFirst" resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from ifs_inventory_quantity iiq |
| | | LEFT JOIN ins_order io1 on io1.ifs_inventory_id = iiq.id |
| | | and io1.state != -1 |
| | | where io1.part_detail = #{partDetail} |
| | | and iiq.supplier_name = #{supplierName} |
| | | and iiq.receiver_date between #{startOfNextQuarter} and #{endOfQuarter} |
| | | </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.LaboratoryMapper"> |
| | | |
| | | <select id="selectItemParameter" resultType="com.ruoyi.basic.pojo.Laboratory"> |
| | | select * from |
| | | ( |
| | | select l.id, |
| | | laboratory_name, |
| | | laboratory_number, |
| | | laboratory_code, |
| | | phone_number, |
| | | head, |
| | | l.address, |
| | | u1.name create_user_name, |
| | | l.create_time |
| | | from laboratory l |
| | | left join user u1 on l.create_user = u1.id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="obtainItemParameterList" resultType="java.lang.Object"> |
| | | select * from |
| | | ( |
| | | select l.id, |
| | | laboratory_name, |
| | | laboratory_number, |
| | | phone_number, |
| | | head, |
| | | l.address, |
| | | u1.name create_user_name, |
| | | l.create_time |
| | | from laboratory l |
| | | left join user u1 on l.create_user = u1.id |
| | | ) a |
| | | </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.ProductMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.Product"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="nameEn" column="name_en" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="objectId" column="object_id" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,name_en, |
| | | create_user,update_user,create_time, |
| | | update_time,object_id |
| | | </sql> |
| | | <select id="selectProductListByObjectId" resultType="com.ruoyi.basic.pojo.Product"> |
| | | select * from ( |
| | | select p.id, |
| | | p.name, |
| | | p.name_en, |
| | | p.create_user, |
| | | p.update_user, |
| | | p.create_time, |
| | | p.update_time, |
| | | p.object_id |
| | | from product p |
| | | WHERE 1=1 |
| | | <if test="partNo != null and partNo != ''"> |
| | | and p.id = (select pp.product_id |
| | | from product_part pp |
| | | where pp.part_no = #{partNo}) |
| | | </if>) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.ProductPartMapper"> |
| | | <select id="selectListByProductId" resultType="com.ruoyi.basic.pojo.ProductPart"> |
| | | SELECT * from product_part pp |
| | | where pp.product_id=#{productId} |
| | | </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.ProductSupplierDensityMapper"> |
| | | <select id="selectListByProductId" resultType="com.ruoyi.basic.pojo.ProductSupplierDensity"> |
| | | SELECT * from product_supplier_density pp |
| | | where pp.product_id=#{productId} |
| | | </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.StandardMethodListMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectStandardMethodById" resultType="java.util.Map"> |
| | | select code, name, remark |
| | | from standard_method |
| | | where id = #{id} |
| | | </select> |
| | | <select id="selectUserById" resultType="java.lang.String"> |
| | | select name |
| | | from user |
| | | where 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="selectParameterList" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select inspection_item, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | checkout_number, |
| | | section, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | template_id, |
| | | son_laboratory |
| | | from structure_item_parameter |
| | | where method = #{code} |
| | | </select> |
| | | <select id="selectStandardMethodLists2" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select sml.id, sml.code, sml.name,sml.remark, sml.create_time, u.name create_user_name |
| | | from standard_method_list sml |
| | | left join user u on u.id = sml.create_user |
| | | where factory = #{data1} |
| | | <if test="data2 != null"> |
| | | and laboratory = #{data2} |
| | | </if> |
| | | <if test="data3 != null"> |
| | | and sample_type = #{data3} |
| | | </if> |
| | | <if test="data4 != null"> |
| | | and sample = #{data4} |
| | | </if> |
| | | <if test="data5 != null"> |
| | | and model = #{data5} |
| | | </if> |
| | | </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="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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.StandardMethodMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.StandardMethod"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="code" column="code" jdbcType="VARCHAR"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectStandardMethodList" resultType="com.ruoyi.basic.pojo.StandardMethod"> |
| | | select * from ( |
| | | select sm.id, |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | | u2.name update_user_name, |
| | | sm.update_time, |
| | | sm.is_product, |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | 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 != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectStandMethodById" resultType="com.ruoyi.basic.pojo.StandardMethod"> |
| | | select sm.id, |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | | u2.name update_user_name, |
| | | sm.update_time, |
| | | sm.is_product, |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | 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.id = #{id} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.StandardProductListMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.StandardProductList"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="unit" column="unit" jdbcType="VARCHAR"/> |
| | | <result property="price" column="price" jdbcType="DECIMAL"/> |
| | | <result property="manHour" column="man_hour" jdbcType="INTEGER"/> |
| | | <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> |
| | | <result property="inspectionItemType" column="inspection_item_type" jdbcType="VARCHAR"/> |
| | | <result property="inspectionValueType" column="inspection_value_type" jdbcType="VARCHAR"/> |
| | | <result property="checkoutNumber" column="checkout_number" jdbcType="INTEGER"/> |
| | | <result property="section" column="section" jdbcType="VARCHAR"/> |
| | | <result property="method" column="method" jdbcType="VARCHAR"/> |
| | | <result property="manDay" column="man_day" jdbcType="INTEGER"/> |
| | | <result property="bsm" column="bsm" jdbcType="VARCHAR"/> |
| | | <result property="ask" column="ask" jdbcType="VARCHAR"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <update id="updateSection"> |
| | | UPDATE standard_product_list |
| | | SET price=#{productList.price}, |
| | | man_hour=#{productList.manHour}, |
| | | section=#{productList.section}, |
| | | cores=#{productList.cores}, |
| | | conductor_material=#{productList.conductorMaterial}, |
| | | conductor_type=#{productList.conductorType}, |
| | | ask=#{productList.ask}, |
| | | tell=#{productList.tell}, |
| | | update_user=#{productList.updateUser}, |
| | | update_time=#{productList.updateTime} |
| | | WHERE id = #{productList.id} |
| | | </update> |
| | | <update id="updateSortUp"> |
| | | update standard_product_list |
| | | set sort = sort - 1 |
| | | where tree = #{tree} |
| | | and standard_method_list_id = #{methodId} |
| | | and sort between #{beginIndex} + 1 and #{endIndex} |
| | | </update> |
| | | <update id="updateSortDown"> |
| | | update standard_product_list |
| | | set sort = sort + 1 |
| | | where tree = #{tree} |
| | | and standard_method_list_id = #{methodId} |
| | | and sort between #{endIndex} and #{beginIndex} - 1 |
| | | </update> |
| | | <select id="standardProductListIPage" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select spl.* from standard_product_list spl |
| | | left join product p on spl.sample = p.name |
| | | where standard_method_list_id = #{id} |
| | | and tree like concat('%',#{tree},'%') |
| | | <if test="laboratory != ''"> |
| | | and son_laboratory = #{laboratory} |
| | | </if> |
| | | <if test="insItem != ''"> |
| | | and inspection_item = #{insItem} |
| | | </if> |
| | | <if test="insItems != ''"> |
| | | and inspection_item_subclass = #{insItems} |
| | | </if> |
| | | group by spl.id |
| | | order by p.id |
| | | </select> |
| | | <select id="getOne" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select * from standard_product_list |
| | | where standard_method_list_id = #{standardMethodListId} |
| | | and inspection_item = #{inspectionItem} |
| | | <if test="sample!=null"> |
| | | and sample = #{sample} |
| | | </if> |
| | | <if test="inspectionItemSubclass!=null"> |
| | | and inspection_item_subclass = #{inspectionItemSubclass} |
| | | </if> |
| | | <if test="inspectionItemSubclass == null"> |
| | | and (inspection_item_subclass is null or inspection_item_subclass = '') |
| | | </if> |
| | | <if test="model!=null"> |
| | | and model = #{model} |
| | | </if> |
| | | <if test="inspectionItemClass != null and inspectionItemClass != ''"> |
| | | and inspection_item_class = #{inspectionItemClass} |
| | | </if> |
| | | </select> |
| | | <select id="selectDetail" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select * from standard_product_list |
| | | where standard_method_list_id = #{standardMethodListId} |
| | | and state =#{state} |
| | | and model=#{model} |
| | | <if test="isCableTag != null and isCableTag != ''"> |
| | | and (inspection_item_class like concat('%ç»æå°ºå¯¸%') or |
| | | inspection_item_class like concat('%çµç¼çµæ§è½%')or |
| | | inspection_item_class like concat('%ç»ç¼%')or |
| | | inspection_item_class like concat('%çµç¼çç§æ§è½%')) |
| | | </if> |
| | | order by sort asc, |
| | | case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | ,id asc |
| | | </select> |
| | | <select id="selectDetail2" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select * from standard_product_list |
| | | where standard_method_list_id = #{standardMethodListId} |
| | | and state =#{state} |
| | | and tree =#{tree} |
| | | <if test="isCableTag != null and isCableTag != ''"> |
| | | and (inspection_item_class like concat('%ç»æå°ºå¯¸%') or |
| | | inspection_item_class like concat('%çµç¼çµæ§è½%')or |
| | | inspection_item_class like concat('%ç»ç¼%')or |
| | | inspection_item_class like concat('%çµç¼çç§æ§è½%')) |
| | | </if> |
| | | order by sort asc, |
| | | case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | ,id asc |
| | | </select> |
| | | <select id="selectPartColor" resultType="java.util.Map"> |
| | | select color, |
| | | color_code |
| | | from product_part |
| | | where part_no = #{partNo} |
| | | union all |
| | | select color, |
| | | color_code |
| | | from structure_test_object_part |
| | | where part_no = #{partNo} |
| | | </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.StandardProductListSupplierAskMapper"> |
| | | |
| | | </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.StandardTemplateMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.StandardTemplate"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="thing" column="thing" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <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 |
| | | from standard_template st |
| | | left join user u2 on u2.id = st.create_user |
| | | left join user u3 on u3.id = st.update_user |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getStandTempIdByName" resultType="com.ruoyi.basic.pojo.StandardTemplate"> |
| | | select id from standard_template where name=#{name} |
| | | </select> |
| | | <!-- æ¥è¯¢å缩åçæ°æ® --> |
| | | <select id="selectCompressThing" resultType="java.lang.String"> |
| | | SELECT COMPRESS(thing) |
| | | from standard_template b |
| | | WHERE id = #{templateId} |
| | | </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.StandardTreeMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.StandardTree"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | | <result property="sample" column="sample" jdbcType="VARCHAR"/> |
| | | <result property="model" column="model" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="FactoryDto" type="com.ruoyi.basic.dto.FactoryDto"> |
| | | <result property="label" column="factory"/> |
| | | <result property="value" column="factory"/> |
| | | <collection property="children" resultMap="LaboratoryDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="LaboratoryDto" type="com.ruoyi.basic.dto.LaboratoryDto"> |
| | | <result property="label" column="laboratory"/> |
| | | <result property="value" column="laboratory"/> |
| | | <collection property="children" resultMap="SampleTypeDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SampleTypeDto" type="com.ruoyi.basic.dto.SampleTypeDto"> |
| | | <result property="label" column="sample_type"/> |
| | | <result property="value" column="sample_type"/> |
| | | <result property="sampleTypeId" column="sample_type_id"/> |
| | | <result property="sort" column="sort"/> |
| | | <result property="partNo" column="part_no"/> |
| | | <result property="sampleTypeEn" column="sample_type_en"/> |
| | | <collection property="children" resultMap="SampleDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SampleDto" type="com.ruoyi.basic.dto.SampleDto"> |
| | | <result property="label" column="sample"/> |
| | | <result property="value" column="sample"/> |
| | | <result property="partNo" column="sample_part_no"/> |
| | | <result property="sampleEn" column="sample_en"/> |
| | | <collection property="children" resultMap="ModelDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ModelDto" type="com.ruoyi.basic.dto.ModelDto"> |
| | | <result property="label" column="model"/> |
| | | <result property="value" column="model"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectStandardTree"> |
| | | sample sample2, |
| | | 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 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 state, |
| | | #{model} |
| | | model, |
| | | #{sample} |
| | | sample, |
| | | #{trees} |
| | | tree, |
| | | id |
| | | structure_item_parameter_id, |
| | | radius_list, |
| | | 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> |
| | | |
| | | <select id="selectStandardProductById" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select inspection_item, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | son_laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | checkout_number, |
| | | section, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | template_id |
| | | from structure_item_parameter |
| | | where id = #{id} |
| | | </select> |
| | | <select id="getStandardProductListBySample" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select inspection_item, |
| | | inspection_item_subclass, |
| | | laboratory, |
| | | son_laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | checkout_number, |
| | | section, |
| | | method, |
| | | man_day, |
| | | sample, |
| | | bsm, |
| | | template_id, |
| | | dic, |
| | | ask, |
| | | ask_tell as tell |
| | | from structure_item_parameter sp |
| | | where sp.sample = #{sampleType} |
| | | 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, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample |
| | | 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.laboratory = l.laboratory_name |
| | | and st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | where sto.specimen_name = #{sampleType} |
| | | group by sto.specimen_name |
| | | </select> |
| | | <select id="selectStandardProductListByTree" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select <include refid="selectStandardTree"/> |
| | | from structure_item_parameter |
| | | where ( |
| | | sample is NULL |
| | | OR sample = '' |
| | | or sample = '[]' |
| | | OR sample LIKE CONCAT('%[', #{tree}, ']%') |
| | | ) |
| | | and (laboratory is null |
| | | or laboratory = '' |
| | | or laboratory = #{laboratory}) |
| | | order by inspection_item_class, inspection_item, id asc |
| | | </select> |
| | | |
| | | <select id="selectStandardProductListByTree2" resultType="com.ruoyi.basic.pojo.StandardProductList"> |
| | | select <include refid="selectStandardTree"/> |
| | | from structure_item_parameter |
| | | where sample LIKE CONCAT('%[', #{tree}, ']%') |
| | | and (laboratory is null |
| | | or laboratory = '' |
| | | or laboratory = #{laboratory}) |
| | | order by inspection_item_class, inspection_item, id asc |
| | | </select> |
| | | |
| | | <select id="getStandardTree2" resultMap="SampleTypeDto"> |
| | | select sto.specimen_name sample_type, |
| | | p.name sample, |
| | | st.model |
| | | from structure_test_object sto |
| | | 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"> |
| | | select l.laboratory_name |
| | | from structure_test_object sto |
| | | left join laboratory l on sto.laboratory_id = l.id |
| | | where sto.specimen_name = #{str} |
| | | </select> |
| | | <select id="getStructureItemParameterId" resultType="java.lang.Integer"> |
| | | select id from structure_item_parameter |
| | | where sample like concat('%', #{sampleType}, '%') |
| | | and inspection_item = #{item} |
| | | <if test="itemChild != null and itemChild != ''"> |
| | | and inspection_item_subclass = #{itemChild} |
| | | </if> |
| | | <if test="inspectionItemClass != null and inspectionItemClass != ''"> |
| | | and inspection_item_class = #{inspectionItemClass} |
| | | </if> |
| | | <if test="itemChild == null or itemChild == ''"> |
| | | and (inspection_item_subclass is null or inspection_item_subclass = '') |
| | | </if> |
| | | </select> |
| | | <select id="selectPList" resultType="com.ruoyi.basic.dto.ProductDto"> |
| | | select p.name |
| | | from structure_test_object sto |
| | | left join product p on p.object_id = sto.id |
| | | where sto.specimen_name = #{name} |
| | | order by p.id |
| | | </select> |
| | | <select id="selSample" resultType="java.lang.String"> |
| | | select name |
| | | from product |
| | | where name = #{name} |
| | | </select> |
| | | <select id="selectStandardTreeListByPartNo" resultMap="FactoryDto"> |
| | | select 'ä¸å¤©ç§ææ£æµä¸å¿' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample, |
| | | st.model, |
| | | CASE |
| | | WHEN p.id = (SELECT pp.product_id |
| | | FROM product_part pp |
| | | WHERE pp.part_no = #{partNo}) |
| | | THEN #{partNo} |
| | | ELSE NULL |
| | | END AS sample_part_no, |
| | | CASE |
| | | WHEN sto.id = (SELECT sto.test_object_id |
| | | FROM structure_test_object_part sto |
| | | WHERE sto.part_no = #{partNo}) |
| | | THEN #{partNo} |
| | | ELSE NULL |
| | | END AS part_no |
| | | 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 |
| | | where (p.id = (select pp.product_id |
| | | from product_part pp |
| | | where pp.part_no = #{partNo}) |
| | | or sto.id = (select sto.test_object_id |
| | | from structure_test_object_part sto |
| | | where sto.part_no = #{partNo})) |
| | | order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL(st.id), st.id |
| | | </select> |
| | | |
| | | <sql id="getIfsOrder"> |
| | | select * |
| | | from (SELECT ifs.*, |
| | | COALESCE(io1.create_user, io2.create_user) create_user, |
| | | COALESCE(io1.entrust_code, io2.entrust_code) entrust_code, |
| | | COALESCE(io1.send_time, io2.send_time) send_time, |
| | | io1.id enter_order_id, |
| | | ir1.id enter_report_id, |
| | | ir1.url enter_url, |
| | | ir1.url_s enter_url_s, |
| | | io2.id quarter_order_id, |
| | | ir2.id quarter_report_id, |
| | | ir2.url quarter_url, |
| | | ir2.url_s quarter_url_s, |
| | | group_concat(distinct isa.sample_code, ' ') sample_code, |
| | | group_concat(distinct isa.sample, ' ') sample_name, |
| | | group_concat(distinct isa.model, ' ') sample_model, |
| | | COALESCE(io1.state, io2.state) order_state, |
| | | COALESCE(isu.userName, COALESCE(u1.name, u2.name)) user_name, |
| | | group_concat(distinct iuh.unqualified_desc, ' ') unqualified_desc, |
| | | io1.is_exemption |
| | | FROM ifs_inventory_quantity ifs |
| | | LEFT JOIN ins_order io1 ON io1.ifs_inventory_id = ifs.id and io1.order_type = 'è¿åæ£éª' and io1.state != -1 |
| | | left join ins_report ir1 on io1.id = ir1.ins_order_id |
| | | left join user u1 on io1.create_user = u1.id |
| | | LEFT JOIN ins_order io2 ON io2.ifs_inventory_id = ifs.id and io2.order_type = 'Quarterly inspection' and io2.state != -1 |
| | | left join ins_report ir2 on io2.id = ir2.ins_order_id |
| | | left join user u2 on io2.create_user = u2.id |
| | | LEFT JOIN ins_sample isa ON COALESCE(io1.id, io2.id) = isa.ins_order_id |
| | | LEFT JOIN (SELECT ins_sample_id, GROUP_CONCAT(DISTINCT uu.name SEPARATOR ',') AS userName |
| | | FROM ins_sample_user u |
| | | LEFT JOIN user uu ON u.user_id = uu.id |
| | | WHERE u.state = 0 |
| | | GROUP BY ins_sample_id |
| | | ORDER BY ins_sample_id) isu ON isu.ins_sample_id = COALESCE(io1.id, io2.id) |
| | | left join ins_unqualified_handler iuh on iuh.inventory_quantity_id = ifs.id |
| | | group by ifs.id) a |
| | | </sql> |
| | | |
| | | <select id="getIfsByStateOne" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityDto"> |
| | | <include refid="getIfsOrder"/> |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectIfsInventoryQuantity" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getIfsByOver" 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} |
| | | </if> |
| | | </where> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </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} |
| | | </if> |
| | | </where> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getIfsByQuarter" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | select * from (<include refid="getIfsOrder"/> |
| | | <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} |
| | | </if> |
| | | </where> |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.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_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | laboratory, |
| | | unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | checkout_number, |
| | | section, |
| | | A.create_user, |
| | | A.update_user, |
| | | A.create_time, |
| | | A.update_time, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | sample, |
| | | inspection_value_type, |
| | | dic, |
| | | template_id, |
| | | son_laboratory, |
| | | ask, |
| | | ask_tell, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | code, |
| | | radius_list, |
| | | rates |
| | | from (select *, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | | SUBSTRING_INDEX(SUBSTRING_INDEX(sample, '","', 1), '"', -1) |
| | | when sample = '[""]' then null |
| | | when sample = '[]' then null |
| | | ELSE |
| | | TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1)) |
| | | END AS samples |
| | | from structure_item_parameter) A |
| | | left join structure_test_object sto on samples = specimen_name |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if>)B |
| | | order by CASE |
| | | WHEN code IS NULL THEN 1 |
| | | ELSE 0 |
| | | END, |
| | | CAST(code AS UNSIGNED), |
| | | case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 妿以æ°åå¼å¤´ï¼åæç
§æ°åå¤§å°æåº |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- æå忝åé¢çæ°åé¨å |
| | | ,id asc |
| | | </select> |
| | | |
| | | <resultMap id="getInsProductions" type="map"> |
| | | <result property="name" column="sample"/> |
| | | <collection property="children" resultMap="itemClass" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="itemClass" type="map"> |
| | | <result property="name" column="item_class"/> |
| | | <collection property="children" resultMap="item" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="item" type="map"> |
| | | <result property="name" column="inspection_item"/> |
| | | <collection property="children" resultMap="itemSubClass" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="itemSubClass" type="map"> |
| | | <id property="id" column="id"/> |
| | | <result property="name" column="subclass"/> |
| | | </resultMap> |
| | | <select id="getInsProduction" resultMap="getInsProductions"> |
| | | select distinct id, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | | SUBSTRING_INDEX(SUBSTRING_INDEX(sample, '","', 1), '"', -1) |
| | | when sample = '[""]' then '*' |
| | | ELSE |
| | | TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1)) |
| | | END |
| | | as sample, |
| | | inspection_item, |
| | | case |
| | | when inspection_item_subclass is null or inspection_item_subclass = '' then inspection_item |
| | | else inspection_item_subclass end as subclass, |
| | | case |
| | | when inspection_item_class is null or inspection_item_class = '' then inspection_item |
| | | else inspection_item_class end as item_class |
| | | from structure_item_parameter |
| | | </select> |
| | | <select id="getItemTree" resultMap="itemDto"> |
| | | select sto.id sId, sto.specimen_name sName, p.id pId, p.name pName |
| | | from structure_test_object sto |
| | | left join product p on p.object_id = sto.id |
| | | </select> |
| | | |
| | | <resultMap id="itemDto" type="com.ruoyi.basic.dto.TestItemDto"> |
| | | <result column="sId" property="id"/> |
| | | <result column="sName" property="name"/> |
| | | <collection property="children" resultMap="productDto"/> |
| | | </resultMap> |
| | | <resultMap id="productDto" type="com.ruoyi.basic.dto.ProductDto"> |
| | | <result column="pId" property="id"/> |
| | | <result column="pName" property="name"/> |
| | | </resultMap> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.basic.mapper.StructureTestObjectMapper"> |
| | | |
| | | <select id="selectTestObjectList" resultType="com.ruoyi.basic.dto.PageTestObjectDto"> |
| | | select * from ( |
| | | select sto.id, |
| | | sto.specimen_name, |
| | | u1.name create_user_name, |
| | | sto.create_time, |
| | | u2.name update_user_name, |
| | | sto.update_time, |
| | | sto.code, |
| | | sto.laboratory_id, |
| | | GROUP_CONCAT(p.name) product, |
| | | sto.specimen_name_en, |
| | | sto.object_type |
| | | from structure_test_object sto |
| | | left join user u1 on sto.create_user = u1.id |
| | | left join user u2 on sto.update_user = u2.id |
| | | left join product p on p.object_id = sto.id |
| | | left join product_part pp on pp.product_id = p.id |
| | | left join structure_test_object_part stop ON stop.test_object_id = sto.id |
| | | <if test="partNo != null and partNo != ''" > |
| | | where pp.part_no = #{partNo} or stop.part_no = #{partNo} |
| | | </if> |
| | | group by sto.id |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.ruoyi.basic.mapper.StructureTestObjectPartMapper"> |
| | | <select id="selectListByTestObjectId" resultType="com.ruoyi.basic.pojo.StructureTestObjectPart"> |
| | | SELECT * from structure_test_object_part pp |
| | | where pp.test_object_id = #{testObjectId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>ruoyi</artifactId> |
| | | <groupId>com.ruoyi</groupId> |
| | | <version>3.8.9</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>inspect-server</artifactId> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * æ£éªæ ·å |
| | | * @TableName ins_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; |
| | | |
| | | @ApiModelProperty("æ ·ååä½") |
| | | private String unit; |
| | | |
| | | private Integer cellId; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | private Integer parentId; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | private Integer quantity; |
| | | |
| | | @ApiModelProperty("ç¹æ®æ åæ¹æ³") |
| | | private String specialStandardMethod; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private Integer num=1; |
| | | |
| | | } |
| | |
| | | <minio.version>8.4.3</minio.version> |
| | | <okhttp.version>4.9.0</okhttp.version> |
| | | <hutool.version>5.8.18</hutool.version> |
| | | <easyexcel.version>3.3.2</easyexcel.version> |
| | | </properties> |
| | | |
| | | <!-- ä¾èµå£°æ --> |
| | |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | |
| | | |
| | | <!-- minio --> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>easyexcel</artifactId> |
| | | <version>${easyexcel.version}</version> |
| | | </dependency> |
| | | |
| | | <!--mybatis-plus--> |
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>2.0.23</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <modules> |
| | |
| | | <module>ruoyi-quartz</module> |
| | | <module>ruoyi-generator</module> |
| | | <module>ruoyi-common</module> |
| | | <module>basic-server</module> |
| | | <module>inspect-server</module> |
| | | </modules> |
| | | <packaging>pom</packaging> |
| | | |
| | |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-common</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- æ ¸å¿æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-generator</artifactId> |
| | | </dependency> |
| | | |
| | | <!--åºç¡æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>basic-server</artifactId> |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | |
| | | <!--ä¸å¡æ¨¡å--> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>inspect-server</artifactId> |
| | | <version>${ruoyi.version}</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <version>3.1.0</version> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <version>3.1.0</version> |
| | | <configuration> |
| | | <failOnMissingWebXml>false</failOnMissingWebXml> |
| | | <warName>${project.artifactId}</warName> |
| | | </configuration> |
| | | </plugin> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | <finalName>${project.artifactId}</finalName> |
| | | </build> |
| | | |
| | | </project> |
| | | </project> |
| | |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-test</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-text</artifactId> |
| | | <version>1.3</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | package com.ruoyi.common.handler; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import org.apache.ibatis.reflection.MetaObject; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | public class MybatisHandler implements MetaObjectHandler { |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | Integer userId = null; |
| | | try { |
| | | userId = SecurityUtils.getUserId().intValue(); |
| | | } catch (Exception ignored) { |
| | | } |
| | | System.out.println("æ§è¡æå
¥å¡«å
..."); |
| | | this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now()); |
| | | this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); |
| | | this.strictInsertFill(metaObject, "createUser", Integer.class, userId); |
| | | this.strictInsertFill(metaObject, "updateUser", Integer.class, userId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | Integer userId = null; |
| | | try { |
| | | userId = SecurityUtils.getUserId().intValue(); |
| | | } catch (Exception ignored) { |
| | | } |
| | | this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); // èµ·å§çæ¬ 3.3.0(æ¨è) |
| | | this.strictUpdateFill(metaObject, "updateUser", Integer.class, userId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2011-2020, baomidou (jobob@qq.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| | | * use this file except in compliance with the License. You may obtain a copy of |
| | | * the License at |
| | | * <p> |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| | | * License for the specific language governing permissions and limitations under |
| | | * the License. |
| | | */ |
| | | package com.ruoyi.common.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.ColumnCache; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | |
| | | import java.lang.ref.WeakReference; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | import static java.util.Locale.ENGLISH; |
| | | |
| | | /** |
| | | * Lambda è§£æå·¥å
·ç±» |
| | | * |
| | | * @author HCL, MieMie |
| | | * @since 2018-05-10 |
| | | */ |
| | | public final class LambdaUtils { |
| | | |
| | | /** |
| | | * åæ®µæ å° |
| | | */ |
| | | private static final Map<String, Map<String, ColumnCache>> COLUMN_CACHE_MAP = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * SerializedLambda ååºååç¼å |
| | | */ |
| | | private static final Map<String, WeakReference<SerializedLambda>> FUNC_CACHE = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * è§£æ lambda 表达å¼, è¯¥æ¹æ³åªæ¯è°ç¨äº {@link SerializedLambda#resolve(SFunction)} ä¸çæ¹æ³ï¼å¨æ¤åºç¡ä¸å äºç¼åã |
| | | * 该ç¼åå¯è½ä¼å¨ä»»æä¸å®çæ¶é´è¢«æ¸
é¤ |
| | | * |
| | | * @param func éè¦è§£æç lambda 对象 |
| | | * @param <T> ç±»åï¼è¢«è°ç¨ç Function 对象çç®æ ç±»å |
| | | * @return è¿åè§£æåçç»æ |
| | | * @see SerializedLambda#resolve(SFunction) |
| | | */ |
| | | public static <T> SerializedLambda resolve(SFunction<T, ?> func) { |
| | | Class<?> clazz = func.getClass(); |
| | | String canonicalName = clazz.getCanonicalName(); |
| | | return Optional.ofNullable(FUNC_CACHE.get(canonicalName)) |
| | | .map(WeakReference::get) |
| | | .orElseGet(() -> { |
| | | SerializedLambda lambda = SerializedLambda.resolve(func); |
| | | FUNC_CACHE.put(canonicalName, new WeakReference<>(lambda)); |
| | | return lambda; |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼å key å°ä¼ å
¥ç key åæ´ä¸ºå¤§åæ ¼å¼ |
| | | * |
| | | * <pre> |
| | | * Assert.assertEquals("USERID", formatKey("userId")) |
| | | * </pre> |
| | | * |
| | | * @param key key |
| | | * @return 大åç key |
| | | */ |
| | | public static String formatKey(String key) { |
| | | return key.toUpperCase(ENGLISH); |
| | | } |
| | | |
| | | /** |
| | | * å°ä¼ å
¥ç表信æ¯å å
¥ç¼å |
| | | * |
| | | * @param tableInfo è¡¨ä¿¡æ¯ |
| | | */ |
| | | public static void installCache(TableInfo tableInfo) { |
| | | COLUMN_CACHE_MAP.put(tableInfo.getEntityType().getName(), createColumnCacheMap(tableInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ç¼åå®ä½å段 MAP ä¿¡æ¯ |
| | | * |
| | | * @param info è¡¨ä¿¡æ¯ |
| | | * @return ç¼å map |
| | | */ |
| | | private static Map<String, ColumnCache> createColumnCacheMap(TableInfo info) { |
| | | Map<String, ColumnCache> map = new HashMap<>(); |
| | | |
| | | String kp = info.getKeyProperty(); |
| | | if (StringUtils.isNotBlank(kp)) { |
| | | map.put(formatKey(kp), new ColumnCache(info.getKeyColumn(), info.getKeySqlSelect())); |
| | | } |
| | | |
| | | info.getFieldList().forEach(i -> |
| | | map.put(formatKey(i.getProperty()), new ColumnCache(i.getColumn(), i.getSqlSelect())) |
| | | ); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ä½å¯¹åºå段 MAP |
| | | * |
| | | * @param clazz å®ä½ç±» |
| | | * @return ç¼å map |
| | | */ |
| | | public static Map<String, ColumnCache> getColumnMap(Class<?> clazz) { |
| | | return COLUMN_CACHE_MAP.computeIfAbsent(clazz.getName(), key -> { |
| | | TableInfo info = TableInfoHelper.getTableInfo(clazz); |
| | | return info == null ? null : createColumnCacheMap(info); |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.TableFieldInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.reflection.property.PropertyNamer; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Optional; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | |
| | | /** |
| | | * ç¼å·çæå¨ |
| | | * |
| | | * @Author: zhangxy |
| | | * @Date: 2020-09-08 16:31 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class NumberGenerator<T> { |
| | | |
| | | private static Pattern NUMBER_PATTERN = Pattern.compile("(.+)\\((\\d+)\\)"); |
| | | |
| | | private NumberGeneratorModelHelper numberGeneratorModelHelper; |
| | | |
| | | |
| | | public String getCopyValueOfUniqueField(final String value, SFunction<T, ?> column) { |
| | | if (value == null) { |
| | | return null; |
| | | } else { |
| | | Matcher matcher = NUMBER_PATTERN.matcher(value); |
| | | String oldValue = value; |
| | | int index = 1; |
| | | if (matcher.matches()) { |
| | | oldValue = matcher.group(1); |
| | | index = Integer.valueOf(matcher.group(2)) + 1; |
| | | } |
| | | |
| | | NumberTableInfo info = initDbInfo(column); |
| | | while (true) { |
| | | String newValue = oldValue + "(" + (index++) + ")"; |
| | | boolean exist = numberGeneratorModelHelper.numberExist(newValue, info); |
| | | if (!exist) { |
| | | return newValue; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumber(final int numOfDigits, SFunction<T, ?> column) { |
| | | return generateNumberWithPrefix(numOfDigits, null, column); |
| | | } |
| | | |
| | | /** |
| | | * çæå¸¦åç¼çç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param prefix |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumberWithPrefix(final int numOfDigits, final String prefix, SFunction<T, ?> column) { |
| | | NumberTableInfo info = initDbInfo(column); |
| | | String generatedNumber = generateNumberWithExtension(info, numOfDigits, prefix, ""); |
| | | return prependPrefix(prefix, generatedNumber); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæå¸¦åç¼çç¼å· |
| | | * |
| | | * @param numOfDigits |
| | | * @param suffix |
| | | * @param column |
| | | * @return |
| | | */ |
| | | public String generateNumberWithSuffix(final int numOfDigits, final String suffix, SFunction<T, ?> column) { |
| | | NumberTableInfo info = initDbInfo(column); |
| | | String generatedNumber = generateNumberWithExtension(info, numOfDigits, "", suffix); |
| | | return appendSuffix(suffix, generatedNumber); |
| | | } |
| | | |
| | | /** |
| | | * åå§åæ°æ®åºè¡¨åãåæ®µå |
| | | * |
| | | * @param column |
| | | * @return |
| | | */ |
| | | private NumberTableInfo initDbInfo(SFunction<T, ?> column) { |
| | | SerializedLambda ld = LambdaUtils.resolve(column); |
| | | TableInfo tableInfo = TableInfoHelper.getTableInfo(ld.getImplClass()); |
| | | String fieldName = PropertyNamer.methodToProperty(ld.getImplMethodName()); |
| | | Optional<TableFieldInfo> op = tableInfo.getFieldList().stream().filter(f -> fieldName.equals(f.getProperty())).findFirst(); |
| | | if (!op.isPresent()) { |
| | | throw new RuntimeException("è·åæ°æ®åºå段åºéï¼è¯·æ£æ¥æ å°"); |
| | | } |
| | | TableFieldInfo fieldInfo = op.get(); |
| | | |
| | | NumberTableInfo info = new NumberTableInfo(); |
| | | info.setLogicDelete(tableInfo.isLogicDelete()); |
| | | info.setNumberFieldName(fieldInfo.getColumn()); |
| | | info.setTableName(tableInfo.getTableName()); |
| | | return info; |
| | | } |
| | | |
| | | |
| | | private String generateNumberWithExtension(NumberTableInfo numberTableInfo, int numOfDigits, String prefix, String suffix) { |
| | | Long dbMax = numberGeneratorModelHelper.getNumbersProjection(numberTableInfo, prefix, suffix); |
| | | Long greatestNumber = 0L; |
| | | if (dbMax != null) { |
| | | greatestNumber = dbMax; |
| | | } |
| | | return String.format("%0" + numOfDigits + "d", greatestNumber + 1); |
| | | } |
| | | |
| | | private String prependPrefix(final String prefix, final String generatedNumber) { |
| | | if (prefix == null) { |
| | | return generatedNumber; |
| | | } |
| | | return prefix + generatedNumber; |
| | | } |
| | | |
| | | |
| | | private String appendSuffix(final String suffix, final String generatedNumber) { |
| | | if (suffix == null) { |
| | | return generatedNumber; |
| | | } |
| | | return generatedNumber + suffix; |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * *************************************************************************** |
| | | * Copyright (c) 2010 Qcadoo Limited |
| | | * Project: Qcadoo Framework |
| | | * Version: 1.4 |
| | | * <p> |
| | | * This file is part of Qcadoo. |
| | | * <p> |
| | | * Qcadoo is free software; you can redistribute it and/or modify |
| | | * it under the terms of the GNU Affero General Public License as published |
| | | * by the Free Software Foundation; either version 3 of the License, |
| | | * or (at your option) any later version. |
| | | * <p> |
| | | * This program is distributed in the hope that it will be useful, |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty |
| | | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| | | * See the GNU Affero General Public License for more details. |
| | | * <p> |
| | | * You should have received a copy of the GNU Affero General Public License |
| | | * along with this program; if not, write to the Free Software |
| | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| | | * *************************************************************************** |
| | | */ |
| | | package com.ruoyi.common.numgen; |
| | | |
| | | import com.google.common.collect.Maps; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.text.StringSubstitutor; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhangxy |
| | | */ |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class NumberGeneratorModelHelper { |
| | | |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | |
| | | private static final String NUMBER_EXIST_QUERY_TEMPLATE = "select count(*) from ${TABLE_NAME} where ${NUMBER_FIELD}='${VALUE}'"; |
| | | |
| | | |
| | | private static final String GET_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " coalesce(TRIM(LEADING '0' from ${NUMBER_FIELD}), '0') " |
| | | + " AS UNSIGNED ) ) " |
| | | + "from ${TABLE_NAME} where 1=1"; |
| | | |
| | | private static final String GET_PREFIX_AWARE_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " TRIM(LEADING '0' from SUBSTRING(${NUMBER_FIELD}, ${NUMBER_STARTS_AT})) " |
| | | + " AS UNSIGNED ) ) " |
| | | + "from ${TABLE_NAME} where ${NUMBER_FIELD} like '${PREFIX}%'"; |
| | | |
| | | private static final String GET_SUFFIX_AWARE_NUMBERS_QUERY_TEMPLATE = "select MAX( CAST( " |
| | | + " TRIM(LEADING '0' from SUBSTRING(${NUMBER_FIELD}, 1, POSITION('${SUFFIX}' IN ${NUMBER_FIELD}) - 1)) " |
| | | + " AS UNSIGNED )) " |
| | | + "from ${TABLE_NAME} where ${NUMBER_FIELD} like '%${SUFFIX}'"; |
| | | |
| | | |
| | | public boolean numberExist(final String value, final NumberTableInfo numberTableInfo) { |
| | | Map<String, String> placeholderValues = Maps.newHashMap(); |
| | | |
| | | placeholderValues.put("TABLE_NAME", numberTableInfo.getTableName()); |
| | | placeholderValues.put("NUMBER_FIELD", numberTableInfo.getNumberFieldName()); |
| | | placeholderValues.put("VALUE", value); |
| | | String query = new StringSubstitutor(placeholderValues, "${", "}").replace(NUMBER_EXIST_QUERY_TEMPLATE); |
| | | Long count = jdbcTemplate.queryForObject(query, Long.class); |
| | | return count > 0; |
| | | } |
| | | |
| | | public Long getNumbersProjection(final NumberTableInfo numberTableInfo, final String prefix, final String suffix) { |
| | | String sqlQuery = buildQuery(numberTableInfo, prefix, suffix); |
| | | return jdbcTemplate.queryForObject(sqlQuery, Long.class); |
| | | } |
| | | |
| | | private String buildQuery(final NumberTableInfo numberTableInfo, |
| | | final String prefix, final String suffix) { |
| | | Map<String, String> placeholderValues = Maps.newHashMap(); |
| | | |
| | | placeholderValues.put("TABLE_NAME", numberTableInfo.getTableName()); |
| | | placeholderValues.put("NUMBER_FIELD", numberTableInfo.getNumberFieldName()); |
| | | |
| | | String query; |
| | | if (StringUtils.isNotEmpty(prefix)) { |
| | | placeholderValues.put("PREFIX", prefix); |
| | | int prefixLength = StringUtils.length(prefix); |
| | | placeholderValues.put("NUMBER_STARTS_AT", String.valueOf(prefixLength + 1)); |
| | | query = GET_PREFIX_AWARE_NUMBERS_QUERY_TEMPLATE; |
| | | } else if (StringUtils.isNotEmpty(suffix)) { |
| | | placeholderValues.put("SUFFIX", suffix); |
| | | query = GET_SUFFIX_AWARE_NUMBERS_QUERY_TEMPLATE; |
| | | } else { |
| | | query = GET_NUMBERS_QUERY_TEMPLATE; |
| | | } |
| | | |
| | | if(numberTableInfo.isLogicDelete()){ |
| | | query += " and active=true"; |
| | | } |
| | | StringSubstitutor substitutor = new StringSubstitutor(placeholderValues, "${", "}"); |
| | | return substitutor.replace(query); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.numgen; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author: zhangxy |
| | | * @Date: 2020-09-11 16:48 |
| | | */ |
| | | @Data |
| | | public class NumberTableInfo { |
| | | |
| | | private String tableName; |
| | | private String numberFieldName; |
| | | |
| | | private boolean logicDelete; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2011-2020, baomidou (jobob@qq.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| | | * use this file except in compliance with the License. You may obtain a copy of |
| | | * the License at |
| | | * <p> |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| | | * License for the specific language governing permissions and limitations under |
| | | * the License. |
| | | */ |
| | | package com.ruoyi.common.numgen; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ClassUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ExceptionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.SerializationUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; |
| | | |
| | | import java.io.*; |
| | | |
| | | /** |
| | | * è¿ä¸ªç±»æ¯ä» {@link java.lang.invoke.SerializedLambda} éé¢ copy è¿æ¥çï¼ |
| | | * åæ®µä¿¡æ¯å®å
¨ä¸æ · |
| | | * <p>è´è´£å°ä¸ä¸ªæ¯æåºåç Function åºåå为 SerializedLambda</p> |
| | | * |
| | | * @author HCL |
| | | * @since 2018/05/10 |
| | | */ |
| | | public class SerializedLambda implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 8025925345765570181L; |
| | | |
| | | private Class<?> capturingClass; |
| | | private String functionalInterfaceClass; |
| | | private String functionalInterfaceMethodName; |
| | | private String functionalInterfaceMethodSignature; |
| | | private String implClass; |
| | | private String implMethodName; |
| | | private String implMethodSignature; |
| | | private int implMethodKind; |
| | | private String instantiatedMethodType; |
| | | private Object[] capturedArgs; |
| | | |
| | | /** |
| | | * éè¿ååºååè½¬æ¢ lambda 表达å¼ï¼è¯¥æ¹æ³åªè½åºåå lambda 表达å¼ï¼ä¸è½åºå忥å£å®ç°æè
æ£å¸¸é lambda åæ³ç对象 |
| | | * |
| | | * @param lambda lambda对象 |
| | | * @return è¿åè§£æåç SerializedLambda |
| | | */ |
| | | public static SerializedLambda resolve(SFunction<?, ?> lambda) { |
| | | if (!lambda.getClass().isSynthetic()) { |
| | | throw ExceptionUtils.mpe("è¯¥æ¹æ³ä»
è½ä¼ å
¥ lambda 表达å¼äº§ççåæç±»"); |
| | | } |
| | | try (ObjectInputStream objIn = new ObjectInputStream(new ByteArrayInputStream(SerializationUtils.serialize(lambda))) { |
| | | @Override |
| | | protected Class<?> resolveClass(ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException { |
| | | Class<?> clazz; |
| | | try { |
| | | clazz = ClassUtils.toClassConfident(objectStreamClass.getName()); |
| | | } catch (Exception ex) { |
| | | clazz = super.resolveClass(objectStreamClass); |
| | | } |
| | | return clazz == java.lang.invoke.SerializedLambda.class ? SerializedLambda.class : clazz; |
| | | } |
| | | }) { |
| | | return (SerializedLambda) objIn.readObject(); |
| | | } catch (ClassNotFoundException | IOException e) { |
| | | throw ExceptionUtils.mpe("This is impossible to happen", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥å£ class |
| | | * |
| | | * @return è¿å class åç§° |
| | | */ |
| | | public String getFunctionalInterfaceClassName() { |
| | | return normalizedName(functionalInterfaceClass); |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ç°ç class |
| | | * |
| | | * @return å®ç°ç±» |
| | | */ |
| | | public Class<?> getImplClass() { |
| | | return ClassUtils.toClassConfident(getImplClassName()); |
| | | } |
| | | |
| | | /** |
| | | * è·å class çåç§° |
| | | * |
| | | * @return ç±»å |
| | | */ |
| | | public String getImplClassName() { |
| | | return normalizedName(implClass); |
| | | } |
| | | |
| | | /** |
| | | * è·åå®ç°è
çæ¹æ³åç§° |
| | | * |
| | | * @return æ¹æ³åç§° |
| | | */ |
| | | public String getImplMethodName() { |
| | | return implMethodName; |
| | | } |
| | | |
| | | /** |
| | | * æ£å¸¸åç±»åç§°ï¼å°ç±»åç§°ä¸ç / æ¿æ¢ä¸º . |
| | | * |
| | | * @param name åç§° |
| | | * @return æ£å¸¸çç±»å |
| | | */ |
| | | private String normalizedName(String name) { |
| | | return name.replace('/', '.'); |
| | | } |
| | | |
| | | /** |
| | | * @return è·åå®ä¾åæ¹æ³çç±»å |
| | | */ |
| | | public Class<?> getInstantiatedType() { |
| | | String instantiatedTypeName = normalizedName(instantiatedMethodType.substring(2, instantiatedMethodType.indexOf(';'))); |
| | | return ClassUtils.toClassConfident(instantiatedTypeName); |
| | | } |
| | | |
| | | /** |
| | | * @return åç¬¦ä¸²å½¢å¼ |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | String interfaceName = getFunctionalInterfaceClassName(); |
| | | String implName = getImplClassName(); |
| | | return String.format("%s -> %s::%s", |
| | | interfaceName.substring(interfaceName.lastIndexOf('.') + 1), |
| | | implName.substring(implName.lastIndexOf('.') + 1), |
| | | implMethodName); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.mybatis_config; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * èªå®ä¹æ·»å mybatis-plusæ¹éæ·»å |
| | | * @param <T> |
| | | */ |
| | | public interface MyBaseMapper <T> extends BaseMapper<T> { |
| | | |
| | | int insertBatchSomeColumn(List<T> entityList); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.mybatis_config; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | |
| | | @Configuration |
| | | public class MyBatisPlusConfig { |
| | | |
| | | /** |
| | | * éè¦é
ç½®æ¦æªå¨ï¼ä¸ç¶å¨AddDeviceä¸çtotalæ æ³è·åå° |
| | | * @return |
| | | */ |
| | | @Bean |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor(){ |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | // ä¹è§é |
| | | interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor()); |
| | | // å页é
ç½® |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.mybatis_config; |
| | | |
| | | import com.baomidou.mybatisplus.core.injector.AbstractMethod; |
| | | import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | */ |
| | | @Component |
| | | public class MySqlInjector extends DefaultSqlInjector { |
| | | |
| | | @Override |
| | | public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { |
| | | List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo); |
| | | //å¢å èªå®ä¹æ¹æ³ï¼å段注解ä¸ä¸çäºFieldFill.DEFAULTçåæ®µæä¼æå
¥ |
| | | methodList.add(new InsertBatchSomeColumn(t->!t.isLogicDelete())); |
| | | return methodList; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.framework.web.exception; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.ruoyi.common.exception.DemoModeException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.security.access.AccessDeniedException; |
| | |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.exception.DemoModeException; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.html.EscapeUtil; |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysDictTypeMapper |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ææåå
¸ç±»å |
| | | * |
| | | * |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | | public List<SysDictType> selectDictTypeAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ç±»åID |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿åå
¸IDå é¤åå
¸ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictIds éè¦å é¤çåå
¸ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªåå
¸ç±»åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return ç»æ |
| | | */ |
| | | public SysDictType checkDictTypeUnique(String dictType); |
| | | |
| | | List<SysDictType> selectList(String dictName); |
| | | } |
| | |
| | | |
| | | /** |
| | | * åå
¸ ä¸å¡å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDictTypeService |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ææåå
¸ç±»å |
| | | * |
| | | * |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | | public List<SysDictType> selectDictTypeAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | | public List<SysDictData> selectDictDataByType(String dictType); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸åç§°æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * @param dictName åå
¸åç§° |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | | public List<SysDictData> selectDictDataByName(String dictName); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ç±»åID |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤åå
¸ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictIds éè¦å é¤çåå
¸ID |
| | | */ |
| | | public void deleteDictTypeByIds(Long[] dictIds); |
| | |
| | | |
| | | /** |
| | | * æ°å¢ä¿ååå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿ååå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªåå
¸ç±»åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return ç»æ |
| | | */ |
| | |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.PostConstruct; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | /** |
| | | * åå
¸ ä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ææåå
¸ç±»å |
| | | * |
| | | * |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸åç§°æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * @param dictName åå
¸åç§° |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<SysDictData> selectDictDataByName(String dictName) |
| | | { |
| | | List<SysDictType> sysDictTypes = dictTypeMapper.selectList(dictName); |
| | | return selectDictDataByType(sysDictTypes.get(0).getDictType()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ç±»åID |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictIds éè¦å é¤çåå
¸ID |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * æ°å¢ä¿ååå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dict åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿ååå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dict åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªåå
¸ç±»åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param dict åå
¸ç±»å |
| | | * @return ç»æ |
| | | */ |
| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper"> |
| | | <resultMap type="SysDictType" id="SysDictTypeResult"> |
| | | <id property="dictId" column="dict_id"/> |
| | | <result property="dictName" column="dict_name"/> |
| | | <result property="dictType" column="dict_type"/> |
| | | <result property="status" column="status"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="SysDictType" id="SysDictTypeResult"> |
| | | <id property="dictId" column="dict_id" /> |
| | | <result property="dictName" column="dict_name" /> |
| | | <result property="dictType" column="dict_type" /> |
| | | <result property="status" column="status" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDictTypeVo"> |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | from sys_dict_type |
| | | <sql id="selectDictTypeVo"> |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | | <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | <where> |
| | | <if test="dictName != null and dictName != ''"> |
| | | AND dict_name like concat('%', #{dictName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | </select> |
| | | |
| | | <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_id = #{dictId} |
| | | </select> |
| | | |
| | | <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} |
| | | </select> |
| | | |
| | | <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} limit 1 |
| | | </select> |
| | | |
| | | <delete id="deleteDictTypeById" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id = #{dictId} |
| | | </delete> |
| | | |
| | | <delete id="deleteDictTypeByIds" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id in |
| | | <foreach collection="array" item="dictId" open="(" separator="," close=")"> |
| | | #{dictId} |
| | | </foreach> |
| | | </delete> |
| | | <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | <where> |
| | | <if test="dictName != null and dictName != ''"> |
| | | AND dict_name like concat('%', #{dictName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"> |
| | | <!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"> |
| | | <!-- ç»ææ¶é´æ£ç´¢ --> |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="updateDictType" parameterType="SysDictType"> |
| | | update sys_dict_type |
| | | <set> |
| | | <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> |
| | | <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | <insert id="insertDictType" parameterType="SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | | <if test="dictName != null and dictName != ''">#{dictName},</if> |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | </mapper> |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | </select> |
| | | |
| | | <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_id = #{dictId} |
| | | </select> |
| | | |
| | | <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} |
| | | </select> |
| | | |
| | | <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} limit 1 |
| | | </select> |
| | | |
| | | <delete id="deleteDictTypeById" parameterType="Long"> |
| | | delete |
| | | from sys_dict_type |
| | | where dict_id = #{dictId} |
| | | </delete> |
| | | |
| | | <delete id="deleteDictTypeByIds" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id in |
| | | <foreach collection="array" item="dictId" open="(" separator="," close=")"> |
| | | #{dictId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictType" parameterType="SysDictType"> |
| | | update sys_dict_type |
| | | <set> |
| | | <if test="dictName != null and dictName != ''"> |
| | | dict_name = #{dictName}, |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | dict_type = #{dictType}, |
| | | </if> |
| | | <if test="status != null"> |
| | | status = #{status}, |
| | | </if> |
| | | <if test="remark != null"> |
| | | remark = #{remark}, |
| | | </if> |
| | | <if test="updateBy != null and updateBy != ''"> |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | <insert id="insertDictType" parameterType="SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''"> |
| | | dict_name, |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | dict_type, |
| | | </if> |
| | | <if test="status != null"> |
| | | status, |
| | | </if> |
| | | <if test="remark != null and remark != ''"> |
| | | remark, |
| | | </if> |
| | | <if test="createBy != null and createBy != ''"> |
| | | create_by, |
| | | </if> |
| | | create_time |
| | | )values( |
| | | <if test="dictName != null and dictName != ''"> |
| | | #{dictName}, |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | #{dictType}, |
| | | </if> |
| | | <if test="status != null"> |
| | | #{status}, |
| | | </if> |
| | | <if test="remark != null and remark != ''"> |
| | | #{remark}, |
| | | </if> |
| | | <if test="createBy != null and createBy != ''"> |
| | | #{createBy}, |
| | | </if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="selectList" resultType="com.ruoyi.common.core.domain.entity.SysDictType"> |
| | | select * |
| | | from sys_dict_type |
| | | where dict_name = #{dictName} |
| | | </select> |
| | | </mapper> |