review
This commit is contained in:
@@ -2,10 +2,8 @@ package org.jeecg.modules.database.constant;
|
|||||||
|
|
||||||
public interface ExperimentReviewProcessType {
|
public interface ExperimentReviewProcessType {
|
||||||
|
|
||||||
String GJB548C = "GJB-548C";
|
String GJB548C = "GJB548C";
|
||||||
String MIL883 = "MIL-883";
|
|
||||||
String ESCC229000 = "ESCC229000";
|
String ESCC229000 = "ESCC229000";
|
||||||
String ESCC22500 = "ESCC22500";
|
String ESCC22500 = "ESCC22500";
|
||||||
String QJ10004 = "MOS器件QJ10004";
|
String QJ10004 = "QJ10004";
|
||||||
String BIQJ10004 = "双极器件QJ10004";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.jeecg.modules.database.constant;
|
||||||
|
|
||||||
|
public interface ExperimentReviewResultEnum {
|
||||||
|
|
||||||
|
String ITEM_PASS = "";
|
||||||
|
String FINAL_PASS = "评定通过";
|
||||||
|
String NOT_PASS = "评定未通过";
|
||||||
|
String UNKNOWN = "无法评定";
|
||||||
|
String HIGH = "高估";
|
||||||
|
String LOW = "低估";
|
||||||
|
String HIGH_OR_LOW = "高估/低估";
|
||||||
|
}
|
||||||
@@ -1,104 +1,97 @@
|
|||||||
package org.jeecg.modules.database.controller;
|
package org.jeecg.modules.database.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
|
||||||
import org.jeecg.modules.database.constant.ExperimentReviewStatusEnum;
|
|
||||||
import org.jeecg.modules.database.entity.ExperimentReview;
|
|
||||||
import org.jeecg.modules.database.service.IExperimentReviewService;
|
|
||||||
import org.jeecg.modules.system.service.ISysUserService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.*;
|
||||||
|
import org.jeecg.modules.database.service.*;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 试验评定
|
* @Description: 试验评定结果
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-11-05
|
* @Date: 2025-06-16
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Tag(name = "试验评定")
|
@Tag(name = "试验评定结果")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/database/experimentReview")
|
@RequestMapping("/database/experimentReview")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ExperimentReviewController extends JeecgController<ExperimentReview, IExperimentReviewService> {
|
public class ExperimentReviewController extends JeecgController<ExperimentReview, IExperimentReviewService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IExperimentReviewService experimentReviewService;
|
private IExperimentReviewService experimentReviewResultService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService userService;
|
private IExperimentService experimentService;
|
||||||
|
@Autowired
|
||||||
|
private IExperimentSampleInfoService experimentSampleInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
* @param experimentReview
|
* @param experimentReviewResult
|
||||||
* @param pageNo
|
* @param pageNo
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "试验评定-分页列表查询")
|
//@AutoLog(value = "试验评定结果-分页列表查询")
|
||||||
@Operation(summary = "试验评定-分页列表查询")
|
@Operation(summary = "试验评定结果-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<ExperimentReview>> queryPageList(ExperimentReview experimentReview,
|
public Result<IPage<ExperimentReview>> queryPageList(ExperimentReview experimentReviewResult,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<ExperimentReview> queryWrapper = QueryGenerator.initQueryWrapper(experimentReview, req.getParameterMap());
|
QueryWrapper<ExperimentReview> queryWrapper = QueryGenerator.initQueryWrapper(experimentReviewResult, req.getParameterMap());
|
||||||
Page<ExperimentReview> page = new Page<ExperimentReview>(pageNo, pageSize);
|
Page<ExperimentReview> page = new Page<ExperimentReview>(pageNo, pageSize);
|
||||||
IPage<ExperimentReview> pageList = experimentReviewService.page(page, queryWrapper);
|
IPage<ExperimentReview> pageList = experimentReviewResultService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
* @param experimentReview
|
* @param experimentReviewResult
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "试验评定-添加")
|
@AutoLog(value = "试验评定结果-添加")
|
||||||
@Operation(summary = "试验评定-添加")
|
@Operation(summary = "试验评定结果-添加")
|
||||||
@RequiresPermissions("database:experiment_review:add")
|
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody ExperimentReview experimentReview, HttpServletRequest request) {
|
public Result<ExperimentReview> add(@RequestBody ExperimentReview experimentReviewResult) {
|
||||||
experimentReview.setReviewStatus(ExperimentReviewStatusEnum.REVIEW_FINISHED.getStatus());
|
Experiment experiment = experimentService.getById(experimentReviewResult.getExperimentId());
|
||||||
experimentReviewService.saveOrUpdate(experimentReview);
|
ExperimentSampleInfo sampleInfo = experimentSampleInfoService.getById(experimentReviewResult.getSampleId());
|
||||||
return Result.OK("添加成功!");
|
ExperimentReview review = experimentReviewResultService.review(experiment, sampleInfo, ExperimentReviewProcessType.GJB548C);
|
||||||
}
|
return Result.OK(review);
|
||||||
|
|
||||||
@Operation(summary = "试验评定-暂存")
|
|
||||||
@PostMapping(value = "/temporarySave")
|
|
||||||
public Result<String> temporarySave(@RequestBody ExperimentReview experimentReview, HttpServletRequest request) {
|
|
||||||
experimentReview.setReviewStatus(ExperimentReviewStatusEnum.TEMP_SAVE.getStatus());
|
|
||||||
experimentReviewService.saveOrUpdate(experimentReview);
|
|
||||||
return Result.OK("暂存成功!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param experimentReview
|
* @param experimentReviewResult
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "试验评定-编辑")
|
@AutoLog(value = "试验评定结果-编辑")
|
||||||
@Operation(summary = "试验评定-编辑")
|
@Operation(summary = "试验评定结果-编辑")
|
||||||
@RequiresPermissions("database:experiment_review:edit")
|
@RequiresPermissions("database:experiment_review_result:edit")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody ExperimentReview experimentReview) {
|
public Result<String> edit(@RequestBody ExperimentReview experimentReviewResult) {
|
||||||
experimentReviewService.updateById(experimentReview);
|
experimentReviewResultService.updateById(experimentReviewResult);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,12 +101,12 @@ public class ExperimentReviewController extends JeecgController<ExperimentReview
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "试验评定-通过id删除")
|
@AutoLog(value = "试验评定结果-通过id删除")
|
||||||
@Operation(summary = "试验评定-通过id删除")
|
@Operation(summary = "试验评定结果-通过id删除")
|
||||||
@RequiresPermissions("database:experiment_review:delete")
|
@RequiresPermissions("database:experiment_review_result:delete")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
experimentReviewService.removeById(id);
|
experimentReviewResultService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,12 +116,12 @@ public class ExperimentReviewController extends JeecgController<ExperimentReview
|
|||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "试验评定-批量删除")
|
@AutoLog(value = "试验评定结果-批量删除")
|
||||||
@Operation(summary = "试验评定-批量删除")
|
@Operation(summary = "试验评定结果-批量删除")
|
||||||
@RequiresPermissions("database:experiment_review:delete")
|
@RequiresPermissions("database:experiment_review_result:deleteBatch")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.experimentReviewService.removeByIds(Arrays.asList(ids.split(",")));
|
this.experimentReviewResultService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,46 +131,27 @@ public class ExperimentReviewController extends JeecgController<ExperimentReview
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "试验评定-通过id查询")
|
//@AutoLog(value = "试验评定结果-通过id查询")
|
||||||
@Operation(summary = "试验评定-通过id查询")
|
@Operation(summary = "试验评定结果-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<ExperimentReview> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<ExperimentReview> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
ExperimentReview experimentReview = experimentReviewService.getById(id);
|
ExperimentReview experimentReviewResult = experimentReviewResultService.getById(id);
|
||||||
if (experimentReview == null) {
|
if (experimentReviewResult == null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(experimentReview);
|
return Result.OK(experimentReviewResult);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过实验id查询
|
|
||||||
*
|
|
||||||
* @param experimentalId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
//@AutoLog(value = "试验评定-通过id查询")
|
|
||||||
@Operation(summary = "试验评定-通过实验查询")
|
|
||||||
@GetMapping(value = "/queryByExperimentId")
|
|
||||||
public Result<ExperimentReview> queryByExperimentId(@RequestParam(name = "experimentId", required = true) String experimentalId) {
|
|
||||||
LambdaQueryWrapper<ExperimentReview> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(ExperimentReview::getExperimentId, experimentalId);
|
|
||||||
ExperimentReview experimentReview = experimentReviewService.getOne(queryWrapper);
|
|
||||||
if (experimentReview == null) {
|
|
||||||
return Result.OK();
|
|
||||||
}
|
|
||||||
return Result.OK(experimentReview);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 导出excel
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param experimentReview
|
* @param experimentReviewResult
|
||||||
*/
|
*/
|
||||||
|
@RequiresPermissions("database:experiment_review_result:exportXls")
|
||||||
@RequestMapping(value = "/exportXls")
|
@RequestMapping(value = "/exportXls")
|
||||||
public ModelAndView exportXls(HttpServletRequest request, ExperimentReview experimentReview) {
|
public ModelAndView exportXls(HttpServletRequest request, ExperimentReview experimentReviewResult) {
|
||||||
return super.exportXls(request, experimentReview, ExperimentReview.class, "试验评定");
|
return super.exportXls(request, experimentReviewResult, ExperimentReview.class, "试验评定结果");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,7 +161,7 @@ public class ExperimentReviewController extends JeecgController<ExperimentReview
|
|||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("database:experiment_review:add")
|
@RequiresPermissions("database:experiment_review_result:importExcel")
|
||||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
return super.importExcel(request, response, ExperimentReview.class);
|
return super.importExcel(request, response, ExperimentReview.class);
|
||||||
|
|||||||
@@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.database.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewDetail;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewDetailService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定真值表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Tag(name="试验评定真值表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/database/experimentReviewDetail")
|
||||||
|
@Slf4j
|
||||||
|
public class ExperimentReviewDetailController extends JeecgController<ExperimentReviewDetail, IExperimentReviewDetailService> {
|
||||||
|
@Autowired
|
||||||
|
private IExperimentReviewDetailService experimentReviewDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param experimentReviewDetail
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "试验评定真值表-分页列表查询")
|
||||||
|
@Operation(summary="试验评定真值表-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<ExperimentReviewDetail>> queryPageList(ExperimentReviewDetail experimentReviewDetail,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ExperimentReviewDetail> queryWrapper = QueryGenerator.initQueryWrapper(experimentReviewDetail, req.getParameterMap());
|
||||||
|
Page<ExperimentReviewDetail> page = new Page<ExperimentReviewDetail>(pageNo, pageSize);
|
||||||
|
IPage<ExperimentReviewDetail> pageList = experimentReviewDetailService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param experimentReviewDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定真值表-添加")
|
||||||
|
@Operation(summary="试验评定真值表-添加")
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody ExperimentReviewDetail experimentReviewDetail) {
|
||||||
|
experimentReviewDetailService.save(experimentReviewDetail);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param experimentReviewDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定真值表-编辑")
|
||||||
|
@Operation(summary="试验评定真值表-编辑")
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody ExperimentReviewDetail experimentReviewDetail) {
|
||||||
|
experimentReviewDetailService.updateById(experimentReviewDetail);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定真值表-通过id删除")
|
||||||
|
@Operation(summary="试验评定真值表-通过id删除")
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
experimentReviewDetailService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定真值表-批量删除")
|
||||||
|
@Operation(summary="试验评定真值表-批量删除")
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.experimentReviewDetailService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "试验评定真值表-通过id查询")
|
||||||
|
@Operation(summary="试验评定真值表-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<ExperimentReviewDetail> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ExperimentReviewDetail experimentReviewDetail = experimentReviewDetailService.getById(id);
|
||||||
|
if(experimentReviewDetail==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(experimentReviewDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param experimentReviewDetail
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ExperimentReviewDetail experimentReviewDetail) {
|
||||||
|
return super.exportXls(request, experimentReviewDetail, ExperimentReviewDetail.class, "试验评定真值表");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("database:experiment_review_detail:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ExperimentReviewDetail.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.database.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewRule;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定规则
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Tag(name="试验评定规则")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/database/experimentReviewRule")
|
||||||
|
@Slf4j
|
||||||
|
public class ExperimentReviewRuleController extends JeecgController<ExperimentReviewRule, IExperimentReviewRuleService> {
|
||||||
|
@Autowired
|
||||||
|
private IExperimentReviewRuleService experimentReviewRuleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param experimentReviewRule
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "试验评定规则-分页列表查询")
|
||||||
|
@Operation(summary="试验评定规则-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<ExperimentReviewRule>> queryPageList(ExperimentReviewRule experimentReviewRule,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<ExperimentReviewRule> queryWrapper = QueryGenerator.initQueryWrapper(experimentReviewRule, req.getParameterMap());
|
||||||
|
Page<ExperimentReviewRule> page = new Page<ExperimentReviewRule>(pageNo, pageSize);
|
||||||
|
IPage<ExperimentReviewRule> pageList = experimentReviewRuleService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param experimentReviewRule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定规则-添加")
|
||||||
|
@Operation(summary="试验评定规则-添加")
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody ExperimentReviewRule experimentReviewRule) {
|
||||||
|
experimentReviewRuleService.save(experimentReviewRule);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param experimentReviewRule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定规则-编辑")
|
||||||
|
@Operation(summary="试验评定规则-编辑")
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody ExperimentReviewRule experimentReviewRule) {
|
||||||
|
experimentReviewRuleService.updateById(experimentReviewRule);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定规则-通过id删除")
|
||||||
|
@Operation(summary="试验评定规则-通过id删除")
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
experimentReviewRuleService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "试验评定规则-批量删除")
|
||||||
|
@Operation(summary="试验评定规则-批量删除")
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.experimentReviewRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "试验评定规则-通过id查询")
|
||||||
|
@Operation(summary="试验评定规则-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<ExperimentReviewRule> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ExperimentReviewRule experimentReviewRule = experimentReviewRuleService.getById(id);
|
||||||
|
if(experimentReviewRule==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(experimentReviewRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param experimentReviewRule
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, ExperimentReviewRule experimentReviewRule) {
|
||||||
|
return super.exportXls(request, experimentReviewRule, ExperimentReviewRule.class, "试验评定规则");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("database:experiment_review_rule:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, ExperimentReviewRule.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,36 +1,37 @@
|
|||||||
package org.jeecg.modules.database.entity;
|
package org.jeecg.modules.database.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 试验评定
|
* @Description: 试验评定结果
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-11-05
|
* @Date: 2025-06-16
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("experiment_review")
|
@TableName("experiment_review")
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Schema(description = "试验评定")
|
@Schema(description = "试验评定结果")
|
||||||
public class ExperimentReview implements Serializable {
|
public class ExperimentReview implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* id
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Schema(description = "主键")
|
@Schema(description = "id")
|
||||||
private String id;
|
private String id;
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
@@ -62,34 +63,59 @@ public class ExperimentReview implements Serializable {
|
|||||||
@Schema(description = "所属部门")
|
@Schema(description = "所属部门")
|
||||||
private String sysOrgCode;
|
private String sysOrgCode;
|
||||||
/**
|
/**
|
||||||
* 实验ID
|
* 试验ID
|
||||||
*/
|
*/
|
||||||
@Excel(name = "实验ID", width = 15)
|
@Excel(name = "试验ID", width = 15)
|
||||||
@Schema(description = "实验ID")
|
@Schema(description = "试验ID")
|
||||||
private String experimentId;
|
private String experimentId;
|
||||||
/**
|
/**
|
||||||
* 评审流程
|
* 样品ID
|
||||||
*/
|
*/
|
||||||
@Excel(name = "评审流程", width = 15)
|
@Excel(name = "样品ID", width = 15)
|
||||||
@Schema(description = "评审流程")
|
@Schema(description = "样品ID")
|
||||||
private String reviewProcess;
|
private String sampleId;
|
||||||
/**
|
/**
|
||||||
* 评审详情(json大字段)
|
* 试验流程标准
|
||||||
*/
|
*/
|
||||||
@Excel(name = "评审详情(json大字段)", width = 15)
|
@Excel(name = "试验流程标准", width = 15)
|
||||||
@Schema(description = "评审详情(json大字段)")
|
@Schema(description = "试验流程标准")
|
||||||
private String reviewDetail;
|
private String processType;
|
||||||
/**
|
|
||||||
* 评审结果
|
|
||||||
*/
|
|
||||||
@Excel(name = "评审结果", width = 15)
|
|
||||||
@Schema(description = "评审结果(合格/不合格)")
|
|
||||||
private String reviewResult;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评审状态
|
* 是否需要退火
|
||||||
*/
|
*/
|
||||||
@Excel(name = "评审状态", width = 15)
|
@Excel(name = "是否需要退火", width = 15)
|
||||||
@Schema(description = "评审状态")
|
@Schema(description = "是否需要退火(Y/N)")
|
||||||
private int reviewStatus;
|
private String need_anneal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要辐照
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否需要辐照", width = 15)
|
||||||
|
@Schema(description = "是否需要辐照(Y/N)")
|
||||||
|
private String need_radiation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要老练
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否需要老练", width = 15)
|
||||||
|
@Schema(description = "是否需要老练(Y/N)")
|
||||||
|
private String need_burnin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评定结果
|
||||||
|
*/
|
||||||
|
@Excel(name = "评定结果", width = 15)
|
||||||
|
@Schema(description = "评定结果")
|
||||||
|
private String result;
|
||||||
|
/**
|
||||||
|
* 评定状态
|
||||||
|
*/
|
||||||
|
@Excel(name = "评定状态", width = 15)
|
||||||
|
@Schema(description = "评定状态")
|
||||||
|
private String reviewStatus;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ExperimentReviewRule> matchedRuleList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package org.jeecg.modules.database.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定真值表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("experiment_review_detail")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema(description="试验评定真值表")
|
||||||
|
public class ExperimentReviewDetail implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@Schema(description = "id")
|
||||||
|
private String id;
|
||||||
|
/**创建人*/
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||||
|
@Schema(description = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||||
|
@Schema(description = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
/**试验ID*/
|
||||||
|
@Excel(name = "试验ID", width = 15)
|
||||||
|
@Schema(description = "试验ID")
|
||||||
|
private String experimentId;
|
||||||
|
/**样品ID*/
|
||||||
|
@Excel(name = "样品ID", width = 15)
|
||||||
|
@Schema(description = "样品ID")
|
||||||
|
private String sampleId;
|
||||||
|
/**试验流程标准*/
|
||||||
|
@Excel(name = "试验流程标准", width = 15)
|
||||||
|
@Schema(description = "试验流程标准")
|
||||||
|
private String processType;
|
||||||
|
/**规则ID*/
|
||||||
|
@Excel(name = "规则ID", width = 15)
|
||||||
|
@Schema(description = "规则ID")
|
||||||
|
private String ruleId;
|
||||||
|
/**规则优先级*/
|
||||||
|
@Excel(name = "规则优先级", width = 15)
|
||||||
|
@Schema(description = "规则优先级")
|
||||||
|
private int priority;
|
||||||
|
/**评定结果*/
|
||||||
|
@Excel(name = "评定结果", width = 15)
|
||||||
|
@Schema(description = "评定结果")
|
||||||
|
private String result;
|
||||||
|
/**评定状态*/
|
||||||
|
@Excel(name = "评定状态", width = 15)
|
||||||
|
@Schema(description = "评定状态")
|
||||||
|
private String reviewStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package org.jeecg.modules.database.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定规则
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("experiment_review_rule")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema(description="试验评定规则")
|
||||||
|
public class ExperimentReviewRule implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@Schema(description = "id")
|
||||||
|
private String id;
|
||||||
|
/**创建人*/
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||||
|
@Schema(description = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||||
|
@Schema(description = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@Schema(description = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
/**试验流程标准*/
|
||||||
|
@Excel(name = "试验流程标准", width = 15)
|
||||||
|
@Schema(description = "试验流程标准")
|
||||||
|
private String processType;
|
||||||
|
/**建议标题*/
|
||||||
|
@Excel(name = "建议标题", width = 15)
|
||||||
|
@Schema(description = "建议标题")
|
||||||
|
private String title;
|
||||||
|
/**评定结果*/
|
||||||
|
@Excel(name = "评定结果", width = 15)
|
||||||
|
@Schema(description = "评定结果")
|
||||||
|
private String result;
|
||||||
|
/**损伤机理*/
|
||||||
|
@Excel(name = "损伤机理", width = 15)
|
||||||
|
@Schema(description = "损伤机理")
|
||||||
|
private String impactDesc;
|
||||||
|
/**适用范围*/
|
||||||
|
@Excel(name = "适用范围", width = 15)
|
||||||
|
@Schema(description = "适用范围")
|
||||||
|
private String impactScope;
|
||||||
|
/**规则表达式*/
|
||||||
|
@Excel(name = "规则表达式", width = 15)
|
||||||
|
@Schema(description = "规则表达式")
|
||||||
|
private String expression;
|
||||||
|
/**规则优先级*/
|
||||||
|
@Excel(name = "规则优先级", width = 15)
|
||||||
|
@Schema(description = "规则优先级")
|
||||||
|
private int priority;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.database.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewDetail;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定真值表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ExperimentReviewDetailMapper extends BaseMapper<ExperimentReviewDetail> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.database.mapper;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReview;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定结果
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ExperimentReviewResultMapper extends BaseMapper<ExperimentReview> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.database.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewRule;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定规则
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ExperimentReviewRuleMapper extends BaseMapper<ExperimentReviewRule> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.database.mapper.ExperimentReviewDetailMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.database.mapper.ExperimentReviewResultMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.database.mapper.ExperimentReviewRuleMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package org.jeecg.modules.database.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewDetail;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定真值表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IExperimentReviewDetailService extends IService<ExperimentReviewDetail> {
|
||||||
|
|
||||||
|
List<ExperimentReviewDetail> getBySample(String experimentId, String sampleId);
|
||||||
|
|
||||||
|
ExperimentReviewDetail getByRule(String experimentId, String sampleId, String ruleId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.system.cache.AuthStateRedisCache;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
* @version IExperimentReviewRuleExecutor.java, v 0.1 2025年06月16日 17:30 lise
|
||||||
|
*/
|
||||||
|
public interface IExperimentReviewRuleExecutor {
|
||||||
|
|
||||||
|
String getProcessType();
|
||||||
|
int getPriority();
|
||||||
|
String execute(Experiment experiment, ExperimentSampleInfo sampleInfo);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.jeecg.modules.database.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.entity.*;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定规则
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IExperimentReviewRuleService extends IService<ExperimentReviewRule> {
|
||||||
|
|
||||||
|
List<ExperimentReviewRule> getByType(String processType);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package org.jeecg.modules.database.service;
|
package org.jeecg.modules.database.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.entity.*;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.database.entity.ExperimentReview;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 试验评定
|
* @Description: 试验评定结果
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-11-05
|
* @Date: 2025-06-16
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IExperimentReviewService extends IService<ExperimentReview> {
|
public interface IExperimentReviewService extends IService<ExperimentReview> {
|
||||||
ExperimentReview getByExperimentId(String experimentId);
|
|
||||||
|
|
||||||
|
ExperimentReview review(Experiment experiment, ExperimentSampleInfo sampleInfo, String processType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC225001Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC22500;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC225002Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC22500;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC225003Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC22500;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC225004Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC22500;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290001Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290002Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290003Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290004Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290005Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290006Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290007Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290008Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ESCC2290009Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.ESCC229000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ExecutorHolder {
|
||||||
|
private Map<String, IExperimentReviewRuleExecutor> executors = new HashMap<>();
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC22500 + "1", new ESCC225001Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC22500 + "2", new ESCC225002Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC22500 + "3", new ESCC225003Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC22500 + "4", new ESCC225004Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "1", new ESCC2290001Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "2", new ESCC2290002Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "3", new ESCC2290003Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "4", new ESCC2290004Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "5", new ESCC2290005Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "6", new ESCC2290006Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "7", new ESCC2290007Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "8", new ESCC2290008Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.ESCC229000 + "9", new ESCC2290009Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "1", new GJB548C1Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "2", new GJB548C2Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "3", new GJB548C3Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "4", new GJB548C4Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "5", new GJB548C5Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "6", new GJB548C6Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "7", new GJB548C7Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "8", new GJB548C8Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "9", new GJB548C9Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "10", new GJB548C10Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "11", new GJB548C11Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "12", new GJB548C12Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "13", new GJB548C13Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "14", new GJB548C14Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "15", new GJB548C15Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.GJB548C + "16", new GJB548C16Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "1", new QJ100041Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "2", new QJ100042Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "3", new QJ100043Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "4", new QJ100044Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "5", new QJ100045Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "6", new QJ100046Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "7", new QJ100047Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "8", new QJ100048Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "9", new QJ100049Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "10", new QJ1000410Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "11", new QJ1000411Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "12", new QJ1000412Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "13", new QJ1000413Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "14", new QJ1000414Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "15", new QJ1000415Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "16", new QJ1000416Executor());
|
||||||
|
executors.put(ExperimentReviewProcessType.QJ10004 + "17", new QJ1000417Executor());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String execute(String processType, Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
IExperimentReviewRuleExecutor executor = executors.get(processType);
|
||||||
|
if (executor == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return executor.execute(experiment, sampleInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C10Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C11Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C12Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C13Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 13;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C14Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C15Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C16Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewResultEnum;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
* @version GJB548C1Executor.java, v 0.1 2025年06月16日 20:57 lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C1Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return ExperimentReviewResultEnum.HIGH;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewResultEnum;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
* @version GJB548C1Executor.java, v 0.1 2025年06月16日 20:57 lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C2Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return ExperimentReviewResultEnum.ITEM_PASS;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewResultEnum;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
* @version GJB548C1Executor.java, v 0.1 2025年06月16日 20:57 lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C3Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return ExperimentReviewResultEnum.HIGH;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
* @version GJB548C1Executor.java, v 0.1 2025年06月16日 20:57 lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C4Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C5Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C6Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C7Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C8Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GJB548C9Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.GJB548C;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000410Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000411Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000412Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000413Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 13;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000414Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000415Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000416Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ1000417Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 17;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100041Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100042Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100043Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100044Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100045Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100046Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100047Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100048Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Ant Group
|
||||||
|
* Copyright (c) 2004-2025 All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package org.jeecg.modules.database.service.executor;
|
||||||
|
|
||||||
|
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
|
||||||
|
import org.jeecg.modules.database.entity.Experiment;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentSampleInfo;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lise
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class QJ100049Executor implements IExperimentReviewRuleExecutor {
|
||||||
|
@Override
|
||||||
|
public String getProcessType() {
|
||||||
|
return ExperimentReviewProcessType.QJ10004;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPriority() {
|
||||||
|
return 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package org.jeecg.modules.database.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import org.jeecg.modules.database.entity.ExperimentReviewDetail;
|
||||||
|
import org.jeecg.modules.database.mapper.ExperimentReviewDetailMapper;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定真值表
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ExperimentReviewDetailServiceImpl extends ServiceImpl<ExperimentReviewDetailMapper, ExperimentReviewDetail>
|
||||||
|
implements IExperimentReviewDetailService {
|
||||||
|
@Override
|
||||||
|
public List<ExperimentReviewDetail> getBySample(String experimentId, String sampleId) {
|
||||||
|
return list(new LambdaQueryWrapper<ExperimentReviewDetail>().eq(ExperimentReviewDetail::getExperimentId, experimentId)
|
||||||
|
.eq(ExperimentReviewDetail::getSampleId, sampleId).orderByAsc(ExperimentReviewDetail::getPriority));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExperimentReviewDetail getByRule(String experimentId, String sampleId, String ruleId) {
|
||||||
|
return baseMapper.selectOne(new LambdaQueryWrapper<ExperimentReviewDetail>().eq(ExperimentReviewDetail::getExperimentId,
|
||||||
|
experimentId).eq(ExperimentReviewDetail::getSampleId, sampleId).eq(ExperimentReviewDetail::getRuleId, ruleId), false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveOrUpdate(ExperimentReviewDetail entity) {
|
||||||
|
ExperimentReviewDetail experimentReviewDetail = getByRule(entity.getExperimentId(), entity.getSampleId(), entity.getRuleId());
|
||||||
|
if (experimentReviewDetail != null) {
|
||||||
|
entity.setId(experimentReviewDetail.getId());
|
||||||
|
}
|
||||||
|
return super.saveOrUpdate(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package org.jeecg.modules.database.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import org.jeecg.modules.database.entity.*;
|
||||||
|
import org.jeecg.modules.database.mapper.ExperimentReviewRuleMapper;
|
||||||
|
import org.jeecg.modules.database.service.IExperimentReviewRuleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 试验评定规则
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-06-16
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ExperimentReviewRuleServiceImpl extends ServiceImpl<ExperimentReviewRuleMapper, ExperimentReviewRule>
|
||||||
|
implements IExperimentReviewRuleService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ExperimentReviewRule> getByType(String processType) {
|
||||||
|
return list(new LambdaQueryWrapper<ExperimentReviewRule>().eq(ExperimentReviewRule::getProcessType, processType)
|
||||||
|
.orderByAsc(ExperimentReviewRule::getPriority));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,23 +1,91 @@
|
|||||||
package org.jeecg.modules.database.service.impl;
|
package org.jeecg.modules.database.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import org.jeecg.modules.database.entity.ExperimentReview;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.modules.database.mapper.ExperimentReviewMapper;
|
import org.jeecg.modules.database.constant.ExperimentReviewResultEnum;
|
||||||
import org.jeecg.modules.database.service.IExperimentReviewService;
|
import org.jeecg.modules.database.entity.*;
|
||||||
|
import org.jeecg.modules.database.mapper.ExperimentReviewResultMapper;
|
||||||
|
import org.jeecg.modules.database.service.*;
|
||||||
|
import org.jeecg.modules.database.service.executor.ExecutorHolder;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 试验评定
|
* @Description: 试验评定结果
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2024-11-05
|
* @Date: 2025-06-16
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ExperimentReviewServiceImpl extends ServiceImpl<ExperimentReviewMapper, ExperimentReview> implements IExperimentReviewService {
|
public class ExperimentReviewServiceImpl extends ServiceImpl<ExperimentReviewResultMapper, ExperimentReview>
|
||||||
|
implements IExperimentReviewService {
|
||||||
|
@Autowired
|
||||||
|
private IExperimentReviewRuleService experimentReviewRuleService;
|
||||||
|
@Autowired
|
||||||
|
private IExperimentReviewDetailService experimentReviewDetailService;
|
||||||
|
@Autowired
|
||||||
|
private ExecutorHolder executorHolder;
|
||||||
|
|
||||||
|
//高估代表 0,低估代表 1,无法评定代表2,评定结果通过代表3,未通过代表 4
|
||||||
@Override
|
@Override
|
||||||
public ExperimentReview getByExperimentId(String experimentId) {
|
public ExperimentReview review(Experiment experiment, ExperimentSampleInfo sampleInfo, String processType) {
|
||||||
return getOne(new LambdaQueryWrapper<ExperimentReview>().eq(ExperimentReview::getExperimentId, experimentId), false);
|
List<ExperimentReviewRule> ruleList = experimentReviewRuleService.getByType(processType);
|
||||||
|
ExperimentReview result = new ExperimentReview();
|
||||||
|
result.setExperimentId(experiment.getId());
|
||||||
|
result.setProcessType(processType);
|
||||||
|
result.setSampleId(sampleInfo.getId());
|
||||||
|
for (int i = 0; i < ruleList.size(); i++) {
|
||||||
|
ExperimentReviewRule rule = ruleList.get(i);
|
||||||
|
String executeResult = executorHolder.execute(rule.getProcessType() + rule.getPriority(), experiment, sampleInfo);
|
||||||
|
if (StrUtil.isNotBlank(executeResult)) {
|
||||||
|
ExperimentReviewDetail detail = new ExperimentReviewDetail();
|
||||||
|
detail.setExperimentId(experiment.getId());
|
||||||
|
detail.setSampleId(sampleInfo.getId());
|
||||||
|
detail.setProcessType(processType);
|
||||||
|
detail.setRuleId(rule.getId());
|
||||||
|
detail.setPriority(rule.getPriority());
|
||||||
|
detail.setResult(executeResult);
|
||||||
|
experimentReviewDetailService.saveOrUpdate(detail);
|
||||||
|
}
|
||||||
|
if (i == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String reviewResult = adjustResult(experiment.getId(), sampleInfo.getId());
|
||||||
|
if (StringUtils.isNotBlank(reviewResult)) {
|
||||||
|
result.setResult(reviewResult);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String adjustResult(String experimentId, String sampleId) {
|
||||||
|
List<ExperimentReviewDetail> detailList = experimentReviewDetailService.getBySample(experimentId, sampleId);
|
||||||
|
ExperimentReviewDetail first = CollUtil.getFirst(detailList);
|
||||||
|
ExperimentReviewDetail last = CollUtil.getLast(detailList);
|
||||||
|
if (detailList.size() > 1 && !StrUtil.equals(first.getResult(), last.getResult())) {
|
||||||
|
return ExperimentReviewResultEnum.UNKNOWN;
|
||||||
|
}
|
||||||
|
if (detailList.size() == 1 && first.getResult().equals(ExperimentReviewResultEnum.FINAL_PASS)) {
|
||||||
|
return ExperimentReviewResultEnum.FINAL_PASS;
|
||||||
|
}
|
||||||
|
if (detailList.size() == 1 && first.getResult().equals(ExperimentReviewResultEnum.NOT_PASS)) {
|
||||||
|
return ExperimentReviewResultEnum.NOT_PASS;
|
||||||
|
}
|
||||||
|
if (detailList.size() == 2 && StrUtil.equals(first.getResult(), last.getResult())) {
|
||||||
|
return first.getResult();
|
||||||
|
}
|
||||||
|
if (detailList.size() == 2 && !StrUtil.equals(first.getResult(), last.getResult())) {
|
||||||
|
return ExperimentReviewResultEnum.UNKNOWN;
|
||||||
|
}
|
||||||
|
if (detailList.size() > 2) {
|
||||||
|
return ExperimentReviewResultEnum.UNKNOWN;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定真值表</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--表单区域-->
|
||||||
|
<view>
|
||||||
|
<form>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">试验ID:</text></view>
|
||||||
|
<input placeholder="请输入试验ID" v-model="model.experimentId"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">样品ID:</text></view>
|
||||||
|
<input placeholder="请输入样品ID" v-model="model.sampleId"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">试验流程标准:</text></view>
|
||||||
|
<input placeholder="请输入试验流程标准" v-model="model.processType"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">规则ID:</text></view>
|
||||||
|
<input placeholder="请输入规则ID" v-model="model.ruleId"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">评定结果:</text></view>
|
||||||
|
<input placeholder="请输入评定结果" v-model="model.result"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">评定状态:</text></view>
|
||||||
|
<input placeholder="请输入评定状态" v-model="model.reviewStatus"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding">
|
||||||
|
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit">
|
||||||
|
<text v-if="loading" class="cuIcon-loading2 cuIconfont-spin"></text>提交
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import myDate from '@/components/my-componets/my-date.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ExperimentReviewDetailForm",
|
||||||
|
components:{ myDate },
|
||||||
|
props:{
|
||||||
|
formData:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{},
|
||||||
|
required:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
CustomBar: this.CustomBar,
|
||||||
|
NavBarColor: this.NavBarColor,
|
||||||
|
loading:false,
|
||||||
|
model: {},
|
||||||
|
backRouteName:'index',
|
||||||
|
url: {
|
||||||
|
queryById: "/database/experimentReviewDetail/queryById",
|
||||||
|
add: "/database/experimentReviewDetail/add",
|
||||||
|
edit: "/database/experimentReviewDetail/edit",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.initFormData();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
initFormData(){
|
||||||
|
if(this.formData){
|
||||||
|
let dataId = this.formData.dataId;
|
||||||
|
this.$http.get(this.url.queryById,{params:{id:dataId}}).then((res)=>{
|
||||||
|
if(res.data.success){
|
||||||
|
console.log("表单数据",res);
|
||||||
|
this.model = res.data.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
let myForm = {...this.model};
|
||||||
|
this.loading = true;
|
||||||
|
let url = myForm.id?this.url.edit:this.url.add;
|
||||||
|
this.$http.post(url,myForm).then(res=>{
|
||||||
|
console.log("res",res)
|
||||||
|
this.loading = false
|
||||||
|
this.$Router.push({name:this.backRouteName})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack>
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定真值表</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--滚动加载列表-->
|
||||||
|
<mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
|
||||||
|
<view class="cu-list menu">
|
||||||
|
<view class="cu-item" v-for="(item,index) in list" :key="index" @click="goHome">
|
||||||
|
<view class="flex" style="width:100%">
|
||||||
|
<text class="text-lg" style="color: #000;">
|
||||||
|
{{ item.createBy}}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</mescroll-body>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
||||||
|
import Mixin from "@/common/mixin/Mixin.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '试验评定真值表',
|
||||||
|
mixins: [MescrollMixin,Mixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
CustomBar:this.CustomBar,
|
||||||
|
NavBarColor:this.NavBarColor,
|
||||||
|
url: "/database/experimentReviewDetail/list",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goHome(){
|
||||||
|
this.$Router.push({name: "index"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定结果</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--表单区域-->
|
||||||
|
<view>
|
||||||
|
<form>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">试验ID:</text></view>
|
||||||
|
<input placeholder="请输入试验ID" v-model="model.experimentId"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">样品ID:</text></view>
|
||||||
|
<input placeholder="请输入样品ID" v-model="model.sampleId"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">试验流程标准:</text></view>
|
||||||
|
<input placeholder="请输入试验流程标准" v-model="model.processType"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">评定结果:</text></view>
|
||||||
|
<input placeholder="请输入评定结果" v-model="model.result"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">评定状态:</text></view>
|
||||||
|
<input placeholder="请输入评定状态" v-model="model.reviewStatus"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding">
|
||||||
|
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit">
|
||||||
|
<text v-if="loading" class="cuIcon-loading2 cuIconfont-spin"></text>提交
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import myDate from '@/components/my-componets/my-date.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ExperimentReviewResultForm",
|
||||||
|
components:{ myDate },
|
||||||
|
props:{
|
||||||
|
formData:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{},
|
||||||
|
required:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
CustomBar: this.CustomBar,
|
||||||
|
NavBarColor: this.NavBarColor,
|
||||||
|
loading:false,
|
||||||
|
model: {},
|
||||||
|
backRouteName:'index',
|
||||||
|
url: {
|
||||||
|
queryById: "/database/experimentReviewResult/queryById",
|
||||||
|
add: "/database/experimentReviewResult/add",
|
||||||
|
edit: "/database/experimentReviewResult/edit",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.initFormData();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
initFormData(){
|
||||||
|
if(this.formData){
|
||||||
|
let dataId = this.formData.dataId;
|
||||||
|
this.$http.get(this.url.queryById,{params:{id:dataId}}).then((res)=>{
|
||||||
|
if(res.data.success){
|
||||||
|
console.log("表单数据",res);
|
||||||
|
this.model = res.data.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
let myForm = {...this.model};
|
||||||
|
this.loading = true;
|
||||||
|
let url = myForm.id?this.url.edit:this.url.add;
|
||||||
|
this.$http.post(url,myForm).then(res=>{
|
||||||
|
console.log("res",res)
|
||||||
|
this.loading = false
|
||||||
|
this.$Router.push({name:this.backRouteName})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack>
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定结果</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--滚动加载列表-->
|
||||||
|
<mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
|
||||||
|
<view class="cu-list menu">
|
||||||
|
<view class="cu-item" v-for="(item,index) in list" :key="index" @click="goHome">
|
||||||
|
<view class="flex" style="width:100%">
|
||||||
|
<text class="text-lg" style="color: #000;">
|
||||||
|
{{ item.createBy}}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</mescroll-body>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
||||||
|
import Mixin from "@/common/mixin/Mixin.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '试验评定结果',
|
||||||
|
mixins: [MescrollMixin,Mixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
CustomBar:this.CustomBar,
|
||||||
|
NavBarColor:this.NavBarColor,
|
||||||
|
url: "/database/experimentReviewResult/list",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goHome(){
|
||||||
|
this.$Router.push({name: "index"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定规则</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--表单区域-->
|
||||||
|
<view>
|
||||||
|
<form>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">试验流程标准:</text></view>
|
||||||
|
<input placeholder="请输入试验流程标准" v-model="model.processType"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">建议标题:</text></view>
|
||||||
|
<input placeholder="请输入建议标题" v-model="model.title"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">评定结果:</text></view>
|
||||||
|
<input placeholder="请输入评定结果" v-model="model.result"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">损伤机理:</text></view>
|
||||||
|
<input placeholder="请输入损伤机理" v-model="model.impactDesc"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">适用范围:</text></view>
|
||||||
|
<input placeholder="请输入适用范围" v-model="model.impactScope"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">规则表达式:</text></view>
|
||||||
|
<input placeholder="请输入规则表达式" v-model="model.expression"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="cu-form-group">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<view class="title"><text space="ensp">规则优先级:</text></view>
|
||||||
|
<input placeholder="请输入规则优先级" v-model="model.priority"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding">
|
||||||
|
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit">
|
||||||
|
<text v-if="loading" class="cuIcon-loading2 cuIconfont-spin"></text>提交
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import myDate from '@/components/my-componets/my-date.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ExperimentReviewRuleForm",
|
||||||
|
components:{ myDate },
|
||||||
|
props:{
|
||||||
|
formData:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{},
|
||||||
|
required:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
CustomBar: this.CustomBar,
|
||||||
|
NavBarColor: this.NavBarColor,
|
||||||
|
loading:false,
|
||||||
|
model: {},
|
||||||
|
backRouteName:'index',
|
||||||
|
url: {
|
||||||
|
queryById: "/database/experimentReviewRule/queryById",
|
||||||
|
add: "/database/experimentReviewRule/add",
|
||||||
|
edit: "/database/experimentReviewRule/edit",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.initFormData();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
initFormData(){
|
||||||
|
if(this.formData){
|
||||||
|
let dataId = this.formData.dataId;
|
||||||
|
this.$http.get(this.url.queryById,{params:{id:dataId}}).then((res)=>{
|
||||||
|
if(res.data.success){
|
||||||
|
console.log("表单数据",res);
|
||||||
|
this.model = res.data.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
let myForm = {...this.model};
|
||||||
|
this.loading = true;
|
||||||
|
let url = myForm.id?this.url.edit:this.url.add;
|
||||||
|
this.$http.post(url,myForm).then(res=>{
|
||||||
|
console.log("res",res)
|
||||||
|
this.loading = false
|
||||||
|
this.$Router.push({name:this.backRouteName})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!--标题和返回-->
|
||||||
|
<cu-custom :bgColor="NavBarColor" isBack>
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">试验评定规则</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!--滚动加载列表-->
|
||||||
|
<mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
|
||||||
|
<view class="cu-list menu">
|
||||||
|
<view class="cu-item" v-for="(item,index) in list" :key="index" @click="goHome">
|
||||||
|
<view class="flex" style="width:100%">
|
||||||
|
<text class="text-lg" style="color: #000;">
|
||||||
|
{{ item.createBy}}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</mescroll-body>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
|
||||||
|
import Mixin from "@/common/mixin/Mixin.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '试验评定规则',
|
||||||
|
mixins: [MescrollMixin,Mixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
CustomBar:this.CustomBar,
|
||||||
|
NavBarColor:this.NavBarColor,
|
||||||
|
url: "/database/experimentReviewRule/list",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goHome(){
|
||||||
|
this.$Router.push({name: "index"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/database/experimentReviewDetail/list',
|
||||||
|
save='/database/experimentReviewDetail/add',
|
||||||
|
edit='/database/experimentReviewDetail/edit',
|
||||||
|
deleteOne = '/database/experimentReviewDetail/delete',
|
||||||
|
deleteBatch = '/database/experimentReviewDetail/deleteBatch',
|
||||||
|
importExcel = '/database/experimentReviewDetail/importExcel',
|
||||||
|
exportXls = '/database/experimentReviewDetail/exportXls',
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) =>
|
||||||
|
defHttp.get({url: Api.list, params});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
|
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({url: url, params});
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '试验ID',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'experimentId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '样品ID',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'sampleId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '试验流程标准',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'processType'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '规则ID',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'ruleId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评定结果',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'result'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评定状态',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'reviewStatus'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
//查询数据
|
||||||
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
];
|
||||||
|
//表单数据
|
||||||
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '试验ID',
|
||||||
|
field: 'experimentId',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '样品ID',
|
||||||
|
field: 'sampleId',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '试验流程标准',
|
||||||
|
field: 'processType',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '规则ID',
|
||||||
|
field: 'ruleId',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '评定结果',
|
||||||
|
field: 'result',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '评定状态',
|
||||||
|
field: 'reviewStatus',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
// TODO 主键隐藏字段,目前写死为ID
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
field: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 高级查询数据
|
||||||
|
export const superQuerySchema = {
|
||||||
|
experimentId: {title: '试验ID',order: 0,view: 'text', type: 'string',},
|
||||||
|
sampleId: {title: '样品ID',order: 1,view: 'text', type: 'string',},
|
||||||
|
processType: {title: '试验流程标准',order: 2,view: 'text', type: 'string',},
|
||||||
|
ruleId: {title: '规则ID',order: 3,view: 'text', type: 'string',},
|
||||||
|
result: {title: '评定结果',order: 4,view: 'text', type: 'string',},
|
||||||
|
reviewStatus: {title: '评定状态',order: 5,view: 'text', type: 'string',},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程表单调用这个方法获取formSchema
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
export function getBpmFormSchema(_formData): FormSchema[]{
|
||||||
|
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||||
|
return formSchema;
|
||||||
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button>批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
<!-- 高级查询 -->
|
||||||
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||||
|
</template>
|
||||||
|
<!--字段回显插槽-->
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<ExperimentReviewDetailModal @register="registerModal" @success="handleSuccess"></ExperimentReviewDetailModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="database-experimentReviewDetail" setup>
|
||||||
|
import {ref, reactive, computed, unref} from 'vue';
|
||||||
|
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||||
|
import {useModal} from '/@/components/Modal';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
|
import ExperimentReviewDetailModal from './components/ExperimentReviewDetailModal.vue'
|
||||||
|
import {columns, searchFormSchema, superQuerySchema} from './ExperimentReviewDetail.data';
|
||||||
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './ExperimentReviewDetail.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
const userStore = useUserStore();
|
||||||
|
//注册model
|
||||||
|
const [registerModal, {openModal}] = useModal();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||||
|
tableProps:{
|
||||||
|
title: '试验评定真值表',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize:false,
|
||||||
|
formConfig: {
|
||||||
|
//labelWidth: 120,
|
||||||
|
schemas: searchFormSchema,
|
||||||
|
autoSubmitOnEnter:true,
|
||||||
|
showAdvancedButton:true,
|
||||||
|
fieldMapToNumber: [
|
||||||
|
],
|
||||||
|
fieldMapToTime: [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed:'right'
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name:"试验评定真值表",
|
||||||
|
url: getExportUrl,
|
||||||
|
params: queryParam,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||||
|
|
||||||
|
// 高级查询配置
|
||||||
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高级查询事件
|
||||||
|
*/
|
||||||
|
function handleSuperQuery(params) {
|
||||||
|
Object.keys(params).map((k) => {
|
||||||
|
queryParam[k] = params[k];
|
||||||
|
});
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
openModal(true, {
|
||||||
|
isUpdate: false,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除事件
|
||||||
|
*/
|
||||||
|
async function handleDelete(record) {
|
||||||
|
await deleteOne({id: record.id}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 下拉操作栏
|
||||||
|
*/
|
||||||
|
function getDropDownAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
placement: 'topLeft',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.ant-picker),:deep(.ant-input-number){
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/database/experimentReviewResult/list',
|
||||||
|
save='/database/experimentReviewResult/add',
|
||||||
|
edit='/database/experimentReviewResult/edit',
|
||||||
|
deleteOne = '/database/experimentReviewResult/delete',
|
||||||
|
deleteBatch = '/database/experimentReviewResult/deleteBatch',
|
||||||
|
importExcel = '/database/experimentReviewResult/importExcel',
|
||||||
|
exportXls = '/database/experimentReviewResult/exportXls',
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) =>
|
||||||
|
defHttp.get({url: Api.list, params});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
|
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({url: url, params});
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '试验ID',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'experimentId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '样品ID',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'sampleId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '试验流程标准',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'processType'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评定结果',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'result'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评定状态',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'reviewStatus'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
//查询数据
|
||||||
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
];
|
||||||
|
//表单数据
|
||||||
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '试验ID',
|
||||||
|
field: 'experimentId',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '样品ID',
|
||||||
|
field: 'sampleId',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '试验流程标准',
|
||||||
|
field: 'processType',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '评定结果',
|
||||||
|
field: 'result',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '评定状态',
|
||||||
|
field: 'reviewStatus',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
// TODO 主键隐藏字段,目前写死为ID
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
field: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 高级查询数据
|
||||||
|
export const superQuerySchema = {
|
||||||
|
experimentId: {title: '试验ID',order: 0,view: 'text', type: 'string',},
|
||||||
|
sampleId: {title: '样品ID',order: 1,view: 'text', type: 'string',},
|
||||||
|
processType: {title: '试验流程标准',order: 2,view: 'text', type: 'string',},
|
||||||
|
result: {title: '评定结果',order: 3,view: 'text', type: 'string',},
|
||||||
|
reviewStatus: {title: '评定状态',order: 4,view: 'text', type: 'string',},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程表单调用这个方法获取formSchema
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
export function getBpmFormSchema(_formData): FormSchema[]{
|
||||||
|
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||||
|
return formSchema;
|
||||||
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button>批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
<!-- 高级查询 -->
|
||||||
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||||
|
</template>
|
||||||
|
<!--字段回显插槽-->
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<ExperimentReviewResultModal @register="registerModal" @success="handleSuccess"></ExperimentReviewResultModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="database-experimentReviewResult" setup>
|
||||||
|
import {ref, reactive, computed, unref} from 'vue';
|
||||||
|
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||||
|
import {useModal} from '/@/components/Modal';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
|
import ExperimentReviewResultModal from './components/ExperimentReviewResultModal.vue'
|
||||||
|
import {columns, searchFormSchema, superQuerySchema} from './ExperimentReviewResult.data';
|
||||||
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './ExperimentReviewResult.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
const userStore = useUserStore();
|
||||||
|
//注册model
|
||||||
|
const [registerModal, {openModal}] = useModal();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||||
|
tableProps:{
|
||||||
|
title: '试验评定结果',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize:false,
|
||||||
|
formConfig: {
|
||||||
|
//labelWidth: 120,
|
||||||
|
schemas: searchFormSchema,
|
||||||
|
autoSubmitOnEnter:true,
|
||||||
|
showAdvancedButton:true,
|
||||||
|
fieldMapToNumber: [
|
||||||
|
],
|
||||||
|
fieldMapToTime: [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed:'right'
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name:"试验评定结果",
|
||||||
|
url: getExportUrl,
|
||||||
|
params: queryParam,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||||
|
|
||||||
|
// 高级查询配置
|
||||||
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高级查询事件
|
||||||
|
*/
|
||||||
|
function handleSuperQuery(params) {
|
||||||
|
Object.keys(params).map((k) => {
|
||||||
|
queryParam[k] = params[k];
|
||||||
|
});
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
openModal(true, {
|
||||||
|
isUpdate: false,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除事件
|
||||||
|
*/
|
||||||
|
async function handleDelete(record) {
|
||||||
|
await deleteOne({id: record.id}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 下拉操作栏
|
||||||
|
*/
|
||||||
|
function getDropDownAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
placement: 'topLeft',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.ant-picker),:deep(.ant-input-number){
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/database/experimentReviewRule/list',
|
||||||
|
save='/database/experimentReviewRule/add',
|
||||||
|
edit='/database/experimentReviewRule/edit',
|
||||||
|
deleteOne = '/database/experimentReviewRule/delete',
|
||||||
|
deleteBatch = '/database/experimentReviewRule/deleteBatch',
|
||||||
|
importExcel = '/database/experimentReviewRule/importExcel',
|
||||||
|
exportXls = '/database/experimentReviewRule/exportXls',
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) =>
|
||||||
|
defHttp.get({url: Api.list, params});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
|
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({url: url, params});
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '试验流程标准',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'processType'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '建议标题',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'title'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评定结果',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'result'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '损伤机理',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'impactDesc'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '适用范围',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'impactScope'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '规则表达式',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'expression'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '规则优先级',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'priority'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
//查询数据
|
||||||
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
];
|
||||||
|
//表单数据
|
||||||
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '试验流程标准',
|
||||||
|
field: 'processType',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '建议标题',
|
||||||
|
field: 'title',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '评定结果',
|
||||||
|
field: 'result',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '损伤机理',
|
||||||
|
field: 'impactDesc',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '适用范围',
|
||||||
|
field: 'impactScope',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '规则表达式',
|
||||||
|
field: 'expression',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '规则优先级',
|
||||||
|
field: 'priority',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
// TODO 主键隐藏字段,目前写死为ID
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
field: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 高级查询数据
|
||||||
|
export const superQuerySchema = {
|
||||||
|
processType: {title: '试验流程标准',order: 0,view: 'text', type: 'string',},
|
||||||
|
title: {title: '建议标题',order: 1,view: 'text', type: 'string',},
|
||||||
|
result: {title: '评定结果',order: 2,view: 'text', type: 'string',},
|
||||||
|
impactDesc: {title: '损伤机理',order: 3,view: 'text', type: 'string',},
|
||||||
|
impactScope: {title: '适用范围',order: 4,view: 'text', type: 'string',},
|
||||||
|
expression: {title: '规则表达式',order: 5,view: 'text', type: 'string',},
|
||||||
|
priority: {title: '规则优先级',order: 6,view: 'text', type: 'string',},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程表单调用这个方法获取formSchema
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
export function getBpmFormSchema(_formData): FormSchema[]{
|
||||||
|
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||||
|
return formSchema;
|
||||||
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button>批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
<!-- 高级查询 -->
|
||||||
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||||
|
</template>
|
||||||
|
<!--字段回显插槽-->
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<ExperimentReviewRuleModal @register="registerModal" @success="handleSuccess"></ExperimentReviewRuleModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="database-experimentReviewRule" setup>
|
||||||
|
import {ref, reactive, computed, unref} from 'vue';
|
||||||
|
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||||
|
import {useModal} from '/@/components/Modal';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
|
import ExperimentReviewRuleModal from './components/ExperimentReviewRuleModal.vue'
|
||||||
|
import {columns, searchFormSchema, superQuerySchema} from './ExperimentReviewRule.data';
|
||||||
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './ExperimentReviewRule.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
const userStore = useUserStore();
|
||||||
|
//注册model
|
||||||
|
const [registerModal, {openModal}] = useModal();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||||
|
tableProps:{
|
||||||
|
title: '试验评定规则',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize:false,
|
||||||
|
formConfig: {
|
||||||
|
//labelWidth: 120,
|
||||||
|
schemas: searchFormSchema,
|
||||||
|
autoSubmitOnEnter:true,
|
||||||
|
showAdvancedButton:true,
|
||||||
|
fieldMapToNumber: [
|
||||||
|
],
|
||||||
|
fieldMapToTime: [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed:'right'
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name:"试验评定规则",
|
||||||
|
url: getExportUrl,
|
||||||
|
params: queryParam,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||||
|
|
||||||
|
// 高级查询配置
|
||||||
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高级查询事件
|
||||||
|
*/
|
||||||
|
function handleSuperQuery(params) {
|
||||||
|
Object.keys(params).map((k) => {
|
||||||
|
queryParam[k] = params[k];
|
||||||
|
});
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
openModal(true, {
|
||||||
|
isUpdate: false,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除事件
|
||||||
|
*/
|
||||||
|
async function handleDelete(record) {
|
||||||
|
await deleteOne({id: record.id}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 下拉操作栏
|
||||||
|
*/
|
||||||
|
function getDropDownAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
placement: 'topLeft',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.ant-picker),:deep(.ant-input-number){
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
-- 注意:该页面对应的前台目录为views/database文件夹下
|
||||||
|
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||||
|
VALUES ('202506160440880560', NULL, '试验评定真值表', '/database/experimentReviewDetailList', 'database/ExperimentReviewDetailList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0);
|
||||||
|
|
||||||
|
-- 权限控制sql
|
||||||
|
-- 新增
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880561', '202506160440880560', '添加试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 编辑
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880562', '202506160440880560', '编辑试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880563', '202506160440880560', '删除试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 批量删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880564', '202506160440880560', '批量删除试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导出excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880565', '202506160440880560', '导出excel_试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导入excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('202506160440880566', '202506160440880560', '导入excel_试验评定真值表', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_detail:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:56', NULL, NULL, 0, 0, '1', 0);
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
-- 注意:该页面对应的前台目录为views/database文件夹下
|
||||||
|
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||||
|
VALUES ('2025061604416880040', NULL, '试验评定结果', '/database/experimentReviewResultList', 'database/ExperimentReviewResultList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0);
|
||||||
|
|
||||||
|
-- 权限控制sql
|
||||||
|
-- 新增
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416880041', '2025061604416880040', '添加试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 编辑
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416880042', '2025061604416880040', '编辑试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416880043', '2025061604416880040', '删除试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 批量删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416880044', '2025061604416880040', '批量删除试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导出excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416880045', '2025061604416880040', '导出excel_试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导入excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604416890046', '2025061604416880040', '导入excel_试验评定结果', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_result:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:41:04', NULL, NULL, 0, 0, '1', 0);
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
-- 注意:该页面对应的前台目录为views/database文件夹下
|
||||||
|
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||||
|
VALUES ('2025061604401660460', NULL, '试验评定规则', '/database/experimentReviewRuleList', 'database/ExperimentReviewRuleList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0);
|
||||||
|
|
||||||
|
-- 权限控制sql
|
||||||
|
-- 新增
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660461', '2025061604401660460', '添加试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 编辑
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660462', '2025061604401660460', '编辑试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660463', '2025061604401660460', '删除试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 批量删除
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660464', '2025061604401660460', '批量删除试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导出excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660465', '2025061604401660460', '导出excel_试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
-- 导入excel
|
||||||
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
|
VALUES ('2025061604401660466', '2025061604401660460', '导入excel_试验评定规则', NULL, NULL, 0, NULL, NULL, 2, 'database:experiment_review_rule:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-06-16 16:40:46', NULL, NULL, 0, 0, '1', 0);
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<div style="min-height: 400px">
|
||||||
|
<BasicForm @register="registerForm"></BasicForm>
|
||||||
|
<div style="width: 100%;text-align: center" v-if="!formDisabled">
|
||||||
|
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {computed, defineComponent} from 'vue';
|
||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
import {getBpmFormSchema} from '../ExperimentReviewDetail.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewDetail.api';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "ExperimentReviewDetailForm",
|
||||||
|
components:{
|
||||||
|
BasicForm
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
formData: propTypes.object.def({}),
|
||||||
|
formBpm: propTypes.bool.def(true),
|
||||||
|
},
|
||||||
|
setup(props){
|
||||||
|
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
||||||
|
labelWidth: 150,
|
||||||
|
schemas: getBpmFormSchema(props.formData),
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
|
||||||
|
const formDisabled = computed(()=>{
|
||||||
|
if(props.formData.disabled === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
let formData = {};
|
||||||
|
const queryByIdUrl = '/database/experimentReviewDetail/queryById';
|
||||||
|
async function initFormData(){
|
||||||
|
let params = {id: props.formData.dataId};
|
||||||
|
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||||
|
formData = {...data}
|
||||||
|
//设置表单的值
|
||||||
|
await setFieldsValue(formData);
|
||||||
|
//默认是禁用
|
||||||
|
await setProps({disabled: formDisabled.value})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submitForm() {
|
||||||
|
let data = getFieldsValue();
|
||||||
|
let params = Object.assign({}, formData, data);
|
||||||
|
console.log('表单数据', params)
|
||||||
|
await saveOrUpdate(params, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
initFormData();
|
||||||
|
|
||||||
|
return {
|
||||||
|
registerForm,
|
||||||
|
formDisabled,
|
||||||
|
submitForm,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
|
||||||
|
<BasicForm @register="registerForm"/>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref, computed, unref} from 'vue';
|
||||||
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {formSchema} from '../ExperimentReviewDetail.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewDetail.api';
|
||||||
|
// Emits声明
|
||||||
|
const emit = defineEmits(['register','success']);
|
||||||
|
const isUpdate = ref(true);
|
||||||
|
const isDetail = ref(false);
|
||||||
|
//表单配置
|
||||||
|
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
|
||||||
|
//labelWidth: 150,
|
||||||
|
schemas: formSchema,
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
//表单赋值
|
||||||
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
//重置表单
|
||||||
|
await resetFields();
|
||||||
|
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
|
||||||
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
isDetail.value = !!data?.showFooter;
|
||||||
|
if (unref(isUpdate)) {
|
||||||
|
//表单赋值
|
||||||
|
await setFieldsValue({
|
||||||
|
...data.record,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 隐藏底部时禁用整个表单
|
||||||
|
setProps({ disabled: !data?.showFooter })
|
||||||
|
});
|
||||||
|
//设置标题
|
||||||
|
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||||
|
//表单提交事件
|
||||||
|
async function handleSubmit(v) {
|
||||||
|
try {
|
||||||
|
let values = await validate();
|
||||||
|
setModalProps({confirmLoading: true});
|
||||||
|
//提交表单
|
||||||
|
await saveOrUpdate(values, isUpdate.value);
|
||||||
|
//关闭弹窗
|
||||||
|
closeModal();
|
||||||
|
//刷新列表
|
||||||
|
emit('success');
|
||||||
|
} finally {
|
||||||
|
setModalProps({confirmLoading: false});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** 时间和数字输入框样式 */
|
||||||
|
:deep(.ant-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-calendar-picker) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<div style="min-height: 400px">
|
||||||
|
<BasicForm @register="registerForm"></BasicForm>
|
||||||
|
<div style="width: 100%;text-align: center" v-if="!formDisabled">
|
||||||
|
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {computed, defineComponent} from 'vue';
|
||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
import {getBpmFormSchema} from '../ExperimentReviewResult.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewResult.api';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "ExperimentReviewResultForm",
|
||||||
|
components:{
|
||||||
|
BasicForm
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
formData: propTypes.object.def({}),
|
||||||
|
formBpm: propTypes.bool.def(true),
|
||||||
|
},
|
||||||
|
setup(props){
|
||||||
|
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
||||||
|
labelWidth: 150,
|
||||||
|
schemas: getBpmFormSchema(props.formData),
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
|
||||||
|
const formDisabled = computed(()=>{
|
||||||
|
if(props.formData.disabled === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
let formData = {};
|
||||||
|
const queryByIdUrl = '/database/experimentReviewResult/queryById';
|
||||||
|
async function initFormData(){
|
||||||
|
let params = {id: props.formData.dataId};
|
||||||
|
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||||
|
formData = {...data}
|
||||||
|
//设置表单的值
|
||||||
|
await setFieldsValue(formData);
|
||||||
|
//默认是禁用
|
||||||
|
await setProps({disabled: formDisabled.value})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submitForm() {
|
||||||
|
let data = getFieldsValue();
|
||||||
|
let params = Object.assign({}, formData, data);
|
||||||
|
console.log('表单数据', params)
|
||||||
|
await saveOrUpdate(params, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
initFormData();
|
||||||
|
|
||||||
|
return {
|
||||||
|
registerForm,
|
||||||
|
formDisabled,
|
||||||
|
submitForm,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
|
||||||
|
<BasicForm @register="registerForm"/>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref, computed, unref} from 'vue';
|
||||||
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {formSchema} from '../ExperimentReviewResult.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewResult.api';
|
||||||
|
// Emits声明
|
||||||
|
const emit = defineEmits(['register','success']);
|
||||||
|
const isUpdate = ref(true);
|
||||||
|
const isDetail = ref(false);
|
||||||
|
//表单配置
|
||||||
|
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
|
||||||
|
//labelWidth: 150,
|
||||||
|
schemas: formSchema,
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
//表单赋值
|
||||||
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
//重置表单
|
||||||
|
await resetFields();
|
||||||
|
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
|
||||||
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
isDetail.value = !!data?.showFooter;
|
||||||
|
if (unref(isUpdate)) {
|
||||||
|
//表单赋值
|
||||||
|
await setFieldsValue({
|
||||||
|
...data.record,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 隐藏底部时禁用整个表单
|
||||||
|
setProps({ disabled: !data?.showFooter })
|
||||||
|
});
|
||||||
|
//设置标题
|
||||||
|
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||||
|
//表单提交事件
|
||||||
|
async function handleSubmit(v) {
|
||||||
|
try {
|
||||||
|
let values = await validate();
|
||||||
|
setModalProps({confirmLoading: true});
|
||||||
|
//提交表单
|
||||||
|
await saveOrUpdate(values, isUpdate.value);
|
||||||
|
//关闭弹窗
|
||||||
|
closeModal();
|
||||||
|
//刷新列表
|
||||||
|
emit('success');
|
||||||
|
} finally {
|
||||||
|
setModalProps({confirmLoading: false});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** 时间和数字输入框样式 */
|
||||||
|
:deep(.ant-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-calendar-picker) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<div style="min-height: 400px">
|
||||||
|
<BasicForm @register="registerForm"></BasicForm>
|
||||||
|
<div style="width: 100%;text-align: center" v-if="!formDisabled">
|
||||||
|
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {computed, defineComponent} from 'vue';
|
||||||
|
import {defHttp} from '/@/utils/http/axios';
|
||||||
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
import {getBpmFormSchema} from '../ExperimentReviewRule.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewRule.api';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "ExperimentReviewRuleForm",
|
||||||
|
components:{
|
||||||
|
BasicForm
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
formData: propTypes.object.def({}),
|
||||||
|
formBpm: propTypes.bool.def(true),
|
||||||
|
},
|
||||||
|
setup(props){
|
||||||
|
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
||||||
|
labelWidth: 150,
|
||||||
|
schemas: getBpmFormSchema(props.formData),
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
|
||||||
|
const formDisabled = computed(()=>{
|
||||||
|
if(props.formData.disabled === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
let formData = {};
|
||||||
|
const queryByIdUrl = '/database/experimentReviewRule/queryById';
|
||||||
|
async function initFormData(){
|
||||||
|
let params = {id: props.formData.dataId};
|
||||||
|
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||||
|
formData = {...data}
|
||||||
|
//设置表单的值
|
||||||
|
await setFieldsValue(formData);
|
||||||
|
//默认是禁用
|
||||||
|
await setProps({disabled: formDisabled.value})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submitForm() {
|
||||||
|
let data = getFieldsValue();
|
||||||
|
let params = Object.assign({}, formData, data);
|
||||||
|
console.log('表单数据', params)
|
||||||
|
await saveOrUpdate(params, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
initFormData();
|
||||||
|
|
||||||
|
return {
|
||||||
|
registerForm,
|
||||||
|
formDisabled,
|
||||||
|
submitForm,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
|
||||||
|
<BasicForm @register="registerForm"/>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref, computed, unref} from 'vue';
|
||||||
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
|
import {formSchema} from '../ExperimentReviewRule.data';
|
||||||
|
import {saveOrUpdate} from '../ExperimentReviewRule.api';
|
||||||
|
// Emits声明
|
||||||
|
const emit = defineEmits(['register','success']);
|
||||||
|
const isUpdate = ref(true);
|
||||||
|
const isDetail = ref(false);
|
||||||
|
//表单配置
|
||||||
|
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
|
||||||
|
//labelWidth: 150,
|
||||||
|
schemas: formSchema,
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
baseColProps: {span: 24}
|
||||||
|
});
|
||||||
|
//表单赋值
|
||||||
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
//重置表单
|
||||||
|
await resetFields();
|
||||||
|
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
|
||||||
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
isDetail.value = !!data?.showFooter;
|
||||||
|
if (unref(isUpdate)) {
|
||||||
|
//表单赋值
|
||||||
|
await setFieldsValue({
|
||||||
|
...data.record,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 隐藏底部时禁用整个表单
|
||||||
|
setProps({ disabled: !data?.showFooter })
|
||||||
|
});
|
||||||
|
//设置标题
|
||||||
|
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||||
|
//表单提交事件
|
||||||
|
async function handleSubmit(v) {
|
||||||
|
try {
|
||||||
|
let values = await validate();
|
||||||
|
setModalProps({confirmLoading: true});
|
||||||
|
//提交表单
|
||||||
|
await saveOrUpdate(values, isUpdate.value);
|
||||||
|
//关闭弹窗
|
||||||
|
closeModal();
|
||||||
|
//刷新列表
|
||||||
|
emit('success');
|
||||||
|
} finally {
|
||||||
|
setModalProps({confirmLoading: false});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** 时间和数字输入框样式 */
|
||||||
|
:deep(.ant-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-calendar-picker) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user